/* 
 * Caris Studio - Main Styles
 * Protocol: Vanillla JS + CSS Variables
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    /* Brand Palette - 01-brand-caris.md */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F9F9F9;
    --color-text-primary: #1A1A1A;
    --color-border: #E5E5E5;

    /* Typography */
    --font-headers: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;

    /* Layout */
    --header-height: 80px;
}

/* CSS Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    /* Light as per 01-brand-caris.md */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headers);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

section {
    padding: 6rem 1rem;
    /* Increased padding for editorial feel */
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.center {
    text-align: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}


/* 
 * [HEADER] Sticky Navigation 
 */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Phase 16: Initial State */
    background-color: transparent;
    box-shadow: none;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

/* Force White Text Initially */
.header__logo,
.header__link {
    color: #FFFFFF !important;
    transition: color 0.4s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header__link:hover {
    opacity: 0.8;
}

/* Scrolled State */
.header--scrolled {
    background-color: #FFFFFF !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Black Text on Scroll */
.header--scrolled .header__logo,
.header--scrolled .header__link {
    color: #1A1A1A !important;
    text-shadow: none;
}

.header--scrolled .header__link:hover {
    color: #666666 !important;
}

.header__container {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-family: var(--font-headers);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    /* Strict tracking */
    color: var(--color-text-primary);
}

.header__nav {
    display: flex;
    gap: 2rem;
}

.header__link {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    opacity: 0.8;
}

.header__link:hover {
    opacity: 1;
}

.header__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-text-primary);
    transition: width 0.3s ease;
}

.header__link:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .header__nav {
        display: none;
        /* Mobile menu implementation deferred */
    }
}

/* 
 * [HERO] Impact Section
 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
    /* Offset fixed header */

    /* Phase 4: Background Image with Gradient Overlay */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/hero_main.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    /* White text for contrast */
}

.hero__content {
    max-width: 800px;
    padding: 0 1rem;
    animation: fadeIn 1.2s ease-out;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 400;
    /* Editorial style choice */
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
    /* Slightly transparent white */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn--primary {
    border: 1px solid var(--color-text-primary);
    background-color: transparent;
    color: var(--color-text-primary);
}

/* Override btn--primary for Hero (White connection) */
.hero .btn--primary {
    border-color: #fff;
    color: #fff;
}

.hero .btn--primary:hover {
    background-color: #fff;
    color: #000;
}

.btn--primary:hover {
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
}


.btn--secondary {
    border-bottom: 1px solid var(--color-text-primary);
    padding: 0 0 5px 0;
    font-size: 0.9rem;
    font-weight: 500;
    /* Phase 5 Update: Making btn--secondary more button-like for footer actions if needed, 
       but keeping text style for consistency unless specified. 
       Actually, Phase 5 requested Agendar Cita as btn--secondary in locations.
       I will keep it text-underline based or upgrade it? The requested interaction was Ghost Button for map.
       Let's keep secondary as underlined text effectively or give it a subtle bg. 
       Wait, the previous code had btn--secondary as text-only border-bottom.
       I'll upgrade it slightly to be more clickable in location cards.
    */
    background: transparent;
    color: var(--color-text-primary);
}

.btn--secondary:hover {
    opacity: 0.7;
}

/* Phase 5: Ghost Button */
.btn--ghost {
    border: 1px solid var(--color-text-primary);
    background: transparent;
    color: var(--color-text-primary);
    padding: 0.6rem 1.2rem;
    /* Compact padding */
    border-radius: 2px;
}

.btn--ghost:hover {
    background-color: var(--color-text-primary);
    color: #fff;
}

.btn-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: underline;
    font-weight: 600;
    margin-right: 1rem;
}

/* 
 * SECTIONS
 */

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.section-intro {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    color: #555;
    font-weight: 300;
}

/* About Section */
.section-about {
    background-color: var(--color-bg-secondary);
}

.about__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about__text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about__quote {
    font-family: var(--font-headers);
    font-style: italic;
    font-size: 1.5rem;
    margin: 2rem 0;
    padding-left: 1.5rem;
    border-left: 2px solid var(--color-text-primary);
    color: #333;
}

.about__img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Services */
.service-card {
    background: #fff;
    /* Added bg for cards */
    border: 1px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
    /* For image scaling if added later */
}

.service-card:hover {
    border-color: var(--color-border);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.service-card__body {
    padding: 2rem;
}

.card-img-top {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.service-card__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.service-card__desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
}

/* 
 * [RESULTS] Gallery Section
 */
.section-results {
    position: relative;
    overflow: hidden;
    background-color: #000;
    /* Fallback */
}

.results-header-container {
    position: relative;
    padding: 6rem 0 2rem;
    /* Adjusted padding */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    /* Transparent bg to show video underneath */
}

/* Contrast for results content */
.results-content-wrapper {
    position: relative;
    z-index: 2;
    color: #FFFFFF;
}

.results-content-wrapper h3,
.results-content-wrapper p {
    color: #FFFFFF;
}

.video-slices-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 0;
    pointer-events: none;
}

.video-slice {
    flex: 1;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.video-slice video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.5);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    /* Darker for legibility */
    backdrop-filter: blur(3px) grayscale(1);
    /* Blur for separation + Noir */
    -webkit-backdrop-filter: blur(3px) grayscale(1);
    z-index: 1;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #000;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: #000;
    color: #fff;
}

.results-header-container .container {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.results-header-container .section-title,
.results-header-container .section-intro {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* [GALLERY] Infinite Scroll */
.gallery-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab;
    margin-bottom: 3rem;
    /* Soft edges mask */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.gallery-viewport:active {
    cursor: grabbing;
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    padding: 1rem 0;
    will-change: transform;
}

.video-card {
    position: relative;
    width: 320px;
    /* Fixed width for carousel */
    height: 540px;
    /* Taller cinematic ratio */
    flex-shrink: 0;
    /* Prevent shrinking */
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.5s ease;
}

.video-card:hover video {
    opacity: 1;
}

.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.play-icon {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.video-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
    backdrop-filter: blur(4px);
    z-index: 3;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.modal-video {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    outline: none;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 20px;
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
}

.modal-close:hover {
    color: #ccc;
}

/* Transformations Grid (Carousel) */
.transformations-grid {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
}

.transformations-grid::-webkit-scrollbar {
    display: none;
    /* Safari/Chrome */
}

/* Updated Card Styles */
/* Updated Card Styles */
.transformation-card {
    display: flex;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 90vw;
    /* Giant on mobile */
    scroll-snap-align: center;
    cursor: zoom-in;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s;
    background: #000;

    /* FASE 38: Aspect Ratio Control */
    aspect-ratio: 4/3;
    /* Mobile default */
    height: auto;
}

.transformation-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 5;
}

@media (min-width: 768px) {
    .transformation-card {
        min-width: 700px;
        /* Giant on desktop */
        aspect-ratio: 16/9;
        /* Desktop Panoramic */
    }
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #000;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: #000;
    color: #fff;
}

.compare-image {
    position: relative;
    width: 50%;
    height: 100%;
    /* Fill container height */
}

/* White separator between comparison images */
.compare-image:first-child {
    border-right: 2px solid #fff;
}

.compare-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    /* Focus clearly on face/hair */
}

.compare-label {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    font-size: 0.7rem;
    background: #FFFFFF;
    color: #000000;
    padding: 0.3rem 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.compare-label.right {
    left: auto;
    right: 0.5rem;
    background: #FFFFFF;
    color: #000000;
}

/* Dual Lightbox */
.lightbox-dual .dual-content {
    display: flex;
    flex-direction: row;
    height: 70vh;
    /* Reduced height to ensure full visibility */
    width: 90vw;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.dual-image-wrapper {
    position: relative;
    flex: 1;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    background: #000;
    /* Letterboxing background */
    display: flex;
    align-items: center;
    justify-content: center;
}

.dual-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* FASE 39: Prevent cropping */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lb-label {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 600;
    backdrop-filter: blur(4px);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .lightbox-dual .dual-content {
        flex-direction: column;
        height: 85vh;
        width: 95vw;
    }

    .dual-image-wrapper {
        width: 100%;
    }
}

/* Mobile Responsiveness for Gallery */
@media (max-width: 768px) {
    .gallery-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
    }

    .video-card {
        min-width: 80%;
        /* Show most of one card */
        scroll-snap-align: center;
        height: 450px;
    }

    .transformations-grid {
        grid-template-columns: 1fr;
        /* Stack comparison cards */
    }
}

/* Social */
.social-widget {
    background-color: #eee;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-style: italic;
    color: #888;
}

/* Locations */
.section-locations {
    background-color: var(--color-bg-secondary);
}

.location-card {
    background: #fff;
    height: auto;
    /* FASE 41: Auto height for new aspect ratio */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Phase 5: Interaction High-End */
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
    will-change: transform, box-shadow;
}

/* FASE 41: Vertical/Portrait Location Images */
.location-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 9/16;
    /* Vertical Portrait */
    object-fit: cover;
    object-position: center;
    display: block;
}

.location-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.location-card__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.location-card__header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.location-card__header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.location-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
}

.location-card__body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Phase 5: Location Details Styling */
.location-card__body address {
    font-style: normal;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.location-ref {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.location-ref small {
    color: #666;
    font-size: 0.85rem;
}

.location-schedule {
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.phone-link {
    color: #666;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 500;
}

.phone-link:hover {
    color: var(--color-text-primary);
    text-decoration: underline;
}

.location-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    /* Stack buttons on mobile/cards */
    gap: 0.5rem;
}

/* 
 * [FOOTER] Dark Luxury
 */
.footer {
    background-color: #111111;
    color: #888888;
    padding: 5rem 1rem 3rem;
    font-size: 0.95rem;
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Cols Exactas */
    gap: 4rem;
    margin-bottom: 4rem;
    text-align: left;
}

@media (max-width: 768px) {
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
}

.footer__col {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer__logo {
    color: #FFFFFF;
    font-family: var(--font-headers);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.footer__slogan {
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 300;
}

.footer__title {
    color: #FFFFFF;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.footer__nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer__link {
    color: #888888;
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer__link:hover {
    color: #FFFFFF;
}

.footer__link--small {
    font-size: 0.8rem;
    text-decoration: underline;
}

.footer__socials {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.social-icon svg {
    transition: fill 0.3s ease;
}

.social-icon:hover svg {
    fill: #FFFFFF;
}

.footer__phone {
    font-size: 1.1rem;
    color: #FFFFFF;
    margin-top: 0.5rem;
}

.footer__bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #333333;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .header__logo {
        color: #fff;
        /* Ensure logo is visible on hero image if needed, though it's sticky */
    }

    .header--scrolled .header__logo {
        color: var(--color-text-primary);
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about__img {
        height: auto;
        min-height: 300px;
    }
}

/* Carousel UI */
.carousel-ui {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.nav-arrow {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
    line-height: 1;
}

.nav-arrow:hover {
    transform: scale(1.2);
}

.carousel-dots {
    display: flex;
    gap: 0.8rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #FFFFFF;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Dual Lightbox */
.lightbox-dual .dual-content {
    display: flex;
    flex-direction: row;
    height: 70vh;
    /* Reduced height to ensure full visibility */
    width: 90vw;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.dual-image-wrapper {
    position: relative;
    flex: 1;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.dual-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lb-label {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 600;
    backdrop-filter: blur(4px);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .lightbox-dual .dual-content {
        flex-direction: column;
        height: 85vh;
        width: 95vw;
    }

    .dual-image-wrapper {
        width: 100%;
    }
}

/* Phase 14: Star Badge & Authority Bar */

/* Service Card Relative Positioning for Badge */
.service-card {
    position: relative;
}

.star-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #000;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 2;
    border-radius: 2px;
}

/* Authority Bar */
.authority-bar {
    text-align: center;
    margin-top: 5rem;
    border-top: 1px solid #eee;
    padding-top: 3rem;
}

.authority-title {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: #999;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.auth-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.auth-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Phase 17: Mobile Navigation */

/* Desktop Defaults: Hide Mobile Elements */
.mobile-toggle,
.mobile-wa-btn,
.mobile-menu-overlay {
    display: none;
}

@media (max-width: 768px) {

    /* Hide Desktop Nav */
    .header__nav {
        display: none !important;
    }

    /* Show Mobile Elements */
    .mobile-toggle,
    .mobile-wa-btn {
        display: block;
    }

    /* Mobile Toggle Styling */
    .mobile-toggle {
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
        position: relative;
    }

    .bar {
        display: block;
        width: 25px;
        height: 2px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background-color: #FFFFFF;
        /* Initial State Color */
    }

    /* Toggle & Icon Colors on Scroll */
    .header--scrolled .bar {
        background-color: #1A1A1A;
    }

    .mobile-wa-btn {
        color: #FFFFFF;
        transition: color 0.4s ease;
    }

    .header--scrolled .mobile-wa-btn {
        color: #1A1A1A;
    }

    /* Hamburger Animation to X */
    .mobile-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.is-active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
        background-color: #1A1A1A !important;
        /* Force black on overlay */
    }

    .mobile-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
        background-color: #1A1A1A !important;
        /* Force black on overlay */
    }

    /* Overlay Menu */
    .mobile-menu-overlay {
        display: flex;
        /* Flex but hidden via opacity/pointer-events */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.is-open {
        opacity: 1;
        pointer-events: all;
    }

    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .mobile-link {
        font-family: var(--font-headers);
        font-size: 2rem;
        color: #1A1A1A;
        text-align: center;
        text-decoration: none;
    }
}

/* Phase 19: Immersive Service Cards */

.service-card {
    /* Reset & Generics */
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 4px;
    border: none !important;
    isolation: isolate;
    background: #000;
    /* Fallback */
}

/* Background Image */
.immersive-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

.service-card:hover .immersive-bg {
    transform: scale(1.1);
}

/* Content Overlay */
.immersive-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 10%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: all 0.3s ease;
}

.service-card:hover .immersive-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 20%, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0.2) 100%);
}

/* Typography */
.service-title {
    font-size: 1.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #fff;
}

.service-title span {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    display: block;
    margin-top: 5px;
    letter-spacing: 0.05em;
}

.service-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    max-width: 95%;
    line-height: 1.5;
}

/* Actions */
.service-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.btn-action {
    padding: 0.8rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-align: center;
    flex: 1;
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-action.primary {
    background: #FFFFFF;
    color: #000000;
}

.btn-action.primary:hover {
    background: #F0F0F0;
    transform: translateY(-2px);
}

.btn-action.ghost {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
}

.btn-action.ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFFFFF;
    transform: translateY(-2px);
}

/* Phase 20: Authority Logos FIX */
.logos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.auth-logo {
    width: 280px !important;
    max-width: 30vw !important;
    height: auto !important;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.auth-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .logos-container {
        gap: 2rem;
    }

    .auth-logo {
        width: 160px !important;
        max-width: 45% !important;
    }
}

/* Phase 22: Legal Pages */
.legal-hero {
    background-image: url('../img/loc_fortuna.jpg');
    background-size: cover;
    background-position: center;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 0;
}

.legal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.legal-title {
    color: #fff;
    position: relative;
    z-index: 2;
    font-size: 3.5rem;
    font-family: var(--font-headers);
    font-weight: 400;
    letter-spacing: -0.02em;
    text-align: center;
}

.container--narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.legal-body {
    padding: 4rem 0;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    font-family: var(--font-body);
}

.legal-body h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-family: var(--font-headers);
    color: #000;
    font-size: 1.5rem;
}

.legal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-body li {
    margin-bottom: 0.5rem;
}

.legal-return {
    margin-top: 4rem;
    text-align: center;
    padding-bottom: 4rem;
}

/* Botón Cerrar Unificado (Galería fotos y videos) */
#close-dual,
.modal-close {
    position: fixed;
    /* Fijo respecto a la ventana */
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    /* Fondo oscuro semitransparente */
    border-radius: 50%;
    /* Círculo perfecto */
    color: #FFFFFF;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10005;
    /* Por encima de todo */
    transition: background-color 0.3s ease, transform 0.2s ease;
    line-height: 1;
    text-shadow: none;
    font-family: sans-serif;
}

#close-dual:hover,
.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

/* Ajuste para Móviles */
@media (max-width: 768px) {

    #close-dual,
    .modal-close {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 28px;
        background-color: rgba(0, 0, 0, 0.8);
    }

    /* Phase 32: Mobile Reel Format (Render Fix) */
    /* Contenedor: Scroll Horizontal Limpio */
    .gallery-viewport {
        display: flex;
        flex-wrap: nowrap;
        /* Nunca bajar de línea */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;

        /* Centrado Perfecto */
        padding: 2rem 5vw;
        /* 5% de margen a los lados */
        gap: 1rem;
        width: 100%;

        /* Ocultar scrollbar nativa para estética */
        scrollbar-width: none;
    }

    .gallery-viewport::-webkit-scrollbar {
        display: none;
    }

    /* Tarjeta de Video: Formato Reel (9:16) */
    .video-card {
        /* TAMAÑO: Ocupar casi toda la pantalla */
        min-width: 90vw !important;
        /* El video domina la vista */
        width: 90vw !important;

        /* PROPORCIÓN: La clave para que no se vea horrible */
        height: auto !important;
        aspect-ratio: 9/16;
        /* Forzar formato vertical de celular */

        /* Comportamiento */
        scroll-snap-align: center;
        border-radius: 12px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        margin: 0;
        /* Sin márgenes extraños */
    }

    /* Ajuste del video interno */
    .video-card video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* Ahora sí cubrirá bien porque la caja tiene la forma correcta */
        border-radius: 12px;
        object-position: center top;
    }

    /* Ajuste de Overlay para que el icono Play no quede gigante */
    .play-icon {
        width: 60px;
        height: 60px;
    }

    /* Phase 33: Mobile Video Navigation Bar */
    .video-nav-ui {
        display: flex !important;
        /* Show on mobile */
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        margin-top: 1rem;
        padding-bottom: 2rem;
    }

    /* Reuse existing carousel styling, but ensure dots are visible/styled */
    .video-nav-ui .nav-arrow {
        background: none;
        border: 2px solid #333;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
    }

    .video-nav-ui .dot {
        width: 10px;
        height: 10px;
        background-color: #ccc;
        border-radius: 50%;
        cursor: pointer;
        transition: background-color 0.3s;
    }

    .video-nav-ui .dot.active {
        background-color: #333;
        transform: scale(1.2);
    }
}

/* FASE 36: CONSOLIDACIÓN DE FOOTER (3 COLS + SUPER ICONS) */
.footer__col--socials {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    .footer__col--socials {
        align-items: center;
    }
}

/* Teléfono B&W Style */
.phone-link-bw {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    /* Más grande */
    font-weight: 500;
    transition: color 0.3s;
    margin-bottom: 0.5rem;
}

.phone-link-bw:hover {
    color: #b3b3b3;
    /* Sutil cambio */
}

.phone-link-bw i {
    font-size: 1rem;
}

/* Fila de Iconos */
.social-icons-row {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .social-icons-row {
        justify-content: center;
    }
}

/* Botones de Icono */
.icon-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.icon-btn:hover {
    transform: translateY(-5px) scale(1.1);
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* FASE 42: Estilo Premium para Botón TikTok (High Contrast) */
.btn--tiktok-glam {
    /* Estructura y Glassmorphism */
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 35px;
    /* Ajuste de Fondo Glass más visible */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Borde más fuerte */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;

    /* CAMBIO CLAVE: Color Blanco */
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Ajuste del icono SVG */
.tt-logo-svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

/* Efecto Hover Llamativo (Colores TikTok) */
.btn--tiktok-glam:hover {
    /* CAMBIO CLAVE: Gradiente TikTok en lugar de fondo negro */
    background: linear-gradient(45deg, #00f2ea, #ff0050);
    border-color: transparent;
    /* El gradiente define el borde */
    color: #fff;
    /* Texto se mantiene blanco */
    /* Sombras más intensas */
    box-shadow: 0 8px 25px rgba(0, 242, 234, 0.6), 0 8px 25px rgba(255, 0, 79, 0.6);
    transform: translateY(-3px);
}

.btn--tiktok-glam:hover .tt-logo-svg {
    transform: scale(1.1);
}

/* Ajuste Mobile para que no sea demasiado ancho */
@media (max-width: 768px) {
    .btn--tiktok-glam {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 80%;
        justify-content: center;
    }
}