/* =========================================================
   LAYOUT L4 — Minimal Chic Universal
========================================================= */

body[data-template].layout-l4 .layout-l4-minimal {
    min-height: 100vh;
    padding: 28px 0 92px;
}

body[data-template].layout-l4 .l4-invite {
    width: min(calc(100% - 28px), 430px);
    margin: 0 auto;
    padding: 10px 18px 24px;
    text-align: center;
}

body[data-template].layout-l4 .l4-content {
    width: min(100%, 350px);
    margin: 0 auto;
    padding: 18px 8px 0;
    background: transparent;
}

body[data-template].layout-l4 .l4-header {
    margin: 0 auto 18px;
}

body[data-template].layout-l4 .l4-kicker {
    margin: 0 0 12px;
    color: var(--template-accent, #b98a4b);
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.38em;
    text-transform: uppercase;
}

body[data-template].layout-l4 .l4-intro {
    width: 90%;
    margin: 0 auto 14px;
    color: var(--template-text, #2d2723);
    font-size: 0.78rem;
    line-height: 1.55;
    opacity: 0.88;
}

body[data-template].layout-l4 .l4-names {
    margin: 0 auto;
    color: #24211f;
    font-family: var(--font-title);
    font-size: clamp(5.35rem, 21vw, 6.85rem);
    font-weight: 400;
    line-height: 0.78;
    letter-spacing: -0.045em;
}

body[data-template].layout-l4 .l4-short {
    width: 86%;
    margin: 16px auto 0;
    color: var(--template-text, #2d2723);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.42;
}

body[data-template].layout-l4 .l4-photo {
    width: min(62%, 220px);
    margin: 12px auto 20px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 999px;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--template-accent, #b98a4b) 42%, transparent),
        0 16px 36px rgba(45, 39, 35, 0.15);
}

body[data-template].layout-l4 .l4-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

body[data-template].layout-l4 .l4-event-data {
    width: 92%;
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 28%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 28%, transparent);
}

body[data-template].layout-l4 .l4-data-item {
    padding: 13px 8px 14px;
}

body[data-template].layout-l4 .l4-data-item + .l4-data-item {
    border-left: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 22%, transparent);
}

body[data-template].layout-l4 .l4-data-item span,
body[data-template].layout-l4 .l4-location-item span,
body[data-template].layout-l4 .l4-family-item span {
    display: block;
    margin-bottom: 6px;
    color: var(--template-accent, #b98a4b);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

body[data-template].layout-l4 .l4-data-item strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title);
    font-size: 1.32rem;
    font-weight: 500;
    line-height: 1.08;
}

body[data-template].layout-l4 .l4-locations {
    width: 92%;
    margin: 22px auto 0;
    display: grid;
    gap: 16px;
}

body[data-template].layout-l4 .l4-location-item strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title);
    font-size: 1.42rem;
    font-weight: 500;
    line-height: 1.16;
}

body[data-template].layout-l4 .l4-location-item p {
    width: 94%;
    margin: 5px auto 0;
    color: var(--template-text, #2d2723);
    font-size: 0.78rem;
    line-height: 1.45;
    opacity: 0.88;
}

body[data-template].layout-l4 .l4-family {
    width: 92%;
    margin: 28px auto 0;
    padding-top: 22px;
    border-top: 1px solid color-mix(in srgb, var(--template-accent, #b98a4b) 36%, transparent);
}

body[data-template].layout-l4 .l4-family-item {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--template-accent, #b98a4b) 22%, transparent);
}

body[data-template].layout-l4 .l4-family-item:last-of-type {
    border-bottom: 0;
}

body[data-template].layout-l4 .l4-family-item strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.28;
}

body[data-template].layout-l4 .l4-family p {
    width: 94%;
    margin: 16px auto 0;
    color: var(--template-text, #2d2723);
    font-size: 0.88rem;
    line-height: 1.65;
    opacity: 0.92;
}

body[data-template].layout-l4 .l4-action {
    width: 94%;
    margin: 26px auto 0;
}

body[data-template].layout-l4 .l4-countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 88%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 18px;
    border-radius: 999px;
    background: color-mix(in srgb, #ffffff 42%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--template-text, #2d2723) 12%, transparent),
        0 12px 28px rgba(45, 39, 35, 0.08);
}

body[data-template].layout-l4 .l4-countdown > div {
    padding: 10px 3px;
}

body[data-template].layout-l4 .l4-countdown > div + div {
    border-left: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 14%, transparent);
}

body[data-template].layout-l4 .l4-countdown strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title);
    font-size: 1.42rem;
    font-weight: 500;
    line-height: 1;
}

body[data-template].layout-l4 .l4-countdown span {
    display: block;
    margin-top: 4px;
    color: var(--template-text, #2d2723);
    font-size: 0.46rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
}

body[data-template].layout-l4 .l4-rsvp-button {
    width: 88%;
    min-height: 48px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: linear-gradient(135deg, #2b2825, #151412);
    color: #fffaf7;
    box-shadow:
        0 16px 34px rgba(20, 18, 16, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body[data-template].layout-l4 .l4-rsvp-note {
    margin: 12px 0 0;
    color: var(--template-text, #2d2723);
    font-size: 0.5rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.64;
}

/* Menú neutro universal */
body.public-page.layout-l4[data-template] .bottom-nav.experience-menu {
    background: rgba(255, 250, 247, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(35, 32, 29, 0.08);
    box-shadow: 0 -14px 34px rgba(35, 32, 29, 0.10);
}

body.public-page.layout-l4[data-template] .bottom-nav.experience-menu button,
body.public-page.layout-l4[data-template] .bottom-nav.experience-menu span {
    color: #24211f;
}

body.public-page.layout-l4[data-template] .bottom-nav.experience-menu svg {
    stroke: #24211f;
}

body.public-page.layout-l4[data-template] .bottom-nav.experience-menu span {
    font-weight: 800;
}

body.public-page.layout-l4[data-template] .bottom-nav.experience-menu button:hover,
body.public-page.layout-l4[data-template] .bottom-nav.experience-menu button:focus-visible {
    color: #000;
}

body.public-page.layout-l4[data-template] .bottom-nav.experience-menu button:hover svg,
body.public-page.layout-l4[data-template] .bottom-nav.experience-menu button:focus-visible svg {
    stroke: #000;
}

/* Responsive */
@media (max-width: 480px) {
    body[data-template].layout-l4 .layout-l4-minimal {
        padding: 24px 0 78px;
    }

    body[data-template].layout-l4 .l4-invite {
        padding: 8px 18px 18px;
    }

    body[data-template].layout-l4 .l4-content {
        width: min(100%, 306px);
        padding-top: 10px;
    }

    body[data-template].layout-l4 .l4-kicker {
        font-size: 0.72rem;
        margin-bottom: 10px;
    }

    body[data-template].layout-l4 .l4-intro {
        width: 94%;
        font-size: 13px;
        line-height: 1.55;
        opacity: 0.9;
    }

    body[data-template].layout-l4 .l4-names {
        font-size: clamp(4.35rem, 19vw, 5.2rem);
        line-height: 0.78;
    }

    body[data-template].layout-l4 .l4-short {
        font-size: 0.76rem;
    }

    body[data-template].layout-l4 .l4-photo {
        width: min(58%, 176px);
        margin: 12px auto 18px;
    }

    body[data-template].layout-l4 .l4-event-data,
    body[data-template].layout-l4 .l4-locations,
    body[data-template].layout-l4 .l4-family,
    body[data-template].layout-l4 .l4-action {
        width: 96%;
    }

    body[data-template].layout-l4 .l4-data-item span,
    body[data-template].layout-l4 .l4-location-item span,
    body[data-template].layout-l4 .l4-family-item span {
        font-size: 11px;
        letter-spacing: 0.18em;
    }

    body[data-template].layout-l4 .l4-data-item strong {
        font-size: 19px;
    }

    body[data-template].layout-l4 .l4-location-item strong {
        font-size: 21px;
        line-height: 1.18;
    }

    body[data-template].layout-l4 .l4-location-item p {
        width: 96%;
        font-size: 13px;
        line-height: 1.45;
        opacity: 0.88;
    }

    body[data-template].layout-l4 .l4-family {
        margin-top: 26px;
        padding-top: 20px;
    }

    body[data-template].layout-l4 .l4-family-item {
        margin-bottom: 18px;
        padding-bottom: 15px;
    }

    body[data-template].layout-l4 .l4-family-item strong {
        font-size: 19px;
        line-height: 1.28;
    }

    body[data-template].layout-l4 .l4-family p {
        width: 96%;
        max-width: 300px;
        font-size: 15px;
        line-height: 1.65;
        opacity: 0.95;
    }

    body[data-template].layout-l4 .l4-countdown strong {
        font-size: 1.28rem;
    }

    body[data-template].layout-l4 .l4-countdown span,
    body[data-template].layout-l4 .l4-rsvp-note {
        font-size: 0.5rem;
    }

    body[data-template].layout-l4 .l4-rsvp-button {
        width: 94%;
        min-height: 46px;
        font-size: 0.64rem;
    }
}

/* =========================================================
   L4 — Ajuste final v3
========================================================= */

body[data-template].layout-l4 .l4-names {
    color: #342f2b;
}

body[data-template].layout-l4 .l4-location-item strong {
    font-size: 1.54rem;
    line-height: 1.14;
}

body[data-template].layout-l4 .l4-countdown {
    background: rgba(255, 250, 247, 0.56);
    box-shadow:
        0 0 0 1px rgba(52, 47, 43, 0.18),
        0 12px 28px rgba(45, 39, 35, 0.10);
}

body[data-template].layout-l4 .l4-countdown > div + div {
    border-left: 1px solid rgba(52, 47, 43, 0.18);
}

@media (max-width: 480px) {
    body[data-template].layout-l4 .l4-names {
        color: #342f2b;
    }

    body[data-template].layout-l4 .l4-location-item strong {
        font-size: 23px;
        line-height: 1.15;
    }

    body[data-template].layout-l4 .l4-countdown {
        box-shadow:
            0 0 0 1px rgba(52, 47, 43, 0.2),
            0 12px 28px rgba(45, 39, 35, 0.12);
    }
}

/* =========================================================
   L4 — Base final: tipografía, nombres largos y lectura
========================================================= */

/* Tipo de evento visible */
body[data-template].layout-l4 .l4-kicker {
    margin: 0 auto 12px !important;
    color: var(--template-primary, var(--primary)) !important;
    font-family: "Lato", system-ui, sans-serif !important;
    font-size: 0.84rem !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.26em !important;
    text-transform: uppercase !important;
    opacity: 0.9 !important;
    text-shadow:
        0 1px 0 rgba(255,255,255,0.9),
        0 0 10px rgba(255,255,255,0.8) !important;
}

/* Nombre principal controlado */
body[data-template].layout-l4 .l4-names {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-family: var(--font-title, Georgia, serif) !important;
    font-size: clamp(3.6rem, 14vw, 5.1rem) !important;
    font-weight: 400 !important;
    line-height: 0.98 !important;
    letter-spacing: -0.045em !important;
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Textos de lectura */
body[data-template].layout-l4 .l4-intro,
body[data-template].layout-l4 .l4-location-item p,
body[data-template].layout-l4 .l4-family p {
    font-family: "Lato", system-ui, sans-serif !important;
    font-size: 0.92rem !important;
    line-height: 1.48 !important;
    font-weight: 500 !important;
}

/* Frase destacada */
body[data-template].layout-l4 .l4-short {
    font-family: "Lato", system-ui, sans-serif !important;
    font-size: 0.98rem !important;
    line-height: 1.4 !important;
    font-weight: 850 !important;
}

/* Etiquetas */
body[data-template].layout-l4 .l4-data-item span,
body[data-template].layout-l4 .l4-location-item span,
body[data-template].layout-l4 .l4-family-item span {
    font-family: "Lato", system-ui, sans-serif !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
}

/* Datos importantes */
body[data-template].layout-l4 .l4-data-item strong,
body[data-template].layout-l4 .l4-location-item strong,
body[data-template].layout-l4 .l4-family-item strong {
    font-family: var(--font-title, Georgia, serif) !important;
    line-height: 1.18 !important;
    text-wrap: balance;
    overflow-wrap: break-word;
}

/* Foto sin deformación */
body[data-template].layout-l4 .l4-photo img {
    object-fit: cover;
    object-position: center;
}

/* Móvil base OPPO 360px */
@media (max-width: 480px) {
    body[data-template].layout-l4 .layout-l4-minimal {
        padding-top: 18px !important;
        padding-bottom: 92px !important;
    }

    body[data-template].layout-l4 .l4-invite {
        padding: 8px 16px 24px !important;
    }

    body[data-template].layout-l4 .l4-content {
        width: min(100%, 304px) !important;
        padding-top: 10px !important;
    }

    body[data-template].layout-l4 .l4-kicker {
        font-size: 0.76rem !important;
        letter-spacing: 0.22em !important;
        margin-bottom: 10px !important;
    }

    body[data-template].layout-l4 .l4-names {
        font-size: clamp(2.85rem, 13vw, 3.75rem) !important;
        line-height: 1.04 !important;
        margin-bottom: 14px !important;
    }

    body[data-template].layout-l4 .l4-intro,
    body[data-template].layout-l4 .l4-location-item p,
    body[data-template].layout-l4 .l4-family p {
        font-size: 0.88rem !important;
        line-height: 1.45 !important;
    }

    body[data-template].layout-l4 .l4-short {
        font-size: 0.96rem !important;
        line-height: 1.38 !important;
    }

    body[data-template].layout-l4 .l4-photo {
        width: min(56%, 168px) !important;
        margin: 12px auto 18px !important;
    }

    body[data-template].layout-l4 .l4-data-item strong {
        font-size: 1.12rem !important;
    }

    body[data-template].layout-l4 .l4-location-item strong {
        font-size: 1.18rem !important;
    }

    body[data-template].layout-l4 .l4-family-item strong {
        font-size: 1rem !important;
    }

    body[data-template].layout-l4 .l4-action {
        margin-bottom: 22px !important;
    }
}

/* =========================================================
   L4 — Corrección final para nombres largos
========================================================= */

body[data-template].layout-l4 .l4-names {
    max-width: 100% !important;
    text-wrap: balance;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    hyphens: none !important;
}

/* Boda / nombres compuestos */
body[data-template].layout-l4 .l4-names {
    font-size: clamp(3.15rem, 11.5vw, 4.55rem) !important;
    line-height: 1.02 !important;
}

/* Móvil base OPPO 360px */
@media (max-width: 480px) {
    body[data-template].layout-l4 .l4-names {
        max-width: 280px !important;
        font-size: clamp(2.45rem, 10.5vw, 3.15rem) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.035em !important;
    }

    body[data-template].layout-l4 .l4-header {
        margin-bottom: 14px !important;
    }

    body[data-template].layout-l4 .l4-kicker {
        margin-bottom: 8px !important;
    }
}

/* =========================================================
   L4 — Ajuste final de nombre universal
========================================================= */

body[data-template].layout-l4 .l4-names {
    font-size: clamp(3rem, 10.5vw, 4.25rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.035em !important;
    max-width: 300px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-wrap: balance;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    hyphens: none !important;
}

@media (max-width: 480px) {
    body[data-template].layout-l4 .l4-names {
        font-size: clamp(2.35rem, 9.8vw, 3rem) !important;
        line-height: 1.1 !important;
        max-width: 285px !important;
    }
}

/* =========================================================
   L4 — Lectura limpia universal
========================================================= */

@media (max-width: 480px) {
    body[data-template].layout-l4 .l4-intro {
        font-size: 0.86rem !important;
        line-height: 1.42 !important;
    }

    body[data-template].layout-l4 .l4-short {
        font-size: 0.94rem !important;
        line-height: 1.36 !important;
    }

    body[data-template].layout-l4 .l4-location-item strong {
        font-size: 1.12rem !important;
        line-height: 1.18 !important;
    }

    body[data-template].layout-l4 .l4-location-item p {
        font-size: 0.86rem !important;
        line-height: 1.38 !important;
    }
}

/* =========================================================
   L4 — Ajuste final universal de nombre
========================================================= */

body[data-template].layout-l4 .l4-names {
    font-size: clamp(2.85rem, 9.8vw, 4rem) !important;
    line-height: 1.08 !important;
    max-width: 300px !important;
    letter-spacing: -0.03em !important;
}

@media (max-width: 480px) {
    body[data-template].layout-l4 .l4-names {
        font-size: clamp(2.15rem, 9vw, 2.75rem) !important;
        line-height: 1.12 !important;
        max-width: 280px !important;
    }
}

/* =========================================================
   L4 — Nombre final balance universal
========================================================= */

body[data-template].layout-l4 .l4-names {
    font-size: clamp(3.05rem, 10.4vw, 4.25rem) !important;
    line-height: 1.06 !important;
    max-width: 310px !important;
    letter-spacing: -0.035em !important;
    text-wrap: balance;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    hyphens: none !important;
}

@media (max-width: 480px) {
    body[data-template].layout-l4 .l4-names {
        font-size: clamp(2.32rem, 9.6vw, 2.95rem) !important;
        line-height: 1.1 !important;
        max-width: 288px !important;
    }
}
/* Invitado personalizado - L4 */
.l4-guest-box {
    margin: 14px auto 0;
    padding: 10px 16px;
    width: fit-content;
    max-width: 90%;
    border: 1px solid rgba(35, 24, 21, 0.10);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.3;
    color: #2b211f;
}

.l4-guest-box span {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.65;
}

.l4-guest-box strong {
    display: block;
    font-family: var(--font-title, Georgia, serif);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.15;
}
