/* ========================================================
   MERCADO - SWISS PRECISION MINIMAL DESIGN
======================================================== */

.HeroCarousel {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 580px;
    overflow: hidden;
    background-color: var(--ace-navy);
}

.HeroCarousel__inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.HeroCarousel__item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.HeroCarousel__item.active {
    opacity: 1;
    pointer-events: auto;
}

.HeroCarousel__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.HeroCarousel__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(8, 28, 53, 0.94) 0%,
        rgba(8, 28, 53, 0.78) 50%,
        rgba(8, 28, 53, 0.5) 100%
    );
}

.HeroCarousel__content {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 960px;
    z-index: 2;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.HeroCarousel__content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.HeroCarousel__content p {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    max-width: 820px;
}

/* Indicadores Minimalistas */
.HeroCarousel__indicators {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.HeroCarousel__indicators button {
    width: 32px;
    height: 3px;
    border-radius: 2px;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.HeroCarousel__indicators button.active {
    background: #38BDF8;
    width: 48px;
}

.HeroCarousel__prev,
.HeroCarousel__next {
    display: none;
}

/* ========================================================
   SECCIÓN ASP (ALCANCE, SECTORES Y PARTICIPANTES)
======================================================== */
.asp {
    padding: 50px 0 70px;
    background: var(--surface-muted);
}

.container-asp {
    width: 90%;
    max-width: 1180px;
    margin: 0 auto;
}

.header-asp {
    text-align: center;
    margin-bottom: 28px;
}

.asp-pre-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ace-blue-accent);
    margin-bottom: 10px;
}

.header-asp h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.2vw, 2.3rem);
    font-weight: 800;
    color: var(--ace-navy);
    letter-spacing: -0.025em;
    margin-bottom: 10px;
}

.header-asp p {
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================================
   INTERACTIVE SECTOR HUB (TABS & SPLIT PANELS)
======================================================== */

/* SELECTOR DE PESTAÑAS (TABS) */
.asp-hub-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.asp-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 9999px;
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    color: #475569;
    font-family: var(--font-heading);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(8, 28, 53, 0.04);
}

.asp-tab-btn:hover {
    background: #F1F5F9;
    color: var(--ace-navy);
    border-color: #CBD5E1;
    transform: translateY(-2px);
}

.asp-tab-btn.active {
    background: var(--ace-blue-primary);
    color: #FFFFFF;
    border-color: var(--ace-blue-primary);
    box-shadow: 0 6px 18px -3px rgba(1, 63, 123, 0.35);
    transform: translateY(-2px);
}

.asp-tab-btn .tab-number {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    opacity: 0.75;
    color: inherit;
}

.asp-tab-btn.active .tab-number {
    opacity: 1;
    color: #38BDF8;
}

/* CONTENEDOR DE PANELES */
.asp-hub-panels {
    position: relative;
    width: 100%;
}

.asp-hub-panel {
    display: none;
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 36px -12px rgba(8, 28, 53, 0.08);
    grid-template-columns: 33% 66%;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.asp-hub-panel.active {
    display: grid;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInHub 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInHub {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CAJA DE IMAGEN (SPLIT IZQUIERDA) */
.hub-image-box {
    position: relative;
    min-height: 330px;
    height: 100%;
    background: var(--ace-navy);
    overflow: hidden;
}

.hub-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.asp-hub-panel:hover .hub-image-box img {
    transform: scale(1.03);
}

.hub-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 28, 53, 0.08) 0%,
        rgba(8, 28, 53, 0.4) 55%,
        rgba(8, 28, 53, 0.9) 100%
    );
    pointer-events: none;
}

.hub-badge-floating {
    position: absolute;
    bottom: 18px;
    left: 18px;
    right: 18px;
    z-index: 2;
    color: #FFFFFF;
}

.badge-cat {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 5px;
    background: var(--ace-blue-primary);
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.badge-cat.badge-blue {
    background: var(--ace-blue-accent);
}

.badge-cat.badge-copper {
    background: var(--ace-bronze);
}

.badge-sub {
    font-family: var(--font-body);
    font-size: 0.8rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* CAJA DE CONTENIDO (SPLIT DERECHA) */
.hub-content-box {
    padding: 26px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #FFFFFF;
}

.hub-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ace-blue-accent);
    margin-bottom: 8px;
}

.hub-meta-tag.text-accent {
    color: #0284C7;
}

.hub-meta-tag.text-emerald {
    color: #059669;
}

.hub-title {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 1.8vw, 1.55rem);
    font-weight: 800;
    color: var(--ace-navy);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.hub-description {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.55;
    color: #475569;
    margin-bottom: 16px;
}

/* CARDS DE PUNTOS CLAVE (Panel 1) */
.hub-points-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.hub-point-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #F8FAFC;
    border: 1px solid #EDF2F7;
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.hub-point-card:hover {
    background: #F1F5F9;
    border-color: #E2E8F0;
}

.hub-point-card i {
    font-size: 1.05rem;
    line-height: 1;
    margin-top: 1px;
    flex-shrink: 0;
}

.hub-point-card strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ace-navy);
    margin-bottom: 2px;
}

.hub-point-card p {
    font-family: var(--font-body);
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748B;
    margin: 0;
}

/* CHIPS (Panel 2) */
.hub-chips-wrap {
    margin-bottom: 16px;
}

.chips-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748B;
    margin-bottom: 8px;
}

.hub-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hub-chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 9999px;
    background: var(--ace-blue-ice);
    color: var(--ace-blue-primary);
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
}

.hub-chip:hover {
    background: #C7DEEE;
    transform: translateY(-1px);
}

/* CALLOUT REGULATORIO (Panel 3) */
.hub-highlight-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.hub-highlight-callout i {
    font-size: 1.2rem;
    line-height: 1;
    color: var(--ace-blue-accent);
    flex-shrink: 0;
    margin-top: 1px;
}

.hub-highlight-callout strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    color: #0369A1;
    margin-bottom: 2px;
}

.hub-highlight-callout p {
    font-family: var(--font-body);
    font-size: 0.78rem;
    line-height: 1.45;
    color: #0C4A6E;
    margin: 0;
}

/* FOOTER Y ACCIONES DEL PANEL */
.hub-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #EDF2F7;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 10px;
}

.hub-footer-meta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hub-footer-meta i {
    color: var(--ace-blue-accent);
}

.btn-hub-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: var(--ace-blue-primary);
    color: #FFFFFF !important;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 7px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 3px 10px rgba(1, 63, 123, 0.18);
}

.btn-hub-primary:hover {
    background: var(--ace-blue-accent);
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(2, 96, 168, 0.25);
}

.btn-hub-primary i {
    transition: transform 0.2s ease;
}

.btn-hub-primary:hover i {
    transform: translateX(3px);
}

/* ========================================================
   BADGE DE CATEGORÍA EN HERO (MÓVIL / TABLET)
======================================================== */
.hero-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7DD3FC;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* ========================================================
   MÉTRICAS DEL MERCADO EN VIVO (D-LG-NONE - APP TECH)
======================================================== */
.mobile-market-ticker {
    margin: 16px 14px 14px;
    background: linear-gradient(135deg, #081C35 0%, #0F2D54 100%);
    border-radius: 18px;
    padding: 16px;
    color: #FFFFFF;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 14px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: 0 8px 24px -6px rgba(8, 28, 53, 0.28);
}

.mobile-mmetric-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-mmetric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38BDF8;
    font-size: 1.05rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-mmetric-data {
    display: flex;
    flex-direction: column;
}

.mobile-mmetric-num {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    color: #FFFFFF;
    letter-spacing: -0.02em;
}

.mobile-mmetric-num span {
    color: #38BDF8;
}

.mobile-mmetric-txt {
    font-size: 0.68rem;
    color: #94A3B8;
    font-weight: 500;
    margin-top: 3px;
    line-height: 1.2;
}

/* ========================================================
   RESPONSIVE DESIGN (SOLO PARA TABLETS Y MÓVILES - APP TECH)
   El diseño de escritorio (> 992px) se mantiene 100% intacto
======================================================== */
@media (max-width: 991.98px) {
    .HeroCarousel {
        height: 60vh;
        min-height: 420px;
        max-height: 520px;
    }

    .HeroCarousel__content {
        top: 55%;
        left: 5%;
        right: 5%;
        transform: translateY(-50%);
        max-width: 100%;
        text-align: center;
        padding: 0 16px;
    }

    .HeroCarousel__content h1 {
        font-size: clamp(1.45rem, 5vw, 2.2rem);
        margin-bottom: 10px;
        line-height: 1.15;
    }

    .HeroCarousel__content p {
        font-size: 0.86rem;
        line-height: 1.5;
        margin: 0 auto 16px;
        max-width: 92%;
        color: rgba(255, 255, 255, 0.9);
    }

    .mobile-market-ticker {
        grid-template-columns: repeat(4, 1fr);
    }

    .asp {
        padding: 40px 0 55px;
    }

    .asp-hub-panel {
        grid-template-columns: 1fr;
    }

    .hub-image-box {
        min-height: 220px;
        max-height: 260px;
    }

    .hub-content-box {
        padding: 22px 20px;
    }
}

@media (max-width: 768px) {
    .mobile-market-ticker {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 14px;
        padding: 14px 16px;
    }

    .HeroCarousel__indicators {
        bottom: 14px;
        left: 50%;
        transform: translateX(-50%);
        gap: 6px;
    }

    .HeroCarousel__indicators button {
        width: 20px;
        height: 3px;
    }

    .HeroCarousel__indicators button.active {
        width: 34px;
        background: #38BDF8;
    }

    .asp {
        padding: 34px 0 45px;
    }

    .container-asp {
        width: 100%;
        padding: 0 14px;
    }

    .header-asp {
        margin-bottom: 18px;
    }

    .header-asp h2 {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }

    .header-asp p {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .asp-hub-tabs {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding: 4px 6px 10px !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .asp-hub-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .asp-tab-btn {
        flex-shrink: 0 !important;
        width: auto !important;
        white-space: nowrap !important;
        padding: 8px 16px !important;
        font-size: 0.78rem !important;
        border-radius: 9999px !important;
    }

    .asp-hub-panel {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 14px -3px rgba(8, 28, 53, 0.08);
    }

    .hub-image-box {
        min-height: 180px !important;
        max-height: 210px !important;
    }

    .hub-badge-floating {
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        padding: 6px 10px !important;
    }
    .hub-badge-floating .badge-sub {
        display: none !important;
    }

    .hub-content-box {
        padding: 16px 14px !important;
    }

    .hub-title {
        font-size: 1.15rem !important;
        margin-bottom: 6px !important;
    }

    .hub-description {
        font-size: 0.82rem !important;
        line-height: 1.5 !important;
    }

    .hub-points-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .hub-point-card {
        padding: 10px 12px !important;
        font-size: 0.78rem !important;
    }

    .hub-footer-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .btn-hub-primary {
        justify-content: center !important;
        width: 100% !important;
        padding: 10px 16px !important;
        font-size: 0.82rem !important;
    }
}

/* ========================================================
   DESPEJE DE ANCLAJES (ZERO OVERLAPPING CON NAVBAR + SUBMENÚ)
======================================================== */
#mercado,
#asp {
    scroll-margin-top: 155px;
}

@media (max-width: 991.98px) {
    #mercado,
    #asp {
        scroll-margin-top: 115px;
    }
}
