/* ---
    File: style.css (Versi FINAL ANTI-KONFLIK & FIX POSISI)
    Deskripsi: Stylesheet utama (Hanya Layout NON-NAVBAR)
    PENTING: Mengganti position: sticky menjadi position: fixed untuk stabilitas.
--- */

/* ==== 1. Variabel Global & Reset ==== */
:root {
    --color-primary: #FE7927; /* DIUBAH: Dari #003b8e menjadi #FE7927 */
    --color-accent: #ffc700;
    --color-accent-hover: #ffb700;
    --color-white: #ffffff;
    --color-bg-light: #f5f5f5;
    --color-text: #000000;
    --color-text-secondary: #666666;
    --color-text-darker: #444444;
    --color-border-light: #eeeeee;
    --color-dropdown-bg: #ffffff;
    --color-dropdown-border: #dddddd;
    --color-dropdown-hover: #f5f5f5;
    --color-mobile-submenu-bg: #d45c15; /* DIUBAH: Dari #002f80 menjadi warna oranye lebih gelap #d45c15 */
    
    /* FIX: Tinggi navbar disamakan menjadi 72px (nilai yang terlihat di screenshot) */
    --navbar-height: 72px; 
    --navbar-mobile-height: 50px; /* Nilai mobile yang umum digunakan */
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-white);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* === PERBAIKAN UTAMA AGAR KONTEN TIDAK TERTUTUP/TURUN === */
    margin: 0; 
    /* Memberi padding atas sebesar tinggi navbar (72px) agar konten TIDAK TERTUTUP */
    padding-top: var(--navbar-height); 
    /* ========================================================= */
}

/* FIX URGENT: Menarik Konten Utama ke Atas (Ini seharusnya tidak diperlukan jika navbar fixed, 
   tetapi dipertahankan sebagai fallback/safety net agar tidak ada celah) */
/* main {
    margin-top: calc(-1 * var(--navbar-height)) !important;
} */


/* FIX URGENT: Memaksa Navbar menempel di atas Jendela Browser */
/* KUNCI: Menggunakan FIXED untuk 100% stabilitas */
.site-header { 
    position: fixed !important; /* Ganti sticky ke FIXED untuk resolusi konflik */
    top: 0 !important;
    left: 0 !important; /* Tambahkan left: 0 dan right: 0 */
    right: 0 !important;
    z-index: 1000 !important; 
    width: 100%;
    /* Tinggi yang sama dengan padding body */
    height: var(--navbar-height); 
    background-color: var(--color-primary); /* DIUBAH: Sekarang menggunakan warna oranye #FE7927 */
}

/* KUNCI Tambahan: Style untuk elemen di dalam Navbar yang membutuhkan warna putih/kontras */
.site-header a, 
.site-header span,
.site-header .nav-search-button {
    color: var(--color-white) !important;
}


/* ==== 2. Aksesibilitas & Utilitas (Tidak Diubah) ==== */
:focus-visible {
    outline: 3px solid rgba(254, 121, 39, 0.45); /* DIUBAH: rgba(255, 199, 0, 0.45) menjadi rgba(254, 121, 39, 0.45) */
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary); /* DIUBAH: Sekarang akan berwarna oranye #FE7927 */
    text-decoration: none;
    transition: color 0.28s ease;
}
a:hover {
    color: var(--color-accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* Tombol Default */
.btn {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-text);
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-family: "Open Sans", sans-serif;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
    background: var(--color-accent-hover);
    color: var(--color-text);
    transform: scale(1.03);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary); /* DIUBAH: Sekarang akan berwarna oranye #FE7927 */
    border: 2px solid var(--color-primary); /* DIUBAH: Sekarang akan berwarna oranye #FE7927 */
    padding: 8px 20px;
}
.btn-secondary:hover {
    background: var(--color-primary); /* DIUBAH: Sekarang akan berwarna oranye #FE7927 */
    color: var(--color-white);
    transform: scale(1.03);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
}

/* ==== 3. Header & Navigasi (DIHAPUS TOTAL) - HANYA TEMPAT STYLES NAV YANG DISEMPURNAKAN DI SECTION 1 ==== */

.dropdown-menu li a {
    color: var(--color-text);
    font-weight: 400;
    font-size: 14px;
    text-transform: none;
    padding: 12px 18px;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
    background: var(--color-dropdown-hover);
    color: var(--color-primary); /* DIUBAH: Sekarang akan berwarna oranye #FE7927 */
}


/* ==== 4. Hero Section (Tidak Diubah) ==== */
.hero {
    /* Background image akan ditimpa oleh style di <head> beranda.php */
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
        url("../assets/images/hero-building.jpg") center center/cover no-repeat;
    height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--color-white);
}

.hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero h1 {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 5px; 
    
    margin: 0 auto 25px auto;
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 20px; 
    font-weight: 300; 
    letter-spacing: 8px; 
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-bottom: 5px; 
}

.hero-title-main {
    font-family: 'Poppins', sans-serif;
    font-size: 48px; 
    font-weight: 800; 
    letter-spacing: 1px; 
    line-height: 1.1;
    display: block;
}

/* Responsif di HP */
@media (max-width: 768px) {
    /* Navbar height di mobile sering berubah, sesuaikan padding jika perlu */
    body {
        padding-top: var(--navbar-mobile-height); /* Menggunakan variabel baru */
    }
    
    .hero-subtitle {
        font-size: 14px;
        letter-spacing: 4px;
    }
    .hero-title-main {
        font-size: 32px;
    }
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==== 5. Highlight Sections (Proyek & Berita) (Tidak Diubah) ==== */
.highlight-section {
    padding: 80px 0;
}

.highlight-section.bg-light {
    background: var(--color-bg-light);
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.section-cta {
    text-align: center;
}

/* Kartu Proyek */
.home-project-card {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: var(--color-white);
}

.home-project-card:hover {
    transform: translateY(-5px);
}

.home-project-card .card-thumbnail {
    position: relative;
    width: 100%;
    height: 200px; 
    background-color: #e0e0e0; 
    overflow: hidden;
}

.home-project-card .card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-project-card .card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-primary); /* DIUBAH: Sekarang akan berwarna oranye #FE7927 */
    color: var(--color-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 5;
}

.home-project-card .card-content {
    padding: 20px;
}

.home-project-card .card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.home-project-card .card-year {
    color: var(--color-text-secondary);
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

/* Kartu Berita */
.home-news-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: var(--color-white);
}

.home-news-card:hover {
    transform: translateY(-5px);
}

.home-news-card .card-thumbnail {
    position: relative;
    width: 100%;
    height: 200px; 
    background-color: #e0e0e0;
    overflow: hidden;
}

.home-news-card .card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-news-card .card-content {
    padding: 20px;
}

.home-news-card .card-date {
    color: var(--color-text-secondary);
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.home-news-card .card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.home-news-card .card-excerpt {
    color: var(--color-text-darker);
    font-size: 14px;
    line-height: 1.5;
}

/* ==== 6. Main Content Area (Tidak Diubah) ==== */
.main-content-area {
    padding-top: 80px;
    padding-bottom: 80px;
}

.main-content-area > .container {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.primary-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 360px;
    flex-shrink: 0;
}

/* ==== 7. Footer (Tidak Diubah) ==== */
.site-footer {
    background: var(--color-primary); /* DIUBAH: Sekarang akan berwarna oranye #FE7927 */
    color: var(--color-white);
    padding-top: 60px;
    padding-bottom: 30px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col {
    color: #dddddd;
}

.footer-col h4 {
    color: var(--color-accent);
    margin-bottom: 16px;
    font-size: 18px;
}

.footer-col p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #dddddd;
}

.footer-col a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    font-size: 12px;
    color: #dddddd;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-top: 20px;
}

.social-links-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    border-radius: 50%;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s, border-color 0.2s;
}

.social-links-footer a:hover {
    background-color: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-primary); /* DIUBAH: Sekarang akan berwarna oranye #FE7927 */
}

.policy-links {
    margin-top: 16px;
    padding: 0;
}

.policy-links li {
    margin-bottom: 5px;
}

.policy-links a {
    font-size: 13px;
    color: #bbbbbb;
}

.policy-links a:hover {
    color: var(--color-white);
}

/* ==== 8. Scroll to Top Button (Tidak Diubah) ==== */
.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-accent);
    color: var(--color-text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    z-index: 998;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.3s ease;
}

.scroll-top-btn.show {
    display: flex;
    opacity: 1;
}

.scroll-top-btn:hover {
    background: var(--color-accent-hover);
    color: var(--color-text);
    transform: scale(1.05);
}

/* ==== 9. Responsive Design ==== */
@media (max-width: 992px) {
    .hero h1 { font-size: 36px; }
    .highlight-grid { grid-template-columns: repeat(2, 1fr); }
    .main-content-area > .container { flex-direction: column; gap: 60px; }
    .sidebar { width: 100%; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { 
        font-size: 15px; 
        /* Menggunakan variabel mobile height */
        padding-top: var(--navbar-mobile-height); 
    }

    .site-header { 
        /* Mengubah tinggi navbar fixed di mobile */
        height: var(--navbar-mobile-height);
    }
    
    .container { padding-left: 16px; padding-right: 16px; }
    .section-title { font-size: 24px; }
    
    /* FIX Margin Negatif di Mobile: Menggunakan variabel untuk perhitungan yang akurat */
    /* main {
        margin-top: calc(-1 * var(--navbar-mobile-height)) !important; 
    } */

    .highlight-grid { grid-template-columns: 1fr; }
    .home-news-card .card-excerpt { min-height: auto; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 28px; }
    .hero { height: 350px; }
    .btn { padding: 8px 16px; font-size: 14px; }
}

/* --- ANIMASI JUDUL HERO (Tidak Diubah) --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero p {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 0.3s;
}

.hero .btn {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 0.6s;
}