/* ============================================================
   BIOSFERA — CONSULTORÍA AMBIENTAL
   biosferapy.com — Componentes reutilizables (≥2 páginas)
   AranduCAD — Mayo 2026
   ============================================================ */

/* ============================================================
   HERO INTERNO
   ============================================================ */
.inner-hero {
  height: 400px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: var(--nav-h);
}
.inner-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.inner-hero:hover .inner-hero-bg { transform: scale(1); }
.inner-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6,14,6,0.95) 0%,
    rgba(6,14,6,0.55) 50%,
    rgba(6,14,6,0.2) 100%
  );
}
.inner-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 52px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
}
.breadcrumb a { color: rgba(255,255,255,0.4); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--g1); }
.breadcrumb span { color: var(--g4); }
.inner-hero h1 {
  font-family: var(--font-h);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 12px;
}
.inner-hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
  max-width: 500px;
}

/* ============================================================
   SECCIONES
   ============================================================ */
.section { padding: 110px 0; }
.section-dark  { background: var(--dark); }
.section-dark2 { background: var(--dark2); }
.section-dark3 { background: var(--dark3); }
.section-light { background: var(--light); }
.section-white { background: var(--white); }
.section-green { background: var(--g1); }

.sec-title {
  font-family: var(--font-h);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.08;
  margin-bottom: 14px;
}
.sec-title.light { color: var(--white); }
.sec-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 300;
  max-width: 480px;
}
.sec-sub.light { color: rgba(255,255,255,0.55); }

.sec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  gap: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar { background: var(--dark2); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  padding: 32px 24px;
  text-align: center;
  border-right: 1px solid rgba(46,204,64,0.08);
  transition: background 0.25s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(46,204,64,0.05); }
.stat-n {
  display: block;
  font-family: var(--font-h);
  font-size: 38px;
  font-weight: 700;
  color: var(--g1);
  line-height: 1;
  font-style: italic;
}
.stat-l {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 6px;
}

/* Stats inline (usado en Somos de index y en intro de servicios) */
.stats-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0;
}
.sbox {
  padding: 18px;
  border-left: 3px solid var(--g1);
  background: var(--light);
}
.sbox .n {
  display: block;
  font-family: var(--font-h);
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-style: italic;
}
.sbox .l {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  display: block;
}

/* ============================================================
   MISIÓN VISIÓN (usado en index y nosotros)
   ============================================================ */
.mv-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.mv-card {
  padding: 64px 52px;
  background: var(--dark3);
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.mv-card:hover { background: var(--dark4); }
.mv-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--g3), var(--g1), var(--g4));
}
.mv-bg-num {
  position: absolute;
  top: 20px; right: 32px;
  font-family: var(--font-h);
  font-size: 110px;
  font-weight: 900;
  color: rgba(46,204,64,0.05);
  line-height: 1;
  font-style: italic;
  pointer-events: none;
}
.mv-icon { font-size: 36px; margin-bottom: 20px; display: block; }
.mv-title {
  font-family: var(--font-h);
  font-size: 34px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 18px;
  font-style: italic;
}
.mv-text {
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
  font-weight: 300;
}

/* ============================================================
   SERVICIOS CARDS
   ============================================================ */
.serv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.serv-card {
  background: var(--white);
  padding: 42px 34px;
  border-top: 3px solid transparent;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s;
}
.serv-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 0;
  background: var(--dark);
  transition: height 0.35s var(--ease);
  z-index: 0;
}
.serv-card:hover { border-top-color: var(--g1); }
.serv-card:hover::after { height: 100%; }
.serv-card:hover .sc-num,
.serv-card:hover .sc-title,
.serv-card:hover .sc-list li { color: var(--white); }
.serv-card > * { position: relative; z-index: 1; }
.sc-num {
  display: block;
  font-family: var(--font-b);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--g1);
  margin-bottom: 14px;
  transition: color 0.3s;
}
.sc-icon {
  font-size: 30px;
  margin-bottom: 16px;
  display: block;
  transition: transform 0.3s;
}
.serv-card:hover .sc-icon { transform: scale(1.1); }
.sc-title {
  font-family: var(--font-h);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.2;
  transition: color 0.3s;
}
.sc-list { padding: 0; }
.sc-list li {
  font-size: 13.5px;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.3s;
}
.sc-list li:last-child { border-bottom: none; }
.sc-list li::before {
  content: '▸';
  color: var(--g1);
  font-size: 9px;
  flex-shrink: 0;
}
.sc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--g1);
  margin-top: 18px;
  transition: gap 0.2s;
}
.sc-link:hover { gap: 10px; }

/* CTA card ancho completo */
.serv-cta {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--dark3), var(--dark2));
  padding: 44px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 3px solid var(--g1);
}
.serv-cta-text {
  font-family: var(--font-h);
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  font-style: italic;
  max-width: 560px;
}
.serv-cta-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  margin-top: 8px;
  font-weight: 300;
}

/* ============================================================
   ORGANISMOS (usado en index, nosotros, servicios)
   ============================================================ */
.org-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(46,204,64,0.06);
}
.org-item {
  background: var(--dark3);
  padding: 36px 24px;
  text-align: center;
  transition: background 0.25s;
}
.org-item:hover { background: var(--dark4); }
.org-badge {
  display: inline-block;
  font-family: var(--font-h);
  font-size: 22px;
  font-weight: 700;
  color: var(--g1);
  font-style: italic;
  margin-bottom: 10px;
}
.org-name {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ============================================================
   GALERÍA FILTRABLE (usado en index preview y proyectos completa)
   ============================================================ */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  font-family: var(--font-b);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 9px 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.22s;
}
.filter-btn:hover { border-color: var(--g1); color: var(--g1); }
.filter-btn.active {
  background: var(--g1);
  border-color: var(--g1);
  color: var(--white);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.g-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--dark3);
}
.g-item.hidden { display: none; }
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
  display: block;
}
.g-item:hover img { transform: scale(1.06); }
.g-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6,14,6,0);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  transition: background 0.3s;
}
.g-item:hover .g-overlay { background: rgba(6,14,6,0.6); }
.g-label {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
}
.g-item:hover .g-label { opacity: 1; transform: translateY(0); }
.g-label span {
  display: inline-block;
  background: var(--g1);
  color: var(--white);
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
}

/* ============================================================
   RESPONSIVE (componentes)
   ============================================================ */
@media (max-width: 1024px) {
  .org-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .inner-hero { height: 300px; }
  .inner-hero h1 { font-size: 30px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inline { grid-template-columns: 1fr 1fr; }

  .mv-wrap { grid-template-columns: 1fr; }
  .mv-card { padding: 44px 28px; }

  .serv-grid { grid-template-columns: 1fr; }
  .serv-cta { flex-direction: column; align-items: flex-start; padding: 32px 28px; }

  .org-grid { grid-template-columns: repeat(2, 1fr); }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .org-grid { grid-template-columns: 1fr 1fr; }
}
