/* ============================================
   MI ASY-SYAUQI Website - Modern Responsive CSS
   ============================================ */

:root {
    --primary-color: #0b5486;
    --primary-dark: #083d5f;
    --primary-light: #1a7ab8;
    --accent-color: #f39c12;
    --accent-dark: #d68910;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    max-width: 1750px; /* Diperlebar maksimal untuk desktop agar Full Width */
    width: 96%; /* Menggunakan lebar 96% layar */
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   TOP BAR
   ============================================ */

.top-bar {
    background-color: #0a2f02;
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #fff;
    font-size: 16px;
    transition: var(--transition);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    background-image: url('../img/header1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-white); /* Fallback color */
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: relative;
}

/* Membuat logo MI ASY-SYAUQI lebih cerah, terang, dan jelas */
.mi-asy-syauqi-logo {
    color: #fff !important;
    text-shadow:
        0 4px 24px #ffffff00,
        0 1px 0 #06411a,
        0 0 38px #024001,
        0 0 12px #1eca7a,
        0 2px 20px #0e2223;
    filter: brightness(1.4) drop-shadow(0 2px 2px #01490200);
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #ffffff 0%, #013e16 35%, #42f4a1 70%, #09e185 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Optional: fallback jika gradient-clip gagal */
    /* fallback text fill color (safari compatible) */
    /* font-size tetap diatur dari markup/inline style */
}

/* Untuk visibilitas tambahan di layer overlay */
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,64,16,0.07); /* Lebih tipis, agar background tidak menutupi teks */
    z-index: 0;
}
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3); /* Overlay putih lebih transparan agar background terlihat */
    z-index: 0;
}

.site-header .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .site-header {
        top: 0; /* No top-bar on mobile */
    }
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    right: 0;
}

.header-search {
    display: none; /* Hidden on mobile, shown on desktop */
}

@media (min-width: 992px) {
    .header-search {
        display: block;
    }
}

.search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 5px 15px;
    min-width: 250px;
}

.search-form input {
    border: none;
    background: transparent;
    padding: 8px 10px;
    font-size: 14px;
    flex: 1;
    outline: none;
}

.search-form button {
    border: none;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
}

.logo {
    text-align: center;
}

.logo a {
    text-decoration: none;
    color: var(--primary-color);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8); /* Shadow untuk kontras */
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8); /* Shadow untuk kontras */
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background-color: #0a2f02;
    padding: 0;
}

.navbar-menu {
    list-style: none;
    display: flex;
    justify-content: center; /* Memosisikan menu navigasi di tengah */
    margin: 0;
    padding: 0;
}

.navbar-menu > li {
    position: relative;
}

.navbar-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.navbar-menu > li > a:hover,
.navbar-menu > li > a.active {
    background-color: #0d4a05;
    color: #fff;
}

.navbar-menu > li > a i {
    font-size: 12px;
    margin-left: 5px;
}

/* Dropdown Menu */
.has-dropdown .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001; /* Above navbar */
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    margin: 0;
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 25px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    min-height: calc(100vh - 400px);
    padding: 3px 0;
}

/* ============================================
   HERO / BANNER SLIDER
   ============================================ */

.hero {
    margin-bottom: 40px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    height: 450px;
}

.hero-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-item.active {
    opacity: 1;
    z-index: 1;
}

.hero-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 40px 30px 30px;
    color: #fff;
}

.hero-caption h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active {
    background-color: #fff;
    width: 30px;
    border-radius: 6px;
}

/* ============================================
   HERO CAROUSEL (Horizontal Carousel)
   ============================================ */

.hero-carousel-section {
    padding: 20px 0;
    overflow: hidden;
    position: relative;
    background: transparent;
}

.hero-carousel-wrapper {
    position: relative;
    padding: 0 40px; /* Space for arrows */
}

.hero-carousel-container {
    overflow: hidden;
}

.hero-carousel-track {
    display: flex;
    gap: 8px; /* Standard gap from image */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.hero-carousel-item {
    flex: 0 0 calc((100% - (7 * 8px)) / 8); /* Default to 8 items on large desk */
    min-width: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.hero-carousel-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-carousel-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Top Logos Section */
.hero-carousel-top-logos {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
    pointer-events: none;
}

.hero-carousel-image-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 177.78%; /* 9:16 Aspect Ratio */
    overflow: hidden;
    border-radius: 4px;
    background: #222;
}

.hero-carousel-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 10px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 2;
}

.hero-carousel-item-title {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Fallback untuk browser modern */
@supports (aspect-ratio: 9 / 16) {
    .hero-carousel-image-wrapper {
        height: auto;
        padding-bottom: 0;
        aspect-ratio: 9 / 16;
    }
}

.hero-carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-carousel-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1; /* Always visible like in image */
    transition: all 0.2s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.hero-carousel-play-overlay i {
    font-size: 14px;
    margin-left: 2px;
}

/* Nav Arrows */
.hero-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.hero-carousel-nav:hover {
    background: var(--primary-color);
    color: #fff;
}

.hero-carousel-nav.prev { left: -5px; }
.hero-carousel-nav.next { right: -5px; }

@media (min-width: 1400px) {
    .hero-carousel-nav.prev { left: -20px; }
    .hero-carousel-nav.next { right: -20px; }
}



/* Dots Indicator */
.hero-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 0;
}

.hero-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.hero-carousel-dot.active {
    width: 24px;
    height: 8px;
    border-radius: 4px;
    background: #2d5016;
}

.hero-carousel-dot:hover {
    background: #999;
}

.hero-carousel-dot.active:hover {
    background: #2d5016;
}

/* Hero Carousel Lightbox Styles */
.hero-carousel-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.hero-carousel-lightbox.active {
    opacity: 1;
}

.hero-carousel-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.hero-carousel-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.hero-carousel-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.hero-carousel-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .hero-carousel-lightbox-content {
        max-width: 95%;
    }
    
    .hero-carousel-lightbox-close {
        top: -50px;
        right: 10px;
    }
}

/* Responsive Design untuk Hero Carousel */
/* Responsive Breakpoints matching current items count */
@media (max-width: 1400px) {
    .hero-carousel-item {
        flex: 0 0 calc((100% - (6 * 8px)) / 7);
    }
}

@media (max-width: 1200px) {
    .hero-carousel-item {
        flex: 0 0 calc((100% - (5 * 8px)) / 6);
    }
}

@media (max-width: 992px) {
    .hero-carousel-item {
        flex: 0 0 calc((100% - (4 * 8px)) / 5);
    }
}

@media (max-width: 768px) {
    .hero-carousel-item {
        flex: 0 0 calc((100% - (3 * 8px)) / 4);
    }
}

@media (max-width: 576px) {
    .hero-carousel-item {
        flex: 0 0 calc((100% - (2 * 8px)) / 3);
    }
    .hero-carousel-nav {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .hero-carousel-section {
        padding: 10px 0;
    }
    
    .hero-carousel-wrapper {
        padding: 0;
        gap: 0;
    }
    
    .hero-carousel-item {
        flex: 0 0 calc((100% - (1 * 20px)) / 2);
    }
    
    /* Aspect ratio 9:16 tetap dipertahankan */
    .hero-carousel-image-wrapper {
        height: 0;
        padding-bottom: 177.78%;
    }
    
    @supports (aspect-ratio: 9 / 16) {
        .hero-carousel-image-wrapper {
            height: auto;
            padding-bottom: 0;
            aspect-ratio: 9 / 16;
        }
    }
    
    .hero-carousel-play-overlay {
        width: 45px;
        height: 45px;
    }
    
    .hero-carousel-play-overlay i {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .hero-carousel-wrapper {
        padding: 0;
    }
    
    .hero-carousel-item {
        flex: 0 0 calc((100% - (1 * 12px)) / 2);
    }
    
    /* Aspect ratio 9:16 tetap dipertahankan */
    .hero-carousel-image-wrapper {
        height: 0;
        padding-bottom: 177.78%;
    }
    
    @supports (aspect-ratio: 9 / 16) {
        .hero-carousel-image-wrapper {
            height: auto;
            padding-bottom: 0;
            aspect-ratio: 9 / 16;
        }
    }
    
    .hero-carousel-track {
        gap: 12px;
    }
}

/* ============================================
   SECTIONS
   ============================================ */

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
}

/* ============================================
   HEADLINE NEWS (Replacing Services)
   ============================================ */

.headline-news {
    padding: 30px 0 50px;
    background: #fff;
}

.headline-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr; /* Lebih melebar ke kiri untuk konten utama */
    gap: 40px;
}

.headline-main-card {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.headline-main-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    z-index: 1;
}

.headline-main-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.headline-main-card:hover img {
    transform: scale(1.03);
}

.headline-main-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    background: transparent;
    padding: 40px;
    width: 100%;
    z-index: 2;
}

.headline-tag {
    color: #4CAF50;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.headline-title {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 15px 0;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'Outfit', 'Inter', sans-serif;
}

.headline-date {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 500;
}

/* Side Column */
.headline-side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.headline-side-item {
    display: flex;
    gap: 20px;
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.headline-side-item:first-child {
    padding-top: 0;
}

.headline-side-item:last-child {
    border-bottom: none;
}

.headline-side-item .headline-side-content {
    flex: 1;
}

.headline-tag-small {
    color: #4CAF50;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.headline-title-small {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.headline-side-item:hover .headline-title-small {
    color: #2d5016;
}

.headline-date-small {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.headline-side-img {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.headline-side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 992px) {
    .headline-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .headline-main-card {
        height: 350px;
    }
    
    .headline-main-overlay {
        padding: 20px;
    }
    
    .headline-title {
        font-size: 24px;
    }
    
    .headline-side-img {
        width: 100px;
        height: 70px;
    }
}



/* ============================================
   NEWS / ARTIKEL
   ============================================ */

.news {
    margin: 50px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.news-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-item .thumb {
    display: block;
    overflow: hidden;
    height: 200px;
}

.news-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.card-body {
    padding: 20px;
}

.card-body h4 {
    margin-bottom: 10px;
}

.card-body h4 a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: var(--transition);
    display: block;
}

.card-body h4 a:hover {
    color: var(--primary-color);
}

.card-body .meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.card-body .excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--accent-color);
}

/* ============================================
   ANNOUNCEMENTS / PENGUMUMAN
   ============================================ */

.announcements {
    margin: 50px 0;
}

.announcement-item {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.announcement-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.announcement-item.important {
    border-left-color: var(--danger-color);
    background-color: #fff5f5;
}

.announcement-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.announcement-item .meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* ============================================
   AGENDA
   ============================================ */

.agenda {
    margin: 50px 0;
}

.agenda-item {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    transition: var(--transition);
}

.agenda-item:hover {
    box-shadow: var(--shadow-lg);
}

.agenda-date {
    min-width: 80px;
    text-align: center;
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
}

.agenda-date .day {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.agenda-date .month {
    font-size: 14px;
    text-transform: uppercase;
}

.agenda-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.agenda-content .location {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 5px;
}

/* ============================================
   GALLERY
   ============================================ */

.gallery {
    margin: 50px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 15px;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

/* ============================================
   CONTACT FORM
   ============================================ */

.contact-form {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 100%;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 84, 134, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-accent {
    background-color: var(--accent-color);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-link {
    padding: 10px 15px;
    background-color: var(--bg-white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-weight: 500;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-dots {
    padding: 10px 5px;
    color: var(--text-light);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background-color: #0a2f02;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact i {
    color: var(--accent-color);
    margin-top: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom i {
    color: var(--danger-color);
}

/* ============================================
   ADMIN STYLES
   ============================================ */

.admin-panel {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 30px auto;
    max-width: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: var(--bg-light);
}

.admin-table img {
    max-width: 100px;
    height: auto;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.login-form {
    max-width: 400px;
    margin: 100px auto;
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.login-form h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 11px;
    padding: 5px 10px;
    transition: var(--transition);
    flex: 1;
    min-width: 0;
}

.mobile-bottom-nav .nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    display: block;
}

.mobile-bottom-nav .nav-item span {
    font-size: 11px;
    white-space: nowrap;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-item.active i {
    color: var(--primary-color);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80%;
    max-width: 320px;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: var(--transition);
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: #fff;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 20px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-list > li > a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.mobile-menu-list > li > a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.mobile-menu-list > li > a .fa-chevron-right {
    margin-left: auto;
    margin-right: 0;
    font-size: 12px;
    color: #999;
}

.mobile-menu-list > li > a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.mobile-menu-list .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    display: none;
}

.mobile-menu-list .has-submenu.active .submenu {
    display: block;
}

.mobile-menu-list .submenu li a {
    padding-left: 55px;
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Max-width: 1200px */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .hero-slider {
        height: 400px;
    }
}

/* Max-width: 992px */
@media (max-width: 992px) {
    .service-grid {
        gap: 12px;
    }
    .service-item {
        min-width: 110px;
        max-width: 130px;
        padding: 18px 12px;
    }
    .service-icon-circle i {
        font-size: 28px;
    }
    .service-item h3 {
        font-size: 12px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-caption h2 {
        font-size: 24px;
    }
    
    .header-search {
        display: block;
    }
}

/* Max-width: 768px - MOBILE ONLY */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .navbar {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        z-index: 1000;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    .navbar.active {
        display: block;
    }
    
    .navbar-menu {
        flex-direction: column;
    }
    
    .navbar-menu > li {
        width: 100%;
    }
    
    .navbar-menu > li > a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .has-dropdown .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: #0d4a05;
        margin-left: 20px;
    }
    
    .dropdown a {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .top-bar {
        display: none; /* Hide top bar on mobile */
    }
    
    
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .contact-info {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .header-search {
        display: none; /* Hide search on mobile, show hamburger only */
    }
    
    .logo p {
        display: none; /* Hide subtitle on mobile */
    }
    
    .header-content {
        gap: 10px;
        justify-content: center;
    }
    
    .header-right {
        position: absolute;
        right: 0;
    }
    
    .service-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        justify-content: center;
        overflow-x: visible;
        padding-bottom: 0;
    }
    .service-item {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        padding: 15px 8px;
        flex-shrink: 1;
    }
    .service-icon-circle i {
        font-size: 24px;
    }
    .service-item h3 {
        font-size: 11px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .hero-caption {
        padding: 20px 15px 15px;
    }
    
    .hero-caption h2 {
        font-size: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .agenda-item {
        flex-direction: column;
    }
    
    .agenda-date {
        align-self: flex-start;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    .site-footer {
        padding-bottom: 80px; /* Space for bottom nav */
    }
    
    .main-content {
        padding-bottom: 70px;
    }
}

/* Max-width: 576px */
@media (max-width: 576px) {
    .logo h1 {
        font-size: 24px;
    }
    
    .logo p {
        font-size: 12px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .hero-caption h2 {
        font-size: 18px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .service-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .service-item {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        padding: 12px 6px;
    }
    
    .service-icon-circle i {
        font-size: 20px;
    }
    
    .service-item h3 {
        font-size: 10px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .admin-panel {
        padding: 20px;
    }
    
    .admin-table {
        font-size: 14px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.hidden {
    display: none;
}

/* ============================================
   FRONT-END SIDEBAR
   ============================================ */

.page-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px; /* Force main content to respect bounds */
    gap: 30px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    align-items: start; /* Sidebar doesn't stretch long if content is short */
}

.page-main-content {
    min-width: 0; /* Important for preventing grid blowout from long text/tables */
    width: 100%;
}

.front-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Sidebar Widget */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.sidebar-widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e6b3b;
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8f5e9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget-title i {
    font-size: 15px;
    color: #27ae60;
}

/* Search */
.sidebar-search-wrap {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-search-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
}

.sidebar-search-btn {
    padding: 10px 14px;
    background: #1e6b3b;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.sidebar-search-btn:hover {
    background: #155a30;
}

/* Popular */
.sidebar-popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-popular-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sidebar-rank {
    flex: 0 0 28px;
    height: 28px;
    background: #1e6b3b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}

.sidebar-popular-info {
    flex: 1;
    min-width: 0;
}

.sidebar-popular-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #27ae60;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sidebar-popular-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.sidebar-popular-title:hover { color: #1e6b3b; }

.sidebar-popular-date {
    font-size: 11px;
    color: #aaa;
}

/* Categories */
.sidebar-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    background: #f9f9f9;
}

.sidebar-category-link:hover {
    background: #e8f5e9;
    color: #1e6b3b;
}

.sidebar-category-link i {
    font-size: 10px;
    color: #27ae60;
}

.sidebar-category-count {
    margin-left: auto;
    background: #1e6b3b;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Recent */
.sidebar-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-recent-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sidebar-recent-thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.sidebar-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.sidebar-recent-item:hover .sidebar-recent-thumb img {
    transform: scale(1.06);
}

.sidebar-recent-info {
    flex: 1;
    min-width: 0;
}

.sidebar-recent-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.sidebar-recent-title:hover { color: #1e6b3b; }

.sidebar-recent-date {
    font-size: 11px;
    color: #aaa;
}

/* Quick Links */
.sidebar-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-links-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    background: #f9f9f9;
}

.sidebar-links-list a:hover {
    background: #1e6b3b;
    color: #fff;
}

.sidebar-links-list a i {
    font-size: 13px;
    color: #27ae60;
    width: 16px;
    transition: color 0.2s;
}

.sidebar-links-list a:hover i { color: #fff; }

.sidebar-empty {
    font-size: 13px;
    color: #aaa;
    text-align: center;
    padding: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .page-with-sidebar {
        grid-template-columns: 1fr;
    }
    .front-sidebar {
        order: 2;
    }
}
