/**
 * Valores Block Styles (Nuestros Valores)
 * Sección de valores con iconos SVG y etiquetas.
 * Título, descripción del header y descripción por item son wysiwyg: los
 * estilos inline del editor (fuente, tamaño, color, alineación) ganan a
 * los defaults definidos aquí.
 * Figma: node-id=477-14567
 */

/* Contenedor principal */
.valores-section {
    background-color: var(--wp--preset--color--white);
    padding: 80px 30px;
    position: relative;
}

.valores-container {
    max-width: var(--wp--style--global--wide-size, 1400px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 64px;
}

/* Header - Figma: center aligned, gap 8px */
.valores-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

/* Título (wysiwyg) - baseline bold con Inter; si se elige Delicious Handrawn baja a regular */
.valores-title {
    font-family: var(--wp--preset--font-family--inter);
    font-weight: 700;
    font-size: var(--wp--preset--font-size--large, 36px);
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark);
    margin: 0;
    width: 100%;
}

.valores-title h1,
.valores-title h2,
.valores-title h3,
.valores-title h4,
.valores-title h5,
.valores-title h6,
.valores-title p {
    margin: 0;
    line-height: inherit;
}

/* Al elegir una fuente distinta a Inter desde el editor (p. ej. Delicious Handrawn)
   se quita el bold por defecto para que la tipografía decorativa no choque. */
.valores-title:has([style*="Delicious Handrawn"]) {
    font-weight: 400;
}

.valores-title a {
    color: inherit;
    text-decoration: underline;
}

/* Subtítulo / descripción (wysiwyg) - baseline H4 */
.valores-subtitle {
    font-family: var(--wp--preset--font-family--inter);
    font-weight: 400;
    font-size: var(--wp--preset--font-size--medium, 24px);
    line-height: 1.4;
    color: var(--wp--preset--color--text-dark);
    margin: 0;
    width: 100%;
    max-width: 900px;
}

.valores-subtitle > *:first-child { margin-top: 0; }
.valores-subtitle > *:last-child { margin-bottom: 0; }
.valores-subtitle p { margin: 0 0 0.5em; }
.valores-subtitle p:last-child { margin-bottom: 0; }
.valores-subtitle a {
    color: var(--wp--preset--color--primary, #D50032);
    text-decoration: underline;
}

/* Grid de valores */
.valores-grid {
    display: flex;
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
    gap: 16px;
    width: 100%;
}

/* Item individual */
.valores-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    text-align: center;
}

/* Icono - 48x48, color #3A91CF */
.valores-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.valores-icon svg,
.valores-icon img {
    width: 48px;
    height: 48px;
    display: block;
}

.valores-icon img {
    object-fit: contain;
}

/* Label - Inter bold, lg body, centrado (como muestra el Figma de ventajas) */
.valores-label {
    font-family: var(--wp--preset--font-family--inter);
    font-weight: 700;
    font-size: var(--wp--preset--font-size--body-large, 18px);
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark);
}

/* Descripción por item (wysiwyg) */
.valores-description {
    font-family: var(--wp--preset--font-family--inter);
    font-weight: 400;
    font-size: var(--wp--preset--font-size--small, 14px);
    line-height: 1.25;
    color: var(--wp--preset--color--text-gray, #4F4F4F);
    width: 100%;
}

.valores-description > *:first-child { margin-top: 0; }
.valores-description > *:last-child { margin-bottom: 0; }
.valores-description p { margin: 0 0 0.5em; }
.valores-description p:last-child { margin-bottom: 0; }
.valores-description a {
    color: var(--wp--preset--color--primary, #D50032);
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .valores-section {
        padding: 60px 24px;
    }

    .valores-container {
        gap: 48px;
    }

    .valores-title {
        font-size: 28px;
    }

    .valores-subtitle {
        font-size: 20px;
    }

    .valores-grid {
        flex-wrap: wrap;
        justify-content: center;
    }

    .valores-item {
        flex: 0 0 calc(33.333% - 16px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .valores-section {
        padding: 32px 16px;
    }

    .valores-container {
        gap: 48px;
    }

    .valores-title {
        font-size: 28px;
    }

    .valores-subtitle {
        font-size: 18px;
    }

    .valores-label {
        font-size: var(--wp--preset--font-size--normal, 16px);
    }

    .valores-item {
        flex: 0 0 calc(50% - 8px);
    }
}
