/* ====================================================================
   WEBSITE SEKOLAH MAN ENDE (STYLESHEET)
   ==================================================================== */

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

/* CSS Variables for Themes */
:root {
    /* Color Palette - Light Mode */
    --primary-color: #0b6623; /* Madrasah Green */
    --primary-light: #128031;
    --secondary-color: #ff8600; /* Vibrant Orange */
    --secondary-hover: #e07200;
    --dark-bg: #090f0c;
    
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --nav-bg: #0b6623;
    --nav-text: #ffffff;
    --nav-hover: #ff8600;
    
    --transition-speed: 0.3s;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: rgba(0, 0, 0, 0.05);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-color: #0d1310;
    --card-bg: #151e1a;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #24332c;
    
    --nav-bg: #0b6623;
    --nav-text: #ffffff;
    
    --glass-bg: rgba(21, 30, 26, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: rgba(0, 0, 0, 0.3);
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
}

.section-bg-white {
    background-color: var(--card-bg);
}

.heading-block {
    text-align: center;
    margin-bottom: 50px;
}

.heading-block h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    color: var(--text-color);
}

.heading-block h2 span {
    color: var(--secondary-color);
}

.heading-block h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
}

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

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ====================================================================
   HEADER & TOP BAR
   ==================================================================== */

:root {
    --header-bg-teal: #0da193;
}

.main-header {
    background-color: var(--header-bg-teal);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color var(--transition-speed);
    padding: 15px 0 10px;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Logo Area */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ffffff;
}

.logo img {
    height: 55px;
    object-fit: contain;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

.logo-text p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Header Top Right Actions */
.header-top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #ffffff;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    color: #ffffff;
    transform: scale(1.1);
}

.date-today-badge {
    background-color: #ffffff;
    color: var(--text-color);
    padding: 6px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
}

/* Bottom Row */
.header-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 10px;
}

/* Navigation Menu */
.navbar {
    width: 100%;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #ffffff;
    border-radius: 4px;
    transition: all var(--transition-speed);
    text-transform: uppercase;
}

.nav-link:hover, .nav-item.active .nav-link {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-link i {
    font-size: 0.75rem;
    margin-left: 2px;
}

.nav-item-theme {
    margin-left: auto;
}

/* Dropdown styling */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 6px;
    min-width: 230px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 999;
}

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

.dropdown-item {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    text-transform: none;
}

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

.dropdown-item:hover {
    background-color: rgba(13, 161, 147, 0.08);
    color: var(--header-bg-teal);
    padding-left: 25px;
}

/* Theme Switcher Toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    transition: all var(--transition-speed);
}

[data-theme="dark"] .theme-toggle-btn {
    color: #ffd700;
}

.theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: rotate(15deg);
}

/* Search Row Styles */
.header-search-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.2s;
}

.search-toggle-btn:hover {
    opacity: 0.8;
}

.search-box-expand {
    display: none;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    width: 300px;
    animation: slideIn 0.3s ease;
}

.search-box-expand.active {
    display: flex;
}

.search-input {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 0.85rem;
    padding: 4px 0;
    width: 100%;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-go-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    padding: 2px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hamburger Menu button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 5px 0;
    border-radius: 2px;
    transition: var(--transition-speed);
}

/* Mobile responsive menu */
@media (max-width: 992px) {
    .hamburger {
        display: block;
    }
    
    .header-top-row {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-top-right {
        justify-content: center;
        width: 100%;
    }
    
    .header-bottom-row {
        justify-content: flex-end;
    }
    
    .navbar-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .navbar-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-link {
        padding: 12px 15px;
        color: var(--text-color);
    }
    
    .nav-link:hover, .nav-item.active .nav-link {
        background-color: rgba(13, 161, 147, 0.08);
        color: var(--header-bg-teal);
    }
    
    .nav-item-theme {
        margin-left: 0;
        padding: 12px 15px;
    }
    
    .theme-toggle-btn {
        background-color: rgba(0, 0, 0, 0.05);
        color: var(--text-color);
        width: 100%;
        border-radius: 8px;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background-color: rgba(0,0,0,0.02);
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding-left: 20px;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    .nav-item.open .dropdown-menu {
        display: block;
    }
}

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

.hero-slider-container {
    position: relative;
    height: 520px;
    overflow: hidden;
    background-color: #000000;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

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

.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}

.hero-slide-content {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    text-align: center;
    color: #ffffff;
    z-index: 10;
    padding: 0 20px;
}

.hero-slide-tag {
    background-color: var(--secondary-color);
    color: #ffffff;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hero-slide-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-slide-description {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 25px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Slider arrows and indicators */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    border: none;
    z-index: 100;
    transition: all var(--transition-speed);
    backdrop-filter: blur(5px);
}

.slider-arrow:hover {
    background-color: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev { left: 30px; }
.slider-next { right: 30px; }

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

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

.slider-dot.active {
    background-color: var(--secondary-color);
    width: 28px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .hero-slider-container { height: 400px; }
    .hero-slide-title { font-size: 1.8rem; }
    .hero-slide-description { font-size: 0.95rem; }
    .slider-arrow { display: none; }
}

/* ====================================================================
   SAMBUTAN KEPALA SEKOLAH
   ==================================================================== */

.speech-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    align-items: start;
}

.speech-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.speech-image-container img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    transition: transform 0.5s;
}

.speech-image-container:hover img {
    transform: scale(1.05);
}

.speech-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.kamad-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    color: #ffffff;
}

.kamad-badge h4 {
    font-size: 1.1rem;
    font-weight: 700;
}

.kamad-badge p {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.speech-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.speech-content p {
    margin-bottom: 15px;
    text-align: justify;
    color: var(--text-color);
}

.speech-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-muted);
    margin: 25px 0;
    font-size: 1.05rem;
}

@media (max-width: 992px) {
    .speech-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .speech-image-container {
        max-width: 350px;
        margin: 0 auto;
    }
}

/* ====================================================================
   BERITA & PENGUMUMAN SECTION
   ==================================================================== */

.news-section {
    background-color: var(--card-bg);
}

.news-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.news-main-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-card-horizontal {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 25px;
    background-color: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.news-card-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.news-card-image {
    position: relative;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card-horizontal:hover .news-card-image img {
    transform: scale(1.1);
}

.news-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 3px 12px;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.news-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.news-card-title a:hover {
    color: var(--primary-color);
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.news-readmore {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-readmore:hover {
    color: var(--secondary-hover);
}

/* Sidebar Widgets */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.widget {
    background-color: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
    padding-left: 12px;
    color: var(--text-color);
}

/* Info Scroll Widget */
.scroll-wrap {
    height: 320px;
    overflow-y: auto;
    padding-right: 5px;
}

.scroll-wrap::-webkit-scrollbar {
    width: 6px;
}

.scroll-wrap::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.scroll-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.scroll-item:first-child { padding-top: 0; }
.scroll-item:last-child { border-bottom: none; }

.scroll-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.scroll-item-title a:hover {
    color: var(--secondary-color);
}

/* Recent Posts widget */
.recent-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.recent-post-item:last-child { margin-bottom: 0; }

.recent-post-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recent-post-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 5px;
}

.recent-post-title a:hover {
    color: var(--primary-color);
}

.recent-post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .news-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .news-card-horizontal {
        grid-template-columns: 1fr;
    }
    .news-card-image {
        height: 180px;
    }
}

/* ====================================================================
   VIDEO KEGIATAN SECTION (SLIDER CAROUSEL)
   ==================================================================== */

.video-carousel {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
}

.video-card {
    min-width: 320px;
    flex: 1 0 calc(33.333% - 17px);
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    scroll-snap-align: start;
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background-color: #000;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed);
}

.video-card:hover .video-overlay {
    background-color: rgba(0,0,0,0.5);
}

.play-icon {
    width: 55px;
    height: 55px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all var(--transition-speed);
}

.video-card:hover .play-icon {
    background-color: var(--secondary-color);
    color: #ffffff;
    transform: scale(1.15);
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 992px) {
    .video-card {
        min-width: 280px;
        flex: 1 0 calc(50% - 13px);
    }
}

@media (max-width: 576px) {
    .video-card {
        min-width: 260px;
        flex: 1 0 100%;
    }
}

/* ====================================================================
   GALERI FOTO SECTION
   ==================================================================== */

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all var(--transition-speed);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1/1;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 102, 35, 0.85); /* Green gradient tint */
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: #ffffff;
    transition: opacity var(--transition-speed);
}

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

.gallery-item-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.gallery-item-cat {
    font-size: 0.75rem;
    background-color: var(--secondary-color);
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ====================================================================
   CONTACT & FEEDBACK FORM SECTION
   ==================================================================== */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-info-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-info-icon {
    width: 42px;
    height: 42px;
    background-color: rgba(11, 102, 35, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-info-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.contact-info-text p, .contact-info-text a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Form block */
.form-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

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

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 102, 35, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Success Modal & Alert */
.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}

/* ====================================================================
   QUOTES & TESTIMONIALS STICKY BANNER
   ==================================================================== */

.quotes-banner {
    position: relative;
    background-image: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.75)), url('https://www.manende.sch.id/upload/image/background-testi.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    text-align: center;
    padding: 90px 20px;
}

.quotes-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    height: 140px; /* fixed size to avoid jumping height */
}

.quote-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s ease-in-out;
}

.quote-slide.active {
    opacity: 1;
    visibility: visible;
}

.quote-slide h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 20px;
    font-style: italic;
}

.quote-slide span {
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

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

.main-footer {
    background-color: #080d0a;
    color: #ffffff;
    padding: 70px 0 30px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-about h3 {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.footer-about p {
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    color: #94a3b8;
}

.footer-contact-item i {
    color: var(--secondary-color);
    margin-top: 4px;
}

.footer-contact-item span {
    line-height: 1.4;
}

.footer-news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-news-item {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
}

.footer-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.footer-news-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.footer-news-title a {
    color: #e2e8f0;
}

.footer-news-title a:hover {
    color: var(--secondary-color);
}

.footer-news-date {
    font-size: 0.72rem;
    color: #64748b;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.82rem;
}

.copyright-links {
    display: flex;
    gap: 20px;
}

.copyright-links a:hover {
    color: var(--secondary-color);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ====================================================================
   MODAL LIGHTBOX STYLING
   ==================================================================== */

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
}

.lightbox-content img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-caption {
    color: #ffffff;
    text-align: center;
    margin-top: 15px;
    font-size: 1rem;
    font-family: var(--font-heading);
}

/* ====================================================================
   PAGES CONTENT AREA (SPA PAGES)
   ==================================================================== */

.page-content-wrapper {
    display: none;
}

.page-content-wrapper.active {
    display: block;
}

.subpage-container {
    padding: 60px 0;
    max-width: 900px;
    margin: 0 auto;
}

.subpage-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.subpage-body {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.8;
}

.subpage-body p {
    margin-bottom: 20px;
}

.subpage-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.subpage-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.feature-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.feature-box h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .subpage-features-grid {
        grid-template-columns: 1fr;
    }
}
