/* =========================================================
   1. RESET, VARIABLES & THEME BASE (root.css)
   ========================================================= */

/* --- FONT IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Montserrat:wght@300;400;500&display=swap');

:root {
    /* --- COLOR PALETTE --- */
    --bg-color: #F9F7F2;       /* Background Utama (Light) */
    --text-dark: #1B2A39;      /* Teks Utama / Judul */
    --text-body: #333333;      /* Teks Paragraf */
    --accent: #B39A6A;         /* Warna Aksen (Emas) */
    --white: #ffffff;          /* Warna Putih / Background Card */

    /* --- TYPOGRAPHY --- */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; /* Mencegah scroll horizontal yang tidak diinginkan */
}

body {
    background: var(--bg-color);
    color: var(--text-body);
    font-family: var(--font-body);
    line-height: 1.7;
    transition: background 0.3s ease, color 0.3s ease; /* Transisi halus saat ganti tema */
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* --- DARK MODE VARIABLES --- */
body.dark {
    --bg-color: #0f1720;       /* Background Utama (Dark) */
    --text-dark: #ffffff;      /* Judul jadi Putih */
    --text-body: #e0e0e0;      /* Paragraf jadi Abu Terang */
    --white: #0f1720;          /* Background Card jadi Gelap */
}

/* =========================================================
   2. TYPOGRAPHY (typography.css)
   ========================================================= */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-dark); /* Mengikuti tema (Hitam/Putih) */
    font-weight: 600;
}

/* Override khusus untuk judul tertentu agar berwarna Emas jika diinginkan */
/* h1, h2, h3, h4 { color: rgb(255, 174, 0); } <--- Hapus atau aktifkan sesuai kebutuhan desain */

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 0 5%;
}

/* Fix Warna Judul di Header Gambar (Selalu Putih) */
.gallery-header h1,
.gallery-header .subtitle {
    color: #ffffff !important;
}

/* =========================================================
   3. NAVBAR & MENU (navbar.css)
   ========================================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transform: translateY(-100%); /* Default tersembunyi */
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.navbar.nav-visible {
    transform: translateY(0);
    opacity: 1;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.nav-container {
    height: 80px;
    display: flex;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 24px;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
}

/* Logo */
.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.nav-logo:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Menu Items */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    margin-left: auto;
}

.nav-link {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    padding: 10px 0;
}

.nav-link:hover {
    color: var(--accent);
}

/* Dropdown */
.has-dropdown { position: relative; }
.arrow { font-size: 0.7rem; margin-left: 5px; }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -20px;
    background: var(--white);
    min-width: 220px;
    padding: 15px 0;
    list-style: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-top: 3px solid var(--accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 25px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.dropdown-menu li a:hover {
    background: #f4f4f4;
    color: var(--accent);
    padding-left: 30px;
}

/* Navbar Extras (Button & Hamburger) */
.nav-extras {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-get-product {
    background: var(--accent);
    color: var(--white);
    padding: 10px 25px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-get-product:hover {
    background: #977e4e;
}

.hamburger {
    display: none; /* Hidden on Desktop */
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    margin: 5px auto;
    transition: 0.3s;
}

/* ===============================

   GALLERY HEADER (LUXURY PARALLAX)

   =============================== */

.gallery-header {

    position: relative;

    height: 100vh; /* Full layar */

    width: 100%;

    display: flex;

    justify-content: center;

    align-items: center;

    overflow: hidden;

    text-align: center;

    color: var(--white);

}



.header-bg {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    z-index: -1;

}



.header-bg video,

.header-bg img {

    width: 100%;

    height: 100%;

    object-fit: cover; /* Memastikan video full cover tanpa gepeng */

}



.header-bg .overlay {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background: rgba(0,0,0,0.4); /* Gelapkan video agar teks terbaca */

}



.header-content h1 {

    font-size: clamp(3rem, 6vw, 5rem); /* Responsif font */

    font-family: var(--font-heading);

    letter-spacing: -1px;

    margin-bottom: 20px;

    line-height: 1.1;

}



.header-content .subtitle {

    font-family: var(--font-body);

    text-transform: uppercase;

    letter-spacing: 4px;

    color: goldenrod:

    font-size: 0.9rem;

    margin-bottom: 15px;

    opacity: 0.9;

}



.btn-scroll-down {

    display: inline-block;

    margin-top: 30px;

    color: var(--white);

    border: 1px solid rgba(255,255,255,0.5);

    padding: 12px 30px;

    text-transform: uppercase;

    letter-spacing: 2px;

    font-size: 0.75rem;

    transition: 0.4s;

    background: rgba(0,0,0,0.2);

    backdrop-filter: blur(5px);

}



.btn-scroll-down:hover {

    background: var(--white);

    color: var(--text-dark);

}
/* ===============================

   CLIENT LOGOS

   =============================== */

.client-logos {

    padding: 60px 5%;

    background: var(--white);

    text-align: center;

    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

}



.client-logos p {

    font-size: 0.75rem;

    text-transform: uppercase;

    letter-spacing: 2px;

    margin-bottom: 30px;

    opacity: 0.6;

}



.logo-grid {

    display: flex;

    justify-content: center;

    gap: 10px;

    flex-wrap: wrap;

    opacity: 0.8; /* Logo agak pudar agar elegan */

    filter: grayscale(100%); /* Hitam putih */

}



.logo-grid img {

    height: 150px;

    width: auto;

    transition: 0.3s;

}



.logo-grid img:hover {

    opacity: 1;

    filter: grayscale(0%);

}



/* ===============================

   MASONRY GRID (THE CORE)

   =============================== */

.gallery-section {

    padding: 80px 4%;

    background: var(--bg-color);

}



.gallery-filter-container {

    display: flex;

    justify-content: center;

    gap: 20px;

    margin-bottom: 50px;

}



.filter-btn {

    background: none;

    border: none;

    font-family: var(--font-body);

    font-size: 0.85rem;

    text-transform: uppercase;

    letter-spacing: 1px;

    cursor: pointer;

    color: var(--text-body);

    padding-bottom: 5px;

    position: relative;

    opacity: 0.6;

    transition: 0.3s;

}



.filter-btn.active, .filter-btn:hover {

    opacity: 1;

    color: var(--text-dark);

}



.filter-btn.active::after {

    content: '';

    position: absolute;

    bottom: 0;

    left: 0;

    width: 100%;

    height: 1px;

    background: var(--text-dark);

}



/* Style Masonry menggunakan Columns */

.masonry-grid {

    column-count: 3; /* 3 Kolom */

    column-gap: 10px; /* Jarak antar kolom */

}



.masonry-item {

    break-inside: avoid; /* Jangan potong item di tengah */

    margin-bottom: 20px; /* Jarak bawah */

    position: relative;

    overflow: hidden;

    cursor: pointer;

}



.masonry-item img,

.masonry-item video {

    width: 100%;

    height: auto;

    display: block;

    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

}



/* Overlay Effect */

.item-overlay {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background: rgba(0,0,0,0.4);

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: center;

    opacity: 0;

    transition: opacity 0.4s ease;

    padding: 20px;

}



.item-overlay h3 {

    color: white;

    font-family: var(--font-heading);

    font-size: 1.5rem;

    transform: translateY(20px);

    transition: 0.4s;

}



.item-overlay p {

    color: rgba(255,255,255,0.8);

    font-size: 0.8rem;

    text-transform: uppercase;

    letter-spacing: 2px;

    margin-top: 5px;

    margin-bottom: 20px;

    transform: translateY(20px);

    transition: 0.4s delay 0.1s;

}



.btn-view-project {

    background: transparent;

    color: white;

    border: 1px solid white;

    padding: 8px 20px;

    text-transform: uppercase;

    font-size: 0.7rem;

    letter-spacing: 1px;

    transform: translateY(20px);

    transition: 0.3s;

    cursor: pointer;

}



.btn-view-project:hover {

    background: white;

    color: black;

}



/* Hover State */

.masonry-item:hover img,

.masonry-item:hover video {

    transform: scale(1.05); /* Zoom in halus */

}



.masonry-item:hover .item-overlay {

    opacity: 1;

}



.masonry-item:hover .item-overlay h3,

.masonry-item:hover .item-overlay p,

.masonry-item:hover .btn-view-project {

    transform: translateY(0);

}



/* Load More & Hidden Items */

.hidden-item {

    display: none; /* Sembunyikan item tambahan secara default */

}



.load-more-container {

    text-align: center;

    margin-top: 60px;

}



.btn-load-more {

    background: var(--text-dark);

    color: var(--white);

    border: none;

    padding: 15px 40px;

    font-family: var(--font-body);

    text-transform: uppercase;

    letter-spacing: 2px;

    font-size: 0.8rem;

    cursor: pointer;

    transition: 0.3s;

}



.btn-load-more:hover {

    background: var(--accent);

    transform: translateY(-2px);

}



/* Responsive */

@media (max-width: 900px) {

    .masonry-grid {

        column-count: 2; /* Tablet jadi 2 kolom */

    }

}



@media (max-width: 600px) {

    .masonry-grid {

        column-count: 1; /* HP jadi 1 kolom */

    }

    .header-content h1 {

        font-size: 2.5rem;

    }

}



/* Tambahkan ini di gallery.css */

@keyframes fadeIn {

    from {

        opacity: 0;

        transform: translateY(20px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



/* ===============================

   YOUTUBE EMBED STYLE

   =============================== */

.video-wrapper {

    position: relative;

    width: 100%;

    /* Rasio Aspek 16:9 (Standar YouTube) */

    /* Jika video Anda portrait (Shorts), ubah padding-bottom jadi 177.7% */

    padding-bottom: 56.25%;

    height: 0;

    overflow: hidden;

    background: #000; /* Background hitam saat loading */

}



.video-wrapper iframe {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    /* Skala sedikit (120%) untuk menyembunyikan garis hitam/UI pinggir YouTube agar terlihat seperti full video */

    transform: scale(1.2);

    pointer-events: none; /* Mencegah user klik pause/play di video background */

}



/* Khusus Mobile: Matikan autoplay YouTube agar hemat kuota user */

@media (max-width: 768px) {

    .video-wrapper iframe {

        pointer-events: auto; /* Biarkan user klik play sendiri di HP */

    }

}

/* =========================================================
   5. RESPONSIVE / MOBILE STYLES (responsive.css)
   ========================================================= */

/* --- TABLET & MOBILE (Max 968px) --- */
@media (max-width: 968px) {
    /* Navbar & Hamburger */
    .hamburger { display: block; }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-color);
        flex-direction: column;
        transition: 0.4s;
    }

    .nav-menu.active { left: 0; }

    /* Dropdown di Mobile */
    .has-dropdown:hover .dropdown-menu { display: none; }
    .has-dropdown.active .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: block;
        box-shadow: none;
        background: #f0eee9;
    }

    /* Sembunyikan Tombol "Get Product" di Header */
    .btn-get-product { display: none; }

    /* Animasi Hamburger Icon */
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --- MOBILE PHONE (Max 768px) --- */
@media (max-width: 768px) {
    /* Navbar Padding */
    .nav-container { padding: 0 20px; }
    .nav-logo { font-size: 1.3rem; letter-spacing: 1px; }
    .nav-logo img { height: 32px; }

    /* Nav Menu Panel */
    .nav-menu {
        padding: 32px 24px;
        gap: 6px;
        box-sizing: border-box;
        z-index: 999;
        align-items: flex-start;
    }

    .nav-item { width: 100%; }

    .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 14px 0;
        font-size: 1rem;
        letter-spacing: 0.8px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    /* Extras & Hamburger */
    .nav-extras { gap: 14px; }
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        cursor: pointer;
        z-index: 1200;
    }

    /* Dropdown Adjustment */
    .dropdown-menu {
        position: static;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 6px 0 12px;
        display: none;
    }
    .has-dropdown.active .dropdown-menu { display: block; }
    .dropdown-menu li a { padding: 10px 0 10px 16px; font-size: 0.9rem; opacity: 0.85; }

    /* Footer Responsive */
    footer { padding: 60px 20px 30px; }
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 15px; }

    .footer-col.brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-col.brand img {
        height: 45px;
        margin-bottom: 20px;
    }
}