/* =========================================================
   VILLAS DE SALCHI - TROPICAL MODERNISM THEME
   ========================================================= */

:root {
    /* Paleta de Colores "User Selected" */
    --salchi-pantone-302: #004165;
    /* Deep Navy */
    --salchi-pantone-549: #5E9CAE;
    /* Teal */
    --salchi-pantone-551: #A1C6CF;
    /* Sky Blue */
    --salchi-pantone-7514: #D7A890;
    /* Terracotta Light */
    --salchi-pantone-7523: #AC675E;
    /* Terracotta Dark */

    /* Mapping Semántico */
    --salchi-bg: #fdfcfb;
    --salchi-text: var(--salchi-pantone-302);

    --salchi-primary: var(--salchi-pantone-302);
    --salchi-secondary: var(--salchi-pantone-549);
    --salchi-accent: var(--salchi-pantone-7514);
    --salchi-accent-dark: var(--salchi-pantone-7523);

    --salchi-light-overlay: rgba(255, 255, 255, 0.9);

    /* Espaciado y Layout */
    --salchi-container: 1400px;
    --salchi-gutter: 2rem;

    /* Fuentes */
    --font-serif: "Playfair Display", serif;
    --font-sans: "Outfit", sans-serif;
}

/* =========================================================
   RESET & BASICS
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--salchi-bg);
    color: var(--salchi-text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

/* New Responsive Classes - FIXED TYPOGRAPHY */
.section-heading {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-top: 15px;
}

.section-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #5c554f;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

/* Utilidades */
.salchi-container {
    max-width: var(--salchi-container);
    margin: 0 auto;
    padding: 0 var(--salchi-gutter);
}

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

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-padding {
    padding: 100px 0;
}

/* Botones */
.btn-salchi {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-family: var(--font-sans);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--salchi-primary);
    color: #fff;
    border: 1px solid var(--salchi-primary);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--salchi-primary);
    border: 1px solid var(--salchi-primary);
}

.btn-outline:hover {
    background-color: var(--salchi-primary);
    color: #fff;
}

/* Variante nueva: Botón claro (Teal) */
.btn-teal {
    background-color: var(--salchi-secondary);
    /* Pantone 549 */
    color: #fff;
    border: 1px solid var(--salchi-secondary);
}

.btn-teal:hover {
    background-color: var(--salchi-pantone-302);
    border-color: var(--salchi-pantone-302);
    transform: translateY(-2px);
}


/* =========================================================
   HEADER STICKY (Glassmorphism)
   ========================================================= */
.salchi-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 12px 0;
    transition: padding 0.3s ease, background 0.3s ease;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
}

.salchi-header.scrolled {
    padding: 8px 0;
    /* Reduced padding slightly to accommodate larger logo without being huge */
    background: rgba(244, 241, 234, 0.95);
    /* Increased opacity for better contrast */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.salchi-header.scrolled .brand-logo img {
    height: 50px;
    /* Resize on scroll */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-desktop {
    display: flex;
    gap: 40px;
}

.mobile-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--salchi-primary);
    /* Use primary color for visibility on light header */
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(14, 28, 38, 0.98);
    /* Dark background */
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.nav-link-mobile {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

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

.mobile-back {
    margin-top: 20px;
    font-size: 1rem;
}

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

.brand-logo img {
    height: 65px;
    width: auto;
    margin-bottom: 10px;
    transition: height 0.3s ease;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding-bottom: 5px;
}

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

/* Language Switcher Header */
.nav-lang-header {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--salchi-primary);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    line-height: 1;
    /* Match line-height for better centering */
}

/* Grouping Language and Back button */
.header-nav-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    /* Spacing between language and back button */
}

.nav-lang-header:hover {
    color: var(--salchi-accent);
}

.nav-lang-header i {
    font-size: 16px;
}

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

.btn-back-num {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--salchi-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 24px;
    border-radius: 50px;
    /* Rounded pill shape */
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.btn-back-num:hover {
    background: var(--salchi-primary);
    color: #ffffff;
    border-color: #fff;
}


/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-image: url("/images/salchi/banner_2.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;
    /* Increased height for smoother blend */
    background: linear-gradient(to bottom, transparent 0%, var(--salchi-bg) 100%);
    z-index: 2;
    /* Above video (1) but below content (3) */
    pointer-events: none;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-video.visible {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* Removed per user request */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 1.2s ease forwards 0.5s;
}

.hero-subtitle {
    font-size: 14px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Added text shadow */
}

.hero-subtitle::before,
.hero-subtitle::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.8);
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 32px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    /* Added soft text shadow */
}

.hero-title i {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
}


@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 1;
    /* Máxima opacidad */
    animation: bounce 2s infinite;
    z-index: 10;
    /* Encima de todo */
    pointer-events: none;
}

.scroll-indicator span {
    font-size: 11px;
    /* Un poco más grande */
    font-weight: 600;
    /* Más negrita */
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--salchi-primary);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    /* Sombra clara para contraste */
}

.line-scroll {
    width: 2px;
    /* Más gruesa */
    height: 50px;
    /* Un poco más larga */
    background: linear-gradient(to bottom, var(--salchi-primary), transparent);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}


/* =========================================================
   INTRO & BENTO GRID
   ========================================================= */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.intro-image-wrap {
    position: relative;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
}

.intro-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.intro-image-wrap:hover img {
    transform: scale(1.05);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 20px;
    margin-top: 60px;
}

.bento-item {
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.bento-item:hover {
    transform: translateY(-5px);
}

.bento-item.card-content {
    background: #fff;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.bento-item.tall {
    grid-row: span 2;
}

.bento-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    /* Smooth slow zoom */
}

.bento-item:hover .bento-img {
    transform: scale(1.1);
}

.bento-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: #fff;
}





/* =========================================================
   LOCATION MAP STYLING
   ========================================================= */
.location-section {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    /* Center Vertically */
    padding: 0 var(--salchi-gutter);
    overflow: hidden;
}

.map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind */
}

.location-card {
    position: relative;
    z-index: 10;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    max-width: 450px;
    /* Constrained width so map is visible */
    margin: 40px auto;
    /* Fallback centering */
    margin-left: max(5%, calc/50% - 600px);
    /* Offset a bit to the left in Salchi container style usually */
}

/* Use regular salchi-container inside relative section usually, but here section is relative */
@media (min-width: 1024px) {
    .location-card {
        margin-left: 100px;
    }
}


/* =========================================================
   FOOTER
   ========================================================= */
.salchi-footer {
    background-color: var(--salchi-primary);
    color: #eaddcf;
    padding: 80px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.footer-brand img {
    filter: brightness(0) invert(1) opacity(0.9);
    /* White logo */
}

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

.footer-developer img {
    filter: brightness(0) invert(1);
    /* White NUM logo */
    transition: opacity 0.3s;
}

.footer-developer:hover img {
    opacity: 1;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */
/* Hide video on mobile only to save data/battery */
@media (max-width: 767px) {
    .hero-video {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .intro-image-wrap {
        height: 400px;
        order: -1;
    }

    /* Simplified Stack for Tablet & Mobile */
    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 40px;
        height: auto;
        /* Reset fixed rows */
        grid-template-rows: none;
    }

    .bento-item,
    .bento-item.wide,
    .bento-item.tall,
    .bento-item.large {
        width: 100%;
        grid-column: auto;
        grid-row: auto;
        min-height: 350px;
        /* Increased for better visual impact */
        height: auto;
    }

    .bento-item img.bento-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .bento-item.card-content {
        height: auto;
        min-height: auto;
        /* Allow text to size naturally */
        padding: 40px 30px;
    }

    .location-card {
        margin: 40px auto;
        position: relative;
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 80vh;
        /* Reduced height on mobile */
        background-image: url("/images/salchi/banner_2.jpg");
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .location-card {
        margin: 20px;
        padding: 30px;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #eee;
    }

    .location-section {
        height: auto;
        flex-direction: column;
        padding: 0;
        display: block;
    }

    .map-bg {
        position: relative;
        height: 300px;
    }

    /* Header Mobile Adjustments */
    .nav-desktop {
        display: none;
    }

    .desktop-only {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    /* Footer Logos Adjustments for Mobile */
    .footer-brand img {
        height: 180px !important;
    }

    .footer-developer img {
        height: 60px !important;
    }
}

/* =========================================================
   BLURRED LENS CURSOR
   ========================================================= */
.cursor-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    /* Slightly visible white tint */
    backdrop-filter: blur(4px);
    /* The "Glass" effect */
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    /* Interact through it */
    z-index: 9999;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    /* Soft glow */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Centering is handled by JS translate mostly, but margin helps align origin */
    margin-left: -30px;
    margin-top: -30px;
    transition: opacity 0.3s ease;
    will-change: transform;
}


/* =========================================================
   PROTOTYPE CARDS ALIGNMENT (Desktop)
   ========================================================= */
@media (min-width: 1024px) {
    .prototype-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .prototype-body {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* Force the list to perform the expansion, pushing subsequent items (grid) down */
    .prototype-body ul {
        flex: 1;
    }

    /* Target the UL list to push everything else down? No, margin-top: auto on grid is better. */
    /* Ensure the button stays at the bottom too by wrapping or careful margin. */

    .proto-details-grid {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .cursor-blur {
        display: none;
    }
}

/* =========================================================
   CREATIVE GALLERY & LIGHTBOX
   ========================================================= */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(22, 22, 22, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.gallery-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-header {
    padding: 30px var(--salchi-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--salchi-pantone-551);
}

.gallery-close-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-close-btn:hover {
    background: #fff;
    color: #000;
    transform: rotate(90deg);
}

.gallery-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px var(--salchi-gutter);
}

/* Creative Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding-bottom: 60px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    height: 250px;
    /* Uniform height for clean grid */
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Entry animation handled by JS adding a class or inline style delay */
}

.gallery-modal.active .gallery-item {
    animation: fadeUpItem 0.6s ease forwards;
}

@keyframes fadeUpItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.gallery-item:hover img {
    transform: scale(1.05);
    /* Slight zoom on grid hover */
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.lightbox-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    overflow: hidden;
    /* Important for zoom not to spill */
}

.image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-main img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    transition: transform 0.1s linear;
    /* Responsive zoom */
    transform-origin: center center;
}

.nav-btn {
    position: absolute;
    top: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 5;
    transform: translateY(-50%);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-btn.prev {
    left: 20px;
}

.nav-btn.next {
    right: 20px;
}

/* Zoom Controls */
.lightbox-controls {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.lightbox-controls input[type=range] {
    width: 200px;
    accent-color: var(--salchi-pantone-549);
    cursor: pointer;
}

/* =========================================================
   INTERACTIVE MASTER PLAN
   ========================================================= */
.map-chip {
    position: absolute;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 5;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-chip:hover,
.map-chip.active {
    z-index: 100;
    transform: translate(-50%, -50%) scale(1.1);
}

.chip-dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    position: relative;
    /* Color is set inline via vars usually, but we use inline styles in JS */
}

/* Pulse animation for chips */
.map-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--chip-color, #fff);
    /* Uses CSS var from JS */
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4;
    z-index: -1;
    animation: chipPulse 2s infinite;
}

@keyframes chipPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    70% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.chip-tooltip {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    /* Prevent wrapping */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    text-align: center;
    color: var(--salchi-primary);
    min-width: 180px;
    width: auto;
    z-index: 100;
}

/* Triangle arrow */
.chip-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    z-index: -1;
}

.map-chip:hover .chip-tooltip,
.map-chip.active .chip-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.chip-tooltip strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

.chip-tooltip span {
    display: block;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 2px;
}

/* Responsive Chips */
@media (max-width: 768px) {
    .chip-dot {
        width: 14px;
        height: 14px;
    }

    .chip-tooltip {
        display: none;
        /* Hidden by default */
        position: fixed;
        /* Center on screen for mobile readability */
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 1000;
        width: 80% !important;
        max-width: 300px;
        text-align: center;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    /* Show when active (tapped) */
    .map-chip.active .chip-tooltip {
        display: block;
        opacity: 1;
        visibility: visible;
        animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    /* Add backdrop for mobile modal feel */
    .map-chip.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.3);
        z-index: 999;
        pointer-events: all;
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Directional Tooltips */
.chip-tooltip.top {
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
}

.chip-tooltip.bottom {
    top: 45px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
}

.chip-tooltip.left {
    right: 40px;
    left: auto;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
}

.chip-tooltip.right {
    left: 40px;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
}

/* Arrows for directions */
.chip-tooltip.bottom::after {
    top: -6px;
    bottom: auto;
}

.chip-tooltip.left::after {
    right: -6px;
    left: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(45deg);
}

.chip-tooltip.right::after {
    left: -6px;
    right: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(45deg);
}

/* Hover States for directions */
.map-chip:hover .chip-tooltip.top,
.map-chip.active .chip-tooltip.top {
    transform: translateX(-50%) translateY(0);
}

.map-chip:hover .chip-tooltip.bottom,
.map-chip.active .chip-tooltip.bottom {
    transform: translateX(-50%) translateY(0);
}

.map-chip:hover .chip-tooltip.left,
.map-chip.active .chip-tooltip.left {
    transform: translateY(-50%) translateX(0);
}

.map-chip:hover .chip-tooltip.right,
.map-chip.active .chip-tooltip.right {
    transform: translateY(-50%) translateX(0);
}

/* Hide Master Plan on Mobile Devices */
@media (max-width: 767px) {
    #master-plan {
        display: none !important;
    }
}

/* Section Transitions */
.section-transition {
    position: relative;
    z-index: 1;
    /* Ensure above body but below interactive elements if z-index is used */
}

.section-transition::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    /* Generous height for a smooth fade */
    background: linear-gradient(to bottom, transparent, var(--next-bg));
    pointer-events: none;
    z-index: 1;
}

/* PHASE TOGGLE SLIDER */
.phase-toggle-container {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.phase-btn {
    position: relative;
    z-index: 2;
    /* Above the sliding bg */
    border: none;
    background: transparent;
    /* Background handled by sliding div */
    padding: 10px 25px;
    border-radius: 40px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease;
}

.phase-btn:hover {
    color: var(--salchi-primary);
}

.phase-btn.active {
    color: var(--salchi-primary);
    font-weight: 600;
    /* Box shadow removed as it belongs to the sliding bg now */
    box-shadow: none;
    background: transparent;
}

/* Map Layers */
/* Main Map Wrapper */
.master-plan-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    /* Aspect ratio removed to let images dictate height naturally */
}

/* Map Layers */
.map-layer {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

.map-layer.active {
    opacity: 1;
    z-index: 5;
    position: relative;
    /* Ensure it participates in flow */
}

/* Ensure chips are above images */
.map-chip {
    z-index: 10;
}

/* Inventory Table Styles */
.salchi-table-container {
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.salchi-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.salchi-table th {
    background: #fff;
    /* White bg for cleaner look */
    padding: 15px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--salchi-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.salchi-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-family: 'Outfit', sans-serif;
    color: #555;
    font-size: 0.95rem;
}

.salchi-table tr:last-child td {
    border-bottom: none;
}

.salchi-prop-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--salchi-primary);
    font-style: italic;
}

.salchi-price {
    font-weight: 600;
    color: #333;
}

.salchi-status-avail {
    color: #28a745;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.salchi-status-avail::before {
    content: '●';
    font-size: 0.6rem;
}

/* Payment Plan Styles */
.payment-plan-container {
    background: #fdfbf9;
    border: 1px solid #dcdcdc;
    /* Subtle border */
    border-radius: 15px;
    overflow: hidden;
    max-width: 1000px;
    margin: 40px auto 0;
}

.payment-plan-header {
    background: #eef3f4;
    /* Light teal tint or grey */
    padding: 20px;
    text-align: center;
    /* Center align header as per ref */
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid #dcdcdc;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(4, 1fr);
    /* First col specifically sized */
    /* Vertical dividers handled via borders if needed */
    border-top: 1px solid #dcdcdc;
}

.payment-col {
    padding: 20px 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.payment-col.first {
    background: #f4f8f9;
}

.payment-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--salchi-primary);
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.payment-sublabel {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 10px;
}

.payment-amount {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--salchi-primary);
    font-weight: 600;
}

.payment-amount-mxn {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #666;
    margin-top: 5px;
}

.payment-percent {
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    color: #555;
    margin: 10px 0;
}

.payment-desc {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.4;
}

.payment-note {
    font-size: 0.7rem;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

/* Responsive Table & Payment */
@media (max-width: 900px) {
    .payment-grid {
        grid-template-columns: 1fr;
    }

    .payment-plan-header {
        text-align: center;
    }
}

/* Prototype Details Grid */
.proto-details-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin-top: 30px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    width: 100%;
}

.proto-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 10px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

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

.proto-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
    fill: var(--salchi-accent);
}

.proto-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.proto-sublabel {
    font-size: 0.65rem;
    color: #aaa;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.proto-value {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--salchi-primary);
    font-weight: 600;
}

.proto-subvalue {
    font-size: 0.8rem;
    color: #888;
}

.btn-plano {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 1px solid var(--salchi-primary);
    color: var(--salchi-primary);
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin-top: 10px;
}

.btn-plano:hover {
    background: var(--salchi-primary);
    color: #fff;
}

/* Optional Enhancements Section */
.optional-enhancements {
    background: #eef3f4;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    margin-top: 60px;
    padding: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.opt-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
    flex-wrap: wrap;
}

.opt-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* Cambio a 5 columnas */
    gap: 15px;
    /* Reducción ligera del espacio */
    text-align: center;
}

.opt-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.opt-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    /* Tamaño reducido para caber en 5 columnas */
    color: var(--salchi-primary);
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.3;
}

.opt-subtitle {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.opt-price-usd {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    /* Tamaño reducido */
    color: #333;
    font-weight: 600;
}

.opt-price-mxn {
    font-size: 0.9rem;
    color: #888;
    margin-top: 2px;
}

.opt-info-box {
    grid-column: span 5;
    /* Actualizado para 5 columnas */
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

@media (max-width: 900px) {
    .proto-details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .proto-detail-item {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding-bottom: 15px;
    }

    .proto-detail-item:last-child {
        border-bottom: none;
    }

    .opt-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .opt-info-box {
        grid-column: span 1;
        text-align: center;
    }
}

/* =========================================================
   BLUEPRINT MODAL
   ========================================================= */
.blueprint-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.blueprint-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.blueprint-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--salchi-primary);
    /* Dark color for visibility on white */
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
}

.blueprint-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: var(--salchi-accent);
}

.blueprint-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90vh;
}

.blueprint-title {
    color: var(--salchi-primary);
    /* Dark color for visibility on white */
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.blueprint-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Removed shadow and radius as per user request */
}

.blueprint-image-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* =========================================================
   FULL WIDTH CAROUSEL
   ========================================================= */
.full-width-carousel {
    position: relative;
    width: 100%;
    height: 60vh;
    /* Reduced height for a slimmer look */
    overflow: hidden;
    background-color: #000;
}

.carousel-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.5s ease-in-out, transform 8s linear;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    padding: 20px;
    z-index: 10;
}

.carousel-subtitle {
    font-size: 13px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 18px;
    /* Reduced margin */
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-subtitle::before,
.carousel-subtitle::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.8);
}

.carousel-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    /* Reduced max size */
    letter-spacing: 0.05em;
    margin-bottom: 18px;
    /* Reduced margin */
    font-weight: 400;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.carousel-text {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    /* Slighly smaller text for better balance */
    max-width: 700px;
    /* Narrower for better reading in slim area */
    line-height: 1.5;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .full-width-carousel {
        height: 50vh;
    }
}

#prototipos.section-padding {
    padding: 60px 0;
}

/* =========================================================
   PROTOTYPES ALTERNATING LAYOUT
   ========================================================= */
.prototypes-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.proto-row {
    display: flex;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
    height: 500px;
    /* Fixed height to equalize containers */
    transition: transform 0.4s ease;
}

.proto-row:hover {
    transform: translateY(-5px);
}

.proto-row.reverse {
    flex-direction: row-reverse;
}

.proto-image {
    flex: 1;
    /* Match content width */
    position: relative;
    overflow: hidden;
}

.proto-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
}

.proto-row:hover .proto-image img {
    transform: scale(1.05);
}

.proto-content {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.proto-title-wrap {
    margin-bottom: 10px;
}

.proto-badge {
    background: var(--salchi-secondary);
    color: #fff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 10px;
}

.proto-name {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--salchi-primary);
    margin-bottom: 2px;
}

.proto-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 15px;
}

.proto-summary {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Compact Specs Grid */
.proto-specs-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

.spec-item {
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.spec-icon {
    width: 24px;
    height: 24px;
    fill: var(--salchi-secondary);
    margin-bottom: 8px;
    opacity: 0.8;
}

.spec-val {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--salchi-primary);
    margin-bottom: 2px;
}

.spec-lab {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
}

.proto-actions {
    display: flex;
    gap: 15px;
}

/* Responsive Prototypes */
@media (max-width: 1024px) {

    .proto-row,
    .proto-row.reverse {
        flex-direction: column;
        height: auto;
        /* Removed fixed height */
        min-height: auto;
        overflow: visible;
        /* Prevent cutting off shadows or elements */
    }

    .proto-image {
        height: 400px;
    }

    .proto-content {
        padding: 40px 30px 50px;
        /* Increased bottom padding */
    }
}

@media (max-width: 768px) {
    .proto-image {
        height: 300px;
    }

    .proto-specs-compact {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
        padding: 15px 5px;
        background: #fdfcfb;
    }

    .spec-item {
        min-width: 0;
    }

    .spec-icon {
        width: 18px;
        height: 18px;
        margin-bottom: 6px;
    }

    .spec-val {
        font-size: 0.75rem;
        margin-bottom: 1px;
    }

    .spec-lab {
        font-size: 0.55rem;
        letter-spacing: 0;
    }

}

/* =========================================================
   CTA SECTION
   ========================================================= */
.cta-section {
    position: relative;
    padding: 120px 0;
    text-align: center;
    color: #fff;
    background-image: url('/images/salchi/salchi2\ \(3\).webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(14, 28, 38, 0.6);
    z-index: 1;
}

.cta-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    line-height: 1.1;
}

.cta-text {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
}

.btn-cta {
    padding: 18px 45px;
    font-size: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .cta-section {
        padding: 80px 0;
        background-attachment: scroll;
    }
}