﻿/* ── Contenedor de tarjetas ── */
.activos-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 3vw 40px 3vw;
}

/* ── Tarjeta ── */
.activo-card {
    border: 1.5px solid #c2c2c2;
    /*    border-left: 4px solid #00AABB; */
    border-radius: 25px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,125,138,0.06);
}

.activo-card-inner {
    display: flex;
    align-items: stretch;
    transition: background 0.2s;
}

.activo-card-inner:hover {
    background: #f4fbfc;
    cursor: pointer;
}

.activo-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.activo-info {
    flex: 1;
    min-width: 0;
    margin-left: 10px;
}

.activo-info ul {
    list-style: disc;
    padding-left: 20px;
    margin: 4px 0 0 0;
}

/* ── Header (botón clickeable) ── */
.activo-header {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 16px;
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    color: inherit;
    transition: none;
    min-height: 70px;
}

.activo-card.abierto .activo-header {
    flex: 0 0 auto;
}

.activo-card-compact.abierto .activo-img-wrapper {
    max-height: 338px;
}

.activo-card:has(.activo-body.open) .activo-card-inner:hover {
    background: #fff;
    cursor: default;
}

.activo-header:focus {
    outline: none;
}

.activo-card:focus-within {
    box-shadow: 0 1px 6px rgba(0,125,138,0.06);
}

a, button {
    transition: all 0.3s ease-in-out 0s;
}

/* imagen */
.activo-img-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 200px;
    overflow: hidden;
    height: 165px;
    background: transparent;
}

.activo-img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center 70%; 
    display: block;
}

.activo-img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.40);
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    padding: 25px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.activo-card.abierto .activo-img-caption {
    opacity: 1;
}

.activo-card.abierto .activo-img-wrapper {
    height: unset;
    width: 300px;
    border-radius: 25px;
}

.activo-card.abierto .activo-img-wrapper .activo-img {
    object-position: center center;
}

.activo-img-caption ul {
    margin: 4px 0 0 0;
    padding-left: 16px;
}

.activo-img-caption li {
    color: #fff;
}
/* ── Texto ── */
.activo-nombre {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 4px 0;
}

.activo-subtitulo {
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* ── Flecha ── */
.activo-arrow {
    width: 16px;
    height: auto;
    flex-shrink: 0;
    margin-left: auto;
    transition: transform 0.3s;
}

.activo-header.activo-abierto {
    border-radius: 12px 12px 0 0;
}

.activo-header.activo-abierto .activo-arrow {
    transform: rotate(180deg);
}

/* ── Cuerpo desplegable ── */
.activo-body {
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.activo-body.open {
    max-height: 800px;
    border-radius: 0 0 12px 12px;
}

.activo-body-inner {
    padding: 3px 20px;
    border-top: none;
}

/* stats (iconos + valores) */
.activo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
    padding: 16px 0;
    border-top: 1px solid #d0e8ea;
    align-items: start;
}

.activo-stats:has(.activo-stat:nth-child(7)) {
    grid-template-columns: repeat(4, 1fr);
}

.activo-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 80px;
}

.activo-stat img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 6px;
}

.activo-stat-valor {
    font-size: 16px;
    font-weight: 700;
    color: #00AABB;
}

.activo-stat-label {
    font-size: 13px;
    color: #828483;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.activo-stat-lista {
    list-style: none !important;
    padding: 0;
    margin: 8px 0 0 0;
    text-align: center;
    font-size: 10px;
    color: #828483;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.activo-stat-lista li {
    list-style: none !important;
    padding-left: 0;
    margin-bottom: 2px;
}

.activo-stat-lista-num {
    color: #00AABB;
    font-weight: 700;
    font-size: 15px;
    margin-right: 3px;
}

.activo-disclaimer {
    font-size: 10px;
    color: #aaa;
    margin: 0 0 0 0;
    padding: 0;
}

/* footer de la tarjeta */
.activo-footer {
    display: flex;
    gap: 40px;
    padding-top: 16px;
    border-top: 1px solid #d0e8ea;
    margin-top: 8px;
    flex-wrap: wrap;
    align-items: center
}

.activo-footer-titulo {
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
    text-align: center;
}

.activo-certs {
    flex: 1;
    min-width: 0;
}

/* Descarga */
.subtitulo-descarga {
    font-weight: 600;
    text-align: center;
    color: #222;
}

.activo-descarga {
    flex: 0 0 201px;
    min-width: 0;
}

.activo-footer:not(:has(.activo-certs)) .activo-descarga {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.activo-footer:not(:has(.activo-certs)) .activo-descarga .pildora-button {
    min-width: 200px;
}

/* Normas y certificaciones */
.activo-certs-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    align-items: stretch;
    border: 1.5px solid #d0e8ea;
    border-radius: 10px;
    padding: 12px 16px;
}

.sin-btn-descarga {
/*    width: fit-content;*/
    margin: 0 auto;
}

.activo-cert-badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #d0e8ea;
    border-radius: 6px;
    min-width: 50px;
    padding: 4px 21px;
    overflow: hidden;
}

.activo-cert-numero {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    line-height: 1;
}

.activo-cert-texto {
    font-size: 10px;
    color: #828483;
    text-transform: uppercase;
    margin-top: 3px;
    line-height: 1.2;
}

.activo-cert-vcs {
    flex-shrink: 0;
    border: 1px solid #d0e8ea;
    padding: 4px 6px;
    flex: 0 0 auto;
}

.activo-cert-vcs img {
    height: 30px;
    width: auto;
    display: block;
}

/* Cuando hay 6 items (5 ISO + logo): una sola fila con badges más compactos */
.activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-badge:not(.activo-cert-vcs) {
    flex: 1;
    min-width: 0;
    padding: 4px 10px;
}
.activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-badge:not(.activo-cert-vcs) .activo-cert-texto {
    font-size: 9px;
}
.activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-vcs {
    flex: 0 0 107px;
    overflow: hidden;
}
.activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-vcs img {
    height: 40px;
    width: auto;
    display: block;
}

@media (max-width: 1315px) {
    .activo-certs-grid {
        flex-wrap: wrap;
    }

    .activo-cert-badge {
        flex: 1 1 calc(33% - 6px);
        min-width: 0;
        overflow: hidden;
    }

    .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-badge:not(.activo-cert-vcs) {
        flex: 1 1 calc(33% - 6px);
        padding: 4px 6px;
    }

    .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-vcs {
        flex: 1 1 calc(33% - 6px);
        overflow: visible;
    }
}
/*
@media (min-width: 1316px) and (max-width: 1480px) {
    .lang-en .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) {
        flex-wrap: wrap;
    }

        .lang-en .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-badge:not(.activo-cert-vcs) {
            flex: 1 1 calc(33% - 6px);
        }
}*/

@media (min-width: 1316px) and (max-width: 1480px) {
    .lang-en .activo-certs-grid {
        flex-wrap: wrap;
    }

    .lang-en .activo-cert-badge {
        flex: 1 1 calc(33% - 6px);
        min-width: 0;
    }

    .lang-en .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-vcs {
        flex: 1 1 calc(33% - 6px);
        overflow: visible;
    }

    .lang-en .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-badge:not(.activo-cert-vcs) {
        flex: 1 1 calc(33% - 6px);
    }

    .lang-en .activo-cert-vcs img {
        height: 40px;
    }

    .lang-en .activo-descarga {
        flex: 0 0 210px;
    }

    .lang-en .sin-btn-descarga {
        flex-wrap: nowrap;
    }

    .lang-en .sin-btn-descarga .activo-cert-badge {
        flex: 1;
    }
}

@media (min-width: 1405px) and (max-width: 1650px) {
    .activo-descarga {
        flex: 0 0 220px;
    }

    .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-badge:not(.activo-cert-vcs) {
        padding: 4px 4px;
    }
}

@media (min-width: 1650px) {
    .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-vcs {
        flex: 0 0 150px;
    }

    .activo-descarga {
        flex: 0 0 350px;
    }

    .activo-descarga .pildora-button {
        max-width: 250px;
        margin: 0 auto;
    }

    .activo-cert-vcs img {
        height: 45px;
    }
}

@media (max-width: 1024px) {
    .activo-card-compact.abierto .activo-img-wrapper {
        max-height: 489px;
    }

    .activo-stat-valor {
        font-size: 14px;
    }

    .activo-stat-label {
        font-size: 11px;
    }

    .activo-footer {
        flex-direction: column;
        gap: 20px;
    }

    .activo-descarga {
        flex: 0 0 auto;
        width: 100%;
    }

    .activo-certs-grid {
        flex-wrap: wrap;
    }

    .activo-cert-badge {
        flex: 1 1 calc(33% - 6px);
        min-width: 0;
        overflow: hidden;
    }

    .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-badge:not(.activo-cert-vcs) {
        flex: 1 1 calc(33% - 6px);
        padding: 4px 6px;
    }

    .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-vcs {
        flex: 1 1 calc(33% - 6px);
        overflow: visible;
    }

    .activo-disclaimer {
        font-size: 9px;
    }

    .intro-sitios-activos {
        margin-top: 40px !important;
    }
}

@media (max-width: 900px) {
    .activo-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .activo-stats:has(.activo-stat:nth-child(7)) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px){
    .activo-card-inner{
        flex-direction: column;
    }

    .activo-img-wrapper {
        width: 100%;
        height: 220px;
    }

    .activo-card.abierto .activo-img-wrapper {
        width: 100%;
        height: 220px;
    }

    .activo-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .activo-body-inner {
        padding: 3px 12px;
    }

    .activo-footer {
        flex-direction: column;
    }

    .activo-certs-grid {
        flex-wrap: wrap;
    }

    .activo-cert-badge {
        flex: 1 1 calc(33% - 6px);
        min-width: 0;
    }

    .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-badge:not(.activo-cert-vcs) {
        flex: 1 1 calc(33% - 6px);
        padding: 4px 6px;
    }

    .activo-certs-grid:has(.activo-cert-badge:nth-child(6)) .activo-cert-vcs {
        flex: 1 1 calc(33% - 6px);
        overflow: visible;
    }

    .activo-descarga {
        flex: 0 0 auto;
        width: 100%;
    }
}

@media (max-width: 375px) {
    .activo-stat-valor {
        font-size: 13px;
    }

    .activo-stat-label {
        font-size: 10px;
    }

    .activo-body-inner {
        padding: 3px 10px;
    }

    .activo-disclaimer {
        font-size: 9px;
    }
}
