/* CSS Variables - Mediterranean Coastal Luxury Palette */
:root {
    /* Primary Colors */
    --color-primary: #2F4F4F;        /* Deep Slate - main headers, nav */
    --color-secondary: #C19A6B;      /* Warm Caramel - wood accent color */
    --color-accent: #8B9556;         /* Soft Olive - olive tree reference */
    
    /* Backgrounds */
    --color-bg-primary: #F9F6F0;     /* Warm Cream - main background */
    --color-bg-light: #FFFFFF;        /* Pure White - cards, forms */
    --color-bg-dark: #2F4F4F;        /* Deep Slate - footer */
    --color-bg-stone: #F9F6F0;        /* Warm Cream - same as bg-primary */
    
    /* Accent Colors */
    --color-adriatic: #4A90A4;       /* Coastal Teal - links, highlights */
    --color-gold: #D4A574;           /* Golden Tan - CTA buttons, active states */
    
    /* Text Colors */
    --color-text-primary: #2F4F4F;   /* Deep Slate - body text */
    --color-text-secondary: #6B7280; /* Grey - secondary text */
    --color-text-light: #9CA3AF;     /* Light Grey - captions */
    --color-text-dark: #2F4F4F;      /* Deep Slate - same as primary */
    
    /* Semantic Colors */
    --color-success: #059669;
    --color-error: #DC2626;
    --color-warning: #D97706;
    --color-white: #FFFFFF;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.015) 1px, transparent 0);
    background-size: 20px 20px;
    font-size: 16px; /* Minimum 16px for mobile readability */
    line-height: 1.8; /* Improved readability */
    overflow-x: hidden;
    animation: fadeIn 0.8s ease-in;
}

/* Typography - Headings */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-primary);
}

h1 {
    letter-spacing: 0.02em;
    line-height: 1.2;
}

h2 {
    line-height: 1.2;
}

h3 {
    line-height: 1.2;
}

/* Paragraphs */
p {
    line-height: 1.8;
    margin-bottom: 1.5em; /* Increased spacing between paragraphs */
}

/* Ensure adequate spacing in text blocks */
.space-y-4 > * + * {
    margin-top: 1.5rem; /* 24px */
}

.space-y-6 > * + * {
    margin-top: 2rem; /* 32px - better breathing room */
}

/* Improve text contrast for light grey text on dark backgrounds */
.text-white\/90 {
    color: rgba(255, 255, 255, 0.95) !important; /* Improved from 0.9 for better contrast */
}

.text-white\/85 {
    color: rgba(255, 255, 255, 0.92) !important; /* Improved from 0.85 for better contrast */
}

/* Ensure hero text has good contrast */
#hero p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Add shadow for better readability */
}

/* Ensure all headings have proper hierarchy */
h1 {
    font-size: 2.25rem; /* 36px mobile */
}

@media (min-width: 768px) {
    h1 {
        font-size: 3rem; /* 48px tablet */
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3.75rem; /* 60px desktop */
    }
}

h2 {
    font-size: 1.75rem; /* 28px mobile */
}

@media (min-width: 768px) {
    h2 {
        font-size: 2.25rem; /* 36px tablet */
    }
}

@media (min-width: 1024px) {
    h2 {
        font-size: 3rem; /* 48px desktop */
    }
}

h3 {
    font-size: 1.25rem; /* 20px mobile */
}

@media (min-width: 768px) {
    h3 {
        font-size: 1.5rem; /* 24px tablet+ */
    }
}

/* Mobile Typography Improvements */
@media (max-width: 639px) {
    body {
        font-size: 16px; /* Ensure minimum 16px on mobile */
        line-height: 1.8;
    }
    
    /* Ensure text blocks have adequate padding on mobile */
    section {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    /* Increase padding in content blocks on mobile */
    .max-w-2xl,
    .max-w-3xl,
    .max-w-4xl,
    .max-w-6xl,
    .max-w-7xl {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    /* Ensure touch targets are minimum 48px */
    button, a, input, select, textarea {
        min-height: 48px;
    }
    
    /* Mobile headings should scale better */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Utility Classes */
.text-primary {
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-adriatic); /* Links use Coastal Teal */
}

.text-text-dark {
    color: var(--color-text-dark);
}

.text-text-light {
    color: var(--color-text-light);
}

.bg-primary {
    background-color: var(--color-primary);
}

.bg-accent {
    background-color: var(--color-gold); /* CTA buttons use Golden Tan */
}

.border-accent {
    border-color: var(--color-accent); /* Borders use Soft Olive */
}

/* Secondary buttons (ghost buttons like "Explore Our Amenities") */
a[href="#amenities"],
a.border-accent,
.border-2.border-accent {
    border: 2px solid var(--color-accent) !important;
    padding: 14px 32px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

a[href="#amenities"]:hover,
a.border-accent:hover,
.border-2.border-accent:hover {
    background-color: var(--color-accent) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Hover states for buttons with bg-accent */
.hover\:bg-accent:hover,
button.hover\:bg-accent:hover,
a.hover\:bg-accent:hover {
    background-color: var(--color-adriatic) !important; /* Hover states use Coastal Teal */
}

.hover\:bg-accent\/90:hover {
    background-color: rgba(74, 144, 164, 0.9) !important; /* Hover states use Coastal Teal with opacity */
}

.bg-bg-light {
    background-color: var(--color-bg-light);
}

.bg-stone {
    background-color: var(--color-bg-stone);
}

/* Header Styles */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

header.scrolled {
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header.scrolled .container > div {
    height: 60px;
}

/* Navigation Links */
.nav-link {
    position: relative;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-adriatic);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language Toggle */
.lang-toggle {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    transition: color 0.3s ease;
}

.lang-toggle.active {
    color: var(--color-gold);
}

.lang-toggle:hover {
    color: var(--color-gold);
}

/* Social Icons */
.social-icon {
    color: var(--color-text-light);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    color: var(--color-adriatic);
    transform: rotate(360deg);
}

/* Book Now Button */
.book-now-btn {
    background-color: var(--color-gold);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px; /* Base size */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(212, 165, 116, 0.4);
}

/* Mobile Header Layout */
@media (max-width: 1023px) {
    header {
        height: 64px;
    }
    
    header .container > div {
        height: 64px;
    }
    
    .hamburger-btn {
        z-index: 1001;
        width: 40px;
        height: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 0;
    }
    
    .hamburger-btn span {
        width: 24px;
        height: 2px;
        background-color: var(--color-primary);
        transition: all 0.3s ease;
        display: block;
    }
    
    /* Logo centered on mobile */
    header .lg\:hidden a[href="#hero"] {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
    }
    
    /* Language toggle on right */
    header .lg\:hidden .lang-toggle {
        font-size: 14px;
        padding: 4px 8px;
        min-height: 32px;
    }
}

@media (max-width: 639px) {
    .book-now-btn {
        display: none; /* Hide BOOK DIRECT button on mobile - floating button will show */
    }
}

.book-now-btn:hover {
    background-color: var(--color-adriatic);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
}

/* Hamburger Menu */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    z-index: 1001;
    position: relative;
    flex-shrink: 0;
}

.hamburger-btn span {
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
    display: block;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: rgba(44, 44, 44, 0.95);
    backdrop-filter: blur(10px);
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    opacity: 0;
}

.mobile-nav.open {
    right: 0;
    visibility: visible;
    opacity: 1;
}

.mobile-nav-link {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: 500;
    padding: 20px 40px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: background-color 0.3s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(74, 144, 164, 0.2);
    color: var(--color-adriatic);
}

/* Hero Section */
.hero-bg {
    background-image: url('images/temp/hero.jpg');
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
}

#hero h1 {
    letter-spacing: 0.05em;
    padding: 1rem 0;
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    animation: bounce 2s infinite;
    transition: transform 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(5px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Specs Bar */
.spec-item {
    transition: transform 0.3s ease;
}

.spec-item:hover {
    transform: translateY(-4px);
}

.spec-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    color: var(--color-gold);
    transition: all 0.3s ease;
}

.spec-icon [data-lucide] {
    width: 40px;
    height: 40px;
    stroke: var(--color-gold);
    stroke-width: 1.5;
}

.spec-item:hover .spec-icon {
    transform: scale(1.1) rotate(5deg);
}

.spec-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
}

/* The View Section */
.view-bg {
    background-image: url('images/temp/window-view.jpg');
}

.view-overlay {
    background: rgba(0, 0, 0, 0.4);
}

#view .max-w-2xl {
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 48px !important;
}

@media (max-width: 1023px) {
    .view-bg {
        background-attachment: scroll !important;
    }
}

/* Gallery */
.gallery-grid {
    display: grid;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background-color: #f0f0f0;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover::before {
    background: rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
    max-width: 100%;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Lightbox */
.lightbox {
    cursor: pointer;
}

.lightbox-content {
    cursor: default;
}

.lightbox img {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 48px;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Amenities */
.amenity-card {
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.amenity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.amenity-card:hover .amenity-icon {
    transform: scale(1.1) rotate(5deg);
}

.amenity-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--color-gold);
    transition: all 0.3s ease;
}

.amenity-icon [data-lucide] {
    width: 48px;
    height: 48px;
    stroke: var(--color-gold);
    stroke-width: 1.5;
}


.amenity-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}

/* Links */
a {
    color: var(--color-adriatic);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-gold);
}

/* Footer */
footer {
    padding-top: 80px;
    padding-bottom: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--color-gold);
}

.footer-social-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-icon:hover {
    background-color: var(--color-gold);
    transform: rotate(360deg) scale(1.1);
}

/* Floating Book Button (Mobile) */
#floating-book-btn {
    background-color: var(--color-gold);
    animation: pulse 3s infinite;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.4);
    height: 60px;
    font-size: 17px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
}

/* Show floating button only on mobile */
@media (min-width: 1024px) {
    #floating-book-btn {
        display: none !important;
    }
}

#floating-book-btn:hover {
    background-color: var(--color-adriatic);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 165, 116, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(212, 165, 116, 0.4);
    }
    50% {
        box-shadow: 0 4px 24px rgba(212, 165, 116, 0.6);
    }
}

/* Form Styles - Floating Labels */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
    line-height: 1.8;
    padding: 16px 16px 8px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    background-color: white;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    opacity: 0;
    transition: opacity 0.3s;
}

.form-input:focus::placeholder,
.form-textarea:focus::placeholder {
    opacity: 0.5;
}

.form-textarea {
    padding-top: 20px;
    resize: vertical;
    min-height: 120px;
}

.form-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--color-text-light);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
    padding: 0 4px;
    z-index: 1;
    white-space: nowrap;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-textarea + .form-label {
    top: 24px;
    transform: translateY(0);
}

/* Floating label state */
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label,
.form-input.has-value + .form-label,
.form-select:focus + .form-label,
.form-select:not([value=""]) + .form-label,
.form-select.has-value + .form-label,
.form-textarea:focus + .form-label,
.form-textarea:not(:placeholder-shown) + .form-label,
.form-textarea.has-value + .form-label {
    top: -10px;
    left: 12px;
    transform: translateY(0);
    font-size: 12px;
    color: var(--color-gold);
    font-weight: 600;
    white-space: normal;
    max-width: calc(100% - 24px);
    line-height: 1.4;
}

.form-textarea:focus + .form-label,
.form-textarea:not(:placeholder-shown) + .form-label,
.form-textarea.has-value + .form-label {
    top: -10px;
    left: 12px;
    transform: translateY(0);
    white-space: normal;
    max-width: calc(100% - 24px);
    line-height: 1.4;
}

/* Validation Icons */
.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.validation-icon svg {
    width: 20px;
    height: 20px;
}

.success-icon {
    color: var(--color-success);
}

.error-icon {
    color: var(--color-error);
}

/* Form Input States */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.form-input.valid,
.form-select.valid {
    border-color: var(--color-success);
    padding-right: 40px;
}

.form-input.invalid,
.form-select.invalid {
    border-color: var(--color-error);
    padding-right: 40px;
}

/* Select wrapper for floating label */
.select-wrapper {
    position: relative;
}

.select-wrapper .form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.select-wrapper .form-select:focus + .form-label,
.select-wrapper .form-select:not([value=""]) + .form-select.has-value + .form-label {
    top: -10px;
    left: 12px;
    transform: translateY(0);
    font-size: 12px;
    color: var(--color-gold);
    font-weight: 600;
    white-space: normal;
    max-width: calc(100% - 24px);
    line-height: 1.4;
}

/* Mobile specific label adjustments */
@media (max-width: 640px) {
    .form-label {
        font-size: 14px;
        max-width: calc(100% - 40px);
    }
    
    .form-input:focus + .form-label,
    .form-input:not(:placeholder-shown) + .form-label,
    .form-input.has-value + .form-label,
    .form-textarea:focus + .form-label,
    .form-textarea:not(:placeholder-shown) + .form-label,
    .form-textarea.has-value + .form-label {
        font-size: 11px;
        white-space: normal;
        word-wrap: break-word;
        max-width: calc(100% - 24px);
        line-height: 1.3;
    }
}

/* Error Messages */
.error-message {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.error-message.hidden {
    display: none;
}

/* Submit Button States */
.submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(212, 165, 116, 0.4);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-btn.loading {
    background-color: var(--color-primary);
}

.submit-btn.success {
    background-color: var(--color-success);
}

.btn-text,
.btn-spinner,
.btn-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-spinner.hidden,
.btn-success.hidden {
    display: none;
}

.btn-success i {
    width: 20px;
    height: 20px;
}

/* Date picker night count */
#nights-count {
    font-weight: 500;
    color: var(--color-gold);
}

/* Lucide Icons Styling */
[data-lucide] {
    width: 48px;
    height: 48px;
    stroke: var(--color-gold);
    stroke-width: 1.5;
}

.key-specs [data-lucide] {
    width: 40px;
    height: 40px;
}

/* Flatpickr Customization */
.flatpickr-input {
    cursor: pointer;
}

.flatpickr-calendar {
    font-family: 'Montserrat', sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.flatpickr-day.selected {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.flatpickr-day.selected:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

@media (max-width: 639px) {
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px;
        padding: 14px 16px 8px;
    }
    
    .form-textarea {
        padding-top: 18px;
    }
    
    .submit-btn {
        font-size: 18px;
        padding: 16px 24px;
    }
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.error-message {
    display: block;
}

.error-shake {
    animation: shake 0.5s;
}

#booking-form.error-shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* Section Headlines */
h2.section-headline,
.section-headline {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

@media (min-width: 768px) {
    h2.section-headline,
    .section-headline {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    h2.section-headline,
    .section-headline {
        font-size: 3.5rem;
    }
}

.section-headline.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Amenity Cards - Stagger Animation */
.amenity-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.amenity-card.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery Images */
.gallery-item {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.gallery-item.animated {
    opacity: 1;
}

/* Social Proof - Slide from sides */
.social-proof-item {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.social-proof-item.slide-left {
    transform: translateX(-50px);
}

.social-proof-item.slide-right {
    transform: translateX(50px);
}

.social-proof-item.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Stats/Specs Count-up */
.spec-number {
    display: inline-block;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .view-bg {
        background-attachment: scroll !important;
    }
    
    /* Disable scroll animations */
    .animate-on-scroll,
    .section-headline,
    .amenity-card,
    .gallery-item,
    .social-proof-item {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .animate-on-scroll.fade-in-up,
    .section-headline.animated,
    .amenity-card.animated,
    .gallery-item.animated,
    .social-proof-item.animated {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* CTA Buttons - Ensure minimum 18px font */
.book-now-btn,
#floating-book-btn,
button[type="submit"],
a[href="#booking"],
a[href="#amenities"] {
    font-size: 16px; /* Base */
}

@media (max-width: 639px) {
    .book-now-btn,
    #floating-book-btn,
    button[type="submit"],
    a[href="#booking"],
    a[href="#amenities"] {
        font-size: 18px; /* Minimum 18px for CTA buttons on mobile */
        padding: 14px 28px;
    }
}

/* Container */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 1280px;
}

@media (min-width: 1024px) {
    .container {
        padding-left: 60px;
        padding-right: 60px;
    }
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding-left: 60px;
        padding-right: 60px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Language Transition */
[data-i18n] {
    transition: opacity 0.2s ease;
}

/* Image Control - Prevent Overflow */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Ensure all images are contained */
section img,
.about img,
.gallery-item img,
.amenity-card img {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: cover;
    overflow: hidden;
}

/* Hero background image control */
.hero-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

/* View section background control */
.view-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

/* About section image */
#about img {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* Lightbox images can be full size */
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Location Section Redesign */
.location-section {
    background: linear-gradient(to bottom, #F9F6F0 0%, #FFFFFF 100%);
    padding: 0;
    overflow: hidden;
}

.location-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    max-width: 1400px;
    margin: 0 auto;
    gap: 0;
}

.location-content {
    padding: 100px 80px;
    background: var(--color-bg-primary);
}

.location-inner {
    max-width: 600px;
}

.section-label {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 16px;
}

.location-subtitle {
    font-size: 20px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    font-style: italic;
    font-family: 'Playfair Display', serif;
}

.location-description {
    margin: 32px 0;
}

.location-description p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--color-text-primary);
}

/* Nearby Cards Grid */
.nearby-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.nearby-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.nearby-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--color-gold);
}

.nearby-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}

.nearby-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nearby-info strong {
    font-size: 15px;
    color: var(--color-primary);
    font-weight: 600;
    line-height: 1.3;
}

.nearby-info span {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* Map Side */
.location-map-wrapper {
    position: relative;
    min-height: 600px;
    background: var(--color-bg-light);
}

.map-container {
    position: sticky;
    top: 100px;
    height: 600px;
    overflow: hidden;
    border-radius: 20px 0 0 20px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.maps-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background-color: var(--color-accent);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.maps-btn:hover {
    background-color: var(--color-adriatic);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 164, 0.3);
}

.maps-btn i {
    width: 20px;
    height: 20px;
}

/* Booking Form Section */
.booking-form-section {
    background: linear-gradient(135deg, #F9F6F0 0%, #FFFFFF 100%);
    padding: 100px 40px;
}

.booking-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.booking-form-header {
    text-align: center;
    margin-bottom: 48px;
}

.booking-form-header .section-headline {
    font-size: 36px;
    margin-bottom: 12px;
}

.booking-subtitle {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Form Row Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .location-container {
        grid-template-columns: 1fr;
    }
    
    .location-content {
        padding: 60px 32px;
    }
    
    .nearby-grid {
        grid-template-columns: 1fr;
    }
    
    .location-map-wrapper {
        min-height: 400px;
    }
    
    .map-container {
        position: relative;
        top: 0;
        height: 400px;
        border-radius: 0;
    }
    
    .booking-form-section {
        padding: 60px 24px;
    }
    
    .booking-form-container {
        padding: 40px 32px;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .booking-form-container {
        padding: 40px 24px;
    }
    
    .location-content {
        padding: 40px 24px;
    }
}

