/* Reset dan Variabel */
:root {
    /* Mode Terang (Default) */
    --primary-color: #1a5f7a;
    --secondary-color: #2a9d8f;
    --accent-color: #e9c46a;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333333;
    --text-light: #6c757d;
    --bg-color: #ffffff;
    --bg-secondary: #f1f8ff;
    --header-bg: #ffffff;
    --nav-bg: #1a5f7a;
    --card-bg: #ffffff;
    --footer-bg: #1a5f7a;
    --footer-text: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --border-color: #e0e0e0;
    
    /* Font */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

.dark-mode {
    /* Mode Gelap */
    --primary-color: #2a9d8f;
    --secondary-color: #1a5f7a;
    --accent-color: #e9c46a;
    --light-color: #343a40;
    --dark-color: #f8f9fa;
    --text-color: #f8f9fa;
    --text-light: #adb5bd;
    --bg-color: #121212;
    --bg-secondary: #1e1e1e;
    --header-bg: #1e1e1e;
    --nav-bg: #1a5f7a;
    --card-bg: #1e1e1e;
    --footer-bg: #0d1b2a;
    --footer-text: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.3);
    --border-color: #444444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--header-bg);
}

/* Header Top (Logo dan Judul) - TIDAK STICKY */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 5%;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-bg);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-kemenag, .logo-mtsn {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.header-text {
    text-align: center;
    flex-grow: 1;
}

.header-text h1 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.header-text p {
    color: var(--text-light);
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Navigasi - HANYA INI YANG STICKY */
.main-nav {
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-family: var(--font-primary);
    transition: background-color 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px var(--shadow);
    border-radius: 0 0 5px 5px;
    z-index: 1000;
    list-style: none;
    padding: 0;
}

.dark-mode .dropdown-menu {
    background-color: var(--card-bg);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    color: var(--text-color);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:hover {
    background-color: var(--bg-secondary);
}

.nav-right {
    display: flex;
    align-items: center;
}

.theme-toggle {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Banner */
.banner-section {
    padding: 20px 5%;
    background-color: var(--bg-secondary);
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
}

.banner {
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    color: white;
    text-align: center;
    position: relative;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 95, 122, 0.8), rgba(42, 157, 143, 0.8));
    z-index: 1;
}

.banner h2,
.banner p {
    position: relative;
    z-index: 2;
}

.banner h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-family: var(--font-primary);
}

.banner p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.banner-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.indicator.active {
    background-color: white;
}

/* Konten Utama */
.main-content {
    padding: 30px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

section {
    margin-bottom: 50px;
}

h2 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Grid Edisi */
.edisi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.edisi-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.edisi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow);
}

.edisi-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.edisi-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.edisi-card:hover .edisi-image img {
    transform: scale(1.05);
}

.edisi-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 1;
}

.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    font-family: var(--font-primary);
    text-transform: uppercase;
}

.edisi-info {
    padding: 20px;
}

.edisi-info h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-family: var(--font-primary);
}

.edisi-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.edisi-desc {
    margin-bottom: 15px;
    color: var(--text-color);
}

.coming-soon-text {
    color: var(--accent-color);
    font-weight: 600;
    text-align: center;
    margin: 15px 0;
}

.read-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
    text-decoration: none;
    text-align: center;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
}

.read-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Grid Guru */
.guru-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.guru-grid-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    text-align: center;
}

.guru-grid-card:hover {
    transform: translateY(-5px);
}

.guru-grid-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.guru-grid-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guru-grid-info h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-family: var(--font-primary);
    font-size: 1rem;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 5% 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 8px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.copyright {
    margin-top: 15px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-links {
    list-style: none;
    padding: 0;
}

.quick-links li {
    margin-bottom: 10px;
}

.quick-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.quick-links a:hover {
    color: var(--accent-color);
}

/* Footer Logo Contacts */
.footer-logos {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-logo:hover {
    background-color: var(--accent-color);
    color: var(--dark-color);
    transform: translateY(-3px);
}

/* WhatsApp khusus */
.footer-logo.whatsapp:hover {
    background-color: #25D366;
    color: white;
}

/* Telepon khusus */
.footer-logo.phone:hover {
    background-color: #34B7F1;
    color: white;
}

/* Email khusus */
.footer-logo.email:hover {
    background-color: #EA4335;
    color: white;
}

/* Facebook khusus */
.footer-logo.facebook:hover {
    background-color: #1877F2;
    color: white;
}

/* Instagram khusus */
.footer-logo.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white;
}

/* Responsif footer logos */
@media (max-width: 768px) {
    .footer-logos {
        justify-content: center;
    }
    
    .footer-logo {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Responsif */
@media (max-width: 1024px) {
    .edisi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .guru-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px 5%;
    }
    
    .logo-container {
        justify-content: center;
    }
    
    .nav-container {
        flex-direction: column;
        padding: 10px 5%;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }
    
    .dropdown:hover .dropdown-menu {
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .nav-right {
        width: 100%;
        justify-content: center;
    }
    
    .banner {
        height: 200px;
        padding: 20px;
    }
    
    .banner h2 {
        font-size: 1.6rem;
    }
    
    .edisi-grid {
        grid-template-columns: 1fr;
    }
    
    .guru-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* =========================================== */
/* STYLING KHUSUS UNTUK HALAMAN EDISI */
/* =========================================== */

/* Header Edisi */
.edisi-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px 5%;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 5px 15px var(--shadow);
}

.edisi-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-family: var(--font-primary);
}

.edisi-header .edisi-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.edisi-header .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

/* Daftar Isi */
.daftar-isi {
    background-color: var(--bg-secondary);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 3px 10px var(--shadow);
}

.daftar-isi h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-family: var(--font-primary);
}

.grid-tombol {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.tombol-isi {
    background-color: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tombol-isi:hover, .tombol-isi.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow);
}

.tombol-isi i {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.tombol-isi:hover i, .tombol-isi.active i {
    color: white;
}

/* Kontainer untuk konten yang akan berubah */
.konten-container {
    margin-bottom: 60px;
    min-height: 400px;
    position: relative;
}

.konten-section {
    display: none;
    margin-bottom: 0;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    border-left: 5px solid var(--primary-color);
    animation: fadeIn 0.5s ease;
}

.konten-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.konten-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.konten-section .konten-body {
    line-height: 1.8;
}

.konten-section .highlight {
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--accent-color);
}

.konten-section .quote {
    font-style: italic;
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--text-light);
}

.math-formula {
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 20px 0;
    overflow-x: auto;
}

.gambar-konten {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow);
}

.gambar-deskripsi {
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    margin-top: 5px;
    font-size: 0.9rem;
}

.tombol-challenge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.tombol-challenge:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(238, 90, 36, 0.3);
}

/* Tombol navigasi untuk kembali ke daftar isi */
.nav-buttons-container {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: var(--secondary-color);
}

/* Tombol kembali ke daftar isi */
.back-to-index {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--accent-color);
    color: var(--dark-color);
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
    margin: 20px auto 0;
    width: fit-content;
}

.back-to-index:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

/* =========================================== */
/* RESPONSIF UNTUK HALAMAN EDISI */
/* =========================================== */

@media (max-width: 768px) {
    .edisi-header h1 {
        font-size: 2rem;
    }
    
    .grid-tombol {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .konten-section {
        padding: 20px;
    }
    
    .nav-buttons-container {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .edisi-header h1 {
        font-size: 1.7rem;
    }
    
    .grid-tombol {
        grid-template-columns: 1fr;
    }
    
    .edisi-header .edisi-info {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.4rem;
    }
    
    .header-text p {
        font-size: 0.8rem;
    }
    
    .logo-kemenag, .logo-mtsn {
        height: 50px;
    }
    
    .banner {
        height: 180px;
        padding: 15px;
    }
    
    .banner h2 {
        font-size: 1.4rem;
    }
    
    .banner p {
        font-size: 0.9rem;
    }
    
    .guru-grid {
        grid-template-columns: 1fr;
    }
    
    .guru-grid-photo {
        width: 100px;
        height: 100px;
    }
}