/* ==========================================================================
   ESTILOS CALCADOS PASO 1: GRILLA VERTICAL DE 5 COLUMNAS
   ========================================================================== */

/* Cabecera del paso */
.cg-step[data-step="1"] {
    width: 100%;
}

.cg-step1-header {
    text-align: center;
    margin-bottom: 40px;
}

.cg-step1-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.cg-step1-header .cg-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

/* Grilla principal ajustada a 5 columnas */
.cg-grid-options-step1 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

/* Responsivo para pantallas grandes e intermedias */
@media (max-width: 1400px) {
    .cg-grid-options-step1 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
    .cg-grid-options-step1 { grid-template-columns: repeat(3, 1fr); }
}

/* Estilo exacto de las Tarjetas Verticales */
.cg-step[data-step="1"] .cg-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px; /* Esquinas bien curvadas como la captura */
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Efecto Hover */
.cg-step[data-step="1"] .cg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Wrapper de Imagen */
.cg-step[data-step="1"] .cg-card-image-wrapper {
    width: 100%;
    height: 180px; /* Altura vertical para mantener proporción */
    overflow: hidden;
}

.cg-step[data-step="1"] .cg-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bloque de contenido y textos */
.cg-step[data-step="1"] .cg-card-content {
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1; /* Empuja el botón hacia abajo equitativamente */
}

.cg-step[data-step="1"] .cg-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.2;
    display: block;
}

.cg-step[data-step="1"] .cg-card-subtext {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* El botón circular negro inferior con la flecha */
.cg-step[data-step="1"] .cg-arrow-circle {
    width: 36px;
    height: 36px;
    background: #111827;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: bold;
    margin-top: auto; /* Se clava abajo */
    transition: background-color 0.2s ease;
}

.cg-step[data-step="1"] .cg-card:hover .cg-arrow-circle {
    background: #0054a6; /* Cambia al azul de tu marca al hacer hover */
}

/* Estado de tarjeta seleccionada */
.cg-step[data-step="1"] .cg-card.selected {
    border: 2px solid #0054a6;
    box-shadow: 0 8px 24px rgba(0, 84, 166, 0.1);
}

/* Checkbadge discreto para la esquina superior en la tarjeta seleccionada */
.cg-step[data-step="1"] .cg-check-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #0054a6;
    color: #ffffff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 10;
}

/* Footer de navegación inferior */
.cg-navigation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.cg-notice-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 14px;
}

.cg-info-icon {
    background: #0054a6;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* ============================================================
   REDISEÑO MÓVIL: REJILLA DE 2 COLUMNAS (MUESTRA MÁS CUADRITOS)
   ============================================================ */
@media (max-width: 768px) {
    /* Ajustes generales de cabecera en móvil */
    .cg-step1-header {
        margin-bottom: 25px;
    }
    .cg-step1-header h2 {
        font-size: 24px !important;
    }

    /* FORZAMOS LA REJILLA EN 2 COLUMNAS EFECTIVAS EN MÓVIL */
    .cg-grid-options-step1 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Dos cajitas por fila */
        gap: 12px !important; /* Separación compacta para que quepan perfectas */
        margin-bottom: 30px !important;
        width: 100% !important;
    }

    /* Adaptación de tarjetas para la cuadrícula doble */
    .cg-step[data-step="1"] .cg-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important; /* Permite que colapsen correctamente */
        margin: 0 !important;
        border-radius: 14px !important; /* Esquinas ligeramente más compactas */
        box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
    }

    /* Reducimos la altura de la imagen para que entren más filas en pantalla */
    .cg-step[data-step="1"] .cg-card-image-wrapper {
        height: 110px !important; /* Altura ideal balanceada para el modo 2 columnas */
    }

    .cg-step[data-step="1"] .cg-card-image-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Rediseño de textos internos compacto */
    .cg-step[data-step="1"] .cg-card-content {
        padding: 12px 8px !important; /* Reducimos el padding drásticamente */
        gap: 6px !important;
    }

    /* Títulos legibles y compactos */
    .cg-step[data-step="1"] .cg-card-title {
        font-size: 13px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        margin-bottom: 2px !important;
        text-transform: uppercase !important;
    }

    /* Subtextos más pequeños */
    .cg-step[data-step="1"] .cg-card-subtext {
        font-size: 11px !important;
        line-height: 1.3 !important;
        margin: 0 0 8px 0 !important;
    }

    /* Botón circular interno ajustado de tamaño */
    .cg-step[data-step="1"] .cg-arrow-circle {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
        margin-top: auto !important;
    }

    /* Ajuste fino del check azul superior */
    .cg-step[data-step="1"] .cg-check-badge {
        top: 8px;
        right: 8px;
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
}