/* =====================
   HERO
===================== */

.hero {
  position: relative;
  overflow: hidden;

  background:
    linear-gradient(
      135deg,
      rgba(20, 61, 42, 0.95),
      rgba(94, 139, 114, 0.92)
    );

  color: var(--color-white);
  padding: 140px 0;
  text-align: center;
}

/* textura ambiental */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at top right,
      rgba(224, 161, 38, 0.15),
      transparent 35%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(201, 106, 27, 0.12),
      transparent 30%
    );

  pointer-events: none;
}

/* contenido encima */
.hero .container {
  position: relative;
  z-index: 2;
}

.hero h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 720px;
  margin: auto;
  color: rgba(255,255,255,0.88);
}

/* =====================
   HIGHLIGHTS PRO
===================== */

.highlights {
  padding: 70px 0;
  text-align: center;
}

.titulo-cards-index {
  margin-bottom: 50px;
}

/* =====================
   GRID ESTILO PINTEREST
===================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 320px;
  gap: 28px;
}

/* =====================
   CARD BASE
===================== */

.card {

  position: relative;

  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;

  box-shadow: var(--shadow-card);
  border: 1px solid rgba(20, 61, 42, 0.06);

  display: flex;
  flex-direction: column;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;

  /* Animación */
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

/* hover base */
.card:hover {
  cursor: pointer;
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(20, 61, 42, 0.12);
  border-color: rgba(201, 106, 27, 0.2);
}

/* =====================
   CARD DESTACADA
===================== */

.card.featured {
  grid-column: span 2;
  grid-row: span 2;
  color: var(--color-brand-dark);
  background: white;
}

/* Imagen de la card */
.card.featured img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* Contenido debajo de la imagen */
.card.featured .card-content {
  position: relative;
  bottom: auto;
  left: auto;
  width: 100%;
  background: white;
  padding: 22px 25px 25px;
}

/* Colores normales */
.card.featured h3 {
  color: var(--color-brand-dark);
}

.card.featured p {
  color: var(--color-text-soft);
}

.card.featured .card-metric {
  color: var(--color-brand);
}
.card.featured .card-overlay {
  display: none;
}
/* =====================
   IMAGEN
===================== */

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  cursor: pointer;

  transition: transform 0.45s ease, filter 0.45s ease;

  filter: saturate(0.95) contrast(1.03);
}

.card:hover img {
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.05);
}

/* =====================
   CONTENIDO NORMAL
===================== */

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;

  background: white;
}

/* TAG */

.card-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
}

/* TITULO */

.card-content h3 {
  font-size: 1rem;
  color: var(--color-brand-dark);
}

/* TEXTO */

.card-content p {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  text-align: start;
}

/* MÉTRICA */

.card-metric {
  font-size: 13px;
  font-weight: bold;
  color: var(--color-brand);
}

/* =====================
   HOVER OVERLAY
===================== */

.card-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.8),
    rgba(0,0,0,0.2)
  );

  display: flex;
  align-items: flex-end;
  z-index: 3000;
  padding: 20px;

  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card-overlay p {
  color: white;
  font-size: 14px;
  line-height: 1.5;
}

/* =====================
   EFECTO ORGÁNICO
===================== */

.card:nth-child(3n) {
  transform: translateY(10px);
}

.card:nth-child(4n) {
  transform: translateY(-10px);
}

/* =====================
   ANIMACIÓN ENTRADA
===================== */

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }



@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 992px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .card.featured {
    grid-column: span 2;
    grid-row: span 1;
  }
}

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

  .card.featured {
    grid-column: span 1;
  }
}

/* =====================
   ABOUT
===================== */

.about-section {
  padding: 90px 0;
}

.about-section.alt {
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.45),
      rgba(255,255,255,0.15)
    );
}

.about-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 50px;

  align-items: center;
}

.about-img img {
  width: 100%;

  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-soft);

  filter:
    contrast(1.04)
    saturate(0.96);

  transition:
    transform 0.4s ease,
    filter 0.4s ease;
}

.about-img img:hover {
  transform: scale(1.015);

  filter:
    contrast(1.06)
    saturate(1);
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 992px) {

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

  .card.featured {
    grid-column: span 2;
    grid-row: span 1;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }

}

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

  .card.featured {
    grid-column: span 1;
    grid-row: span 1;
  }
  .hero {
    padding: 110px 0;
  }

  .hero h2 {
    font-size: 2.3rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card img {
    height: 220px;
  }

  .about-grid {
    text-align: center;
  }

}