﻿/* =========================================================
   MASTERPLAN
   ========================================================= */

#masterplan {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 100px 0;
    overflow: hidden;
    background: radial-gradient(circle at 15% 20%, rgba(232,180,97,0.10), transparent 26%), radial-gradient(circle at 85% 75%, rgba(24,43,70,0.07), transparent 28%), linear-gradient(180deg, #f7f5f1 0%, #f1efeb 100%);
}

    #masterplan::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(255,255,255,0.35), transparent 18%, transparent 82%, rgba(255,255,255,0.25)), repeating-linear-gradient(90deg, rgba(24,43,70,0.015) 0px, rgba(24,43,70,0.015) 1px, transparent 1px, transparent 90px);
        pointer-events: none;
    }

.masterplan-shell {
    width: min(1380px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 360px minmax(0, 600px); /* ← limitá el ancho máximo de la imagen */
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 2;
    justify-content: center; /* ← centrá el grid cuando no llena todo */
}

/* =========================================================
   LADO IZQUIERDO
   ========================================================= */

.masterplan-copy {
    position: relative;
    padding-right: 10px;
}

/* --- KICKER EN CAJAS ASIMÉTRICAS --- */
.masterplan-kicker-blocks {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
}

.masterplan-kicker-word {
    display: flex;
    gap: 5px;
    align-items: center;
}

    .masterplan-kicker-word span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 32px;
        font-size: 0.7rem;
        font-weight: 900;
        color: #13233a;
        border: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 3px 8px rgba(0,0,0,0.06);
        cursor: default;
        user-select: none;
        transition: all 0.3s ease;
    }

.mk-1 {
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    background: #ffffff;
}

.mk-2 {
    clip-path: polygon(0% 0%, 100% 5%, 95% 100%, 5% 95%);
    background: #f5f5f5;
}

.mk-3 {
    clip-path: polygon(5% 0%, 95% 5%, 100% 100%, 0% 90%);
    background: #ffffff;
}

.mk-4 {
    clip-path: polygon(0% 5%, 90% 0%, 100% 95%, 10% 100%);
    background: #f5f5f5;
}

.mk-5 {
    clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
    background: #ffffff;
}

.mk-6 {
    clip-path: polygon(0% 0%, 95% 8%, 100% 100%, 5% 92%);
    background: #f5f5f5;
}

.mk-7 {
    clip-path: polygon(5% 5%, 100% 0%, 95% 95%, 0% 100%);
    background: #ffffff;
}

.mk-8 {
    clip-path: polygon(0% 8%, 92% 0%, 100% 92%, 8% 100%);
    background: #f5f5f5;
}

.mk-9 {
    clip-path: polygon(10% 0%, 100% 5%, 90% 100%, 0% 95%);
    background: #ffffff;
}

.mk-10 {
    clip-path: polygon(0% 0%, 100% 8%, 100% 100%, 0% 92%);
    background: #f5f5f5;
}

.mk-11 {
    clip-path: polygon(5% 0%, 95% 5%, 100% 100%, 0% 95%);
    background: #ffffff;
}

.masterplan-kicker-word span:hover {
    transform: translateY(-2px) scale(1.1);
    color: #d99a3c;
}

/* Título más chico */
.masterplan-title {
    margin: 0 0 20px;
    font-size: clamp(1.9rem, 3vw, 2.8rem); /* ← reducido */
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #13233a;
    font-weight: 300;
    max-width: 400px;
}

    .masterplan-title strong {
        display: block;
        font-weight: 800;
        color: #0f2037;
    }

.masterplan-description {
    margin: 0 0 28px;
    max-width: 380px;
    font-size: 0.98rem;
    line-height: 1.85;
    color: #617089;
}

.masterplan-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.masterplan-btn {
    position: relative;
    height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.masterplan-btn-primary {
    background: #13233a;
    color: #fff;
    box-shadow: 0 14px 28px rgba(19,35,58,0.18), inset 0 1px 0 rgba(255,255,255,0.1);
}

    .masterplan-btn-primary::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 999px;
        padding: 1px;
        background: linear-gradient(135deg, rgba(232,180,97,0.35), rgba(255,255,255,0.2), rgba(232,180,97,0.25));
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
        opacity: 0.6;
    }

    .masterplan-btn-primary:hover {
        transform: translateY(-2px);
        background: #0f1c30;
        box-shadow: 0 20px 40px rgba(19,35,58,0.25);
    }

.masterplan-btn-secondary {
    background: linear-gradient(180deg, #ffffff 0%, #f4f1ea 100%);
    color: #1b2d47;
    border: 1px solid rgba(220,214,205,0.9);
    box-shadow: 0 10px 20px rgba(19,35,58,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
}

    .masterplan-btn-secondary:hover {
        transform: translateY(-2px);
        background: #ffffff;
        border-color: rgba(232,180,97,0.6);
        color: #13233a;
    }

/* =========================================================
   LADO DERECHO — IMAGEN
   ========================================================= */

.masterplan-visual {
    position: relative;
}

.masterplan-card {
    position: relative;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

    .masterplan-card::before {
        display: none;
    }

.masterplan-card-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 0 8px 14px;
}

.masterplan-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: #98a5b9;
    text-transform: uppercase;
}

.masterplan-meta strong {
    font-size: 0.92rem;
    color: #1d2f49;
    font-weight: 700;
}

.masterplan-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1d2f49;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 9px;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.7);
}

.legend-available .legend-dot {
    background: #63c587;
}

.legend-reserved .legend-dot {
    background: #e7bc57;
}

.legend-occupied .legend-dot {
    background: #e56b6b;
}
.masterplan-shell {
    align-items: start; /* ← cambiá de center a start */
}
.legend-separator {
    opacity: 0.4;
    font-weight: 600;
    color: #8d99ac;
}

/* Imagen más chica — centrada y equilibrada */
.masterplan-image-wrap {
    position: relative;
    border-radius: 20px;
    border: 1.5px solid rgba(30, 58, 95, 0.15);
    box-shadow: 0 20px 50px rgba(17,28,44,0.10);
    overflow: hidden;
    /* sin display:flex, sin max-height fijo */
    /* el wrapper se adapta al tamaño natural de la imagen */
}

    .masterplan-image-wrap::before,
    .masterplan-image-wrap::after {
        display: none;
    }

.masterplan-image {
    width: 100%;
    height: auto; /* ← altura natural */
    max-height: none; /* ← sin límite */
    object-fit: unset; /* ← sin recorte */
    display: block;
}

/* Botón zoom sobre la imagen */
.masterplan-zoom-btn {
    position: absolute;
    bottom: 16px;
    left: 50%; /* ← centrado */
    transform: translateX(-50%); /* ← ajuste para centrar */
    right: auto; /* ← quitá el right */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 14px;
    border-radius: 999px;
    border: none;
    background: rgba(19, 35, 58, 0.82);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    transition: all 0.3s ease;
}

    .masterplan-zoom-btn svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .masterplan-zoom-btn:hover {
        background: rgba(232, 180, 97, 0.92);
        color: #13233a;
        transform: translateY(-2px);
    }

/* =========================================================
   LIGHTBOX
   ========================================================= */

.masterplan-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

    .masterplan-lightbox.active {
        opacity: 1;
        visibility: visible;
    }

.masterplan-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 22, 0.85);
    backdrop-filter: blur(6px);
}

.masterplan-lightbox-dialog {
    position: relative;
    z-index: 2;
    width: min(1200px, 96vw);
    transform: scale(0.97);
    transition: transform 0.35s ease;
}

.masterplan-lightbox.active .masterplan-lightbox-dialog {
    transform: scale(1);
}

.masterplan-lightbox-img {
    width: 100%;
    max-height: 90vh;
    object-fit: contain; /* ← completa en el zoom también */
    display: block;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

.masterplan-lightbox-close {
    position: absolute;
    top: -14px;
    right: -4px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .masterplan-lightbox-close:hover {
        background: #E8B461;
        color: #13233a;
        transform: scale(1.06);
    }

/* =========================================================
   RESPONSIVE — 1200px
   ========================================================= */
@media (max-width: 1200px) {
    .masterplan-shell {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .masterplan-copy {
        max-width: 100%;
        padding-right: 0;
    }

    .masterplan-kicker-blocks {
        align-items: center;
    }

    .masterplan-kicker-word {
        justify-content: center;
    }

    .masterplan-title {
        max-width: 100%;
        text-align: center;
    }

    .masterplan-description {
        max-width: 100%;
        text-align: center;
    }

    .masterplan-actions {
        justify-content: center;
    }

    .masterplan-image {
        max-height: 460px;
    }
}

/* =========================================================
   MOBILE — 768px
   ========================================================= */
@media (max-width: 768px) {
    #masterplan {
        padding: 70px 0;
    }

    .masterplan-shell {
        width: min(94%, 100%);
        gap: 28px;
    }

    .masterplan-kicker-word span {
        width: 22px;
        height: 28px;
        font-size: 0.6rem;
    }

    .masterplan-kicker-word {
        gap: 4px;
    }

    .masterplan-kicker-blocks {
        gap: 6px;
    }

    .masterplan-title {
        font-size: 1.75rem;
        line-height: 1.08;
        text-align: center;
    }

    .masterplan-description {
        font-size: 0.95rem;
        line-height: 1.8;
        margin-bottom: 22px;
        text-align: center;
    }

    .masterplan-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .masterplan-btn {
        height: 46px;
        padding: 0 18px;
        font-size: 0.85rem;
    }

    .masterplan-card-bottom {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 4px 12px;
        gap: 10px;
    }

    .masterplan-image {
        max-height: 320px;
    }

    .masterplan-zoom-btn span {
        display: none;
    }
    /* solo icono en mobile */
    .masterplan-zoom-btn {
        padding: 10px;
        border-radius: 50%;
    }

        .masterplan-zoom-btn svg {
            width: 18px;
            height: 18px;
        }

    .masterplan-lightbox {
        padding: 14px;
    }

    .masterplan-lightbox-img {
        border-radius: 14px;
    }

    .masterplan-lightbox-close {
        top: -10px;
        right: 0;
        width: 40px;
        height: 40px;
    }
}
