/**
 * ชมรมวิทยุจิตอาสาร่วมใจแห่งประเทศไทย (RVCT)
 * Ruamjai Volunteer Radio Club of Thailand (AR & CB)
 * Main Stylesheet - Green Volunteer Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
    --rvct-primary: #15803d;        /* Green 700 */
    --rvct-primary-dark: #14532d;   /* Green 900 */
    --rvct-primary-light: #22c55e;  /* Green 500 */
    --rvct-accent: #eab308;         /* Gold/Amber */
    --rvct-bg-light: #f0fdf4;       /* Light Green tint */
    --rvct-surface: #ffffff;
    --rvct-text-dark: #1e293b;
    --rvct-text-muted: #64748b;
    --rvct-border: #e2e8f0;
    --rvct-shadow: 0 4px 15px rgba(20, 83, 45, 0.08);
    --rvct-shadow-hover: 0 10px 25px rgba(20, 83, 45, 0.16);
    --font-heading: 'Prompt', sans-serif;
    --font-body: 'Sarabun', 'Prompt', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--rvct-text-dark);
    background-color: #f8fafc;
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .btn, .nav-link, .badge {
    font-family: var(--font-heading);
}

/* ========================================================
   Mourning Ribbon (ริบบิ้นไว้อาลัย มุมขวาบน)
   ======================================================== */
.mourning-ribbon {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    pointer-events: none !important;
    width: 95px !important;
    height: 95px !important;
    background: transparent !important;
    border: none !important;
    transform: none !important;
    padding: 0 !important;
    clip-path: none !important;
    box-shadow: none !important;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.25));
    transition: opacity 0.3s ease;
}

.mourning-ribbon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: transparent !important;
    border: none !important;
    clip-path: none !important;
}

@media (max-width: 576px) {
    .mourning-ribbon {
        width: 75px !important;
        height: 75px !important;
    }
}

/* ========================================================
   Header & Navbar
   ======================================================== */
.top-header-bar {
    background: linear-gradient(135deg, var(--rvct-primary-dark) 0%, #0f391f 100%);
    color: #e2e8f0;
    font-size: 0.88rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-header-bar a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-header-bar a:hover {
    color: #ffffff;
}

.navbar-rvct {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.navbar-brand-logo {
    height: 54px !important;
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--rvct-primary-light);
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.25);
    transition: transform 0.3s ease;
    display: inline-block;
}

.navbar-brand:hover .navbar-brand-logo {
    transform: rotate(5deg) scale(1.05);
}

.navbar-brand-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--rvct-primary-dark);
    line-height: 1.25;
}

.navbar-brand-subtitle {
    font-size: 0.78rem;
    color: var(--rvct-primary);
    font-weight: 500;
}

.nav-link {
    font-weight: 500;
    color: #334155 !important;
    padding: 0.5rem 0.95rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--rvct-primary-dark) !important;
    background-color: var(--rvct-bg-light);
}

.nav-link.active {
    font-weight: 600;
    color: var(--rvct-primary) !important;
}

.lang-btn {
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 4px 12px;
}

/* ========================================================
   Hero Section & Banners
   ======================================================== */
.hero-section {
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.94) 0%, rgba(22, 101, 52, 0.88) 100%), url('../images/rvct_logo.jpg') center/cover no-repeat;
    color: #ffffff;
    padding: 4.5rem 0 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, #f8fafc, transparent);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 780px;
    margin: 1.25rem auto 2rem auto;
}

.hero-logo-large {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ========================================================
   Frequency Banner / Quick Stats
   ======================================================== */
.frequency-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    border-left: 5px solid var(--rvct-primary);
    box-shadow: var(--rvct-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.frequency-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rvct-shadow-hover);
}

.stat-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--rvct-shadow);
    border-bottom: 3px solid var(--rvct-primary-light);
    height: 100%;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--rvct-primary-dark);
}

/* ========================================================
   Cards & Section Styling
   ======================================================== */
.section-title {
    position: relative;
    font-weight: 700;
    color: var(--rvct-primary-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--rvct-text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.rvct-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--rvct-border);
    box-shadow: var(--rvct-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.rvct-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--rvct-shadow-hover);
    border-color: rgba(34, 197, 94, 0.4);
}

.card-img-wrapper {
    position: relative;
    height: 210px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.rvct-card:hover .card-img-wrapper img {
    transform: scale(1.06);
}

.card-badge-date {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(20, 83, 45, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
}

.btn-rvct-primary {
    background: linear-gradient(135deg, var(--rvct-primary) 0%, var(--rvct-primary-dark) 100%);
    color: #ffffff;
    border: none;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-rvct-primary:hover {
    background: linear-gradient(135deg, var(--rvct-primary-light) 0%, var(--rvct-primary) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
    transform: translateY(-1px);
}

.btn-rvct-outline {
    border: 2px solid var(--rvct-primary);
    color: var(--rvct-primary);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1.3rem;
    background: transparent;
    transition: all 0.25s ease;
}

.btn-rvct-outline:hover {
    background: var(--rvct-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
}

/* ========================================================
   Announcements & Pinned items
   ======================================================== */
.announcement-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--rvct-border);
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.announcement-item:hover {
    border-color: var(--rvct-primary-light);
    transform: translateX(4px);
    box-shadow: var(--rvct-shadow);
}

.announcement-item.pinned {
    border-left: 5px solid var(--rvct-accent);
    background: #fffdf5;
}

/* ========================================================
   Committee Member Card
   ======================================================== */
.committee-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    box-shadow: var(--rvct-shadow);
    border: 1px solid var(--rvct-border);
    transition: all 0.3s ease;
    height: 100%;
}

.committee-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--rvct-shadow-hover);
    border-color: var(--rvct-primary-light);
}

.committee-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.25rem auto;
    border: 4px solid var(--rvct-bg-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.committee-callsign {
    display: inline-block;
    background: var(--rvct-bg-light);
    color: var(--rvct-primary-dark);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: 0.4rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ========================================================
   Photo Gallery & Unlimited Images Lightbox
   ======================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 1.5rem;
}

.gallery-thumb {
    position: relative;
    height: 170px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 83, 45, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    color: #ffffff;
    font-size: 1.5rem;
    transition: opacity 0.25s ease;
}

.gallery-thumb:hover .gallery-overlay {
    opacity: 1;
}

/* ========================================================
   Downloadable Document List
   ======================================================== */
.doc-download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--rvct-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.doc-download-item:hover {
    border-color: var(--rvct-primary);
    background: var(--rvct-bg-light);
}

.doc-icon {
    font-size: 2rem;
    color: var(--rvct-primary);
    margin-right: 1rem;
}

/* ========================================================
   Footer
   ======================================================== */
.footer-rvct {
    background: linear-gradient(135deg, #0f391f 0%, #092012 100%);
    color: #94a3b8;
    padding: 4rem 0 1.5rem 0;
    margin-top: 5rem;
}

.footer-rvct h5 {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-rvct a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-rvct a:hover {
    color: var(--rvct-primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    margin-top: 3rem;
    font-size: 0.88rem;
}

/* ========================================================
   Admin Panel Layout
   ======================================================== */
.admin-sidebar {
    min-height: 100vh;
    background: #0f391f;
    color: #e2e8f0;
    padding: 1.5rem 1rem;
}

.admin-sidebar .nav-link {
    color: #cbd5e1 !important;
    padding: 0.65rem 1rem !important;
    margin-bottom: 0.35rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    background: rgba(34, 197, 94, 0.2);
    color: #ffffff !important;
}

.admin-sidebar .nav-link.active {
    background: var(--rvct-primary);
    font-weight: 600;
}

.admin-content {
    background: #f1f5f9;
    min-height: 100vh;
    padding: 2rem;
}

.admin-stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
