/* ============================================
   NACG Portal - Main Stylesheet
   Brand Colors: Green (#1B5E20), Yellow (#FFD600), White
   ============================================ */

:root {
    --nacg-green: #1B5E20;
    --nacg-green-dark: #0D3B0F;
    --nacg-green-light: #2E7D32;
    --nacg-yellow: #FFD600;
    --nacg-yellow-dark: #F9A825;
    --nacg-white: #FFFFFF;
    --nacg-gray: #F5F5F5;
    --sidebar-width: 260px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === BRAND COLORS === */
.bg-nacg { background-color: var(--nacg-green) !important; }
.bg-nacg-dark { background-color: var(--nacg-green-dark) !important; }
.bg-nacg-light { background-color: var(--nacg-green-light) !important; }
.bg-nacg-yellow { background-color: var(--nacg-yellow) !important; }
.text-nacg { color: var(--nacg-green) !important; }
.text-nacg-yellow { color: var(--nacg-yellow) !important; }
.border-nacg { border-color: var(--nacg-green) !important; }
.btn-nacg {
    background-color: var(--nacg-green);
    color: white;
    border: none;
}
.btn-nacg:hover {
    background-color: var(--nacg-green-dark);
    color: white;
}
.btn-nacg-outline {
    border: 2px solid var(--nacg-green);
    color: var(--nacg-green);
    background: transparent;
}
.btn-nacg-outline:hover {
    background-color: var(--nacg-green);
    color: white;
}
.btn-nacg-yellow {
    background-color: var(--nacg-yellow);
    color: #333;
    border: none;
    font-weight: 600;
}
.btn-nacg-yellow:hover {
    background-color: var(--nacg-yellow-dark);
    color: #333;
}

/* === NAVBAR === */
.navbar-dark.bg-nacg .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    transition: color 0.2s;
}
.navbar-dark.bg-nacg .navbar-nav .nav-link:hover,
.navbar-dark.bg-nacg .navbar-nav .nav-link.active {
    color: var(--nacg-yellow);
}
.brand-name {
    font-size: 0.95rem;
    line-height: 1.2;
}
.brand-slogan {
    font-size: 0.7rem;
    color: var(--nacg-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === HERO === */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55));
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    display: none;
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}
.hero-slogan {
    font-size: 1.2rem;
    color: var(--nacg-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    font-weight: 600;
}
}

/* === SECTION STYLES === */
.section-title {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--nacg-green-dark);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--nacg-yellow);
}
.section-title-left::after {
    left: 0;
    transform: none;
}

/* === CARDS === */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--nacg-green-dark);
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: #666;
}

/* === NEWS / EVENT CARDS === */
.news-card, .event-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.news-card:hover, .event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.news-card-img, .event-card-img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    background: #f5f5f5;
}
.news-card-body, .event-card-body {
    padding: 20px;
}

/* === CTA SECTION === */
.cta-section {
    background: linear-gradient(135deg, var(--nacg-yellow), var(--nacg-yellow-dark));
    padding: 50px 0;
}
.cta-section h3 {
    color: var(--nacg-green-dark);
    font-weight: 700;
}

/* === PAGE HEADER === */
.page-header {
    background: linear-gradient(135deg, var(--nacg-green-dark), var(--nacg-green));
    color: white;
    padding: 50px 0;
    text-align: center;
}
.page-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.page-header .breadcrumb {
    justify-content: center;
    background: transparent;
    margin: 0;
}
.page-header .breadcrumb a {
    color: var(--nacg-yellow);
    text-decoration: none;
}
.page-header .breadcrumb .active {
    color: rgba(255,255,255,0.7);
}

/* === DASHBOARD LAYOUT === */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}
.dashboard-sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s;
}
.dashboard-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.dashboard-header {
    background: white;
    padding: 12px 24px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 90;
}
.dashboard-content {
    padding: 24px;
    flex: 1;
}

/* === SIDEBAR === */
.sidebar-nav .sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.sidebar-nav .sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}
.sidebar-nav .sidebar-link.active {
    background: var(--nacg-green-light);
    color: white;
    font-weight: 600;
}
.sidebar-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
    padding: 16px 14px 6px;
    font-weight: 600;
}

/* === TABLES === */
.table-nacg {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.table-nacg thead {
    background: var(--nacg-green);
    color: white;
}
.table-nacg thead th {
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    padding: 12px 16px;
}
.table-nacg tbody td {
    padding: 12px 16px;
    vertical-align: middle;
}
.table-nacg tbody tr:hover {
    background: #f8f9fa;
}

/* === STATUS BADGES === */
.badge-active { background: #4CAF50; }
.badge-pending { background: #FF9800; }
.badge-inactive { background: #9E9E9E; }
.badge-suspended { background: #F44336; }
.badge-approved { background: #4CAF50; }
.badge-rejected { background: #F44336; }
.badge-draft { background: #9E9E9E; }
.badge-published { background: #4CAF50; }
.badge-overdue { background: #F44336; }

/* === FORMS === */
.form-nacg .form-control:focus, .form-nacg .form-select:focus {
    border-color: var(--nacg-green-light);
    box-shadow: 0 0 0 0.2rem rgba(27,94,32,0.15);
}
.form-nacg .form-label {
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

/* === GALLERY === */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    height: 260px;
}
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.gallery-card:hover .gallery-img {
    transform: scale(1.08);
}
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 40px 16px 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}
.gallery-card:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}
.gallery-overlay h6 {
    font-weight: 700;
    font-size: 0.95rem;
}
.gallery-overlay p {
    opacity: 0.85;
}

/* === GALLERY FILTER === */
.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 0 8px;
}
@media (max-width: 576px) {
    .gallery-filter {
        gap: 10px;
    }
    .gallery-filter .filter-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        width: calc(50% - 6px);
        text-align: center;
    }
}
.gallery-filter .filter-btn {
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.85rem;
    transition: all 0.3s;
    white-space: nowrap;
}
.gallery-filter .btn-outline-nacg {
    border: 1px solid var(--nacg-green);
    color: var(--nacg-green);
    background: transparent;
}
.gallery-filter .btn-outline-nacg:hover {
    background: var(--nacg-green);
    color: white;
}

/* === LIGHTBOX === */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox-modal .lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}
.lightbox-modal .lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}
.lightbox-caption {
    color: #fff;
    padding: 12px 20px 0;
    font-size: 0.95rem;
    text-align: center;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 1;
    line-height: 1;
}
.lightbox-close:hover { color: var(--nacg-yellow); }
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    z-index: 1;
    padding: 10px 15px;
    user-select: none;
    transition: color 0.2s;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { color: var(--nacg-yellow); }
@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next { font-size: 36px; padding: 8px 10px; }
    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }
    .lightbox-close { top: 10px; right: 15px; font-size: 30px; }
}

/* === FOOTER === */
footer a:hover {
    color: var(--nacg-yellow) !important;
}

/* === RESPONSIVE === */
@media (max-width: 767.98px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
    }
    .dashboard-sidebar.show {
        transform: translateX(0);
    }
    .dashboard-main {
        margin-left: 0;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .stat-card .stat-value {
        font-size: 1.4rem;
    }
}

/* === PRINT === */
@media print {
    .dashboard-sidebar, .dashboard-header, .sidebar-toggle,
    .no-print, nav, footer, .btn, form {
        display: none !important;
    }
    .dashboard-main {
        margin-left: 0 !important;
    }
    .dashboard-content {
        padding: 0 !important;
    }
}

/* === MISC === */
.avatar-sm { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; }
.avatar-md { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; }
.avatar-lg { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; }
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #999;
}
.empty-state i { font-size: 3rem; display: block; margin-bottom: 15px; }
.required::after { content: ' *'; color: #F44336; }
