/* ===== CSS Variables & Reset ===== */
:root {
    --primary: #1a6b47;
    --primary-light: #2E8B57;
    --primary-dark: #0d4a30;
    --accent: #c9a84c;
    --accent-light: #e0c776;
    --bg: #f5f1eb;
    --bg-dark: #0f2318;
    --bg-card: #ffffff;
    --text: #2c3e2d;
    --text-light: #5a6e5c;
    --text-muted: #8a998c;
    --white: #ffffff;
    --font: 'Poppins', sans-serif;
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img {
    max-width: 100%;
    display: block;
    height: auto;
}

/* ===== Utilities ===== */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 {
    font-size: 2.6rem;
    color: var(--primary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
}
.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 16px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26,107,71,0.3);
}
.btn-primary i,
.btn-primary span {
    color: #ffffff !important;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26,107,71,0.4);
}
.btn-large { padding: 18px 36px; font-size: 1.15rem; }

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    background: transparent;
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== Header ===== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 8px 0;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(26,107,71,0.08);
    contain: layout style;
}
header.scrolled {
    padding: 4px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { display: flex; align-items: center; }
.logo img { height: 72px; width: auto; transition: height 0.3s ease; }
header.scrolled .logo img { height: 56px; }

.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu ul { display: flex; gap: 28px; }
.nav-menu a {
    font-weight: 500;
    color: var(--text);
    transition: color 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav-menu a:hover::after { width: 100%; }
.nav-menu a:hover { color: var(--primary); }
.nav-menu a.btn-primary,
.nav-menu a.btn-primary:hover,
.nav-menu a.btn-primary i {
    color: #ffffff;
}
.nav-menu a.btn-primary::after {
    display: none;
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 4px;
}
.bar {
    display: block;
    width: 26px;
    height: 3px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===== Hero ===== */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    contain: layout paint;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: heroZoom 20s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15,35,24,0.55) 0%,
        rgba(15,35,24,0.35) 50%,
        rgba(15,35,24,0.65) 100%
    );
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 800px;
    padding: 0 24px;
}
.hero h1 {
    font-size: 3.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.15;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero p {
    font-size: 1.25rem;
    margin-bottom: 36px;
    opacity: 0.92;
    text-shadow: 0 1px 10px rgba(0,0,0,0.2);
}
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--white);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}
.about-text h2 {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.2;
}
.about-text > p {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 28px;
}
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 500;
    font-size: 0.92rem;
}
.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.feature-item i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26,107,71,0.08);
    border-radius: 10px;
    flex-shrink: 0;
}
.feature-item.full-width {
    grid-column: 1 / -1;
    justify-content: center;
}
.about-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.about-image:hover img { transform: scale(1.03); }
.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

/* ===== Gallery Section ===== */
.gallery-section {
    background: var(--white);
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    gap: 16px;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    contain: layout paint;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}
.gallery-item:nth-child(1) img { object-position: center center; }

/* ===== Video Tour ===== */
.video-section {
    background: var(--bg-dark);
    color: var(--white);
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}
.video-section .section-header h2 { color: var(--white); }
.video-section .section-header h2::after {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}
.video-section .section-header p { color: rgba(255,255,255,0.7); }

.video-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}
.video-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}
.video-slide {
    min-width: 100%;
    position: relative;
}
.video-slide video {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: #000;
}
.video-slide .video-label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
    z-index: 2;
}
.video-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}
.video-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-dark);
}
.video-dots {
    display: flex;
    gap: 8px;
}
.video-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}
.video-dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 5px;
}

/* ===== Accommodations ===== */
.accommodations-section {
    background: var(--bg);
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}
.chalet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}
.chalet-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.04);
    contain: layout paint;
}
.chalet-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.card-image { height: 260px; overflow: hidden; position: relative; }
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.chalet-card:hover .card-image img { transform: scale(1.06); }
.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--accent);
    color: var(--bg-dark);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.card-content {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-content h3 {
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-size: 1.3rem;
}
.card-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}
.card-amenities {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.card-amenity {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.card-amenity i { color: var(--primary); font-size: 0.9rem; }

/* ===== Contact ===== */
.contact-section {
    background: var(--white);
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: start;
}
.contact-info h2 {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 12px;
}
.contact-info > p {
    color: var(--text-light);
    margin-bottom: 32px;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.info-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}
.info-item i {
    font-size: 1.3rem;
    color: var(--white);
    background: var(--primary);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-item h4 { color: var(--primary-dark); margin-bottom: 2px; font-size: 0.95rem; }
.info-item p { font-size: 0.9rem; color: var(--text-light); }

.social-links { display: flex; gap: 12px; margin-top: 28px; }
.social-links a {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.social-links a:hover {
    transform: translateY(-4px) rotate(4deg);
    box-shadow: 0 8px 20px rgba(26,107,71,0.3);
}
.contact-map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.contact-map iframe { border-radius: var(--radius-lg); }

/* ===== Footer ===== */
footer {
    background: var(--bg-dark);
    color: var(--white);
    text-align: center;
    padding: 36px 0;
}
footer p { opacity: 0.7; font-size: 0.9rem; }
footer p + p { margin-top: 4px; }

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: none;
    border: none;
}
.lightbox-close:hover { opacity: 1; transform: rotate(90deg); }

/* ===== Reduced Motion (Accessibility) ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .hero-bg img { animation: none; }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: var(--white);
        width: 80%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        justify-content: center;
        transition: left 0.4s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.1);
        padding: 24px;
        z-index: 1000;
    }
    .nav-menu.active { left: 0; }
    .nav-menu ul { flex-direction: column; align-items: center; gap: 20px; }
    .mobile-hidden { display: none; }

    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.05rem; }

    .about-grid,
    .contact-wrapper { grid-template-columns: 1fr; }
    .about-image { order: -1; }
    .about-image img { height: 300px; }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 220px;
    }
    .gallery-item:nth-child(1) { grid-column: 1 / -1; grid-row: auto; }
    .gallery-item:nth-child(n+6) { display: none; }

    .video-slide video { height: 280px; }
    .chalet-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }

    .section { padding: 60px 0; }
    .section-header h2 { font-size: 2rem; }

    /* Disable content-visibility on mobile to avoid layout shift */
    .about-grid,
    .gallery-section,
    .video-section,
    .accommodations-section,
    .contact-section {
        content-visibility: visible;
        contain-intrinsic-size: auto;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item:nth-child(1) img { min-height: 200px; }
}