/* Regular */
@font-face {
  font-family: 'IowanOldStyleBT';
  src: url('/assets/fonts/iowanoldst-bt-webfont/bitstream-iowan-old-style-bt-586c36a8d7712.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Italic */
@font-face {
  font-family: 'IowanOldStyleBT';
  src: url('/assets/fonts/iowanoldst-bt-webfont/bitstream-iowan-old-style-italic-bt-586c3740dc396.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Bold */
@font-face {
  font-family: 'IowanOldStyleBT';
  src: url('/assets/fonts/iowanoldst-bt-webfont/bitstream-iowan-old-style-bold-bt-586c371d8d669.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Bold Italic */
@font-face {
  font-family: 'IowanOldStyleBT';
  src: url('/assets/fonts/iowanoldst-bt-webfont/bitstream-iowan-old-style-bold-italic-bt-586c37701cb62.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Black (Extra Bold) */
@font-face {
  font-family: 'IowanOldStyleBT';
  src: url('/assets/fonts/iowanoldst-bt-webfont/bitstream-iowan-old-style-black-bt-586c36e930225.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Black Italic */
@font-face {
  font-family: 'IowanOldStyleBT';
  src: url('/assets/fonts/iowanoldst-bt-webfont/bitstream-iowan-old-style-black-italic-bt-586c378f12ca1.woff') format('woff');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

html, body {
  font-family: 'IowanOldStyleBT', serif;
}



/* --- FONT FALLBACKS (Google Fonts) --- */
:root {
    --font-title: 'Lora', serif;
    --font-subtitle: 'Open Sans', sans-serif;
    --font-content: 'Playfair Display', serif;

    --color-text: #444;
    --color-primary: #5a4b41;
    /* Coklat Tua */
    --color-accent: #9d887a;
    /* Coklat Muda */
    --color-background: #F8F5F0;
    /* Cream/Beige (BACKGROUND UTAMA) */
    --color-button: #35445B;
    /* Warna tombol Reserve */
    --color-copyright-bg: #a8a8a8;
    /* Latar belakang copyright bar */
    --color-footer-text: #444;
}

/* --- RESET & GLOBAL --- */
* {
    box-sizing: border-box;
}

/* PENTING: Menghilangkan margin browser default dan mencegah scroll horizontal */
html,
body {
    margin: 0;
    padding: 0;
    /* Mencegah munculnya scrollbar horizontal (whitespace tak terlihat) */
    overflow-x: hidden;
}

body {
    /*font-family: var(--font-content);*/
    font-family: 'IowanOldStyleBT', serif;
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    transition: padding-top 0.4s ease-in-out;
}

/* Class yang ditambahkan JS saat body discroll, mengatasi Fixed Navbar */
.scrolled-body {
    padding-top: 80px;
}

/* PENTING: Menghilangkan padding kiri/kanan global di container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

h1,
h2,
h3 {
    /*font-family: var(--font-title);*/
    font-family: 'IowanOldStyleBT', serif;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
}

.subtitle,
.section-subtitle,
.navbar a,
.btn-reserve {
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    font-weight: 400;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: var(--color-accent);
    transition: color 0.3s;
}

/* --- STICKY HEADER (Navbar) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Navbar harus selalu memiliki padding */
    padding: 20px 40px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    z-index: 1000;
    background-color: rgba(90, 75, 65, 0);
    /* Transparan di Hero */
    transition: background-color 0.4s ease-in-out, padding 0.4s ease-in-out;
}

/* GAYA NAVBAR SAAT DI SCROLL KE BAWAH (Kelas ditambahkan oleh JS) */
.navbar.scrolled {
    background-color: var(--color-background);
    padding: 10px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Mengganti warna teks agar terlihat di latar belakang putih/cream */
.navbar.scrolled .navbar-left span,
.navbar.scrolled .navbar-right .lang-select {
    color: var(--color-text);
}

.navbar.scrolled .navbar-center .logo-text {
    color: var(--color-text);
}

/* --- NAVBAR NEW LAYOUT (Disesuaikan untuk Centering Mutlak) --- */
.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    /* PENTING: Masing-masing mengambil 1/3 dari ruang tersedia */
    flex: 1;
}

.navbar-left {
    justify-content: flex-start;
}

.navbar-right {
    justify-content: flex-end;
    gap: 20px;
}

.navbar-center {
    display: flex;
    justify-content: center;
    align-items: center;

    /* PENTING: Mengambil 1/3 ruang yang sama dengan kiri dan kanan */
    flex: 1;

    flex-direction: column;
    /* Tetap pertahankan column untuk logo teks/tagline */
}

.main-logo {
    height: 40px;
    width: auto;
    margin-bottom: 5px;
}

.logo-text {
    /*font-family: var(--font-title);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 1.2em;
    color: white;
    transition: color 0.3s;
}

/* Menu Toggle Styling */
.menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: white;
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 1em;
    transition: color 0.3s;
    z-index: 1001;
    /* Pastikan ikon menu di atas overlay */
}

.burger-icon {
    font-size: 1.5em;
    line-height: 1;
}

/* Language Selector */
.lang-select {
    color: white;
    font-size: 1em;
}

/* Reserve Button */
.btn-reserve {
    background-color: #35445B;
    color: white;
    padding: 10px 25px;
    /*border-radius: 5px;*/
    transition: background-color 0.3s, transform 0.2s;
    font-size: 0.9em;
}

.btn-reserve:hover {
    background-color: #35404d;
    transform: translateY(-2px);
}


/* --- HERO SECTION STYLING (Menggunakan 100vh) --- */
.hero-section {
    position: relative;
    min-height: 8vh;
    margin-top: 0;
    background-color: #000;
    padding-top: 0;

    text-align: center;
    overflow: hidden;
}

/* GAYA KHUSUS UNTUK VIDEO HERO */
#heroVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    z-index: 2;
    color: white;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-size: 3em;
    margin: 0;
    text-transform: none;
    color: white;
}

.hero-subtitle {
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 1.2em;
    margin: 5px 0 10px 0;
    color: white;
    letter-spacing: 5px;
}

.hero-description {
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 0.8em;
    margin: 0;
    color: white;
    letter-spacing: 2px;
}

/* =========================================================
 * PADDING INTERNAL UNTUK KONTEN DI DALAM CONTAINER 
 * ========================================================= */
.story-section .container>*,
.facilities-section .container>*,
.gallery-section .container>*,
.cta-section .container>* {
    padding-left: 20px;
    padding-right: 20px;
}

/* Hapus padding pada elemen yang harus tetap full width atau sudah dihandle */
.villa-carousel-area {
    padding: 0 !important;
}

/* --- STORY SECTION STYLING --- */
.story-section {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.content-row {
    display: flex;
    gap: 60px;
    margin-top: 40px;
    padding: 0;
}

.quote {
    flex: 1;
    font-size: 2.2em;
    font-style: italic;
    line-height: 1.3;
    text-align: left;
    margin: 0;
    padding-right: 20px;
    border-right: 1px solid var(--color-accent);
    color: var(--color-primary);
}

.story-text {
    flex: 1;
    text-align: left;
    font-size: 1.1em;
}


/* --- FACILITIES SECTION STYLING (Background Putih) --- */
.facilities-section {
    padding: 80px 0;
    text-align: center;
    /* START OF PATTERN IMPLEMENTATION */
    background:
        url('../images/bg-pattern.png') repeat,
        /* Lapisan pattern */
        linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
        /* Lapisan warna putih transparan */
        #FFFFFF;
    /* Warna putih solid sebagai fallback dan lapisan dasar */
    background-blend-mode: multiply;
    /* Ini akan menggabungkan pattern dan warna putih secara harmonis */
    /* END OF PATTERN IMPLEMENTATION */
}

/* Section Subtitle untuk Facilities */
.facilities-section .section-subtitle {
    color: var(--color-text);
    font-size: 0.9em;
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    margin-bottom: 50px;
    letter-spacing: 1px;
}

/* Mengubah tata letak menjadi Grid 3x2 */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 40px;
    margin-top: 40px;
    padding: 0;
}

.facility-item {
    padding: 0;
    border-top: none;

    text-align: center;
    /*font-family: var(--font-content);*/
    font-family: 'IowanOldStyleBT', serif;
}

.facility-item h3 {
    font-size: 1.1em;
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    margin-top: 0;
    margin-bottom: 10px;
}

.facility-item p {
    font-size: 1em;
    line-height: 1.5;
    color: var(--color-text);
}

.facility-item a {
    display: none;
}


/* --- VILLA SECTION STYLING --- */
.villa-section {
    padding: 80px 0;
    background-color: var(--color-background);
    text-align: left;
}

/* Wrapper di dalam .container yang membagi konten */
.villa-content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.villa-text-content {
    flex: 1;
    max-width: 100%;
    padding-right: 20px;
}

.villa-text-content .section-title {
    margin-top: 0;
}

.villa-text-content .subtitle {
    font-size: 0.9em;
    color: var(--color-accent);
    margin-top: -15px;
    margin-bottom: 30px;
}

.villa-text-content p {
    font-size: 0.95em;
    margin-bottom: 20px;
}

.villa-text-content strong {
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    font-weight: 700;
    color: var(--color-primary);
}


/* --- VILLA CAROUSEL STYLING --- */
.villa-carousel-area {
    flex: 1;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Kontainer yang bisa digeser manual (dan oleh JS) */
.villas-carousel {
    display: flex;
    flex-wrap: nowrap;

    overflow-x: scroll;
    scroll-snap-type: x mandatory;

    gap: 20px;
    /* PENTING: Tambahkan padding 20px di kiri dan kanan untuk menyamakan dengan konten teks */
    padding: 0 20px 20px 20px;
    margin-bottom: 20px;

    scroll-behavior: smooth;
}

/* Menyembunyikan scrollbar */
.villas-carousel::-webkit-scrollbar {
    display: none;
}

.villas-carousel {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.btn-reserve:hover{
    color:white;
}

.villa-card {
    flex: 0 0 calc(33.333% - 13.333px);
    min-width: 350px;
    background: white;
    text-align: left;
    transition: box-shadow 0.3s;

    scroll-snap-align: start;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Hapus margin kanan pada card terakhir yang tidak diperlukan karena padding pada carousel sudah ada */
.villas-carousel .villa-card:nth-child(3),
.villas-carousel .villa-card:nth-child(6) {
    margin-right: 0;
}


.villa-card img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.villa-card h3 {
    margin: 15px 15px 5px;
    font-size: 1.2em;
    text-transform: none;
}

.villa-details {
    padding: 0 15px;
    margin-bottom: 15px;
}

.villa-details p {
    margin: 0;
    line-height: 1.4;
    font-size: 0.9em;
}

.villa-details strong {
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    color: var(--color-text);
}

.villa-details .key-features {
    margin-top: 10px;
    color: var(--color-accent);
}

.villa-card .btn-detail {
    display: block;
    text-align: center;
    background-color: var(--color-button);
    color: white;
    padding: 10px 0;
    margin: 0;
    border-radius: 0;
    transition: background-color 0.3s;
}

.villa-card .btn-detail:hover {
    background-color: var(--color-primary);
}

/* --- CAROUSEL NAVIGATION (Pindah ke Konten Kiri) --- */
.carousel-navigation {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 20px;
    padding: 0 !important;
}

.nav-line {
    height: 3px;
    width: 30px;
    background-color: var(--color-accent);
    border-radius: 2px;
    opacity: 0.5;
    transition: width 0.3s, opacity 0.3s, background-color 0.3s;
    cursor: pointer;
}

.nav-line.active {
    width: 50px;
    background-color: var(--color-primary);
    opacity: 1;
}

/* --- GALLERY SECTION STYLING (Background Putih & Desain Baru) --- */
.gallery-section {
    padding: 80px 0;
    text-align: center;
    /* START OF PATTERN IMPLEMENTATION */
    background:
        url('../images/bg-pattern.png') repeat,
        linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
        #FFFFFF;
    background-blend-mode: multiply;
    /* END OF PATTERN IMPLEMENTATION */
}

/* Section Title - OUR GALLERY */
.section-title {
    font-size: 1.8em;
    margin-bottom: 5px;
}

/* Section Subtitle - SOME SPOTS/LOCATIONS THAT WE CAPTURED */
.section-subtitle {
    color: var(--color-text);
    font-size: 0.9em;
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    margin-bottom: 50px;
    letter-spacing: 1px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 30px;
    margin-top: 40px;
    padding: 0 !important;
}

.gallery-item {
    overflow: visible;
    position: relative;
    text-align: left;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

/* Judul (Villa Traveler X) */
.gallery-item h3 {
    position: static;
    color: var(--color-primary);
    background: none;
    padding: 0;
    margin: 10px 0 5px 0;
    font-size: 1.2em;
    /*font-family: var(--font-title);*/
    font-family: 'IowanOldStyleBT', serif;
    text-transform: none;
}

/* Deskripsi Baru */
.gallery-description {
    /*font-family: var(--font-content);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 0.9em;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

/* Efek hover dipertahankan pada gambar */
.gallery-item:hover img {
    transform: scale(1.05);
}


/* --- CTA SECTION STYLING (Background Cream/Beige) --- */
.cta-section {
    background-color: var(--color-background);
    padding: 60px 0;
}

.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 0 !important;
}

.cta-left h2 {
    /*font-family: var(--font-title);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 2.2em;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.2;
    min-width: 250px;
}

.cta-center {
    flex-grow: 1;
    text-align: left;
    margin: 0 40px;
}

.cta-center h3 {
    /*font-family: var(--font-title);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 1.2em;
    color: var(--color-primary);
    margin: 0 0 5px 0;
}

.cta-center p {
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 0.9em;
    color: var(--color-text);
    margin: 0;
}

.cta-right {
    min-width: 250px;
    text-align: right;
}

.cta-btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1em;
}

/* --- FOOTER SECTION STYLING (Background Putih) --- */
.main-footer {
    /* START OF PATTERN IMPLEMENTATION */
    background:
        linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
        #FFFFFF;
    background-blend-mode: multiply;
    /* END OF PATTERN IMPLEMENTATION */
    color: var(--color-footer-text);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1.5fr;
    gap: 40px;
    /* PENTING: Kembalikan padding 20px pada grid footer */
    padding: 0 20px 40px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.footer-col p,
.footer-col address {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    font-style: normal;
}

.footer-col p strong {
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
    font-weight: 700;
    font-size: 1em;
    color: var(--color-primary);
}

.footer-info .footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
}

.footer-info .logo-text {
    /*font-family: var(--font-title);*/
    font-family: 'IowanOldStyleBT', serif;
    font-size: 1.5em;
    color: var(--color-primary);
}

.footer-info .main-logo {
    height: 50px;
    margin-bottom: 5px;
}

.footer-nav p {
    margin: 0;
}

.footer-nav p a {
    color: var(--color-footer-text);
    display: block;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.footer-nav p a:hover {
    color: var(--color-accent);
}

.footer-address address {
    line-height: 1.4;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.icon-placeholder {
    width: 35px;
    height: 35px;
    background-color: var(--color-button);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    transition: background-color 0.2s;
}

.icon-placeholder:hover {
    background-color: var(--color-primary);
}

.footer-contact p {
    line-height: 1.3;
}

.footer-contact p:nth-child(2) {
    margin-bottom: 20px;
}


/* Copyright Bar */
.copyright-bar {
    background-color: var(--color-copyright-bg);
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 0.85em;
    /*font-family: var(--font-subtitle);*/
    font-family: 'IowanOldStyleBT', serif;
}

/* * ========================================
 * MEDIA QUERIES (RESPONSIVE DESIGN)
 * ========================================
 */

/* --- LAYOUT TABLET (Max-width 992px) --- */
@media (max-width: 992px) {

    /* Global */
    .container {
        padding: 0;
    }

    /* PENTING: Sesuaikan padding internal untuk konten di dalam container pada tablet */
    .story-section .container>*,
    .facilities-section .container>*,
    .gallery-section .container>*,
    .cta-section .container>*,
    .villa-section .container>* {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Header/Navbar Adjustments */
    .navbar {
        padding: 15px 15px;
    }

    /* Logo Centering Logic (Menggunakan flex-grow di tablet) */
    .navbar-left,
    .navbar-right {
        flex: unset;
    }

    .navbar-center {
        flex: 1;
    }

    .navbar-right .lang-select {
        display: none;
    }

    /* Story Section */
    .content-row {
        flex-direction: column;
        gap: 30px;
    }

    .quote {
        border-right: none;
        border-bottom: 1px solid var(--color-accent);
        padding-right: 0;
        padding-bottom: 20px;
        font-size: 1.8em;
    }

    /* Villa Section */
    .villa-carousel-area {
        margin-right: 0;
    }

    /* Sesuaikan padding carousel untuk tablet */
    .villas-carousel {
        padding: 0 15px 20px 15px;
    }

    .villas-carousel .villa-card:nth-child(3),
    .villas-carousel .villa-card:nth-child(6) {
        margin-right: 0;
    }

    .villa-card {
        flex: 0 0 calc(50% - 10px);
        min-width: 300px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        /* Kembalikan padding 15px untuk footer di tablet */
        padding: 0 15px 30px 15px;
    }
}

/* --- LAYOUT MOBILE (Max-width 576px) --- */
@media (max-width: 576px) {

    /* Villa Section */
    .villa-carousel-area {
        margin-right: 0;
    }

    /* Sesuaikan padding carousel untuk mobile */
    .villas-carousel {
        padding: 0 15px 0 15px;
    }

    .villa-card {
        flex: 0 0 100%;
        min-width: calc(100vw - 30px);
    }

    .villas-carousel .villa-card:nth-child(3),
    .villas-carousel .villa-card:nth-child(6) {
        margin-right: 0;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
}