/* ══════════════════════════════════════════
   CATALOG – Presencial + Virtual
   Alineado con home.css (tokens --h-*)
══════════════════════════════════════════ */

.catalog-section {
    /* Tokens (misma familia que portada; home.css no carga aquí) */
    --h-navy: #03102b;
    --h-dark: #0a2348;
    --h-blue: #006bb3;
    --h-blue-mid: #0a82d4;
    --h-blue-lt: #2196d9;
    --h-white: #ffffff;
    --h-off: #f4f7fb;
    --h-gray: #6b7a99;
    --h-text: #1a2340;
    --h-radius: 14px;
    --h-radius-sm: 8px;
    --h-shadow: 0 12px 40px rgba(3, 16, 43, 0.14);
    --h-trans: 0.22s ease;

    background: linear-gradient(165deg, var(--h-navy) 0%, #061e47 45%, #0a2d52 100%);
    padding: 72px 0 96px;
    min-height: 60vh;
    position: relative;
    overflow: hidden;
}

.catalog-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 55% at 50% -10%, rgba(0, 107, 179, 0.22), transparent 55%);
    pointer-events: none;
}

.catalog-wrap {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 max(24px, 4vw);
}

/* ── Cabecera catálogo ───────────────────── */
.catalog-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.catalog-heading {
    color: var(--h-white);
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 20px;
    text-shadow: none;
}

.catalog-heading::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    margin: 0 auto 22px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--h-blue-lt), var(--h-blue));
}

.catalog-lead {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.68);
    font-weight: 400;
}

/* ── Botón descarga ─────────────────────── */
.catalog-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 14px 28px;
    background: var(--h-blue);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border-radius: var(--h-radius-sm);
    box-shadow: 0 8px 28px rgba(0, 107, 179, 0.45);
    transition: background var(--h-trans), transform var(--h-trans), box-shadow var(--h-trans);
    letter-spacing: 0.02em;
}

.catalog-download:hover {
    background: var(--h-blue-mid);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 107, 179, 0.55);
}

/* ── Grid de tarjetas ───────────────────── */
.card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

@media (max-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 560px) {
    .card-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ── Tarjeta ────────────────────────────── */
.card {
    position: relative;
    overflow: hidden;
    background: var(--h-dark);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 28px rgba(3, 16, 43, 0.35);
    transition: transform var(--h-trans), box-shadow var(--h-trans), border-color var(--h-trans);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--h-shadow);
    border-color: rgba(33, 150, 217, 0.35);
}

.card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.card:hover img {
    transform: scale(1.04);
}

.card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 16px 14px;
    background: linear-gradient(to top, rgba(3, 16, 43, 0.95) 0%, rgba(3, 16, 43, 0.5) 65%, transparent 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.78rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 2;
    line-height: 1.35;
}

/* Overlay hover */
.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 28px 22px;
    background: linear-gradient(180deg, rgba(3, 16, 43, 0.92) 0%, rgba(6, 30, 71, 0.96) 100%);
    color: #fff;
    text-align: center;
    opacity: 0;
    transform: translateY(8%);
    transition: opacity 0.32s ease, transform 0.32s ease;
    z-index: 3;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-overlay h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--h-blue-lt);
    display: inline-block;
    max-width: 100%;
    color: #fff;
}

.card-overlay p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    overflow-y: auto;
    margin: 0;
}

.card-overlay p::-webkit-scrollbar {
    width: 4px;
}

.card-overlay p::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 217, 0.55);
    border-radius: 4px;
}

/* ── Logos en sección catálogo ───────────── */
.catalog-section .logos-section {
    background: rgba(0, 0, 0, 0.2);
    margin-top: 56px;
    padding: 48px 0 52px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-section .logos-section h2 {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    margin-bottom: 28px;
}

.catalog-section .logos-section h2::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.45), var(--h-blue-lt, #2196d9));
}

.catalog-section .logos-nav-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.catalog-section .logos-nav-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.catalog-section .logos-dot {
    background: rgba(255, 255, 255, 0.35);
}

.catalog-section .logos-dot.active {
    background: #fff;
}

.catalog-section .logos-dot:hover {
    background: rgba(255, 255, 255, 0.65);
}

.catalog-section .logo-item {
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
}

.catalog-section .logos-carousel-wrap {
    max-width: 720px;
}

@media (max-width: 600px) {
    .catalog-section .logos-section {
        padding: 40px 0 48px;
    }
    .catalog-section .logos-section h2 {
        padding-inline: 4px;
        font-size: clamp(1rem, 4.5vw, 1.3rem);
        max-width: none;
        hyphens: auto;
        -webkit-hyphens: auto;
        overflow-wrap: anywhere;
    }
    .catalog-section .logos-carousel-wrap {
        width: 100%;
        max-width: min(720px, 100%);
    }
    .catalog-section .logo-item {
        flex: 0 0 min(150px, calc(100vw - 80px));
        width: min(150px, calc(100vw - 80px));
        height: min(150px, calc(100vw - 80px));
        padding: 12px;
    }
    .catalog-section .logo-item img {
        width: min(122px, calc(100vw - 120px));
        height: min(122px, calc(100vw - 120px));
    }
    .catalog-section .logos-nav {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        column-gap: 10px;
        row-gap: 10px;
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
    }
    .catalog-section .logos-dots {
        min-width: 0;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-block: 4px;
        scrollbar-width: thin;
        gap: 6px;
    }
    .catalog-section .logos-dots .logos-dot {
        flex-shrink: 0;
    }
}
