/*
 * pages.css
 * ------------------------------------------------------------
 * Bloques específicos de las páginas institucionales:
 * page hero, splits de imagen+texto, sustainability,
 * storytelling, listados técnicos, breadcrumb.
 *
 * Carga: base → components → layout → pages
 * ------------------------------------------------------------
 */

/* ==========================================================
   Page hero (cabecera de páginas internas)
   ========================================================== */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem);
    background:
        radial-gradient(circle at 80% 20%, rgba(43, 169, 164, 0.18), transparent 55%),
        linear-gradient(180deg, #F4F8FB 0%, #E9F1F6 100%);
    border-bottom: 1px solid var(--color-border);
}

.page-hero__inner {
    max-width: 760px;
}

.page-hero__eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--biox-teal);
    margin-bottom: var(--space-md);
}

.page-hero__title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--color-primary);
    margin: 0 0 var(--space-md);
    line-height: 1.1;
}

.page-hero__lede {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin: 0;
    max-width: 38rem;
}

/* ----------------------------------------------------------
   Page hero CON foto de fondo (oscurece + overlay navy/teal)
   ---------------------------------------------------------- */
.page-hero--photo {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 42, 72, 0.88) 0%, rgba(20, 55, 94, 0.78) 60%, rgba(43, 169, 164, 0.55) 100%),
        var(--bg-image) center / cover no-repeat;
    border-bottom: none;
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: clamp(4rem, 9vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.page-hero--photo .page-hero__title { color: #fff; }
.page-hero--photo .page-hero__lede { color: rgba(255, 255, 255, 0.88); }
.page-hero--photo .page-hero__eyebrow { color: var(--biox-teal-light, #6BD3CF); }
.page-hero--photo .breadcrumb,
.page-hero--photo .breadcrumb a { color: rgba(255, 255, 255, 0.7); }
.page-hero--photo .breadcrumb a:hover { color: #fff; }

/* ==========================================================
   Breadcrumb
   ========================================================== */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb__sep { margin: 0 0.4rem; opacity: 0.5; }

/* ==========================================================
   Split (imagen + texto)
   ========================================================== */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.split--reverse .split__text { order: 2; }
.split--reverse .split__media { order: 1; }

@media (max-width: 880px) {
    .split { grid-template-columns: 1fr; }
    .split--reverse .split__text,
    .split--reverse .split__media { order: initial; }
}

.split__media {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(43, 169, 164, 0.18), rgba(20, 55, 94, 0.35)),
        center/cover no-repeat var(--bg-image, linear-gradient(135deg, #14375E, #2BA9A4));
    box-shadow: var(--shadow-md);
}

.split__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.split__text h2 {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.split__text p {
    color: var(--color-text-muted);
    font-size: 1.02rem;
}

/* ==========================================================
   Listado técnico (con icono check teal)
   ========================================================== */
.tlist {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0 0;
    display: grid;
    gap: var(--space-sm);
}

.tlist li {
    position: relative;
    padding-left: 1.85rem;
    color: var(--color-text);
    line-height: 1.55;
}

.tlist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: rgba(43, 169, 164, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232BA9A4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2.5,8.5 6.5,12.5 13.5,4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* ==========================================================
   Producto detalle
   ========================================================== */
.product {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
    padding: clamp(2rem, 4vw, 3rem);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-xl);
}

@media (max-width: 760px) {
    .product { grid-template-columns: 1fr; }
}

.product__media {
    aspect-ratio: 1;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 30% 30%, rgba(43, 169, 164, 0.25), transparent 60%),
        linear-gradient(135deg, #F4F8FB, #E9F1F6);
    display: grid;
    place-items: center;
    color: var(--biox-teal);
}

.product__media svg {
    width: 38%;
    height: auto;
}

/* Variante con foto real (reemplaza el ícono SVG) */
.product__media--photo {
    overflow: hidden;
    background: none;
    padding: 0;
}
.product__media--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
    transition: transform 600ms ease;
}
.product:hover .product__media--photo img {
    transform: scale(1.04);
}

.product__tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--biox-teal);
    margin-bottom: var(--space-sm);
}

.product h3 {
    color: var(--color-primary);
    font-size: 1.4rem;
    margin: 0 0 var(--space-sm);
}

.product__lede {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.product__meta {
    margin-top: var(--space-md);
    display: grid;
    gap: var(--space-md);
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 560px) {
    .product__meta { grid-template-columns: 1fr; }
}

.product__meta dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--biox-teal);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.product__meta dd {
    margin: 0;
    color: var(--color-text);
}

/* ==========================================================
   Sustainability hero block
   ========================================================== */
.sustain-hero {
    position: relative;
    padding: clamp(3.5rem, 8vw, 6rem) 0;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 42, 72, 0.82), rgba(43, 169, 164, 0.45)),
        center/cover no-repeat var(--bg-image, linear-gradient(135deg, #0F2A48, #14375E));
    overflow: hidden;
}

.sustain-hero__inner {
    max-width: 760px;
}

.sustain-hero h2 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0 0 var(--space-md);
}

.sustain-hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin: 0 0 var(--space-lg);
    max-width: 36rem;
}

.sustain-hero__leaf {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(124, 179, 66, 0.22);
    color: #B5DC7E;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.sustain-hero__leaf::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--biox-leaf);
}

/* ==========================================================
   Storytelling band (fotos amplias + cita)
   ========================================================== */
.story {
    position: relative;
    padding: clamp(3rem, 7vw, 5rem) 0;
    background: var(--color-bg-alt);
}

.story__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: stretch;
}

@media (max-width: 880px) {
    .story__grid { grid-template-columns: 1fr; }
}

.story__media {
    aspect-ratio: 5 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(15, 42, 72, 0.4), rgba(43, 169, 164, 0.2)),
        center/cover no-repeat var(--bg-image, linear-gradient(135deg, #14375E 0%, #2BA9A4 100%));
    box-shadow: var(--shadow-md);
    min-height: 320px;
}

.story__quote {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story__quote blockquote {
    margin: 0 0 var(--space-md);
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--color-primary);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.story__quote cite {
    font-style: normal;
    font-size: 0.92rem;
    color: var(--color-text-muted);
}

.story__quote cite strong {
    color: var(--color-text);
    font-weight: 600;
    display: block;
}

/* ==========================================================
   Final CTA
   ========================================================== */
.final-cta {
    background: linear-gradient(135deg, #0F2A48 0%, #14375E 60%, #1F4D7A 100%);
    color: #fff;
    padding: clamp(3rem, 7vw, 5rem) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.final-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(43, 169, 164, 0.25), transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(124, 179, 66, 0.15), transparent 50%);
    pointer-events: none;
}

/* Variante con foto de fondo + overlay navy para legibilidad */
.final-cta--photo {
    background:
        linear-gradient(135deg, rgba(15, 42, 72, 0.92) 0%, rgba(20, 55, 94, 0.85) 60%, rgba(31, 77, 122, 0.78) 100%),
        var(--bg-image) center / cover no-repeat;
}
.final-cta--photo::before {
    background:
        radial-gradient(circle at 20% 30%, rgba(43, 169, 164, 0.3), transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(124, 179, 66, 0.2), transparent 50%);
}

.final-cta__inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.final-cta h2 {
    color: #fff;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin: 0 0 var(--space-md);
}

.final-cta p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.1rem;
    margin: 0 0 var(--space-lg);
}

.final-cta .btn {
    background: var(--biox-teal);
    border-color: var(--biox-teal);
}

.final-cta .btn:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

.final-cta .btn--secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.final-cta .btn--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: #fff;
}

/* ==========================================================
   Pillars (sustentabilidad — 3-col con icono leaf)
   ========================================================== */
.pillar {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border-top: 3px solid var(--biox-leaf);
}

.pillar__num {
    font-family: var(--font-family-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--biox-leaf);
    line-height: 1;
    display: block;
    margin-bottom: var(--space-sm);
}

.pillar h3 {
    color: var(--color-primary);
    margin: 0 0 0.4rem;
}

.pillar p {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 0.97rem;
}

/* ==========================================================
   Service item (lista)
   ========================================================== */
.service {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border);
    align-items: start;
}

.service:last-child { border-bottom: 0; }

.service__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(43, 169, 164, 0.18), rgba(20, 55, 94, 0.18));
    color: var(--biox-teal);
    display: grid;
    place-items: center;
}

.service__icon svg { width: 26px; height: 26px; }

.service h3 {
    margin: 0 0 0.3rem;
    color: var(--color-primary);
    font-size: 1.15rem;
}

.service p {
    color: var(--color-text-muted);
    margin: 0;
}

/* Service variante con foto en vez de ícono */
.service--photo {
    grid-template-columns: 200px 1fr;
    gap: var(--space-xl);
    align-items: center;
    padding: var(--space-xl) 0;
}
.service__photo {
    width: 200px;
    height: 140px;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
}
@media (max-width: 720px) {
    .service--photo {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .service__photo {
        width: 100%;
        height: 180px;
    }
}

/* ==========================================================
   Trust strip (industrias / sectores que atendemos)
   ========================================================== */
.trust {
    padding: var(--space-xl) 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
}

.trust__inner {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
    flex-wrap: wrap;
    justify-content: center;
}

.trust__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding-right: var(--space-md);
    border-right: 1px solid var(--color-border);
}

.trust__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.trust__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.trust__chip:hover {
    border-color: var(--biox-teal-light);
    background: rgba(43, 169, 164, 0.06);
    color: var(--color-primary);
}

.trust__chip svg {
    width: 14px;
    height: 14px;
    color: var(--biox-teal);
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .trust__label { width: 100%; text-align: center; padding: 0 0 var(--space-sm); border-right: 0; border-bottom: 1px solid var(--color-border); }
}

/* ==========================================================
   Section divider (SVG wave sutil)
   ========================================================== */
.divider {
    position: relative;
    height: 60px;
    margin-top: -1px;
    overflow: hidden;
    pointer-events: none;
}

.divider svg {
    display: block;
    width: 100%;
    height: 100%;
}

.divider--up { transform: rotate(180deg); }

/* ==========================================================
   Card refinado (gloss + corner accent)
   ========================================================== */
.card {
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--biox-teal) 0%, var(--biox-teal-light) 50%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover::before { opacity: 1; }

.card__icon {
    position: relative;
    overflow: hidden;
}

.card__icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 60%);
    pointer-events: none;
}

/* ==========================================================
   Quote mark decorativo en storytelling
   ========================================================== */
.story__quote {
    position: relative;
}

.story__quote::before {
    content: "“";
    position: absolute;
    top: -0.4rem;
    left: 1.5rem;
    font-family: Georgia, serif;
    font-size: 8rem;
    line-height: 1;
    color: var(--biox-teal);
    opacity: 0.18;
    pointer-events: none;
    user-select: none;
}

.story__quote blockquote {
    position: relative;
    z-index: 1;
}

/* ==========================================================
   Stats animados (números con escala)
   ========================================================== */
.stats__num {
    background: linear-gradient(135deg, #ffffff 0%, var(--biox-teal-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.stats__item {
    position: relative;
    padding: var(--space-lg) var(--space-md);
}

.stats__item::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: rgba(255, 255, 255, 0.12);
}

.stats__item:first-child::before { display: none; }

@media (max-width: 720px) {
    .stats__item::before { display: none; }
}

/* ==========================================================
   Reveal-on-scroll
   ========================================================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero::after,
    .hero__visual::after,
    .hero__badge { animation: none; }
}

/* ==========================================================
   CTA con flecha animada
   ========================================================== */
.btn .arrow {
    display: inline-block;
    transition: transform var(--transition);
}

.btn:hover .arrow { transform: translateX(4px); }
