/* ==== BASE ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #fff;
  overflow-x: hidden;
}

h2 {
  font-weight: 600;
  color: var(--text);
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  background: var(--brand);
  margin-top: 10px;
  border-radius: 999px;
}

/* ==== HERO ==== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 170px 10% 120px;
  text-align: center;
  margin-top: var(--header-height);
  background: url('../img/optimized/panoramica/panoramicainicio-900.jpg') center / cover no-repeat;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

@media (min-width: 769px) {
  .hero {
    background-image: url('../img/optimized/panoramica/panoramicainicio-1600.jpg');
  }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.hero::after {
  content: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(79, 176, 104, 0.18);
  color: #2f7441;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.35rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 62ch;
  margin: 0 auto 15px;
  line-height: 1.6;
}

.hero .subtext {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 500;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.hero-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(53, 110, 69, 0.24);
}

.hero-btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(53, 110, 69, 0.28);
}

.hero-btn-secondary {
  background: #fff;
  color: #224a33;
  border: 1px solid rgba(34, 74, 51, 0.25);
}

.hero-btn-secondary:hover {
  border-color: rgba(34, 74, 51, 0.5);
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-2px);
}

/* ==== QUIENES SOMOS ==== */
.quienes-somos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.72fr);
  min-height: 560px;
  padding: 0;
  background: #f7f5f1;
}

.qs-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(48px, 6vw, 88px) clamp(34px, 5vw, 76px);
}

.qs-text span {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.qs-text h2 {
  max-width: 14ch;
  margin: 0 0 22px;
  color: #15191d;
  font-size: clamp(2rem, 3.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
}

.qs-text h2::after {
  margin-top: 18px;
}

.qs-text p {
  max-width: 62ch;
  margin: 0;
  color: #4f565d;
  font-size: 1.05rem;
  line-height: 1.8;
}

.qs-img {
  min-height: 560px;
  overflow: hidden;
}

.qs-img img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

/* ==== PROCESO ==== */
.process {
  padding: 96px 8% 108px;
  background: #f7f5f1;
}

.process-heading {
  display: block;
  max-width: 820px;
  margin: 0 auto 48px;
  text-align: center;
}

.process-heading span {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.process-heading h2 {
  display: block;
  max-width: 18ch;
  margin: 0 auto;
  color: #15191d;
  font-size: clamp(2rem, 3.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
}

.process-heading h2::after {
  margin: 20px auto 0;
}

.process-heading p {
  max-width: 650px;
  margin: 24px auto 0;
  color: #4f565d;
  font-size: 1.06rem;
  line-height: 1.75;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  max-width: 1380px;
  margin: 0 auto;
}

.process-steps article {
  position: relative;
  min-height: 255px;
  padding: 32px;
  border: 1px solid #e5ded3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(35, 28, 20, 0.07);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.process-steps article::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 0;
  width: 60px;
  height: 4px;
  border-radius: 999px;
  background: var(--brand);
}

.process-steps article:hover {
  transform: translateY(-7px);
  border-color: rgba(79, 176, 104, 0.24);
  box-shadow: 0 22px 46px rgba(35, 28, 20, 0.12);
}

.process-steps article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 30px;
  border-radius: 999px;
  background: #edf3e9;
  color: #4f8b55;
  font-weight: 800;
}

.process-steps h3 {
  margin-bottom: 14px;
  color: #15191d;
  font-size: clamp(1.22rem, 1.55vw, 1.52rem);
  line-height: 1.15;
}

.process-steps p {
  margin: 0;
  color: #515860;
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ==== NUESTROS ESPACIOS ==== */
.espacios {
  padding: 90px 8%;
  text-align: center;
  background: #f7f7f7;
}

.espacios h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.espacios p {
  color: #555;
  margin-bottom: 50px;
  font-weight: 300;
}

.grid-espacios {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.espacio-card {
  border: 1px solid transparent;
  background: #f6f5f3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.espacio-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.espacio-info {
  padding: 24px 18px;
}

.espacio-info h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.espacio-info p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.5;
}

.espacio-info a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--muted);
  transition: color 0.25s, border-color 0.25s;
}

.espacio-info a:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.espacio-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--brand);
}

/* ==== VENTAJAS ==== */
.ventajas {
  padding: 100px 8%;
  text-align: center;
  background: #fff;
}

.grid-ventajas {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.ventajas .item {
  background: #f5f5f5;
  padding: 30px;
  border-radius: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.ventajas .item:hover {
  background: #eef4f0;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.ventajas .item h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.ventajas .item svg {
  width: 44px;
  height: 44px;
  color: var(--brand);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
}

.ventajas .item p {
  color: #555;
  line-height: 1.55;
}

/* ==== CTA ==== */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 86px 8%;
  background: #253126;
  color: #fff;
}

.cta h2 {
  display: block;
  max-width: 14ch;
  margin: 0 auto 18px;
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
}

.cta h2::after {
  margin: 18px auto 0;
}

.cta p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.84);
  margin: 0 auto 28px;
  font-size: 1.04rem;
  line-height: 1.75;
}

.btn-contacto {
  background: var(--brand);
  color: #fff;
  padding: 12px 30px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-contacto:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

/* ==== FOOTER ==== */
.footer {
  text-align: center;
  padding: 40px 20px;
  background: #333;
  font-size: 0.95rem;
  color: #f5f5f5;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .hero {
    padding: 140px 6% 85px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-btn {
    width: min(280px, 100%);
  }

  .quienes-somos,
  .process,
  .espacios,
  .ventajas,
  .cta {
    padding: 68px 6%;
  }

  .quienes-somos {
    grid-template-columns: 1fr;
  }

  .qs-text {
    padding: 64px 6%;
  }

  .qs-img,
  .qs-img img {
    min-height: 320px;
  }

  .process-heading {
    margin-bottom: 34px;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .process-steps article {
    min-height: 0;
    padding: 28px 24px;
  }

  .grid-espacios {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
  }

  .espacio-card img {
    height: 220px;
  }
}

@media (min-width: 769px) and (max-width: 1180px) {
  .grid-espacios {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==== SCROLL REVEAL ==== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.hero.reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 768px) {
  .hero-content {
    width: 100%;
    min-width: 0;
  }

  .hero h1 {
    max-width: min(11ch, calc(100vw - 12vw));
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(2rem, 8.8vw, 2.55rem);
    line-height: 1.12;
    overflow-wrap: break-word;
  }

  .hero p,
  .hero .subtext {
    max-width: min(32ch, calc(100vw - 12vw));
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: break-word;
  }
}
