/* Capa de contenido administrable y carrusel de portada. */
.home-carousel {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--ink-950);
}

.home-carousel__viewport {
    position: relative;
    min-height: min(810px, calc(100svh - 39px));
}

.home-slide {
    position: absolute;
    z-index: 0;
    inset: 0;
    min-height: inherit;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 75% 30%, rgba(8,117,255,.36), transparent 28%),
        linear-gradient(120deg, #03060b 0%, #06101d 48%, #0a2348 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .65s var(--ease), visibility .65s var(--ease);
}

.home-slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.home-slide::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(90deg, #000, transparent 85%);
    content: "";
    pointer-events: none;
}

.home-slide::after {
    position: absolute;
    z-index: 1;
    right: -9%;
    bottom: -33%;
    width: 62vw;
    height: 62vw;
    max-width: 900px;
    max-height: 900px;
    border: 1px solid rgba(96,178,255,.18);
    border-radius: 50%;
    box-shadow: 0 0 0 65px rgba(17,113,255,.035), 0 0 0 130px rgba(17,113,255,.025);
    content: "";
    pointer-events: none;
}

.home-slide--has-image::before {
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(2,7,15,.92) 0%, rgba(2,8,18,.76) 42%, rgba(3,9,19,.18) 76%, rgba(3,9,19,.1) 100%),
        linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.28));
    mask-image: none;
}

.home-slide--has-image::after {
    opacity: .32;
}

.home-slide--flyer::before,
.home-slide--flyer::after {
    display: none;
}

.home-slide__background {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.home-slide__background img,
.home-slide__background video {
    display: block;
    width: 100%;
    height: 100%;
}

.home-slide__background--cover img, .home-slide__background--cover video { object-fit: cover; }
.home-slide__background--contain { background: #05080d; }
.home-slide__background--contain img, .home-slide__background--contain video { object-fit: contain; }
.home-slide__background--center img, .home-slide__background--center video { object-position: center; }
.home-slide__background--left img, .home-slide__background--left video { object-position: left center; }
.home-slide__background--right img, .home-slide__background--right video { object-position: right center; }
.home-slide__background--top img, .home-slide__background--top video { object-position: center top; }
.home-slide__background--bottom img, .home-slide__background--bottom video { object-position: center bottom; }

.home-slide .home-hero__inner {
    position: relative;
    z-index: 2;
}

.home-slide--has-image .home-hero__content {
    max-width: 720px;
    padding: 34px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 26px;
    background: rgba(3,10,22,.34);
    box-shadow: 0 26px 70px rgba(0,0,0,.2);
    backdrop-filter: blur(7px);
}

.home-slide__full-link {
    position: absolute;
    z-index: 3;
    inset: 0;
}

.home-carousel__controls {
    position: absolute;
    z-index: 8;
    right: 0;
    bottom: 30px;
    left: 0;
    display: flex;
    width: var(--container);
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    pointer-events: none;
}

.home-carousel__arrow,
.home-carousel__dots button {
    pointer-events: auto;
}

.home-carousel__arrow {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    color: var(--white);
    background: rgba(5,14,28,.56);
    box-shadow: 0 12px 34px rgba(0,0,0,.22);
    backdrop-filter: blur(10px);
    transition: transform .2s, background .2s, border-color .2s;
}

.home-carousel__arrow:hover {
    border-color: rgba(255,255,255,.5);
    background: var(--blue-600);
    transform: translateY(-2px);
}

.home-carousel__arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
}

.home-carousel__dots {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 99px;
    background: rgba(5,14,28,.48);
    backdrop-filter: blur(10px);
}

.home-carousel__dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255,255,255,.42);
    transition: width .25s var(--ease), background .25s;
}

.home-carousel__dots button.is-active {
    width: 30px;
    background: var(--blue-300);
}

.business-banner--custom {
    background-image: linear-gradient(90deg, rgba(2,7,15,.94), rgba(3,12,29,.74)), var(--business-bg);
    background-position: center;
    background-size: cover;
}

.business-banner--custom::before {
    background: radial-gradient(circle at 90% 10%, rgba(8,117,255,.45), transparent 34%);
}

@media (max-width: 980px) {
    .home-carousel__viewport { min-height: 720px; }
    .home-slide { min-height: 720px; }
    .home-slide--has-image::before {
        background: linear-gradient(90deg, rgba(2,7,15,.9), rgba(2,8,18,.64) 62%, rgba(3,9,19,.2));
    }
    .home-slide--has-image .home-hero__content { max-width: 660px; }
}

@media (max-width: 700px) {
    .home-carousel__viewport { min-height: 680px; }
    .home-slide { min-height: 680px; }
    .home-slide--flyer .home-slide__background--contain img, .home-slide--flyer .home-slide__background--contain video { object-fit: contain; }
    .home-slide--has-image::before {
        background: linear-gradient(180deg, rgba(2,7,15,.52), rgba(2,7,15,.76) 58%, rgba(2,7,15,.94));
    }
    .home-slide--has-image .home-hero__content {
        margin-top: auto;
        padding: 24px;
        border-radius: 20px;
        background: rgba(3,10,22,.52);
    }
    .home-carousel__controls {
        bottom: 18px;
        justify-content: center;
    }
    .home-carousel__arrow { width: 40px; height: 40px; }
    .home-carousel__dots { padding: 7px 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-slide { transition: none; }
}

/* V4 · orden visual de la portada y bloques personalizados */
.home-page-layout {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-page-layout > [data-home-section] {
    order: var(--home-order, 50);
    width: 100%;
}

.split-layout--reverse .split-layout__media {
    order: 2;
}

.split-layout--reverse .split-layout__content {
    order: 1;
}

.home-custom--surface {
    background: var(--surface-50, #f4f7fb);
}

.home-custom--dark {
    background: var(--ink-900);
    color: var(--white);
}

.home-custom--blue {
    background: var(--blue-600);
    color: var(--white);
}

.home-custom--dark .eyebrow,
.home-custom--blue .eyebrow,
.home-custom--dark h2,
.home-custom--blue h2,
.home-custom--dark p,
.home-custom--blue p {
    color: inherit;
}

.home-custom__text {
    max-width: 900px;
}

.home-custom__content--center {
    text-align: center;
    margin-inline: auto;
}

.home-custom__content--center .button {
    margin-inline: auto;
}

.home-custom__empty-image {
    min-height: 360px;
    border: 2px dashed rgba(7, 95, 234, .35);
    border-radius: 22px;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    background: linear-gradient(145deg, rgba(7, 95, 234, .08), rgba(7, 17, 31, .04));
    color: var(--ink-900);
}

.home-custom__empty-image strong {
    font-size: 1.2rem;
}

.home-custom__empty-image span {
    max-width: 280px;
    color: var(--text-muted, #64748b);
}

.home-custom__cta--light {
    background: var(--surface-50, #f4f7fb);
    color: var(--ink-900);
}

.home-custom__cta--light .eyebrow,
.home-custom__cta--light h2,
.home-custom__cta--light p {
    color: var(--ink-900);
}

.home-custom__cta--light .button--white {
    background: var(--blue-600);
    color: #fff;
}

@media (max-width: 860px) {
    .split-layout--reverse .split-layout__media,
    .split-layout--reverse .split-layout__content {
        order: initial;
    }
}
