/* Design System: The Nurturing Curator */

:root {
    /* Color Palette - Material Inspired */
    --color-primary: #B5A897;
    --color-primary-container: #d8cbb7;
    --color-on-primary: #ffffff;

    --color-secondary: #B5A897;
    --color-secondary-container: #d8cbb7;

    --color-background: #F3EDE0;
    /* Tonal background, non-white */
    --color-surface: #F3EDE0;
    --color-on-surface: #101010;
    --color-on-surface-variant: #B5A897;

    --color-surface-container-lowest: #FFFFFF;
    /* Softened off-white */
    --color-surface-container-low: #F3EDE0;
    --color-surface-container: #d8cbb7;
    --color-surface-container-high: #d8cbb7;
    --color-surface-container-highest: #d8cbb7;
    --color-surface-dim: #d8cbb7;

    --color-outline: #B5A897;
    --color-outline-variant: #d8cbb7;

    /* Typography */
    --font-headline: 'Noto Serif', serif;
    --font-body: 'Manrope', sans-serif;

    /* Spacing & Shapes */
    --radius-lg: 0.25rem;
    --radius-xl: 0.5rem;
    --radius-full: 0.75rem;
    /* Following the Stitch roundness ROUND_FOUR */

    /* Soft Physics */
    --shadow-soft: 0 20px 40px rgba(31, 27, 16, 0.06);
    --transition-weighted: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

body {
    background-color: var(--color-background);
    color: var(--color-on-surface);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
.hero-title {
    font-family: var(--font-headline);
    font-weight: 300;
    font-size: clamp(2rem, 8vw, 4.5rem);
    /* Reduced minimum from 2.5rem to 2rem */
    line-height: 1.1;
}

h2,
.section-title {
    font-family: var(--font-headline);
    font-weight: 300;
    font-size: clamp(1.75rem, 6vw, 3.5rem);
    /* Reduced minimum from 2rem to 1.75rem */
    line-height: 1.2;
}

h3 {
    font-family: var(--font-headline);
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

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

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

/* Layout Utilities */
.container {
    width: calc(100% - 4rem);
    max-width: 1300px;
    margin: 0 auto;
}

.page-content {
    padding-top: 180px;
    /* Space for floating navbar */
}

@media (max-width: 768px) {
    .container {
        width: calc(100% - 2rem);
    }

    .page-content {
        padding-top: 120px;
    }
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.md-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Components */

/* Navbar - Floating & Sophisticated */
.navbar {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 1300px;
    z-index: 1000;
    background: rgba(255, 248, 240, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 100px;
    border: none;
    box-shadow: 0 10px 40px rgba(108, 92, 74, 0.04);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.navbar.submenu-active {
    background: rgba(255, 248, 240, 0.96);
    border-radius: 2.5rem 2.5rem 0 0;
    box-shadow: 0 10px 40px rgba(108, 92, 74, 0.08);
}

.navbar-inner {
    height: 90px;
    padding: 0 2.5rem;
}

.logo-filter {
    filter: brightness(0) saturate(100%) invert(39%) sepia(11%) saturate(1036%) hue-rotate(346deg) brightness(95%) contrast(85%);
    /* Warm brown/primary color */
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-headline);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--color-primary);
}

.nav-link.active {
    border-bottom: 2px solid var(--color-primary);
}

.nav-item-container {
    position: relative;
}

@media (min-width: 769px) {
    .nav-item-container {
        position: static;
        /* Allows submenu to span full navbar width */
    }
}

.nav-item-header {
    display: flex;
    align-items: center;
}

.desktop-submenu-toggle {
    margin-left: 0.25rem;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.7;
    transition: var(--transition-weighted);
    color: var(--color-on-surface);
}

.desktop-submenu-toggle:hover {
    opacity: 1;
    color: var(--color-primary);
}

/* Desktop Submenu (Extension of navbar) */
.desktop-submenu {
    position: absolute;
    top: 90px;
    /* Flush with navbar height */
    left: 0;
    width: 100%;
    background: rgba(255, 248, 240, 0.96);
    backdrop-filter: blur(20px);
    border-radius: 0 0 2.5rem 2.5rem;
    padding: 3rem 11rem 4.5rem 4.5rem;
    /* Increased padding-right to leave space for right column */
    box-shadow: 0 30px 60px rgba(108, 92, 74, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateY(-10px);
    z-index: 999;
    overflow: hidden;
    /* Clips the background column and watermark */
}

/* Right column container in desktop submenu */
/* Watermark (half logo) for desktop submenu – matches logo typography */
.desktop-submenu::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -60px;
    /* Slight offset to align precisely with edge */
    transform: translateY(-50%);
    width: 14rem;
    height: 15.22rem;
    /* Aspect ratio of onna-o.svg (width/height = 460/500 = 0.92) */
    background-color: var(--color-primary);
    opacity: 0.35;
    -webkit-mask-image: url('../assets/onna-o.svg');
    mask-image: url('../assets/onna-o.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    z-index: 2;
    pointer-events: none;
    user-select: none;
}

/* Remove decorative column – keep space via extra right padding */
.desktop-submenu::before {
    display: none;
}

.desktop-submenu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.desktop-submenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 4rem;
    position: relative;
    /* Positioned relative to sit on top of ::before/::after column */
    z-index: 3;
}

/* Specific grid for Especialistas (usually more items) */
.nav-item-container:nth-child(3) .desktop-submenu ul {
    grid-template-columns: repeat(4, 1fr);
}

.desktop-submenu li a {
    display: block;
    color: var(--color-on-surface);
    opacity: 0.7;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-weighted);
    text-decoration: none;
    padding: 0.25rem 0;
}

.desktop-submenu li a:hover {
    opacity: 1;
    color: var(--color-primary);
    transform: translateX(8px);
}

.logo img {
    height: 45px;
    width: auto;
    vertical-align: middle;
}

.footer-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    /* Increased for consistency */
    cursor: pointer;
    transition: var(--transition-weighted);
    border: 1.5px solid var(--color-outline-variant);
    /* Same border for both */
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1;
}

.btn-primary {
    background: transparent;
    color: var(--color-outline);
}

.btn-primary:hover,
.btn-secondary:hover {
    background: var(--color-surface-container-high) !important;
    /* Identical hover background */
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(127, 117, 109, 0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--color-on-surface-variant);
}

/* Hero Section Refinement */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img,
.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(244, 239, 235, 0.9) 20%, rgba(244, 239, 235, 0.4) 60%, transparent 100%);
}

.hero-content {
    max-width: 700px;
    z-index: 10;
}

.hero-title {
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-on-surface-variant);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.specialists-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

@media (max-width: 768px) {
    .specialists-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Sections */
.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

/* Cards */
.card {
    background: var(--color-surface-container-lowest);
    border-radius: var(--radius-full);
    /* ROUND_FOUR = 0.75rem */
    padding: 2.5rem;
    transition: var(--transition-weighted);
    position: relative;
    overflow: hidden;
}

.service-block-card {
    cursor: pointer;
    background: white;
    border: 1px solid var(--color-outline-variant);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-weighted);
    padding: 0;
    /* Remove default padding for image edge-to-edge */
}

.service-card-image {
    aspect-ratio: 3/1;
    overflow: hidden;
    width: 100%;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--transition-weighted);
}

.service-block-card:hover .service-card-image img {
    transform: scale(1.08);
}

.service-card-content {
    padding: 2.5rem;
}

.service-block-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(108, 92, 74, 0.12);
    border-color: var(--color-primary-container);
}

.service-block-card h3 {
    margin: 0 0 1rem;
    font-size: 1.8rem;
}

.service-list-preview {
    list-style: none;
    margin-top: 1rem;
}

.service-list-preview li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

/* Desktop Horizontal Layout Optimization */
@media (min-width: 769px) {
    .service-block-card {
        flex-direction: row;
        align-items: stretch;
    }

    .service-card-image {
        width: 30%;
        /* Compact image */
        min-width: 180px;
        max-width: 240px;
        aspect-ratio: auto;
        /* Remove vertical aspect ratio */
    }

    .service-card-content {
        padding: 2rem 2.5rem 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .service-block-card h3 {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }

    .service-list-preview {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem 1.5rem;
        margin-top: 1rem;
    }

    .service-list-preview li {
        margin-bottom: 0.25rem;
    }
}

.service-list-preview li span {
    font-size: 1.1rem;
    color: var(--color-primary);
}

/* Mosaic Gallery System */
.mosaic-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    height: 100vh;
    gap: 0;
    margin: 0;
}

@media (max-width: 768px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
        height: auto;
    }
}

@media (max-width: 768px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    /* Mobile-only variety for mosaic */
    .mobile-span-2-2 {
        grid-area: span 2 / span 2;
    }

    .mobile-span-1-2 {
        grid-area: span 1 / span 2;
    }

    .mobile-span-2-1 {
        grid-area: span 2 / span 1;
    }
}

@media (max-width: 768px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    /* Mobile-only variety for mosaic */
    .mobile-span-2-2 {
        grid-area: span 2 / span 2;
    }

    .mobile-span-1-2 {
        grid-area: span 1 / span 2;
    }

    .mobile-span-2-1 {
        grid-area: span 2 / span 1;
    }
}

@media (max-width: 768px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    /* Mobile-only variety for mosaic */
    .mobile-span-2-2 {
        grid-area: span 2 / span 2;
    }

    .mobile-span-1-2 {
        grid-area: span 1 / span 2;
    }

    .mobile-span-2-1 {
        grid-area: span 2 / span 1;
    }
}

@media (max-width: 768px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    /* Mobile-only variety for mosaic */
    .mobile-span-2-2 {
        grid-area: span 2 / span 2;
    }

    .mobile-span-1-2 {
        grid-area: span 1 / span 2;
    }

    .mobile-span-2-1 {
        grid-area: span 2 / span 1;
    }
}

@media (max-width: 768px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    /* Mobile-only variety for mosaic */
    .mobile-span-2-2 {
        grid-area: span 2 / span 2;
    }

    .mobile-span-1-2 {
        grid-area: span 1 / span 2;
    }

    .mobile-span-2-1 {
        grid-area: span 2 / span 1;
    }
}

@media (max-width: 768px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    /* Mobile-only variety for mosaic */
    .mobile-span-2-2 {
        grid-area: span 2 / span 2;
    }

    .mobile-span-1-2 {
        grid-area: span 1 / span 2;
    }

    .mobile-span-2-1 {
        grid-area: span 2 / span 1;
    }
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #F3EDE0;
    /* corporate background */
    border: 1px solid #B5A897;
    /* corporate border */
    border-radius: 0;
    /* straight edges */
    /* Watermark O remains via ::after */

}

/* Override any custom span classes to enforce 1x1 grid cells */
.mosaic-item.span-2-2,
.mosaic-item.span-2-1,
.mosaic-item.span-1-2,
.mosaic-item.span-3-2 {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
}

.mosaic-item::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: #B5A897;
    /* primary color for O */
    -webkit-mask-image: url('../assets/onna-o.svg');
    mask-image: url('../assets/onna-o.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    opacity: 0.12;
    pointer-events: none;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    opacity: 0.35;
    /* Faded into background */
    mix-blend-mode: multiply;
    /* Perfect integration with background color */
    transition: all 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Diagonal Overlay Gradient - Softer for integration */
.mosaic-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(108, 92, 74, 0.1) 0%, transparent 100%);
    transition: opacity 0.45s ease;
    z-index: 0;
    pointer-events: none;
}

.mosaic-item:hover img,
.mosaic-item.mobile-hover img {
    filter: grayscale(0%) brightness(1.1) contrast(1.2);
    /* Highlighted and vivid */
    opacity: 1;
    transform: scale(1.06);
    mix-blend-mode: normal;
}

/* Floating Label */
.mosaic-label {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    right: auto;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--color-on-surface);
    z-index: 2;
    /* No transform, always visible */
}

.mosaic-label .category {
    display: none;
    /* hide category if not needed */
}

.mosaic-label .title {
    font-family: var(--font-headline);
    font-size: 1rem;
    margin: 0;
    color: var(--color-on-surface);
}

.mosaic-item:hover {
    border-radius: 24px;
    border-color: var(--color-primary);
}

.mosaic-item:hover .mosaic-label {
    /* keep visible */
}


/* Hierarchical Grid Spans (Desktop) */
@media (min-width: 1025px) {
    /* Disabled custom span definitions – uniform squares */
    /* .mosaic-item.span-2-2 { grid-column: span 2; grid-row: span 2; } */
    /* .mosaic-item.span-2-1 { grid-column: span 2; grid-row: span 1; } */
    /* .mosaic-item.span-1-2 { grid-column: span 1; grid-row: span 2; } */
    /* .mosaic-item.span-3-2 { grid-column: span 3; grid-row: span 2; } */
}

/* Mobile & Tablet Adaptation: All visible at once */
@media (max-width: 1024px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
        gap: 10px;
    }

    .mosaic-item.span-2-2,
    .mosaic-item.span-2-1,
    .mosaic-item.span-1-2 {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* Hierarchy for mobile to break monotony */
    .mosaic-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }

    .mosaic-item:nth-child(5) {
        grid-column: span 2;
        grid-row: span 1;
    }

    .mosaic-label {
        padding: 1.5rem;
        transform: translateY(0);
        /* Always visible or mostly visible on touch? No, user said hover/slide */
        background: linear-gradient(to top, rgba(26, 26, 26, 0.6) 0%, transparent 100%);
    }

    .mosaic-label .title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .mosaic-gallery {
        grid-auto-rows: 140px;
    }

    .mosaic-label .title {
        font-size: 0.9rem;
    }
}

/* Modal System */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.2);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    /* Default for desktop */
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-surface);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 3rem;
    /* Extra soft for modals */
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    box-shadow: 0 40px 100px rgba(108, 92, 74, 0.15);
    transform: scale(0.95) translateY(20px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    /* Ensure close button stays anchored correctly */
}

.modal-content.modal-no-img {
    grid-template-columns: 1fr;
    max-width: 800px;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    cursor: pointer;
    z-index: 10;
    background: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 4rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Modal Actions */
.modal-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-surface-container);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.linkedin-modal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; /* Square size: 48-52px */
    height: 48px; /* Square size: 48-52px */
    border-radius: 8px; /* Rounded corners */
    background-color: #B5A897;
    color: #ffffff;
    transition: transform 0.3s ease, background-color 0.3s ease;
    flex-shrink: 0;
}

.linkedin-modal-link:hover {
    transform: scale(1.05);
    background-color: #B5A897;
}

.linkedin-modal-link svg {
    width: 40px; /* Icon size: 32-40px (with 4px padding on each side) */
    height: 40px; /* Icon size: 32-40px (with 4px padding on each side) */
    fill: currentColor;
    display: block;
}

.modal-actions .btn-primary {
    height: 48px; /* Match height of LinkedIn button */
    padding: 0 1.75rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1.5px solid #B5A897 !important;
    color: #B5A897 !important;
    background: transparent !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    border-radius: 100px !important;
    margin: 0 !important;
    min-height: 48px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transform: none !important;
}

.modal-actions .btn-primary:hover {
    background: #B5A897 !important;
    color: #ffffff !important;
    border-color: #B5A897 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px rgba(181, 168, 151, 0.15) !important;
}

/* Modal Title Utility */
.modal-title {
    font-family: var(--font-headline);
    font-weight: 300;
    font-size: clamp(1.75rem, 5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* Specific for Booking Modal */
.booking-modal .modal-content {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    /* Override grid if needed */
    max-width: 600px;
    height: auto;
    max-height: 90vh;
}

.booking-modal .modal-body {
    padding: 3.5rem 4rem;
    /* Reduced from 5rem to help visibility */
    flex: 1;
    min-height: 0;
}

.booking-modal .form-group {
    margin-bottom: 1.5rem;
}

.booking-modal-title {
    font-size: 2.5rem;
}

@media (max-width: 768px) {
    .modal-overlay {
        padding-top: 90px;
        /* Space for the logo */
    }

    .modal-content {
        display: flex;
        flex-direction: column;
        width: 95%;
        max-height: calc(95vh - 90px);
    }

    .modal-img {
        display: none;
    }

    .modal-body {
        padding: 3rem 1.5rem 2rem;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        /* Critical for flex scroll */
    }

    .modal-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .modal-actions {
        justify-content: center;
        gap: 12px;
    }

    .modal-actions .btn-primary {
        width: 100% !important;
        text-align: center;
    }

    .navbar {
        width: 92%;
        top: 15px;
        left: 4%;
        transform: none !important;
        border-radius: 100px;
    }

    .booking-modal .modal-content {
        max-height: calc(85svh - 90px);
        margin-bottom: 40px;
    }

    .booking-modal-title {
        font-size: 1.6rem !important;
        white-space: nowrap;
    }
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 0.75rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-outline-variant);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-on-surface);
    transition: var(--transition-weighted);
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
    padding-bottom: 0.25rem;
    margin-bottom: -0.25rem;
    /* Vertical expansion effect */
}

.form-feedback {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-feedback.success {
    color: #B5A897;
    display: block;
}

.form-feedback.error {
    color: #B5A897;
    display: block;
}

/* Footer */
footer {
    background-color: var(--color-surface-dim);
    padding: 6rem 0 3rem;
    transition: var(--transition-weighted);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
}

.footer-logo {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* Social Icons */
.footer-social-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-top: 1rem;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    color: #B5A897;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon-link svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.social-icon-link:hover {
    color: #FFFFFF;
    transform: scale(1.15);
}

/* Responsividad del Footer */
@media (max-width: 768px) {
    footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-info p {
        display: none;
        /* Hide the descriptive paragraph on mobile if we want to compress it */
    }

    /* Hide Navigation, Legal, and Newsletter in footer on mobile */
    .footer-grid>div:not(.footer-info) {
        display: none !important;
    }

    .footer-social-links {
        justify-content: center;
        margin-top: 0.5rem;
    }

    .social-icon-link {
        width: 2.75rem;
        /* Ensure 44px minimum touch target width (2.75rem = 44px) */
        height: 2.75rem;
        /* Ensure 44px minimum touch target height */
    }

    .social-icon-link svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    /* Copyright container spacing */
    footer .container:last-child {
        margin-top: 2rem !important;
        padding-top: 1.5rem !important;
    }
}

/* Sophisticated Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
/* Responsive */

/* Tablet & Smaller */
@media (max-width: 1024px) {
    .grid.md-grid-2 {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

.contact-info-section {
    max-width: 400px;
}

@media (min-width: 1025px) {
    .contact-container {
        grid-template-columns: 400px 1fr;
        gap: 6rem;
        max-width: 1200px;
        margin-inline: auto;
    }
}

/* Mobile & Smaller */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        transform: none !important;
        border-radius: 0;
        border: none;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
        z-index: 2200;
    }

    .navbar.navbar-active {
        background: #B5A897 !important;
        border-color: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    /* Pseudo-element to block the scrolling text inside nav-links from overlapping the logo */
    .navbar.navbar-active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: #B5A897;
        z-index: 2150;
    }

    /* Scrolled state for mobile navbar */
    .navbar.scrolled {
        background: rgba(244, 239, 235, 0.95);
        backdrop-filter: blur(15px);
        box-shadow: 0 10px 30px rgba(108, 92, 74, 0.1);
    }

    .navbar-inner {
        height: 70px;
        padding: 0 5%;
        justify-content: center;
        position: relative;
    }

    .logo img {
        height: 60px !important;
        width: auto;
        transition: filter 0.4s ease;
        position: relative;
        z-index: 2201;
    }

    /* Adaptive Logo Colors for mobile */
    .navbar.hero-transparent:not(.scrolled):not(.navbar-active) .logo img,
    .navbar.navbar-active .logo img {
        filter: brightness(0) invert(1) !important;
    }

    .navbar.hero-transparent:not(.scrolled):not(.navbar-active) .menu-btn,
    .navbar.navbar-active .menu-btn {
        color: #ffffff !important;
    }

    .navbar.scrolled:not(.navbar-active) .logo img {
        filter: brightness(0) saturate(100%) invert(39%) sepia(11%) saturate(1036%) hue-rotate(346deg) brightness(95%) contrast(85%);
    }

    .navbar.scrolled:not(.navbar-active) .menu-btn {
        color: var(--color-primary);
    }

    .nav-links {
        position: fixed;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        /* Support for mobile viewports */
        background-color: #B5A897 !important;
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1.5rem;
        z-index: 2100;
        opacity: 0;
        visibility: hidden;
        transform: translateY(0);
        /* Remove vertical transform, we use horizontal for submenus */
        transition: opacity 0.4s ease, visibility 0.4s;
        border-radius: 0;
        box-shadow: none;
        padding: 130px 10% 3rem 10%;
        /* Increased top padding to start below logo */
        overflow: hidden;
        /* Immobilize horizontal scroll */
        overscroll-behavior: none;
    }

    .nav-links.nav-links-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-item-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .nav-item-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        /* Align main content to left */
        gap: 0.5rem;
        width: 100%;
        position: relative;
    }

    .nav-link {
        font-size: 1.8rem;
        font-weight: 300;
        letter-spacing: 0.1em;
        text-align: left;
        /* Align text to left */
        flex: 1;
        color: #ffffff;
    }

    .nav-link.active {
        border-bottom: none;
        color: #ffffff;
    }

    .submenu-toggle {
        cursor: pointer;
        font-size: 2rem;
        color: #ffffff;
        transition: transform 0.3s ease;
        position: absolute;
        right: 0;
    }

    .submenu-toggle.active {
        transform: rotate(90deg);
    }

    .mobile-submenu {
        list-style: none;
        position: absolute;
        top: 0;
        left: 100%;
        width: 100%;
        height: 100%;
        background-color: #B5A897;
        padding: 130px 10% 3rem 10%;
        z-index: 2110;
        visibility: hidden;
        transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.6s;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-submenu.active {
        transform: translateX(-100%);
        visibility: visible;
    }

    .submenu-back {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: #ffffff;
        opacity: 0.6;
        margin-bottom: 1.5rem;
        cursor: pointer;
        font-family: var(--font-body);
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        font-weight: 600;
    }

    .submenu-back span {
        font-size: 1.25rem;
    }

    .submenu-section-title {
        font-size: 1.8rem;
        font-family: var(--font-headline);
        font-weight: 300;
        letter-spacing: 0.1em;
        color: #ffffff;
        margin-bottom: 1.5rem;
        display: block;
    }

    .mobile-submenu li {
        margin-bottom: 1rem;
        padding-left: 1rem;
        /* Indentation */
    }

    .mobile-submenu a:not(.submenu-section-title) {
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.7);
        font-weight: 300;
        font-family: var(--font-body);
        transition: color 0.3s ease;
    }

    .mobile-submenu a:not(.submenu-section-title):hover {
        color: #ffffff;
    }

    .menu-btn {
        display: block !important;
        position: absolute;
        right: 5%;
        z-index: 2201;
        /* Above the blocking pseudo-element (2150) */
        cursor: pointer;
        padding: 0.5rem;
        margin-right: -0.5rem;
        transition: color 0.4s ease;
    }

    .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }

    .navbar .btn-primary {
        display: none !important;
    }

    .md-hidden {
        display: none;
    }

    .hero {
        min-height: 100svh;
        height: 100svh;
        padding-top: 0;
        text-align: center;
        display: flex;
        align-items: center;
        overflow: hidden;
    }

    .hero-bg {
        height: 100%;
        width: 100%;
    }

    .hero-bg video {
        object-position: center;
        height: 100%;
        width: 100%;
    }

    .hero-overlay {
        background: linear-gradient(to top, var(--color-background) 5%, rgba(244, 239, 235, 0.01) 100%);
    }

    .hero-content {
        padding-top: 65px;
    }

    .hero-btns {
        margin-top: 1rem !important;
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
        max-width: 90%;
        margin-inline: auto;
    }

    .hero-content {
        margin: 0 auto;
    }

    .flex.gap-4 {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
    }

    /* Team Grid */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Timeline Services */
    .timeline-container {
        flex-direction: column;
        gap: 3rem;
        align-items: center;
        overflow-x: hidden !important;
    }

    .timeline-container>div {
        min-width: 100% !important;
    }

    .timeline-container div[style*="position: absolute"] {
        display: none;
        /* Hide the horizontal line on mobile */
    }
}

/* Specific Utility */
.md-hidden {
    display: none;
}

@media (max-width: 768px) {
    .md-hidden {
        display: block;
    }

    .sm-hidden {
        display: none !important;
    }

    .hide-on-mobile {
        display: none !important;
    }
}

/* Mobile Hamburguer Menu Watermarks */
@media (max-width: 768px) {

    /* Prevent horizontal scrolling in submenus when watermark overflows */
    .mobile-submenu {
        overflow-x: hidden !important;
    }

    /* Watermark at the bottom of main mobile menu and submenus */
    /* Mobile watermark – matches logo font and has no background */
    .nav-links::after,
    .mobile-submenu::after {
        content: '';
        position: absolute;
        bottom: -2.5rem;
        right: -3.5rem;
        width: 11rem;
        height: 11.96rem;
        /* Aspect ratio of onna-o.svg (11 * 500/460 = 11.956) */
        background-color: #FFFFFF;
        opacity: 0.12;
        -webkit-mask-image: url('../assets/onna-o.svg');
        mask-image: url('../assets/onna-o.svg');
        -webkit-mask-size: contain;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        z-index: 2099;
        pointer-events: none;
        user-select: none;
    }
}

/* Specialists Modal & Mini-Cards */
.specialist-mini-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-weighted);
    border: 1px solid var(--color-outline-variant);
}

.specialist-mini-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-outline);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.specialist-mini-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
}

#specialist-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Booking Option Cards */
.booking-option-card {
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.booking-option-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary) !important;
    box-shadow: 0 10px 25px rgba(181, 168, 151, 0.15);
    background-color: var(--color-surface-container-low) !important;
}