/*
Theme Name: Quinta do Rio
Author: AgilStore
Author URI: https://agilstore.pt
Description: Um tema premium one-page para Quinta do Rio.
Version: 1.0.0
Text Domain: quintadorio
*/

:root {
    --color-bg: #1A1A1A;
    --color-bg-alt: #242424;
    --color-text: #F5F5F5;
    --color-text-muted: #A0A0A0;
    --color-primary: #8C8551;
    /* Muted Gold */
    --color-primary-hover: #D4AF37;
    --color-white: #FFFFFF;
    --color-black: #000000;

    --font-heading: 'Playfair Display', serif;
    /* Placeholder for premium serif */
    --font-body: 'Inter', sans-serif;
    /* Clean modern sans */

    --header-height: 72px;
    --container-width: 1200px;
    --padding-md: 2rem;
    --padding-sm: 1rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-primary);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid var(--color-bg);
    /* Padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

body ::selection {
    background-color: #ffffff35;
    color: var(--color-bg);
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.link {
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-thickness: 1px;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    margin-bottom: 1rem;
}

/* Layout Utilities */

.section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    min-height: 100dvh;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--padding-md);
    width: 100%;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(26, 26, 26, 0.2);
    /* matching bg with transparency */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--padding-md);
    position: relative;
    /* Context for absolute nav */
}

.site-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.site-logo-img {
    height: 30px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* Navigation */
.main-navigation {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-navigation a:hover {
    color: var(--color-text-muted);
}

/* Nav Container (Desktop) */
.nav-links-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Menu Toggle (Hidden on Desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Burger Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Header CTA Button */
.header-cta {
    background-color: var(--color-white);
    color: var(--color-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.header-cta:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

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

/* Hero Full Background Section */
.hero-section {
    /* Background image is set inline in PHP */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgb(0 0 0 / 90%));
    z-index: 1;
}

/* Hero Content Overlay */
.hero-content {
    position: relative;
    z-index: 10;
    /* Above overlay */
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.hero-content>* {
    pointer-events: auto;
    /* Re-enable clicks for text/buttons */
    /* text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); */
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-white);
    /* Ensure visible on images */
    margin-bottom: 2rem;
    max-width: 600px;
}

.btn-hero {
    display: inline-block;
    background-color: var(--color-white);
    color: var(--color-black);
    padding: 1rem 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    transition: all 0.3s ease;
}


/* Features Accordion - Horizontal */
.accordion-container {
    display: flex;
    width: 100%;
    height: 600px;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--color-bg-alt);
    margin-top: 3rem;
    overflow: hidden;
}

.accordion-item {
    position: relative;
    flex: 1;
    /* Collapsed state flex */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: flex 0.6s ease-in-out;
    /* Smoother flex transition */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.accordion-item:last-child {
    border-right: none;
}

/* Collapsed Content (Vertical Strip) */
.acc-collapsed-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 2rem 1rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 1;
    z-index: 2;
    /* Sit on top of expanded when visible */
}

.accordion-item.active .acc-collapsed-content {
    opacity: 0;
    pointer-events: none;
    transition-delay: 0s;
    /* Disappear immediately when expanding starts */
}

.acc-number {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--color-text-muted);
}

.acc-vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--color-white);
    letter-spacing: 2px;
    white-space: nowrap;
    margin-bottom: 2rem;
}

/* Expanded Content */
.acc-expanded-content {
    opacity: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    position: absolute;
    /* Crucial: Absolute prevents content from "squishing" while flex changes */
    top: 0;
    left: 0;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    z-index: 1;
    min-width: 400px;
    /* Ensure content layout is stable even when container is narrow */
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion-item.active {
    flex: 4;
    /* Expanded state */
    background-color: var(--color-bg-alt);
    cursor: default;
}

.accordion-item.active .acc-expanded-content {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.3s;
    /* Fade in ONLY after most of the flex expansion is done */
}

/* Feature Header inside collapsed */
.acc-inner {
    max-width: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.acc-number-lg {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    opacity: 0.2;
    margin-bottom: 1rem;
}

.acc-inner h3 {
    font-size: 2.5rem;
    color: var(--color-white);
    margin-bottom: 1rem;
    white-space: nowrap;
    /* PREVENT WRAPPING during transition */
}

.acc-inner p {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 90%;
    height: 80px;
}

.acc-img-placeholder {
    flex: 1;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    background-color: #333;
}

/* Section Header styling */
.features-header {
    text-align: left;
    max-width: 600px;
}

.features-header h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.features-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

/* Standard Desktop Row: CSS Grid */
.about-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: stretch;
    /* This ensures image matches text height */
    width: 100%;
}

.about-row.full-width {
    grid-template-columns: 1fr;
    /* Single column for full width content */
}

/* Image styling for Grid Fit */
.about-image {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Text Styling for Grid */
.about-text {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease-out;
}



/* Typography specifics for About */
.about-text h5 {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.about-text h2 {
    font-size: 3rem;
    line-height: 1.1;
}

.about-text p {
    font-size: 1.1rem;
}

.contact-grid {
    display: flex;
    gap: 60px;
    align-items: center;
}

.contact-info {
    width: 100%;
    flex: 1;
    gap: 20px;
    display: flex;
    flex-direction: column;
}

.info-block {
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 2rem;
}

.info-block h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.info-block p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Form Styling */
.contact-form-wrapper {
    width: 100%;
    height: 100%;
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 4px;
}

.contact-form-wrapper h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.modern-form .form-group {
    margin-bottom: 2rem;
}

.modern-form input,
.modern-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 0;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 0;
    /* Removing default radius */
}

.modern-form input:focus,
.modern-form textarea:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
}

.modern-form input::placeholder,
.modern-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-btn {
    width: 100%;
    color: var(--color-bg);
    border: none;
    cursor: pointer;
}

.form-btn:hover {
    background-color: var(--color-primary-hover);
}

.map-section iframe {
    filter: invert(90%) hue-rotate(180deg) brightness(90%) contrast(90%);
}

/* Gallery Section */
.gallery-section {
    position: relative;
}

.gallery-section h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

.gallery-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.gallery-header {
    margin-bottom: 3rem;
}

.gallery-slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 80vh;
    min-height: 600px;
}

.gallery-slider {
    display: flex;
    flex-direction: row;
    /* Horizontal Layout */
    height: 100%;
    /* Fill wrapper */
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.gallery-slide {
    width: 33.333%;
    height: 100%;
    /* Full height of wrapper */
    flex-shrink: 0;
    position: relative;
    padding: 0 10px;
    box-sizing: border-box;
}

.slide-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}

/* Controls */
.gallery-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    box-sizing: border-box;
    z-index: 10;
    pointer-events: none;
    /* Allow clicking through empty space */
}

.gallery-controls * {
    pointer-events: auto;
    /* Re-enable clicks on buttons */
}

/* Dots (Left) */
.gallery-dots {
    display: flex;
    gap: 10px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gallery-dot.active {
    background-color: var(--color-white);
}

/* Arrows (Right) */
.gallery-arrows {
    display: flex;
    gap: 15px;
}

.gallery-arrows button {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--color-white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-arrows button:hover {
    border-color: var(--color-white);
    color: var(--color-white);
}

/* Space Grid */
.space-grid-wrapper {
    width: 100%;
    margin-top: 2rem;
}

.space-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

.space-grid-item {
    position: relative;
    width: 100%;
}

.space-slide-image {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.space-slide-title {
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    text-align: center;
}

.space-slide-title h3 {
    color: var(--color-white);
    font-size: 1.5rem;
    margin: 0;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Responsive Grid */




/* Space Modal Styles */
.space-grid-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.space-grid-item:hover {
    transform: scale(1.02);
}

.space-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.space-modal.active {
    display: flex;
}

.space-modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    text-align: center;
    position: relative;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

#space-modal-img {
    margin: auto;
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#space-modal-caption {
    margin: 15px auto 0;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--color-white);
    padding: 10px 0;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.space-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.space-modal-close:hover,
.space-modal-close:focus {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}



/* Footer */
.site-footer {
    background-color: var(--color-bg);
    padding: 80px 0 40px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

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

.footer-logo h3 {
    font-size: 1.5rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-white);
}

.footer-logo .site-logo-img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-nav ul {
    display: flex;
    gap: 30px;
    padding: 0;
    margin: 0;
}

.footer-nav a {
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--color-primary);
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    font-size: 1.2rem;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.footer-credits {
    display: flex;
    gap: 30px;
    align-items: center;
}

.terms-links a {
    margin-right: 20px;
    color: #666;
}

.terms-links a:hover,
.developer-credit a:hover {
    color: var(--color-white);
}

.developer-credit a {
    color: #888;
    text-decoration: none;
    font-weight: 600;
}

/* Privacy Policy Modal */
.privacy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    /* backdrop-filter: blur(5px); Removed for performance */
    padding: 20px;
}

.privacy-modal-overlay.active {
    display: flex;
}

.privacy-modal-content {
    background: #1a1a1a;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    /* Hardware acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.privacy-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.3s;
}

.privacy-close:hover {
    color: var(--color-primary);
}

.privacy-text-container {
    padding: 40px;
    overflow-y: auto;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) rgba(255, 255, 255, 0.05);
}

.privacy-text-container::-webkit-scrollbar {
    width: 6px;
}

.privacy-text-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.privacy-text-container::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 3px;
}

.privacy-text-container h2 {
    font-size: 2rem;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.privacy-text-container h3 {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.privacy-text-container p,
.privacy-text-container li {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.privacy-text-container ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}

/* RAL Entities Grid (Litigation Modal) */
.ral-entities-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.ral-entity-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: background-color 0.3s ease;
}

.ral-entity-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ral-entity-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: white;
    padding: 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ral-entity-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ral-entity-info h3 {
    color: var(--color-white);
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.ral-entity-info p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #ccc;
    line-height: 1.4;
}

.ral-entity-info a {
    font-size: 0.85rem;
    color: var(--color-primary);
    text-decoration: none;
}

.ral-entity-info a:hover {
    text-decoration: underline;
}

/* Modal Responsive */

/* ----------------------------------------------------------------
   VOUCHER MODAL & BUTTON
---------------------------------------------------------------- */

/* Navbar Button */
.btn-voucher-outline {
    background: transparent;
    border: 1px solid var(--color-white);
    color: var(--color-white) !important;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.btn-voucher-outline:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white) !important;
}

/* Modal Overlay (Fullscreen) */
.voucher-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    /* Dark theme bg */
    z-index: 100000;
    display: none;
    /* Hidden by default */
    opacity: 0;
    transition: opacity 0.4s ease;
}

.voucher-modal-overlay.active {
    display: block;
    opacity: 1;
}

/* Modal Container (Split View) */
.voucher-modal-container {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
}

/* Left Side: Form */
.voucher-form-side {
    width: 50%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-bg);
    overflow-y: auto;
    /* Allow scroll if form is tall */
}

.voucher-form-content {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.voucher-form-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-white);
    font-family: var(--font-heading);
}

.voucher-form-content p {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.voucher-form-content .mb-4 {
    margin-bottom: 2rem;
}

/* Form Styles (Reusing .modern-form base but refining layout) */
.voucher-form .form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0;
}

.voucher-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.voucher-form label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #aaa;
}

/* Checkbox specific */
.voucher-form .checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 1rem;
}

.voucher-form .checkbox-group input {
    width: auto;
    margin-top: 4px;
}

.voucher-form .checkbox-group label {
    font-size: 0.8rem;
    line-height: 1.4;
    cursor: pointer;
}

/* Right Side: Image */
.voucher-image-side {
    width: 50%;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.voucher-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.voucher-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 4rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--color-white);
    text-align: center;
}

.voucher-image-overlay h3 {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-style: italic;
}

/* Close Button */
.voucher-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: var(--color-white);
    /* Will be visible on dark bg or image */
    font-size: 2.5rem;
    z-index: 100001;
    /* Above everything */
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
}

.voucher-close:hover {
    transform: rotate(90deg);
    color: var(--color-primary);
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */

/* Tablet & Mobile (max-width: 1100px) */
@media (max-width: 1100px) {

    /* Layout & Sections */
    .section {
        height: auto;
        min-height: 100dvh;
        justify-content: flex-start;
        padding-top: 0;
    }

    .section .container,
    .hero-content {
        padding-top: calc(var(--header-height) + 12px);
    }

    .map-section {
        padding: 0 !important;
    }

    .map-section .container {
        padding: 0;
        max-width: 100%;
    }

    /* Hero might need a bit more specific centering or spacing if content is small */
    .hero-section .hero-content {
        padding-top: calc(var(--header-height) + 0.5rem);
        /* Slightly more for Hero visual balance */
        justify-content: center;
        /* Try centering hero content again if it fits, or keep flex-start if safer */
        min-height: 100dvh;
    }

    .about-row {
        display: flex;
        flex-direction: column-reverse;
        gap: 40px;
    }

    /* "O Espaço" is full-width, so it shouldn't be reversed if it only has text */
    .about-row.full-width {
        flex-direction: column;
    }

    .about-row.reverse {
        flex-direction: column;
    }

    .about-row.reverse .about-image {
        margin-top: 0;
    }

    .about-row .about-text,
    .about-row .about-image {
        flex: auto;
        width: 100%;
        margin-top: 0 !important;
    }

    /* Mobile Menu */
    .menu-toggle {
        display: flex;
        z-index: 2000;
    }

    .nav-links-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 1000;
        transform: translateY(-100%);
        transition: transform 0.4s ease-in-out;
        opacity: 0;
        pointer-events: none;
    }

    .nav-links-container.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .header-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }


    .main-navigation {
        position: static;
        transform: none;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .nav-links-container ul li a {
        font-size: 1.5rem;
    }

    /* Accordion */
    .accordion-container {
        flex-direction: column;
        height: auto;
    }

    .accordion-item {
        width: 100% !important;
        height: 80px;
        flex: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        overflow: hidden;
    }

    .accordion-item.active {
        width: 100% !important;
        flex: none;
        height: 600px;
    }

    .acc-collapsed-content {
        width: 100%;
        height: 80px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 20px;
        writing-mode: horizontal-tb;
        transform: none;
        top: 0;
    }

    .acc-vertical-text {
        writing-mode: horizontal-tb;
        transform: none;
        white-space: normal;
        margin-left: 20px;
        margin-bottom: 0;
        font-size: 1.2rem;
    }

    .acc-number {
        margin-bottom: 0;
        font-size: 1.2rem;
    }

    .acc-inner h3 {
        font-size: 1.5rem;
        white-space: normal;
    }

    .acc-inner p {
        font-size: 0.95rem;
        height: auto;
        max-width: 100%;
    }

    .acc-expanded-content {
        min-width: auto;
        padding: 20px;
    }

    .acc-inner {
        width: 100%;
        max-width: 100%;
    }

    /* Contact & Footer */
    .contact-grid {
        flex-direction: column;
    }

    .contact-map {
        width: 100%;
    }

    .footer-top {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 20px;
        text-align: center;
    }

    .footer-credits {
        flex-direction: column;
        gap: 15px;
    }

    /* Misc */
    .parallax-img img,
    .parallax-text {
        transform: none !important;
    }

    .gallery-header {
        margin-bottom: 2rem;
    }

    .gallery-slide {
        width: 100% !important;
    }

    .gallery-slider-wrapper {
        height: 60vh;
        min-height: 400px;
    }
}

/* Notebook/Small Desktop (max-width: 992px) */
@media (max-width: 992px) {

    /* Voucher Modal */
    .voucher-modal-container {
        flex-direction: column;
    }

    .voucher-form-side {
        width: 100%;
        height: 100%;
        padding: 2rem;
        order: 2;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .voucher-image-side {
        display: none;
    }

    .voucher-close {
        top: 1rem;
        right: 1.5rem;
        color: var(--color-white);
    }
}

/* Tablet (max-width: 900px) */
@media (max-width: 900px) {
    .space-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: var(--padding-sm);
    }

    .map-section {
        margin-bottom: 0;
    }

    /* RAL Grid */
    .ral-entities-grid {
        grid-template-columns: 1fr;
    }

    .ral-entity-card {
        flex-direction: row;
        align-items: center;
    }
}

/* Small Mobile (max-width: 700px) */
@media only screen and (max-width: 700px) {
    .space-modal-content {
        width: 100%;
    }
}

/* Extra Small Mobile (max-width: 600px) */
@media (max-width: 600px) {
    .space-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .space-slide-title h3 {
        font-size: 1.2rem;
    }
}