/* ================================
   Química Fina (CSS completo)
   Requiere: ../styles.css
================================ */

/* Aire lateral (no pegado a bordes) */
.container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}

@media (min-width: 1200px) {
    .container {
        padding-left: 2.25rem;
        padding-right: 2.25rem;
    }
}

/* ========= HERO con foto institucional ========= */
.subhero-qf {
    position: relative;
    overflow: hidden;
    padding: 2.2rem 0 1.8rem;
    border-bottom: 1px solid var(--border);
    background: none;
}

.subhero-qf::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 18, 38, .88) 0%, rgba(8, 18, 38, .55) 55%, rgba(8, 18, 38, .22) 100%),
        url("../img/quimica-fina/hero-qf.jpg");
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    z-index: 0;
}

.subhero-qf::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(25, 57, 98, .35), transparent 55%);
    z-index: 0;
}

.subhero-qf__inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.2rem;
    align-items: stretch;
}

@media (min-width: 900px) {
    .subhero-qf__inner {
        grid-template-columns: 1.7fr 1fr;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    font-size: .86rem;
    margin-bottom: .6rem;
    color: rgba(255, 255, 255, .86);
}

.breadcrumbs a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .sep {
    opacity: .7;
}

.page-title {
    font-size: clamp(1.9rem, 2.6vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: .55rem 0 .65rem;
    color: #fff;
}

.page-lead {
    color: rgba(255, 255, 255, .85);
    font-size: 1rem;
    max-width: 72ch;
    margin-bottom: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: .4rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .20);
    color: #fff;
    font-size: .85rem;
    font-weight: 800;
}

/* Panel */
.subhero-qf__panel {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.subhero-qf__panel h2 {
    color: var(--accent-strong);
    font-weight: 900;
    font-size: 1.05rem;
}

.qf-kpis {
    display: grid;
    gap: .6rem;
    margin-top: .25rem;
}

.kpi {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .75rem;
    background: #fff;
}

.kpi__label {
    display: block;
    font-size: .74rem;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: .15rem;
}

.kpi__value {
    display: block;
    font-weight: 900;
    color: var(--primary);
    font-size: .92rem;
}

/* ========= STATS ========= */
.stats-grid {
    display: grid;
    gap: .8rem;
    margin-top: 1rem;
}

@media (min-width: 850px) {
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    text-align: center;
}

.stat__num {
    display: block;
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -.02em;
    color: var(--accent-strong);
    margin-bottom: .2rem;
}

.stat__label {
    display: block;
    font-size: .88rem;
    color: var(--muted);
    font-weight: 800;
}

.qf-note {
    margin-top: 1rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .9rem 1rem;
    border: 1px dashed #cfe0f5;
    background: #fff;
    border-radius: var(--radius);
}

.qf-note i {
    color: var(--accent-strong);
    margin-top: .2rem;
}

/* ========= Cards con imagen ========= */
.qf-feature-cards {
    margin-top: 1rem;
}

.qf-service-cards {
    margin-top: 1rem;
}

.feature-card {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-soft);
    display: grid;
    transition: transform .18s ease, box-shadow .18s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .10);
}

.feature-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.feature-card__body {
    padding: 1rem;
}

.feature-card__body h3 {
    margin-bottom: .35rem;
    color: var(--accent-strong);
    font-weight: 900;
}

.feature-card__body p {
    color: var(--muted);
}

/* ========= Distribuidores ========= */
.split-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.btn-sm {
    padding: .55rem .85rem;
    font-size: .9rem;
}

.logos-strip {
    display: grid;
    gap: .9rem;
    margin-top: 1rem;
}

@media (min-width: 900px) {
    .logos-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.logo-card {
    display: grid;
    gap: .6rem;
    place-items: center;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, box-shadow .18s ease;
}

.logo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .10);
}

.logo-card img {
    max-width: 160px;
    width: 100%;
    height: 44px;
    object-fit: contain;
    filter: grayscale(10%);
    opacity: .95;
}

.logo-card span {
    font-size: .85rem;
    color: var(--muted);
    font-weight: 900;
}

/* ========= Galería pro ========= */
.gallery {
    display: grid;
    gap: .9rem;
    margin-top: 1rem;
}

@media (min-width: 900px) {
    .gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .gallery-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-item:nth-child(2) {
        grid-column: span 2;
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    background: #fff;
    display: block;
    transition: transform .18s ease, box-shadow .18s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .10);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.gallery-item::after {
    content: attr(aria-label);
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: .35rem .55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: .85rem;
    font-weight: 900;
    opacity: 0;
    transform: translateY(6px);
    transition: .18s ease;
}

.gallery-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* ========= Steps ========= */
.qf-steps {
    display: grid;
    gap: .7rem;
}

@media (min-width: 900px) {
    .qf-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

.step {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
}

.step__num {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: var(--accent);
    color: var(--accent-strong);
    border: 1px solid #cfe0f5;
}

.step h3 {
    margin-bottom: .2rem;
    color: var(--accent-strong);
    font-weight: 900;
    font-size: 1rem;
}

.step p {
    color: var(--muted);
    font-size: .92rem;
}

/* CTA box */
.cta-box {
    margin-top: 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cta-title {
    font-weight: 900;
    color: var(--accent-strong);
    margin-bottom: .25rem;
}

.cta-subtitle {
    color: var(--muted);
}

/* ========= Contact grid ========= */
.contact-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 950px) {
    .contact-grid {
        grid-template-columns: 1.1fr 1.2fr 1fr;
        align-items: stretch;
    }
}

.contact-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.contact-card h3 {
    color: var(--accent-strong);
    font-weight: 900;
    display: flex;
    gap: .55rem;
    align-items: center;
}

.person {
    display: grid;
    gap: .15rem;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.person a {
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
}

.person a:hover {
    text-decoration: underline;
}

.mini {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.mini-pill {
    display: inline-flex;
    gap: .45rem;
    align-items: center;
    padding: .45rem .65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: .85rem;
    font-weight: 900;
    color: var(--muted);
}

.docs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .45rem;
}

.docs li {
    display: flex;
    gap: .55rem;
    align-items: center;
    color: var(--muted);
    font-weight: 800;
}