/* Warna Dasar (Skema Hijau) */
:root {
    --color-primary: #004d40; /* Hijau Tua/Mangrove (Latar Utama Header/Footer) */
    --color-secondary: #388e3c; /* Hijau Terang/Aksen (Tombol, Garis) */
    --color-text-light: #f1f8e9; /* Krem Muda (Latar Belakang Konten) */
    --color-text-dark: #333; /* Teks gelap untuk konten terang */
    --color-white: #ffffff;
    --color-accent-text: #a5d6a7; /* Hijau Sangat Terang (Highlight) */
    --padding-section: 80px 20px; 
    --navbar-height: 55px; /* Tinggi Navigasi */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0;
    padding: 0;
    background-color: var(--color-text-light); 
    color: var(--color-text-dark); 
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* === NAVIGASI UTAMA (PALING ATAS) === */
.top-navbar {
    background-color: var(--color-primary); 
    padding: 10px 40px; 
    position: sticky;
    top: 0;
    z-index: 2000; 
    border-bottom: 3px solid var(--color-secondary); 
    
    display: flex;
    justify-content: space-between; 
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.atlas-logo {
    font-size: 1.4em; 
    font-weight: 800;
    color: var(--color-white);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.menu-kanan a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 1em; 
    padding: 0 15px;
    transition: color 0.3s;
}

.menu-kanan a:hover {
    color: var(--color-accent-text); 
    font-weight: bold;
}

/* === 1. HEADER (HOME JUDUL - FULL SCREEN) === */
.hero-section {
    height: 100vh; /* FULL SCREEN */
    background-image: url('assets/mangrove-background.jpg'); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center; 
    color: var(--color-white);
    text-align: center;
    position: relative;
}

/* Overlay Gelap untuk Kontras Teks */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.header-content-wrapper {
    position: relative; 
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.7); 
    padding: 50px 70px; 
    border-radius: 10px; 
    width: 90%; 
    max-width: 900px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
}

.header-content-wrapper h1 {
    font-size: 2.8em; 
    color: var(--color-white); 
    margin-bottom: 15px;
    line-height: 1.3;
}

.header-content-wrapper p {
    font-size: 1.2em;
    margin-bottom: 30px; 
}

.button-awal {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-secondary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 50px; 
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.button-awal:hover {
    background-color: #2e7d32;
    transform: translateY(-2px); 
}

/* === 2. BAGIAN PENDAHULUAN (FULL SCREEN 2 KOLOM OPTIMAL) === */
.secondary-section {
    background-color: var(--color-white); 
    min-height: calc(100vh - var(--navbar-height)); /* Tinggi penuh dikurangi navbar */
    padding: 0; 
    color: var(--color-text-dark);
    display: flex; 
}

.definisi-kartu-utama {
    width: 100%; 
    max-width: none; 
    margin: 0;
    display: flex;
    flex-grow: 1; 
    
    background-color: var(--color-white); 
    border-radius: 0; 
    box-shadow: none; 
    overflow: hidden; 
}

.definisi-gambar-besar {
    flex: 0 0 40%; /* Proporsi baru: Gambar 40% lebar */
    height: auto; 
    overflow: hidden;
    margin-right: 0; 
}

.mangrove-visual {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.definisi-teks-konten {
    flex: 1; /* Teks 60% lebar */
    padding: 60px; 
    padding-left: 80px; /* Jarak dari gambar */
    text-align: justify; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

.definisi-teks-konten h3 {
    color: var(--color-primary); 
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--color-secondary); 
    padding-bottom: 5px;
    margin-top: 20px;
    display: inline-block; 
}

.definisi-teks-konten ul {
    list-style-type: none;
    padding-left: 0;
}
.definisi-teks-konten ul li::before {
    content: "•"; 
    color: var(--color-secondary); 
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}

/* === 3. DASHBOARD UTAMA (GEE IFRAME) - KONTRAST DAN LEBAR DIOPTIMALKAN === */
.dashboard-gee {
    background-color: var(--color-text-light); /* Latar belakang Krem/Putih */
    text-align: center;
    padding: 60px 20px 40px; 
    color: var(--color-text-dark); /* Teks gelap */
}

.dashboard-gee .title-primary {
    /* Judul: Ditegaskan dengan warna primer gelap */
    color: var(--color-primary); 
    font-size: 2.5em; 
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 800; 
}

.dashboard-gee .data-note {
    /* Sub Judul: Diubah ke warna gelap agar terlihat jelas */
    color: var(--color-text-dark); 
    font-weight: 600; 
    margin-bottom: 35px; 
    font-size: 1.1em;
}

.iframe-container {
    position: relative;
    width: 95%; /* Diperluas untuk mengisi lebih banyak ruang horizontal */
    max-width: 1400px; 
    margin: 0 auto 40px auto; 
    
    height: 85vh; 
    overflow: hidden;
    
    border: 5px solid var(--color-secondary);
    border-radius: 12px; 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background-color: var(--color-white); 
}

/* === DETAIL PULAU STYLING (KONTEN) === */
.content-section {
    padding: var(--padding-section);
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--color-text-light); 
    color: var(--color-text-dark); 
}

.detail-pulau {
    padding-top: 50px; 
    padding-bottom: 50px;
    text-align: center; 
}

.detail-pulau h2 {
    color: var(--color-primary);
    text-align: center;
    font-size: 2.5em;
    border-bottom: 5px solid var(--color-secondary);
    display: inline-block; 
    padding-bottom: 5px;
    margin-bottom: 40px;
}

.detail-card-container {
    display: flex;
    justify-content: space-between;
    gap: 30px; 
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
    flex-wrap: wrap; 
    text-align: left; 
    align-items: stretch; 
}

.detail-card {
    background-color: var(--color-white); 
    flex: 1 1 30%; 
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    border-left: 5px solid var(--color-secondary); 
    min-width: 280px; 
}

.detail-card h3 {
    color: var(--color-primary);
    font-size: 1.2em;
    border-bottom: 1px solid var(--color-secondary);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* Styling Tabel Detail Metrik/Nilai (Rapi, Center, Proporsi Tetap) */
.detail-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: fixed; /* Memastikan lebar kolom seragam */
}

.detail-card th, .detail-card td {
    padding: 12px;
    text-align: center; /* Data di tengah (center) */
    border-bottom: 1px solid #e0e0e0;
}

.detail-card th {
    background-color: var(--color-primary); 
    color: var(--color-white); 
    font-weight: 600;
}

.detail-card td {
    background-color: var(--color-white);
    font-weight: 500;
}

.detail-card tr:nth-child(even) td {
    background-color: #f5f5f5; 
}

.detail-card tr:last-child th, .detail-card tr:last-child td {
    border-bottom: none;
}

/* Proporsi Khusus untuk Tabel 3 Kolom (Status Kesehatan Ekosistem) */
.detail-card table tr th:first-child,
.detail-card table tr td:first-child {
    width: 35%; /* Kolom pertama (Indikator) */
}

.detail-card table tr th:nth-child(2),
.detail-card table tr td:nth-child(2) {
    width: 30%; /* Kolom kedua (Kategori/Nilai) */
}

.detail-card table tr th:last-child,
.detail-card table tr td:last-child {
    width: 35%; /* Kolom terakhir (Keterangan) */
    text-align: left; /* Teks Keterangan di kiri agar mudah dibaca */
}


.data-sumber {
    margin-top: 20px;
    font-size: 0.85em;
    color: #777;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}

/* === 6. FOOTER FINAL === */
footer {
    background-color: var(--color-primary); 
    color: var(--color-white);
    padding: 40px 0 0; 
    border-top: 5px solid var(--color-secondary);
    text-align: left;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px; 
    padding-left: 20px;
    padding-right: 20px;
    flex-wrap: wrap; 
}

.footer-branding {
    flex-basis: 35%; 
    min-width: 250px;
}

.footer-branding h3.web-logo-text {
    font-size: 1.8em; 
    font-weight: 900;
    color: var(--color-white); 
    margin-bottom: 10px;
}

.footer-branding img.untirta-logo {
    width: 120px; 
    height: auto;
    margin-top: 10px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
}

.footer-social, .footer-feedback {
    flex-basis: 30%; 
    min-width: 200px; 
    margin-top: 10px;
}

.footer-column h3 {
    color: var(--color-accent-text); 
    margin-bottom: 15px;
    font-size: 1.2em;
}

.social-icons a {
    color: var(--color-white); 
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: var(--color-secondary);
}

.footer-feedback a {
    color: var(--color-accent-text); 
    text-decoration: underline; 
    transition: color 0.3s;
}
.footer-feedback a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid #1a6459; 
    padding: 20px 20px;
    text-align: center;
    font-size: 0.8em;
    color: var(--color-accent-text); 
}

/* === RESPONSIVITAS MOBILE === */

@media (max-width: 900px) {
    /* 1. Responsivitas Navbar */
    .top-navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
    }
    .menu-kanan {
        margin-top: 10px;
    }
    .menu-kanan a {
        padding: 5px 10px 5px 0;
        display: block; 
    }

    /* 2. Responsivitas Hero */
    .hero-section {
        height: 70vh; 
    }
    .header-content-wrapper {
        padding: 40px; 
        max-width: 90%;
    }
    .header-content-wrapper h1 {
        font-size: 1.8em; 
    }
    
    /* 3. Responsivitas Bagian Pendahuluan */
    .secondary-section {
        min-height: auto; 
    }
    .definisi-kartu-utama {
        flex-direction: column; 
        max-width: 95%;
    }
    .definisi-gambar-besar {
        height: 250px; 
        flex: 100%;
        margin-right: 0; 
        margin-bottom: 20px; 
    }
    .definisi-teks-konten {
        padding: 30px;
        padding-left: 30px;
    }

    /* 4. Responsivitas Dashboard GEE */
    .dashboard-gee .title-primary {
        font-size: 1.6em; 
    }
    .iframe-container {
        height: 50vh; 
    }

    /* 5. Responsivitas Detail Pulau */
    .detail-card-container {
        flex-direction: column; 
        gap: 20px;
    }
    .detail-card {
        min-width: 100%;
    }

    /* 6. Responsivitas Footer */
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-branding, .footer-social, .footer-feedback {
        flex-basis: 100%;
        margin-bottom: 20px;
        min-width: 100%;
    }
    .social-icons {
        margin-top: 10px;
    }
}