/**
 * Portada (antes, página 79 de Elementor). Cada medida sale de producción a
 * 1280 / 768 / 390 (referencia/agunsa.com.pe/profundo/portada-entero@*.json).
 *
 * Las secciones de Elementor tenían caja de 1140 y columnas con 10 px de
 * relleno; los márgenes verticales entre secciones se suman como en un
 * documento normal (el mayor de los dos gana).
 */

/* ── Portada (hero) ── */

.ag-hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #171717;
}
.ag-hero__fondo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 50%;
}
.ag-hero__fondo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .56);
    mix-blend-mode: multiply;
}
.ag-hero__dentro {
    position: relative;
    height: 100%;
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.ag-hero__contenido { max-width: 100%; }
.ag-hero__titulo {
    font-family: var(--ag-tahoma);
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, .37);
    margin-bottom: 3px;
}
.ag-hero__texto {
    font-family: var(--ag-tahoma);
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 15px;
}
.ag-hero__boton {
    display: inline-block;
    padding: 15px 30px;
    border: 2px solid var(--ag-rojo);
    border-radius: 4px;
    background: var(--ag-rojo);
    color: #fff;
    font-family: var(--ag-roboto);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    transition: background .3s, color .3s;
}
.ag-hero__pie { height: 20px; }

@media (max-width: 1024px) {
    .ag-hero { height: 400px; }
    .ag-hero__titulo { font-size: 30px; }
}
@media (max-width: 767px) {
    .ag-hero__dentro { padding: 30px; }
    .ag-hero__titulo { font-size: 25px; }
}

/* ── Título y subtítulo de cada bloque ── */

.ag-bloque-titulo {
    max-width: var(--ag-caja);
    margin: 80px auto 20px;
    padding: 10px;
    text-align: center;
}
.ag-bloque-titulo--primero { margin-top: 70px; }
.ag-titulo {
    font-family: var(--ag-tahoma);
    font-size: 35px;
    font-weight: 700;
    line-height: 1;
    color: var(--ag-gris-oscuro);
}
.ag-bloque-titulo--rojo .ag-titulo { color: var(--ag-rojo); }
.ag-subtitulo {
    margin-top: 5px;
    font-family: var(--ag-tahoma);
    font-size: 15px;
    line-height: 1;
    color: var(--ag-gris);
}
@media (max-width: 767px) {
    .ag-bloque-titulo--contacto { padding: 10px 25px; }
}

/* ── Tarjetas (beneficios en rojo, pasos con borde) ── */

.ag-tarjetas {
    max-width: var(--ag-caja);
    margin: 0 auto 20px;
    display: flex;
}
/* Columna de un tercio; la tarjeta puede salirse si una palabra no cabe
   («Almacenamiento» en tablet), igual que en Elementor. */
.ag-tarjeta-col { flex: 0 0 33.333%; max-width: 33.333%; min-width: 0; display: flex; }
.ag-tarjeta {
    /* Ancho 100 % que encoge por los márgenes: el mínimo automático de flex es el menor entre el
       contenido y ese 100 %, así que «Almacenamiento» la lleva a 256 en tablet, como en Elementor. */
    flex: 0 1 auto;
    width: 100%;
    margin: 0 20px;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
}
.ag-tarjetas--rojas .ag-tarjeta { background: var(--ag-rojo); }
.ag-tarjetas--borde .ag-tarjeta { background: #fff; border: 3px solid var(--ag-rojo); }

.ag-tarjeta__icono {
    display: inline-block;
    margin-bottom: 15px;
    padding: 25px;
    border-radius: 50%;
    font-size: 50px;
    line-height: 1;
    vertical-align: top;
}
.ag-tarjeta__icono svg { display: block; width: 50px; height: 50px; fill: currentColor; }
.ag-tarjetas--rojas .ag-tarjeta__icono { background: #fff; color: var(--ag-rojo); }
.ag-tarjetas--borde .ag-tarjeta__icono { background: var(--ag-rojo); color: #fff; border: 3px solid #fff; }

.ag-tarjeta__titulo {
    font-family: var(--ag-tahoma);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
}
.ag-tarjeta__texto {
    font-family: var(--ag-tahoma);
    font-size: 15px;
    line-height: 1.7;
}
.ag-tarjetas--rojas .ag-tarjeta__titulo,
.ag-tarjetas--rojas .ag-tarjeta__texto { color: #fff; }
.ag-tarjetas--borde .ag-tarjeta__titulo { color: var(--ag-rojo); }
.ag-tarjetas--borde .ag-tarjeta__texto { color: var(--ag-gris); }

@media (max-width: 767px) {
    .ag-tarjetas { flex-direction: column; }
    .ag-tarjeta-col { max-width: none; }
    .ag-tarjeta { margin: 15px; }
}

/* ── Botón con borde («Solicita una demo») ── */

.ag-bloque-boton {
    max-width: var(--ag-caja);
    margin: 0 auto;
    padding: 10px;
    text-align: center;
}
.ag-boton-borde {
    display: inline-block;
    padding: 15px 30px;
    border: 3px solid var(--ag-rojo);
    border-radius: 4px;
    background: #fff;
    color: var(--ag-rojo);
    font-family: var(--ag-tahoma);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: background .3s, color .3s;
}
.ag-boton-borde span, .agc-form__boton span { display: inline-block; line-height: 1; }

/* ── ¿Cómo funciona? (foto + texto sobre rojo) ── */

.ag-fila {
    max-width: var(--ag-caja);
    margin: 0 auto 20px;
    display: flex;
}
.ag-fila--ultima { margin-bottom: 60px; }
.ag-fila__foto { width: 50%; display: flex; align-items: center; text-align: center; }
.ag-fila__foto img { display: block; width: 100%; }
.ag-fila__texto {
    width: 50%;
    padding: 50px;
    display: flex;
    align-items: center;
    background-image: linear-gradient(180deg, var(--ag-rojo) 0%, var(--ag-rojo-oscuro) 100%);
    color: #fff;
}
.ag-fila__caja { display: flex; align-items: flex-start; }
.ag-fila__icono {
    flex: none;
    margin-right: 15px;
    padding: 15px;
    border: 3px solid #fff;
    border-radius: 50%;
    line-height: 1;
}
.ag-fila__icono svg { display: block; width: 30px; height: 30px; fill: currentColor; }
.ag-fila__cuerpo { flex: 1 1 auto; min-width: 0; }
.ag-fila__titulo {
    font-family: var(--ag-tahoma);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}
.ag-fila__parrafo {
    font-family: var(--ag-tahoma);
    font-size: 15px;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .ag-fila { flex-direction: column; padding: 15px; margin-bottom: 20px; }
    .ag-fila--ultima { margin-bottom: 60px; }
    .ag-fila__foto, .ag-fila__texto { width: 100%; }
    .ag-fila__texto { padding: 20px; text-align: center; }
    .ag-fila__caja { flex-direction: column; align-items: center; }
    .ag-fila__icono { margin: 0 0 15px; }
}

/* ── Formulario y foto ── */

.ag-contacto {
    max-width: var(--ag-caja);
    margin: 0 auto 90px;
    display: flex;
}
.ag-contacto__form, .ag-contacto__foto {
    width: calc(50% - 40px);
    margin: 0 20px;
    padding: 10px;
}
.ag-contacto__foto { display: flex; align-items: center; justify-content: center; text-align: center; }
.ag-contacto__foto img { display: inline-block; }

@media (max-width: 1024px) {
    .ag-contacto__foto { display: none; }
}
@media (max-width: 767px) {
    .ag-contacto { flex-direction: column; }
    .ag-contacto__form { width: auto; margin: 20px 20px 0; }
}

.agc-form__campos { display: flex; flex-wrap: wrap; margin: 0 -5px; }
.agc-form__campo {
    width: 100%;
    padding: 0 5px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    text-align: left;
}
.agc-form__etiqueta {
    display: block;
    margin-bottom: 10px;
    font-family: var(--ag-roboto);
    font-size: 18px;
    line-height: 1.7;
    color: var(--ag-gris);
}
.agc-form__campo input {
    display: block;
    width: calc(100% - 4px);
    margin: 0 2px;
    min-height: 40px;
    padding: 10px;
    border: 1px solid #69727d;
    border-radius: 0;
    background: #fff;
    font-family: var(--ag-roboto);
    font-size: 15px;
    line-height: 1.7;
    color: var(--ag-gris);
}
.agc-form__campo textarea {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 5px 14px;
    border: 1px solid #69727d;
    border-radius: 3px;
    background: #fff;
    font-family: var(--ag-roboto);
    font-size: 15px;
    line-height: 1.4;
    color: var(--ag-gris);
    resize: vertical;
}
.agc-form__campo input:focus, .agc-form__campo textarea:focus { outline: 2px solid var(--ag-rojo); outline-offset: 1px; }
.agc-form__campo--enviar { margin-bottom: 0; padding-top: 1px; }
.agc-form__boton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0 24px;
    border: 0;
    border-radius: 3px;
    background: var(--ag-rojo);
    color: #fff;
    font-family: var(--ag-roboto);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: opacity .3s;
}
.agc-form__boton:disabled { opacity: .6; cursor: progress; }
.agc-form__aviso {
    margin-top: 10px;
    font-family: var(--ag-roboto);
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}
.agc-form__aviso[data-tipo="error"] { color: var(--ag-rojo); }
.agc-cebo { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
