/* ==================== CUSTOM STYLES ==================== */
/* Muted Mediterranean Palette:
   Sage Sea #5B7B7A | Warm Cream #E8DFD0 | Clay #B8714D
   Natural White #F7F4EF | Deep Sage #2D3B3A
*/

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent horizontal scroll from reveal animations */
body {
    overflow-x: hidden;
}

/* Header scroll state */
.header-scrolled {
    background-color: rgba(247, 244, 239, 0.97) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-scrolled .nav-link {
    color: #2d3b3a !important;
}

.header-scrolled .nav-link:hover {
    color: #b8714d !important;
}

.header-scrolled .header-logo-img {
    filter: brightness(0) saturate(100%) invert(20%) sepia(10%) saturate(500%) hue-rotate(150deg);
}

.header-scrolled #lang-toggle {
    color: #2d3b3a !important;
    border-color: rgba(45, 59, 58, 0.3) !important;
}

.header-scrolled #mobile-menu-btn {
    color: #2d3b3a !important;
}

.header-scrolled svg.text-clay-600 {
    color: #a45e3d;
}

/* Inner page hero banner */
.page-hero {
    position: relative;
    height: 45vh;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.page-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 130%;
    object-fit: cover;
}

/* Parallax hero image — scaled up to allow scroll movement */
.parallax-hero-img {
    will-change: transform;
    transform: translateY(0) scale(1.15);
    transform-origin: center top;
}

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(45, 59, 58, 0.5), rgba(45, 59, 58, 0.7));
}

.page-hero .hero-content {
    position: relative;
    z-index: 1;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 8px;
    z-index: 101;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 12px 16px;
    border-radius: 4px;
    z-index: 101;
    transition: background 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Room Gallery Slider */
.room-gallery {
    max-width: 100%;
    overflow: hidden;
}

.room-gallery-main img {
    transition: opacity 0.15s ease;
}

.room-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
    max-width: 100%;
}

.room-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.room-gallery-thumb {
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.room-gallery-thumb:hover {
    opacity: 1 !important;
}

/* Responsive room gallery thumbs */
@media (max-width: 640px) {
    .room-gallery-thumb {
        width: 60px !important;
        height: 48px !important;
    }
}

/* Styled Google Maps — muted warm tones to match site palette */
.styled-map {
    position: relative;
}
.styled-map iframe {
    filter: grayscale(30%) sepia(15%) saturate(85%) brightness(102%) contrast(95%);
    transition: filter 0.3s ease;
}
.styled-map:hover iframe {
    filter: grayscale(10%) sepia(5%) saturate(95%) brightness(100%) contrast(100%);
}

/* Form styles */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.4);
}

/* ==================== SCROLL REVEAL ANIMATIONS ==================== */

/* Base state: hidden until observed */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Revealed state */
.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delays for grid children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 500ms; }
.reveal-stagger > *:nth-child(7) { transition-delay: 600ms; }
.reveal-stagger > *:nth-child(8) { transition-delay: 700ms; }

/* Softer reveal transforms on mobile to prevent overflow */
@media (max-width: 768px) {
    .reveal-left {
        transform: translateX(-20px);
    }
    .reveal-right {
        transform: translateX(20px);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==================== DECORATIVE BACKGROUND SHAPES ==================== */

/* Base shape — all shapes use inline SVG, positioned absolutely */
.bg-shape {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    line-height: 0;
}
.bg-shape svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Reduced motion: disable parallax transform */
@media (prefers-reduced-motion: reduce) {
    .bg-shape {
        will-change: auto;
    }
}

/* ==================== TESTIMONIAL CAROUSEL ==================== */
.testimonial-slide {
    display: none;
    animation: testimonialFadeIn 0.55s ease;
}
.testimonial-slide.active {
    display: block;
}
@keyframes testimonialFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #b8714d;
    opacity: 0.25;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s, transform 0.3s;
}
.testimonial-dot.active {
    opacity: 1;
    transform: scale(1.45);
}

/* Active navigation link */
.nav-link-active {
    color: white !important;
    position: relative;
}

.header-scrolled .nav-link-active {
    color: #b8714d !important;
}
