/* --- 1. RESET & VARIABLES --- */
:root {
    --primary: #2563eb;
    --dark: #1e40af;
    --gold: #fbbf24;
    --text: #1f2937;
    --bg-light: #f9fafb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* SANGAT PENTING untuk Responsif */
    font-family: 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    /* Mencegah Scroll Samping (Penyebab kelebaran) */
    color: var(--text);
    background: var(--bg-light);
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- 2. UTILITIES & CONTAINER --- */
.container {
    width: 100%;
    /* Ubah max-width jadi width 100% dengan max */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* Padding kiri kanan agar konten tidak mepet di HP */
}

.section-padding {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}

/* Background System */
.bg-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

/* Gambar Background (Ganti URL Sesuai Keinginan) */
.hero {
    background-image: url('Image/BG_Hero.jpg');

}

.section-service {
    background-image: url('Image/BG_Service.jpg');
}

.section-about {
    background-image: url('Image/BG_About.jpg');
}

.section-profile {
    background-image: url('Image/BG_Hero.jpg');
}

.section-gallery {
    background-image: url('Image/BG_Galery.jpg');
}

.section-contact {
    background-image: url('Image/BG_Contact.jpg');
}

.section-overlay,
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.section-overlay {
    background: rgba(255, 255, 255, 0.021);
}

.hero-overlay {
    background: rgba(255, 255, 255, 0.021);
}

.relative-z,
.hero-content {
    position: relative;
    z-index: 2;
}

.bg-section .section-title h2,
.bg-section .section-title p {
    color: white;
}

/* --- 3. LOADING SCREEN --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
}

.pulse-logo {
    width: 300px;
    animation: pulse 1.9s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
    }
}

/* --- 4. NAVBAR (PERBAIKAN RESPONSIVE) --- */
/* .navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
} */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    /* Awalnya Transparan */
    background: rgba(255, 255, 255, 0);
    padding: 0.3rem 0;
    z-index: 1000;
    /* Efek transisi halus saat berubah warna */
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* Class tambahan ini akan aktif lewat Javascript saat di-scroll */
.nav.scrolled {
    background: rgba(255, 255, 255, 1);
    /* Menjadi Putih Solid */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Tambah bayangan */
    padding: 0.5rem 0;
    /* Sedikit menebal saat scroll (opsional) */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    /* color: var(--primary); */
    font-size: 1.1rem;
}

.logo img {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: #333;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: #333;
    transition: 0.3s;
}

/* --- 5. HERO SECTION --- */
/* --- MODIFIKASI NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    /* Awalnya Transparan */
    background: rgba(255, 255, 255, 0);
    padding: 0.3rem 0;
    z-index: 1000;
    /* Efek transisi halus saat berubah warna */
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* Class tambahan ini akan aktif lewat Javascript saat di-scroll */
.navbar.scrolled {
    background: rgba(255, 255, 255, 1);
    /* Menjadi Putih Solid */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Tambah bayangan */
    padding: 0.5rem 0;
    /* Sedikit menebal saat scroll (opsional) */
}

/* --- MODIFIKASI HERO SECTION (Desktop Center, HP Left) --- */
.hero {
    width: 100%;
    /* FIX HP: Gunakan min-height 100dvh agar pas layar HP */
    min-height: 100dvh;
    /* Gunakan dvh agar lebih akurat di HP */

    display: flex;
    align-items: center;
    /* Vertikal tetap tengah */

    /* DEFAULT (Desktop/Laptop): Rata Tengah */
    justify-content: center;
    text-align: center;

    /* Background settings */
    background-image: url('Image/BG_Hero.jpg');
    background-color: rgba(0, 0, 0, 0.1);
    /* Pastikan path gambar benar */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* FIX Background Zoom di HP: Gunakan scroll */
    background-attachment: scroll;

    position: relative;
    padding-top: 60px;
    /* Jarak untuk navbar */
}

/* Style Default H1 & P (Desktop) */
.hero h1 {
    font-size: 1.9rem;
    color: white;
    /* font-weight: 900; */
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #f0f0f0;
}

.cta-btn {
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
    display: inline-block;
}

.cta-btn:hover {
    background: var(--dark);
}

/* --- MEDIA QUERY KHUSUS HP (Max-width 768px) --- */
@media screen and (max-width: 768px) {
    .hero {
        /* HP: Ubah jadi Rata Kiri */
        justify-content: flex-start;
        text-align: left;
        padding-left: 20px;
        /* Beri jarak dari pinggir kiri */
        padding-right: 20px;
    }

    .hero-content {
        width: 100%;
        /* Pastikan konten mengisi lebar */
    }

    .hero h1 {
        font-size: 1.7rem;
        /* Kecilkan font sedikit di HP */
    }
}

/* --- 6. GRIDS & CARDS (RESPONSIVE READY) --- */
.service-grid {
    display: grid;
    /* Auto-fit: Otomatis turun ke bawah jika layar sempit */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-box {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}

.service-box:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--primary);
}

.service-box .icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Vision & Interest */
.vision-banner {
    background: rgba(254, 254, 255, 0.979);
    color: rgb(46, 45, 45);
    padding: 3rem 1rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.vision-badge,
h1 {
    color: white;
}

.vision-badge {
    background: var(--gold);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: bold;
}

.highlight-gold {
    border-bottom: 3px solid var(--gold);
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.interest-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.typo-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.5rem;
}

.blue-theme {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.orange-theme {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.purple-theme {
    background: linear-gradient(135deg, #a855f7, #9333ea);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 1.5rem;
    text-align: center;
    border-radius: 10px;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

/* --- UPDATE: COMPANY PROFILE & GALLERY (STANDARD PORTRAIT SIZE) --- */

/* 1. Pengaturan Wadah (Container) */
.cp-slider-container {
    width: 100%;
    /* INI KUNCINYA: Batasi lebar maksimal agar di Laptop tidak raksasa */
    max-width: 450px;

    /* Paksa Rasio Asli (2479 lebar / 3510 tinggi) */
    aspect-ratio: 2479 / 3510;

    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin: 0 auto 2rem;
    /* Posisi Tengah */
    background: #f0f0f0;
}

.gallery-wrapper {
    width: 100%;
    /* INI KUNCINYA: Batasi lebar maksimal untuk Galeri juga */
    max-width: 400px;

    /* Paksa Rasio Asli (640 lebar / 800 tinggi) */
    aspect-ratio: 640 / 800;

    position: relative;
    overflow: hidden;
    border-radius: 15px;
    border: 2px solid white;
    margin: 0 auto 2rem;
    /* Posisi Tengah */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 2. Pengaturan Gambar agar FULL IMAGE (Tidak Terpotong) */
.cp-slide img,
.gallery-slide img {
    width: 100%;
    height: 100%;
    /* CONTAIN = Pastikan seluruh gambar masuk ke dalam kotak tanpa terpotong */
    object-fit: contain;
    display: block;
}

/* 3. Animasi Slider */
.cp-slide,
.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: 1s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    /* Latar putih jika gambar tidak memenuhi rasio */
}

.cp-slide.active,
.gallery-slide.active {
    opacity: 1;
    z-index: 1;
}

/* 4. RESET RESPONSIVE (PENTING) */
/* Hapus paksaan tinggi di HP agar mengikuti aspect-ratio di atas */
@media screen and (max-width: 768px) {

    .gallery-wrapper,
    .cp-slider-container {
        height: auto !important;
        /* Biarkan otomatis */
        max-width: 80%;
        /* Di HP, gunakan 80% lebar layar agar manis */
    }
}



/* Gallery full cover */

.download-btn {
    display: inline-block;
    background: var(--dark);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
    border: 1px solid white;
}

/* Partners Marquee */
.partners-section {
    background: white;
    padding: 2rem 0;
    overflow: hidden;
}

.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    /* Tambahan opsional: agar masking rapi */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    /* FIX PENTING: max-content memaksa container selebar jumlah total gambar */
    /* Ini yang membuat semua gambar muncul di HP */
    width: max-content;

    /* Animasi berjalan terus menerus */
    animation: marquee 40s linear infinite;
}

.partner-item {
    flex: 0 0 180px;
    /* Tidak dirubah: ukuran tetap */
    padding: 0 20px;
    text-align: center;
    padding-top: 5px;
}

.partner-item img {
    height: 60px;
    /* Tidak dirubah: ukuran tetap */
    width: auto;
    transition: 0.3s;
}

/* FIX ANIMASI: Ubah translateX jadi -50% */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Kita ubah ke -50% karena kita akan menduplikasi item di HTML */
        /* Ini membuat perputaran menjadi mulus (seamless) */
        transform: translateX(-50%);
    }
}

/* Contact Form & Maps */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-box {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

/* Maps Fix Mobile */
.map-container {
    position: relative;
    width: 100%;
    height: 350px !important;
    /* Paksa tinggi */
    min-height: 350px;
    background-color: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: block;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.qr-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    text-align: center;
}

.social-links {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 35px;
    height: 35px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer & WA */
footer {
    background: rgb(255, 255, 255);
    color: black;
    padding: 3rem 0 1rem;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 2rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-left img {
    height: 40px;
}

.copyright {
    border-top: 1px solid #333;
    padding-top: 1rem;
    color: black;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

/* ========================================= */
/* BAGIAN KHUSUS FIX MOBILE (MEDIA QUERIES)  */
/* ========================================= */

@media screen and (max-width: 768px) {

    /* 1. Navbar menjadi Slide-in Menu */
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 60px;
        height: 78vh;
        background: white;
        flex-direction: column;
        width: 45%;
        align-items: center;
        justify-content: flex-start;
        /* padding-top: 3rem; */
        transition: 0.4s;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 10px;
        font-size: 1rem;
    }

    /* 2. Fix Hero di HP */
    .hero {
        /* Ganti ke scroll agar background tidak ke-zoom parah di HP */
        background-attachment: scroll;
        min-height: 100vh;
        /* Pastikan full screen */
        padding: 80px 20px 20px;
        /* Tambah padding atas agar tidak ketabrak navbar */
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* 3. Stacking Layout (Grid jadi 1 kolom) */
    .interest-grid,
    .stats-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        /* Paksa 1 kolom ke bawah */
        gap: 2rem;
    }

    /* 4. Fix Background Attachment di semua section */
    .bg-section {
        background-attachment: scroll;
    }

    /* 5. Footer Stacking */
    .footer-content {
        flex-direction: column;
    }

    /* 6. Partner Marquee */
    .partner-item {
        flex: 0 0 150px;
    }

    /* 7. Gallery & CP Slider Height */
    .gallery-wrapper,
    .cp-slider-container {
        height: 250px;
    }
}