/* =========================================
   VARIABEL TEMA (TEMA BIRU MA ULIL ALBAB)
========================================= */
:root {
    --blue-dark: #003366;    
    --blue-primary: #0056b3; 
    --blue-light: #e6f0fa;   
    --accent: #f39c12;       
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --bg-light: #f8f9fa;
}

/* =========================================
   RESET & DASAR
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--white);
    scroll-behavior: smooth;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--blue-dark);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* =========================================
   TOP BAR & HEADER
========================================= */
.top-bar {
    background-color: var(--blue-dark);
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 5%;
    text-align: right;
}

header {
    background-color: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    border-radius: 5px;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--blue-primary);
    margin-bottom: -5px;
}

.logo-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav ul li a {
    color: var(--blue-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

nav ul li a:hover {
    color: var(--blue-primary);
    border-bottom: 2px solid var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--blue-primary);
    cursor: pointer;
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
    background: linear-gradient(rgba(0, 51, 102, 0.85), rgba(0, 86, 179, 0.85)), 
                url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    /* Memberikan ruang di bawah agar kotak aplikasi bisa tumpang tindih */
    padding-bottom: 60px;
}

.hero-content h2 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-block;
    margin: 5px;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #d68910;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--blue-primary);
}

/* =========================================
   APLIKASI SEKOLAH (DESAIN SESUAI GAMBAR)
========================================= */
.app-section {
    padding: 0 5%;
    margin-top: -100px; /* Menarik kotak ke atas agar menimpa hero section */
    position: relative;
    z-index: 10;
}

.app-container {
    background-color: #0b2d54; /* Warna biru gelap sesuai gambar */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.app-title h2 {
    color: var(--white);
    font-size: 2.2rem;
    line-height: 1.2;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    margin: 0;
}

.app-carousel {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background-color: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.app-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--white);
    transition: transform 0.3s ease;
}

.app-box:hover {
    transform: translateY(-5px);
}

.app-box i {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 300; /* Membuat icon terlihat seperti garis tipis */
}

.app-box span {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

/* Warna Kotak Sesuai Gambar */
.box-green { background-color: #a4d156; } /* Hijau Muda */
.box-red { background-color: #ff6464; }   /* Merah Muda */
.box-transparent { background-color: transparent; } /* Biru Gelap menyatu dengan background */

/* =========================================
   SECTIONS & UMUM
========================================= */
section {
    padding: 80px 5%;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--blue-dark);
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--accent);
    margin: 15px auto 0;
}

/* =========================================
   TENTANG MADRASAH
========================================= */
.about-content > p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
}

.visi-misi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.visi-card {
    background: var(--blue-light);
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid var(--blue-primary);
}

.visi-card h3 {
    color: var(--blue-primary);
    margin-bottom: 15px;
}

.visi-card ul {
    margin-left: 20px;
}

/* =========================================
   BERITA SECTION
========================================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.news-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.news-content {
    padding: 25px;
}

.news-date {
    font-size: 0.85rem;
    color: var(--blue-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-content h3 a {
    color: var(--blue-dark);
}

.news-content h3 a:hover {
    color: var(--blue-primary);
}

.news-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   FOOTER
========================================= */
footer {
    background-color: var(--blue-dark);
    color: var(--white);
    padding-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 0 5% 40px 5%;
}

.footer-container h3 {
    color: var(--accent);
    margin-bottom: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
}

.footer-about p {
    color: #cccccc;
    font-size: 0.95rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #cccccc;
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.footer-contact p {
    color: #cccccc;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.footer-bottom {
    background-color: #001f3f;
    text-align: center;
    padding: 20px;
    color: #888888;
    font-size: 0.9rem;
}

/* =========================================
   RESPONSIF / MOBILE
========================================= */
@media (max-width: 991px) {
    .hero-content h1 { font-size: 2.5rem; }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        text-align: center;
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
    
    .top-bar { display: none; }
    
    .app-section {
        margin-top: -30px;
    }
    .app-container {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 30px;
    }
    
    .app-carousel {
        flex-wrap: wrap;
        justify-content: center;
    }
}