/* ==========================================================================
   GLAMPING SINTRA RENEWAL - STYLESHEET
   Design Tokens & Premium Aesthetics: Forest Green, Cream Sand, Terracotta
   ========================================================================== */

/* --- Design Variables --- */
:root {
    /* Color Palette */
    --color-primary: #1B3B2B;         /* Deep Forest Green */
    --color-primary-light: #2A543E;   /* Lighter Forest Green for Hover */
    --color-primary-rgb: 27, 59, 43;
    --color-secondary: #C87A53;       /* Warm Terracotta / Sand */
    --color-secondary-light: #D98C64; /* Accent Hover */
    --color-bg-light: #FAF6F0;        /* Soft Cream Sand background */
    --color-bg-card: #FFFFFF;
    --color-text: #2A2A2A;            /* Slate Charcoal */
    --color-text-muted: #5C5C5C;
    --color-text-light: #FFFFFF;
    --color-border: #E8E2D9;          /* Earthy gray border */
    --color-success: #2E7D32;
    --color-error: #C62828;

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-alt-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions & Shadow */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-soft: 0 10px 30px rgba(27, 59, 43, 0.05);
    --shadow-medium: 0 15px 40px rgba(27, 59, 43, 0.1);
    --shadow-header: 0 2px 20px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* --- Grid & Containers --- */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-light);
}

/* --- Buttons & UI Elements --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-alt-heading);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(27, 59, 43, 0.2);
}

.btn-accent {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}

.btn-accent:hover {
    background-color: var(--color-secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 122, 83, 0.25);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--color-text-light);
    border: 2px solid var(--color-text-light);
}

.btn-outline-white:hover {
    background-color: var(--color-text-light);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2.2rem;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

.btn-full-width {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-family: var(--font-alt-heading);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: rgba(27, 59, 43, 0.1);
    color: var(--color-primary);
}

.badge-accent {
    background-color: rgba(200, 122, 83, 0.15);
    color: var(--color-secondary);
}

/* --- Section Headers --- */
.section-badge {
    display: inline-block;
    font-family: var(--font-alt-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-secondary);
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 700px;
}

.section-header-centered {
    text-align: center;
    margin-bottom: 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.text-gray {
    color: #CCCCCC !important;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(250, 246, 240, 0.85); /* Glassmorphism background matching page body */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(27, 59, 43, 0.05);
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    background-color: var(--color-bg-light);
    box-shadow: var(--shadow-header);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
}


.logo-text {
    font-family: var(--font-alt-heading);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: var(--color-primary);
}

.logo-highlight {
    color: var(--color-secondary);
}

/* Desktop Navigation Link styles */
.desktop-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-alt-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-primary);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: var(--transition-smooth);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Switcher Styling */
.lang-selector {
    position: relative;
}

.lang-selected {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-alt-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.lang-selected:hover {
    border-color: var(--color-primary);
    background-color: rgba(27, 59, 43, 0.03);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    list-style: none;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-opt {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0.6rem 1rem;
    font-family: var(--font-alt-heading);
    font-size: 0.85rem;
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-opt:hover {
    background-color: var(--color-bg-light);
    color: var(--color-primary);
}

/* Hamburger Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.toggle-bar {
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-smooth);
}

.mobile-menu-toggle.active .toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
}

/* --- Mobile Menu Drawer --- */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--color-bg-light);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 999;
    padding: 6rem 2rem 2rem;
    transition: cubic-bezier(0.77, 0.2, 0.05, 1) 0.5s;
    visibility: hidden;
}

.mobile-drawer.active {
    right: 0;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-link {
    font-family: var(--font-alt-heading);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--color-primary);
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
    padding-top: 80px;
    color: var(--color-text-light);
    overflow: hidden;
}

.hero-content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-left: max(5%, calc((100vw - 1200px) / 2));
}

/* Hero Logo Styles */
.hero-logo-container {
    margin-top: 3.5rem; /* Prevents overlap with the sticky header */
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: flex-start;
}

.hero-logo-img {
    height: 220px; /* Doubled size for striking prominence */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
}

/* Glassmorphic Readable Badge for Hero */
.hero-section .badge-primary {
    background-color: rgba(250, 246, 240, 0.15) !important;
    color: var(--color-bg-light) !important;
    border: 1px solid rgba(250, 246, 240, 0.25) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.hero-title {
    font-family: var(--font-alt-heading) !important;
    font-weight: 800 !important;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400 !important; /* Regular font weight for better legibility */
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Glassmorphic backdrop so the outline button stays legible even where it
   overlaps the light wave curve, not just the dark hero photo */
.hero-cta-group .btn-outline-white {
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Curved Wave divider at bottom of Hero */
.hero-waves {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--color-bg-light);
    clip-path: ellipse(60% 80% at 50% 100%);
    z-index: 1;
}

/* ==========================================================================
   O Conceito (About) Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text-content .section-lead {
    font-size: 1.25rem;
    color: var(--color-primary-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-text-content p {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.features-icon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.feature-icon-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-icon {
    font-size: 1.8rem;
    background-color: var(--color-bg-card);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
}

.feature-icon-item h4 {
    font-family: var(--font-alt-heading);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Visual Block (Right side image with border frames) */
.about-visual-content {
    position: relative;
    padding: 1.5rem;
}

.visual-border-box {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 3rem);
    height: calc(100% - 3rem);
    border: 2px solid var(--color-secondary);
    border-radius: var(--border-radius);
    z-index: 1;
}

.about-main-img {
    border-radius: var(--border-radius);
    width: 100%;
    object-fit: cover;
    height: 480px;
    position: relative;
    z-index: 2;
    transform: translate(1.5rem, 1.5rem);
    box-shadow: var(--shadow-medium);
}

.visual-accent-badge {
    position: absolute;
    bottom: -15px;
    left: -15px;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    z-index: 3;
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
}

.accent-badge-title {
    font-family: var(--font-alt-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-secondary);
}

.accent-badge-sub {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ==========================================================================
   Cabins Section
   ========================================================================== */
.cabins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.cabin-card {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.cabin-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(27, 59, 43, 0.15);
}

.cabin-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.cabin-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.cabin-card:hover .cabin-img {
    transform: scale(1.05);
}

.cabin-capacity {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(27, 59, 43, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--color-text-light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-family: var(--font-alt-heading);
    font-size: 0.75rem;
    font-weight: 600;
}

.cabin-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cabin-card-title {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.cabin-card-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.cabin-specs {
    list-style: none;
    margin-bottom: 2rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.cabin-specs li {
    font-size: 0.9rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Booking & Reservation Form Section
   ========================================================================== */
.booking-section {
    background-color: var(--color-primary);
    position: relative;
    overflow: hidden;
}

/* Subtle organic circles background in dark booking section */
.booking-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(200, 122, 83, 0.12) 0%, transparent 70%);
    z-index: 0;
}

.booking-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
    position: relative;
    z-index: 1;
}

.booking-container {
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-medium);
    max-width: 750px;
    margin: 0 auto;
    border: 1px solid rgba(27, 59, 43, 0.05);
}

.booking-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.booking-header h2 {
    font-size: 2.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.booking-header p {
    color: var(--color-text-muted);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    font-family: var(--font-alt-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-card);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    transition: var(--transition-smooth);
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 59, 43, 0.08);
}

textarea {
    resize: vertical;
}

/* Date picker specific styling wrapper */
.date-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-picker-wrapper input {
    padding-right: 3rem;
}

.calendar-icon {
    position: absolute;
    right: 1.2rem;
    font-size: 1.1rem;
    color: var(--color-primary);
    pointer-events: none;
}

/* Validation messages */
.form-error-msg {
    color: var(--color-error);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 2px;
    display: none;
}

.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
    border-color: var(--color-error);
    background-color: rgba(198, 40, 40, 0.01);
}

.form-group.invalid .form-error-msg {
    display: block;
}

/* Date Summary Pill — shown after both dates are selected */
.date-summary {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.6rem;
    padding: 0.7rem 1.1rem;
    background: linear-gradient(135deg, rgba(27, 59, 43, 0.05), rgba(27, 59, 43, 0.09));
    border: 1px solid rgba(27, 59, 43, 0.15);
    border-radius: 10px;
    animation: summaryFadeIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

.date-summary.visible {
    display: flex;
}

@keyframes summaryFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.date-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.date-summary-label {
    font-family: var(--font-alt-heading);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-primary);
    opacity: 0.65;
}

.date-summary-value {
    font-family: var(--font-alt-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
}

.date-summary-divider {
    font-size: 1rem;
    color: var(--color-primary);
    opacity: 0.35;
    flex-shrink: 0;
}

.date-summary-nights {
    flex-shrink: 0;
    padding: 0.3rem 0.75rem;
    background-color: var(--color-secondary);
    color: #fff;
    border-radius: 20px;
    font-family: var(--font-alt-heading);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .date-summary {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .date-summary-divider { display: none; }
    .date-summary-nights  { width: 100%; text-align: center; }
}

/* Submit Loading State */
.submit-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-text-light);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Success & Error Banners */
.form-result-banner {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-family: var(--font-alt-heading);
    font-weight: 500;
    font-size: 0.95rem;
}

#form-result-success {
    background-color: rgba(46, 125, 50, 0.1);
    border: 1px solid rgba(46, 125, 50, 0.2);
    color: var(--color-success);
}

#form-result-error {
    background-color: rgba(198, 40, 40, 0.1);
    border: 1px solid rgba(198, 40, 40, 0.2);
    color: var(--color-error);
}

/* ==========================================================================
   Discover Sintra Section (Palace highlight)
   ========================================================================== */
.sintra-section {
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}

.sintra-layout {
    display: flex;
    justify-content: flex-end;
}

.sintra-content {
    max-width: 600px;
    padding: 3rem 0;
}

.sintra-content .section-lead {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.sintra-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.sintra-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 2rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-family: var(--font-alt-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 1.25rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* Grid layout grid-spans */
.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.item-wide {
    grid-column: span 2;
}

/* ==========================================================================
   Contacts & Location Section
   ========================================================================== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
}

.contacts-info-block .section-lead {
    font-size: 1.15rem;
    color: var(--color-primary-light);
    margin-bottom: 2rem;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card-link {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background-color: var(--color-bg-card);
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.contact-card-link:hover {
    border-color: rgba(27, 59, 43, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.contact-card-icon-box {
    font-size: 1.5rem;
    background-color: rgba(27, 59, 43, 0.05);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-primary);
}

.contact-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.contact-card-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-family: var(--font-alt-heading);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.contact-card-value {
    font-family: var(--font-alt-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.font-small {
    font-size: 0.95rem;
}

.card-waze .contact-card-icon-box {
    background-color: rgba(200, 122, 83, 0.1);
    color: var(--color-secondary);
}

.card-waze .contact-card-value {
    color: var(--color-secondary);
}

/* Map frame element styling */
.map-widget-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border);
    position: relative;
    min-height: 400px;
}

.location-map-frame {
    border: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.main-footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand-name {
    font-family: var(--font-alt-heading);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 1px;
}

.footer-brand-highlight {
    color: var(--color-secondary);
}

.footer-brand-tagline {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.6;
}

.footer-links-col,
.footer-info-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-header {
    font-family: var(--font-alt-heading);
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.footer-links a {
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-secondary);
    transform: translateX(3px);
}

.footer-schedule-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-schedule-note {
    font-size: 0.8rem;
    color: var(--color-secondary);
    font-weight: 500;
}

.footer-bottom-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.75;
}

/* ==========================================================================
   Flatpickr Custom Calendar Theme Overrides (Forest Green / Sand)
   ========================================================================== */
.flatpickr-calendar {
    background-color: var(--color-bg-light) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-medium) !important;
    font-family: var(--font-body) !important;
    color: var(--color-text) !important;
}

.flatpickr-calendar::before,
.flatpickr-calendar::after {
    border-bottom-color: var(--color-border) !important;
}

.flatpickr-months {
    padding-top: 0.5rem;
}

.flatpickr-month {
    color: var(--color-primary) !important;
}

.flatpickr-weekday {
    font-family: var(--font-alt-heading) !important;
    font-weight: 600 !important;
    color: var(--color-primary) !important;
    opacity: 0.7;
}

.flatpickr-day {
    color: var(--color-text) !important;
    border-radius: 4px !important;
    transition: var(--transition-smooth) !important;
}

.flatpickr-day:hover {
    background-color: rgba(27, 59, 43, 0.08) !important;
    border-color: transparent !important;
    color: var(--color-primary) !important;
}

/* Selected check-in/check-out and dates inside the range */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-text-light) !important;
}

.flatpickr-day.inRange {
    background-color: rgba(27, 59, 43, 0.1) !important;
    border-color: transparent !important;
    color: var(--color-primary) !important;
    box-shadow: none !important;
}

/* Today style marker */
.flatpickr-day.today {
    border-color: var(--color-secondary) !important;
    font-weight: 700;
}

.flatpickr-day.today:hover {
    background-color: var(--color-secondary) !important;
    color: var(--color-text-light) !important;
}

/* Disabled occupied date styles */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    background-color: #EBE8E2 !important; /* Muted warm sand-grey background */
    color: #C7C1B6 !important;            /* Faded text colour */
    cursor: not-allowed !important;
    text-decoration: line-through !important;
    opacity: 0.55;
}

/* Smaller parenthetical text inside form labels */
.label-note {
    font-size: 0.78em;
    font-weight: 400;
    opacity: 0.65;
}

/* Month Navigation buttons */
.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: var(--color-secondary) !important;
}

/* --- Flatpickr Grid Alignment Fix ---
   By default Flatpickr uses justify-content: space-around which causes
   incomplete rows (end of month) to be centered. Switching to flex-start
   left-aligns all rows. The prevMonthDay/nextMonthDay spacer elements
   (visibility:hidden so they take up space but are invisible) correctly
   push day-1 to its real weekday column. */
.dayContainer {
    justify-content: flex-start !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    opacity: 0 !important;
    pointer-events: none !important;
    /* Must remain a visible flex item (non-zero size) so the grid offset is correct */
    display: block !important;
    flex-basis: 14.2857143% !important;
    max-width: 39px !important;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

@media (max-width: 1024px) {
    /* Responsive margins/container widths */
    .about-grid,
    .contacts-grid {
        gap: 2.5rem;
    }
    .about-main-img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    /* Layout shifts to vertical columns */
    .about-grid,
    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .about-visual-content {
        order: -1; /* Display image above text on small viewports */
        padding: 0;
        margin-bottom: 2rem;
    }

    .visual-border-box {
        display: none;
    }

    .about-main-img {
        transform: none;
        height: 320px;
    }

    /* Header adjustments and drawer trigger */
    .desktop-nav,
    .btn-header {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Hero section alignments */
    .hero-section {
        padding-top: 70px;
    }

    .hero-logo-container {
        justify-content: center;
        margin-top: 1.5rem; /* Safe spacing for mobile header */
    }

    .hero-logo-img {
        height: 170px; /* Doubled mobile size */
    }

    .hero-content-container {
        margin-left: 0;
        text-align: center;
        max-width: 100%;
        padding-bottom: 4rem;
    }

    .hero-cta-group {
        justify-content: center;
    }

    /* Sintra details adjustments */
    .sintra-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Gallery adjustment */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    
    .item-large {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .item-wide {
        grid-column: span 2;
    }

    /* Booking layout row adjustment */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .booking-container {
        padding: 1.75rem;
    }

    /* Map height */
    .map-widget-container {
        min-height: 320px;
    }

    /* Footer layout shifts */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-bottom-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ==========================================================================
   WhatsApp Floating Action Button
   ========================================================================== */
.whatsapp-fab {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 9999;
    width: 58px;
    height: 58px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: waPulse 2.5s ease-out infinite;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
    animation: none;
}

@keyframes waPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-icon {
    width: 30px;
    height: 30px;
    fill: #ffffff;
    flex-shrink: 0;
}

/* Tooltip */
.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    background: #1a1a1a;
    color: #fff;
    font-family: var(--font-alt-heading);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(6px);
    transition: opacity 0.2s, transform 0.2s;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #1a1a1a;
}

.whatsapp-fab:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 480px) {
    .whatsapp-fab {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 52px;
        height: 52px;
    }
    .whatsapp-icon {
        width: 26px;
        height: 26px;
    }
    .whatsapp-tooltip {
        display: none;
    }
}
