/* =========================================
   01. VARIABEL & RESET DASAR
   ========================================= */
:root {
    --primary-blue: #002060;
    --accent-yellow: #FFFF00;
    --bg-black: #000000;
    --text-white: #FFFFFF;
    --placeholder-gray: #D9D9D9;
}

html {
    scroll-behavior: smooth; /* Efek meluncur saat klik menu navbar */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-black);
    color: var(--accent-yellow);
}

a {
    text-decoration: none;
}

/* =========================================
   02. KOMPONEN GLOBAL (Digunakan di banyak halaman)
   ========================================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-yellow);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--accent-yellow);
    padding: 12px 35px;
    border: 1px solid var(--accent-yellow);
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
}

/* =========================================
   HEADER HALAMAN DALAM (Layanan, Portofolio, Tentang)
   ========================================= */
.page-header {
    width: 100%;
    height: 350px; 
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Menggunakan Overlay Transparan (60% gelap) + Gambar Banner */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('img/bg-hero.png');
    background-size: cover; /* Berubah menjadi cover agar membentang penuh */
    background-repeat: no-repeat;
    background-position: center;
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--accent-yellow);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9), -1px -1px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

/* =========================================
   03. HEADER (NAVBAR) & FOOTER
   ========================================= */
header {
    background-color: var(--primary-blue);
    padding: 10px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 50px; 
    width: auto;  
    display: block;
}

nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--accent-yellow);
    font-weight: 500;
    transition: 0.3s ease;
}

nav a:hover {
    color: var(--text-white);
}

footer {
    background-color: var(--primary-blue);
    color: var(--accent-yellow);
    text-align: center;
    padding: 25px;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* =========================================
   04. HALAMAN BERANDA (index.php)
   ========================================= */
/* Hero Section */
.hero {
    width: 100%;
    height: 80vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    
    /* Menggunakan Overlay Transparan (60% gelap) + Gambar Banner */
    /* Pastikan path url() sesuai dengan lokasi gambar Anda */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('img/bg-hero.png');
    background-size: cover;  /* Berubah menjadi cover agar full screen */
    background-repeat: no-repeat;
    background-position: center;

    transition : background-image 0.5s ease-in-out; /* Transisi halus saat hover */
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.9);
}

.hero p {
    max-width: 1000px;
    line-height: 1.6;
    color: var(--text-white);
    margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
    font-size: 1.8rem;
}

/* === Services Zig-Zag di Beranda (Menggunakan Gambar Asli) === */
.service-row {
    display: flex;
    align-items: center;
    gap: 50px; /* Jarak aman antara teks dan gambar */
    margin-bottom: 80px;
}

.service-row:nth-child(even) {
    flex-direction: row-reverse;
}

.service-content {
    flex: 1.5; /* Memberi ruang lebih luas untuk teks */
}

.service-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-yellow);
}

.service-content p {
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-white);
    font-size: 1.1rem;
}

/* Membungkus gambar agar ujungnya melengkung rapi */
.service-image {
    flex: 1; /* Memberi ruang yang lebih kecil untuk gambar */
    border-radius: 8px;
    overflow: hidden; /* Penting: Memotong sudut gambar yang tajam */
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); /* Efek bayangan */
}

/* Mengatur ukuran gambar asli dari HTML */
.service-image img {
    width: 100%;
    height: 280px; /* Mengunci tinggi gambar agar tidak memakan layar */
    object-fit: cover; /* Ajaibnya di sini: Gambar otomatis terpotong rapi tanpa merusak proporsi */
    display: block;
}

/* Testimonial Section */
#testimonials {
    padding-bottom: 100px;
}

.slider-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    height: 450px; 
}

.testi-card {
    background-color: var(--placeholder-gray); 
    border-radius: 4px;
    width: 220px;
    height: 300px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.testi-card .testi-img {
    background-color: var(--primary-blue);
    width: 100%;
    height: 100%; 
    border-radius: 2px;
    transition: all 0.4s ease;
}

.testi-card .testi-content {
    height: 0;
    opacity: 0;
    overflow: hidden;
    text-align: center;
    color: var(--bg-black); 
    transition: all 0.4s ease;
}

.testi-card.active {
    width: 280px;  
    height: 380px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.5); 
}

.testi-card.active .testi-img {
    height: 180px; 
    margin-bottom: 15px;
}

.testi-card.active .testi-content {
    height: auto;
    opacity: 1; 
}

.testi-content h4 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.testi-content p {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

/* =========================================
   05. HALAMAN LAYANAN (services.php)
   ========================================= */
.services-page-container {
    padding-top: 20px;
    padding-bottom: 100px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}

.service-card-box {
    background-color: var(--placeholder-gray);
    padding: 60px 50px;
    border-radius: 4px;
    color: var(--bg-black); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.service-card-box h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.service-card-box p {
    font-size: 1.2rem;
    line-height: 1.6;
    text-align: left;
}

/* Styling khusus untuk daftar bullet di layanan */
.service-list {
    text-align: left;
    margin-left: 25px; /* Memberikan jarak agar titik bullet tidak menabrak batas kiri */
}

.service-list li {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 12px; /* Jarak antar baris poin agar lega dibaca */
    color: var(--bg-black);
    list-style-type: square; /* Mengubah titik bulat menjadi kotak yang lebih tegas */
}

.service-list p {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--bg-black);
}

/* Jika dibuka di HP, ukuran teks disesuaikan */
@media (max-width: 768px) {
    .service-list li {
        font-size: 1.05rem;
    }
}

/* =========================================
   06. HALAMAN PORTOFOLIO (portofolio.php)
   ========================================= */
.portfolio-page-container {
    padding-top: 20px;
    padding-bottom: 100px;
}

/* Baris Pemisah Kategori Portofolio */
.portfolio-category-header {
    background-color: var(--primary-blue);
    color: var(--accent-yellow);
    text-align: center;
    padding: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 50px;    /* Jarak dari grid kategori sebelumnya */
    margin-bottom: 20px; /* Jarak ke grid foto di bawahnya */
    width: 100%;
}

/* Menghilangkan margin atas yang terlalu besar untuk kategori pertama */
.portfolio-category-header:first-of-type {
    margin-top: 0;
}

.portfolio-grid-fixed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; 
}

.portfolio-item-fixed {
    width: 100%;
    aspect-ratio: 1 / 1; 
    background-color: var(--placeholder-gray);
    overflow: hidden; 
    position: relative; 
    cursor: pointer;
}

.portfolio-item-fixed img,
.img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.4s ease; 
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 32, 96, 0.85); 
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    opacity: 0; 
    transition: all 0.3s ease-in-out;
}

.portfolio-overlay h3 {
    color: var(--accent-yellow); 
    font-size: 1.5rem;
    margin: 0;
    transform: translateY(20px); 
    transition: all 0.3s ease-in-out;
}

.portfolio-item-fixed:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item-fixed:hover .portfolio-overlay h3 {
    transform: translateY(0);
}

.portfolio-item-fixed:hover img,
.portfolio-item-fixed:hover .img-placeholder {
    transform: scale(1.1);
}

/* =========================================
   07. RESPONSIVENESS (MEDIA QUERIES)
   ========================================= */
/* Tablet */
@media (max-width: 992px) {
    header {
        padding: 15px 30px;
    }
    .service-row, .service-row:nth-child(even) {
        gap: 30px;
    }
    .service-image {
        height: 250px;
    }
}

/* =========================================
   08. HALAMAN TENTANG (about.php)
   ========================================= */
.about-page-container {
    padding-top: 20px;
    padding-bottom: 100px;
}

/* Format teks paragraf perusahaan (Kuning, Bold, Justify) */
.about-description {
    color: var(--accent-yellow);
    font-size: 1.15rem;
    line-height: 1.6;
    font-weight: 600; /* Membuat teks sedikit lebih tebal/bold */
    margin-bottom: 80px; /* Jarak yang luas antara paragraf dan kotak visi misi */
    text-align: justify; /* Teks rata kanan-kiri seperti di desain */
}

/* Grid Khusus untuk Visi & Misi */
.about-vision-mission {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

/* Handphone Besar */
@media (max-width: 768px) {
    nav {
        display: none; /* Disembunyikan sementara di HP, biasanya diganti ikon hamburger */
    }
    
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    /* Mengubah susunan menjadi Atas-Bawah di HP */
    .service-row, .service-row:nth-child(even) { 
        flex-direction: column; 
        text-align: center;
        gap: 30px; 
    }
    
    .service-content, 
    .service-image {
        width: 100%; /* Kembali memenuhi layar di HP */
    }
    
    .slider-container {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }
    
    .page-header {
        height: 250px;
    }
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .service-card-box {
        padding: 40px 30px;
    }
    .service-card-box h2 {
        font-size: 2.2rem;
    }
    
    .portfolio-grid-fixed {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-description {
        font-size: 1rem;
        margin-bottom: 50px;
    }
    
    .about-vision-mission {
        grid-template-columns: 1fr; /* Berubah menjadi 1 kolom atas-bawah di HP */
        gap: 30px;
    }
}

/* Handphone Kecil */
@media (max-width: 480px) {
    .portfolio-grid-fixed {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ANIMASI MASUK (SCROLL & LOAD)
   ========================================= */
/* 1. State Awal: Semua elemen yang akan dianimasikan disembunyikan (transparan) */
.animate-element {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Kurva animasi agar mulus */
}

/* 2. Jenis-jenis arah datangnya animasi */
.fade-up { transform: translateY(50px); }
.fade-down { transform: translateY(-50px); }
.fade-left { transform: translateX(-50px); }
.fade-right { transform: translateX(50px); }
.zoom-in { transform: scale(0.85); }

/* 3. State Aktif: Muncul secara penuh ke posisi aslinya */
.animate-element.show-animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* 4. Efek Jeda (Stagger) jika ada elemen berdampingan agar tidak muncul bersamaan */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }