/* =========================================
   1. ROOT VARIABLES & RESET
   ========================================= */
:root {
    --maroon: #800000;      /* Merah Hati */
    --gold: #D4AF37;        /* Emas */
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --dark-text: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--dark-text);
    line-height: 1.6;
    background-color: var(--light-gray);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 60px 0;
}

/* =========================================
   2. UTILITY CLASSES (COLORS)
   ========================================= */
.bg-maroon { background-color: var(--maroon); }
.bg-light { background-color: var(--light-gray); }
.bg-gold { background-color: var(--gold); }
.bg-white { background-color: var(--white); }
.text-maroon { color: var(--maroon); }
.text-gold { color: var(--gold); }
.text-white { color: var(--white); }
.text-center { text-align: center; }

/* =========================================
   3. BUTTONS
   ========================================= */
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transition: 0.3s ease;
}
.btn-primary {
    background-color: var(--gold);
    color: var(--maroon);
}
.btn-primary:hover {
    background-color: #fff;
}
.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
}
.btn-secondary:hover {
    background-color: var(--gold);
    color: var(--maroon);
}

/* =========================================
   4. HEADER & NAVBAR
   ========================================= */
.top-bar {
    background-color: var(--maroon);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.contact-info span { margin-right: 15px; }
.social-links a {
    margin-left: 15px;
    color: var(--gold);
}
.social-links a:hover { color: var(--white); }
.btn-login {
    background: var(--gold);
    color: var(--maroon) !important;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}
.logo h1 {
    color: var(--maroon);
    font-size: 24px;
}
.logo h1 span {
    color: var(--gold);
}
.logo p {
    font-size: 12px;
    color: #666;
}
.nav-links {
    display: flex;
    gap: 20px;
}
.nav-links li a {
    font-weight: 600;
    color: var(--maroon);
    transition: 0.3s;
}
.nav-links li a:hover {
    color: var(--gold);
}

/* BREADCRUMB */
.breadcrumb-area a:hover {
    text-decoration: underline;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
#hero {
    background: url('https://via.placeholder.com/1200x600/800000/D4AF37?text=Foto+Gedung+Sekolah') no-repeat center center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
}
.hero-overlay {
    background: rgba(128, 0, 0, 0.7);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}
.hero-content {
    text-align: center;
    color: var(--white);
}
.hero-content h2 {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 15px; justify-content: center; }

/* =========================================
   6. TITLES & SECTIONS GENERAL
   ========================================= */
.section-title {
    color: var(--maroon);
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin-top: 10px;
}
.text-center.section-title::after {
    margin: 10px auto 0;
}

/* =========================================
   7. SAMBUTAN, STATISTIK, PROGRAM (INDEX)
   ========================================= */
.sambutan-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}
.sambutan-img img {
    width: 100%;
    border-radius: 10px;
    border: 5px solid var(--gold);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 20px;
}
.stat-item .counter {
    font-size: 2.5rem;
    margin: 10px 0;
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid var(--gold);
    transition: transform 0.3s;
}
.card:hover {
    transform: translateY(-5px);
}
.card h4 { margin: 15px 0; color: var(--maroon); }

/* =========================================
   8. LAYOUT & SIDEBAR WIDGETS
   ========================================= */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Sidebar Styling */
.sidebar .widget {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.sidebar .widget h4 { 
    color: var(--maroon); 
    margin-bottom: 15px; 
    border-bottom: 2px solid var(--gold); 
    padding-bottom: 5px;
}
.agenda-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* Recent Posts List (Sidebar) */
.recent-posts-list li {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px dashed #ccc;
}
.recent-posts-list li:last-child { border-bottom: none; }
.recent-posts-list li a {
    color: var(--dark-text);
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s;
}
.recent-posts-list li a:hover { color: var(--maroon); }
.recent-date {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

/* Berita List di Index */
.news-item {
    display: flex;
    background: var(--white);
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.news-item img {
    width: 200px;
    object-fit: cover;
}
.news-desc { padding: 20px; }
.news-desc h4 { color: var(--maroon); margin-bottom: 10px; }

/* =========================================
   9. PROFIL, FASILITAS, TESTIMONI (INDEX)
   ========================================= */
.vision-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.vision-box, .mission-box {
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.mission-box { background: var(--white); border-left: 5px solid var(--maroon); }
.mission-box ul { list-style: disc; margin-left: 20px; margin-top: 15px;}
.mission-box ul li { margin-bottom: 10px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.gallery-item { position: relative; overflow: hidden; border-radius: 8px;}
.gallery-item img { width: 100%; display: block; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item p {
    position: absolute;
    bottom: 0; background: rgba(128,0,0,0.8);
    color: var(--white); width: 100%; padding: 10px; text-align: center;
}

.testi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.testi-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    font-style: italic;
    border-left: 5px solid var(--gold);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.testi-card h5 { margin-top: 15px; color: var(--maroon); font-style: normal;}

/* =========================================
   10. HALAMAN LIST BERITA & PAGINATION
   ========================================= */
.news-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}
.news-card-page {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.news-card-page:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(128,0,0,0.15);
}
.news-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 4px solid var(--gold);
}
.news-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.news-date {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}
.news-title {
    font-size: 1.25rem;
    color: var(--dark-text);
    margin-bottom: 10px;
    line-height: 1.4;
}
.news-card-page:hover .news-title { color: var(--maroon); }
.news-excerpt {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}
.btn-readmore {
    font-weight: bold;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}
.btn-readmore:hover { color: var(--gold); }
.btn-readmore i {
    margin-left: 5px;
    transition: margin-left 0.3s ease;
}
.btn-readmore:hover i { margin-left: 10px; }

/* PAGINATION STYLES */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-block;
    padding: 10px 18px;
    background: var(--white);
    color: var(--maroon);
    border: 1px solid #ddd;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.page-link:hover:not(.disabled):not(.active) {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}
.page-link.active {
    background: var(--maroon);
    color: var(--white);
    border-color: var(--maroon);
    pointer-events: none;
}
.page-link.disabled {
    color: #ccc;
    background: #f9f9f9;
    pointer-events: none;
}
/* =========================================
   11. HALAMAN DETAIL BERITA
   ========================================= */
.single-article {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    background-color: var(--white);
}

.article-featured-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-bottom: 5px solid var(--gold);
}

/* Jarak Judul & Meta */
.article-header {
    padding: 40px 30px 20px; /* Padding atas diperbesar */
    border-bottom: 2px solid #eee; /* Garis bawah lebih tegas */
}
.article-title {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 20px; /* Jarak yang lebih lebar antara judul dan tanggal */
}
.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}
.article-meta span i { margin-right: 5px; }

/* Jarak Isi Berita */
.article-body {
    padding: 40px 30px; /* Padding atas dan bawah 40px agar konten tidak terlalu menempel ke atas/bawah */
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}
.article-body p { margin-bottom: 25px; /* Jarak antar paragraf sedikit dilebarkan */ }
.article-body ul, .article-body ol {
    margin-left: 20px;
    margin-bottom: 25px;
}
.article-body li { margin-bottom: 8px; }

/* =========================================
   SHARE BUTTONS (Menarik & Berjarak)
   ========================================= */
.article-share {
    padding: 30px;
    background-color: #fff9ea; /* Warna latar sedikit kekuningan/emas pudar agar area ini stand-out */
    border-top: 1px solid #e0d5c1;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px; /* Jarak (margin) memisahkan akhir isi berita dengan area bagikan */
}

.article-share strong {
    font-size: 1.1rem;
    color: var(--maroon);
}

.share-buttons { 
    display: flex; 
    gap: 15px; 
}

/* Desain Tombol Berbagi */
.btn-share {
    padding: 10px 22px;
    border-radius: 30px; /* Bentuk kapsul (pill) yang lebih modern */
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    transition: all 0.3s ease; /* Animasi mulus saat dihover */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Memberikan efek 3D (timbul) */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Efek Hover (Melayang) pada Tombol */
.btn-share:hover { 
    transform: translateY(-4px); /* Tombol terangkat ke atas saat disentuh kursor */
    box-shadow: 0 8px 15px rgba(0,0,0,0.15); /* Bayangan membesar saat tombol terangkat */
    color: var(--white); 
}

.btn-facebook { background-color: #1877F2; }
.btn-whatsapp { background-color: #25D366; }

/* =========================================
   12. FOOTER
   ========================================= */
footer { padding: 50px 0 0; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a:hover { color: var(--gold); }
.social-footer a { color: var(--gold); font-size: 1.5rem; margin-right: 15px; }
.footer-bottom {
    background: #5a0000;
    padding: 20px 0;
    margin-top: 30px;
}

/* =========================================
   13. RESPONSIVE / MEDIA QUERIES
   ========================================= */
@media (max-width: 768px) {
    .top-bar-content, .navbar { 
        flex-direction: column; 
        text-align: center; 
        gap: 10px;
    }
    .nav-links { 
        flex-wrap: wrap; 
        justify-content: center; 
    }
    .hero-content h2 { font-size: 2rem; }
    
    .sambutan-grid, 
    .stat-grid, 
    .main-layout, 
    .vision-mission-grid, 
    .testi-grid, 
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Index News List */
    .news-item { flex-direction: column; }
    .news-item img { width: 100%; height: 200px; }
    
    /* Detail Article */
    .article-title { font-size: 1.5rem; }
    .article-header, .article-body, .article-share {
        padding: 20px;
    }
    .article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}