/* ============================================
   SD Negeri 2 Bawang - Main Stylesheet
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #102a4a;
    --accent: #38a169;
    --accent-light: #48bb78;
    --accent-dark: #2f855a;
    --bg-light: #f7fafc;
    --bg-blue: #ebf8ff;
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --text-light: #718096;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 10px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Navbar ---------- */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px; /* Jarak antara logo dan teks */
    text-decoration: none;
}

.navbar-logo-img {
    width: 45px;  /* Sesuaikan ukuran logo di header */
    height: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
    color: #1a365d; /* Sesuaikan warna teks */
}

.brand-sub {
    font-size: 0.8rem;
    color: #4a5568;
}

.navbar-brand .logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
}

.navbar-brand .brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
    line-height: 1.2;
}

.navbar-brand .brand-sub {
    font-size: 11px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.navbar-menu a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-medium);
    transition: var(--transition);
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: var(--bg-blue);
    color: var(--primary);
}

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

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative; /* Wajib ada */
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-size: cover; /* Agar gambar memenuhi area */
    background-position: center; /* Agar gambar di tengah */
    background-repeat: no-repeat;
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Hitam dengan transparansi 60% */
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 30px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 17px;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56,161,105,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

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

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

.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

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

.btn-danger:hover {
    background: #c53030;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
    background: var(--white);
    padding: 30px 0;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

/* ---------- Section Styles ---------- */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-light);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.section-header .line {
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ---------- Page Header (sub pages) ---------- */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.page-header h1 {
    font-size: 36px;
    color: var(--white);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.page-header .breadcrumb {
    font-size: 14px;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.page-header .breadcrumb a {
    color: var(--white);
    opacity: 0.8;
}

.page-header .breadcrumb a:hover {
    opacity: 1;
}

/* ---------- Cards ---------- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-blue);
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

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

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
}

/* ---------- Grid Layouts ---------- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

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

/* ---------- Sambutan (Welcome Section) ---------- */
.sambutan {
    display: flex;
    gap: 50px;
    align-items: center;
}

.sambutan-img {
    flex: 0 0 300px;
    height: 380px;
    background: var(--bg-blue);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 80px;
    overflow: hidden;
}

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

.sambutan-content h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

.sambutan-content p {
    color: var(--text-medium);
    margin-bottom: 12px;
    line-height: 1.7;
}

.sambutan-name {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid var(--accent);
    display: inline-block;
}

.sambutan-name strong {
    display: block;
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
    font-size: 16px;
}

.sambutan-name span {
    font-size: 13px;
    color: var(--text-light);
}

/* ---------- Profile Page ---------- */
.profile-section {
    margin-bottom: 50px;
}

.profile-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.visi-misi {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.visi-box, .misi-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.visi-box h3, .misi-box h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--accent);
}

.misi-box ol {
    padding-left: 20px;
}

.misi-box li {
    margin-bottom: 8px;
    color: var(--text-medium);
    line-height: 1.6;
}

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

.info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 3px solid var(--primary);
}

.info-card .icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.info-card h4 {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 4px;
}

.info-card p {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.facility-tags, .ekskul-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--bg-blue);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
}

.tag-green {
    background: #f0fff4;
    color: var(--accent-dark);
}

.tag-green:hover {
    background: var(--accent);
    color: var(--white);
}

/* ---------- Guru / Teacher Cards ---------- */
.guru-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
}

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

.guru-foto {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--bg-blue), #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--primary);
    overflow: hidden;
}

.guru-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guru-info {
    padding: 20px;
}

.guru-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.guru-info .jabatan {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.guru-info .nip {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 4px;
}

/* ---------- Gallery ---------- */
.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 22px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--white);
    color: var(--text-medium);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--bg-blue);
}

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    transition: var(--transition);
}

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

.gallery-overlay h4 {
    color: var(--white);
    font-size: 15px;
}

.gallery-overlay span {
    font-size: 12px;
    opacity: 0.8;
    text-transform: capitalize;
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 36px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10000;
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    text-align: center;
    color: var(--white);
    font-size: 16px;
    width: 100%;
}

/* ---------- News / Berita ---------- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-item {
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.news-img {
    flex: 0 0 280px;
    height: 200px;
    background: var(--bg-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--primary);
    overflow: hidden;
}

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

/*lightbox berita */
#lightbox-berita-final {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.95) !important;
    z-index: 99999999 !important;
    display: none; 
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lb-content {
    display: flex;
    flex-direction: column; /* Gambar di atas, teks di bawah */
    align-items: center;    /* Keduanya rata tengah */
    max-width: 90%;
    max-height: 95vh;
}

#lb-main-img {
    max-width: 100% !important;
    max-height: 75vh !important; /* Sisakan ruang untuk teks */
    object-fit: contain !important;
    border:none;
    border-bottom: none !important; /* Tempelkan dengan teks */
    display: block;
}

#lb-main-caption {
    display: none !important;
}

.lb-close-btn {
    position: absolute !important;
    top: 20px !important;
    right: 30px !important;
    color: white !important;
    font-size: 60px !important;
    cursor: pointer !important;
    line-height: 1;
}

.news-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.news-date {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 6px;
}

.news-body h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.news-body h3 a:hover {
    color: var(--accent);
}

.news-body p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-detail {
    max-width: 800px;
    margin: 0 auto;
}

.news-detail h1 {
    font-size: 30px;
    margin-bottom: 16px;
}

.news-detail .detail-meta {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.news-detail .detail-img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 25px;
    max-height: 400px;
    object-fit: cover;
}

.news-detail .detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-medium);
}

.news-detail .detail-content p {
    margin-bottom: 16px;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-medium);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ---------- Contact Page ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

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

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 20px;
}

.contact-item h4 {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 2px;
}

.contact-item p {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 500;
}

.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
}

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

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

.maps-container {
    margin-top: 40px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.maps-container iframe {
    width: 100%;
    height: 350px;
    border: 0;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 16px;
}

.footer p, .footer a {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
}

.footer a:hover {
    color: var(--white);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links li a::before {
    content: '\203A';
    font-size: 18px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.footer-social-container {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.sosmed-btn {
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 0;
}

.sosmed-btn img {
    width: 32px;
    height: auto;
    display: block;
    filter: grayscale(0%);
}

.sosmed-btn:hover {
    transform: translateY(-5px);
    opacity: 0.7;
    filter: brightness(1.2);
}

.sosmed-btn:active {
    transform: scale(0.9);
}

/* ---------- Alert Messages ---------- */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #f0fff4;
    color: var(--accent-dark);
    border: 1px solid #c6f6d5;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--text-medium);
    margin-bottom: 8px;
}

/* --- 1. Preloader Styles --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* Warna background saat loading */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Pastikan di atas segalanya */
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader {
    text-align: center;
}

/* Container untuk logo dan ring */
.logo-container {
    position: relative;
    width: 50px;  /* Sesuaikan ukuran */
    height: 50px; /* Sesuaikan ukuran */
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animasi Logo (Efek Berdenyut/Pulse) */
.logo-buffering {
    width: 30px; /* Ukuran logo lebih kecil dari container agar muat di dalam ring */
    height: auto;
    z-index: 2;
    animation: logoPulse 1.5s ease-in-out infinite;
}

/* Animasi Ring Buffering (Berputar di luar logo) */
.buffer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(26, 54, 93, 0.1); /* Warna tipis */
    border-top: 3px solid #1a365d; /* Warna utama (biru) */
    border-radius: 50%;
    z-index: 1;
    animation: spin 1s linear infinite;
}

/* Definisi Gerakan Berputar */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Definisi Gerakan Berdenyut */
@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- 2. Konten Fade-In --- */
/* Tambahkan class ini ke pembungkus utama konten Anda */
.content-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.content-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efek menghilang untuk preloader */
#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .hero h1 { font-size: 32px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .visi-misi { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .sambutan { flex-direction: column; }
    .sambutan-img { flex: 0 0 auto; width: 100%; height: 300px; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 5px;
    }

    .navbar-logo-img {
        width: 35px; /* Lebih kecil sedikit di HP */
    }
    .brand-name {
        font-size: 0.95rem;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-toggle {
        display: flex;
    }

    .hero {
        padding: 60px 0;
        min-height: 60vh;
        text-align: center;
        background-attachment: scroll; /* Matikan fixed di mobile agar ringan */
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero h1 { font-size: 28px; }
    .section { padding: 50px 0; }
    .section-header h2 { font-size: 26px; }

    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }

    .news-item { flex-direction: column; }
    .news-img { flex: 0 0 auto; width: 100%; height: 200px; }

    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 15px; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
    .gallery-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-number { font-size: 26px; }
}
