/* =========================================
   Ahorrito de la Colmena (cuenta de ahorro infantil)
   Reutiliza los tokens y componentes de styles.css; aquí solo va lo propio de la página.
   ========================================= */
.ah-page,
.ah-promo {
    --honey: var(--accent);
    --honey-soft: color-mix(in srgb, var(--accent) 14%, var(--bg-main));
    --honey-line: color-mix(in srgb, var(--accent) 45%, var(--border-color));
    --honey-ink: color-mix(in srgb, var(--accent) 55%, var(--text-main));
    --hex: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}

/* ---------- A. Hero ---------- */
.ah-hero {
    position: relative;
    padding: clamp(7.5rem, 13vw, 10rem) 0 clamp(3rem, 7vw, 5.5rem);
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-main) 100%);
    overflow: hidden;
}

/* El fondo de colmena (panal) es exclusivo de la página de Ahorrito de la Colmena (ahorro infantil) */
.ah-hero[aria-labelledby="ah-title"],
.ah-hero--colmena,
.ah-page--colmena .ah-hero,
body.page-ahorrito .ah-hero {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='48.5' viewBox='0 0 84 48.5'%3E%3Cpath d='M14 0l14 0l7 12.1l-7 12.1l-14 0l-7-12.1zM56 0l14 0l7 12.1l-7 12.1l-14 0l-7-12.1zM35 12.1l14 0l7 12.1l-7 12.1l-14 0l-7-12.1zM-7 12.1l14 0l7 12.1l-7 12.1l-14 0l-7-12.1zM77 12.1l14 0l7 12.1l-7 12.1l-14 0l-7-12.1z' fill='none' stroke='%23f2a900' stroke-opacity='.16'/%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--honey-soft) 0%, var(--bg-main) 100%);
}

.ah-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.ah-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 14px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--honey-line);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ah-badge::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--honey);
    clip-path: var(--hex);
}

.ah-hero h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    text-wrap: balance;
}

.ah-hero h1 em {
    font-style: normal;
    color: var(--primary);
}

.ah-hero-lead {
    max-width: 54ch;
    color: var(--text-muted);
    font-size: 1.12rem;
    line-height: 1.65;
    margin-bottom: 1.75rem;
}

.ah-slogan {
    display: inline-block;
    margin-bottom: 1.75rem;
    padding-left: 0.9rem;
    border-left: 4px solid var(--honey);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.ah-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.ah-actions .btn {
    border-radius: 999px;
    padding: 14px 26px;
}

.ah-hero-art img {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    margin: 0 auto;
}

/* ---------- B. Presentación: Aprender, Crecer, Soñar ---------- */
.ah-intro {
    max-width: 68ch;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.ah-intro.sv-rich {
    max-width: 1140px;
    width: 100%;
    margin-bottom: 0;
    text-align: left;
}

.ah-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    list-style: none;
}

.ah-pillar {
    position: relative;
    padding: 2.25rem 1.75rem 1.9rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: transform var(--trans-normal), box-shadow var(--trans-normal), border-color var(--trans-normal);
}

.ah-pillar:hover {
    transform: translateY(-6px);
    border-color: var(--honey-line);
    box-shadow: var(--shadow-lg);
}

.ah-hex {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 58px;
    margin-bottom: 1.25rem;
    background: linear-gradient(160deg, #ffd75e, #f2a900);
    clip-path: var(--hex);
    color: #3b2a1a;
    font-size: 1.6rem;
}

.ah-hex.is-green {
    background: linear-gradient(160deg, var(--primary-light), var(--primary-dark));
    color: #ffffff;
}

.ah-pillar h3,
.ah-benefit h3,
.ah-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.ah-pillar p,
.ah-benefit p,
.ah-step p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---------- C. Beneficios educativos ---------- */
.ah-benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    list-style: none;
}

.ah-benefit {
    flex: 1 1 300px;
    max-width: 380px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-card);
}

.ah-benefit h3 {
    font-size: 1.05rem;
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.ah-benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(15, 139, 77, 0.1);
    color: var(--primary);
    font-size: 1.3rem;
}

.ah-note {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    max-width: 800px;
    margin: 2.5rem auto 0;
    padding: 1.1rem 1.35rem;
    border: 1px solid var(--honey-line);
    border-radius: 14px;
    background: var(--honey-soft);
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

.ah-note .icon {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 1.25rem;
    color: var(--honey-ink);
}

/* ---------- D. Cómo funciona ---------- */
.ah-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    list-style: none;
    counter-reset: paso;
}

.ah-step {
    position: relative;
    counter-increment: paso;
    padding-top: 0.25rem;
}

/* Línea de panal que une los pasos */
.ah-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 29px;
    left: 76px;
    right: -0.75rem;
    border-top: 2px dashed var(--honey-line);
}

.ah-step .ah-hex::after {
    content: counter(paso);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

/* ---------- E. Sueños y metas ---------- */
.ah-dreams {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2rem;
    list-style: none;
}

.ah-dream {
    width: 150px;
    text-align: center;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.35;
}

.ah-dream-hex {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 108px;
    margin: 0 auto 0.9rem;
    background: linear-gradient(160deg, #ffe58a, #f2a900);
    clip-path: var(--hex);
    color: #3b2a1a;
    font-size: 2.4rem;
    transition: transform var(--trans-normal);
}

.ah-dream:nth-child(even) .ah-dream-hex {
    background: linear-gradient(160deg, var(--primary-light), var(--primary-dark));
    color: #ffffff;
}

.ah-dream:hover .ah-dream-hex {
    transform: translateY(-6px) rotate(-4deg);
}

.ah-quote {
    max-width: 26ch;
    margin: 3rem auto 0;
    text-align: center;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.2vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.ah-quote span {
    display: block;
    color: var(--primary);
}

/* ---------- F. Preguntas frecuentes ---------- */
.ah-page .faq-answer-inner a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

/* ---------- G. Llamada a la acción final ---------- */
.ah-cta .contact-channels {
    margin-bottom: 2rem;
}

.ah-cta .contact-channel-icon {
    background: rgba(255, 255, 255, 0.14);
    color: var(--accent);
}

.ah-cta .contact-card {
    padding: 2.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.ah-cta .contact-card h3 {
    margin-bottom: 1.5rem;
}

/* Nombre y teléfono lado a lado para que el formulario no sea tan alto */
.ah-cta .contact-card form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
}

.ah-cta .contact-card form > * {
    grid-column: 1 / -1;
}

.ah-cta .contact-card form > .form-group:has(#sv-name),
.ah-cta .contact-card form > .form-group:has(#sv-phone) {
    grid-column: auto;
}

.ah-cta .contact-card .form-group {
    margin-bottom: 1.15rem;
}

.ah-cta .form-note {
    text-align: center;
}

/* El formulario está justo al lado: el botón que baja hasta él solo hace falta en móvil */
.ah-cta-actions .btn {
    text-align: center;
}

@media screen and (min-width: 993px) {
    .ah-cta-actions a[href="#contactForm"] {
        display: none;
    }
}

@media screen and (max-width: 575px) {
    .ah-cta .contact-card form {
        grid-template-columns: 1fr;
    }

    .ah-cta .contact-card {
        padding: 2rem 1.5rem;
    }
}

.ah-cta-actions .btn-primary {
    background: var(--accent);
    color: #2b1d10;
}

.ah-cta-actions .btn-primary:hover {
    background: #ffc233;
    color: #2b1d10;
}

.ah-cta-actions .btn-secondary {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-light);
}

.ah-cta-actions .btn-secondary:hover {
    border-color: #ffffff;
}

.ah-form-note {
    margin: -0.75rem 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.ah-form-legal {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.ah-form-legal a {
    color: var(--primary);
    text-decoration: underline;
}

.ah-page :focus-visible,
.ah-promo :focus-visible {
    outline: 3px solid var(--honey);
    outline-offset: 3px;
}

/* ---------- Banda promocional en la página de inicio ---------- */
.ah-promo {
    padding: 0 0 var(--space-section);
    background: var(--bg-soft);
}

.ah-promo-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    padding: 2rem 2.5rem;
    border: 1px solid var(--honey-line);
    border-radius: 24px;
    background: linear-gradient(120deg, var(--honey-soft), var(--bg-card) 70%);
    box-shadow: var(--shadow-md);
}

.ah-promo-card img {
    width: 170px;
    height: auto;
}

.ah-promo-card h2 {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.ah-promo-card p {
    color: var(--text-muted);
    max-width: 58ch;
}

.ah-promo-card .btn {
    border-radius: 999px;
    white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 992px) {
    .ah-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ah-hero-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .ah-actions {
        justify-content: center;
    }

    .ah-slogan {
        border-left: none;
        padding-left: 0;
    }

    .ah-hero-art img {
        max-width: 440px;
    }

    .ah-pillars {
        grid-template-columns: 1fr;
    }

    .ah-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem 1.5rem;
    }

    .ah-step::after {
        display: none;
    }

    .ah-promo-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .ah-promo-card img {
        width: 140px;
    }
}

@media screen and (max-width: 560px) {
    .ah-steps {
        grid-template-columns: 1fr;
    }

    .ah-actions .btn {
        width: 100%;
    }

    .ah-dream {
        width: 130px;
    }

    .ah-dream-hex {
        width: 104px;
        height: 94px;
    }
}
