/* ===================================================
   VARIABLES
   =================================================== */
:root {
  --bg-color: #f4f2ee;
  --text-color: #1a1a18;
  --text-muted: #6b6a66;
  --accent: #c8f135;
  --accent-dark: #9bbf1a;

  --font-main: 'Inter', system-ui, sans-serif;
  --font-title: 'Poppins', system-ui, sans-serif;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.1);

  --radius-card: 20px;
  --transition: 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===================================================
   BASE
   =================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
}

/* ===================================================
   HEADER
   =================================================== */
.site-header {
  padding: 4rem 2rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.header-tag {
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-title {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-color);
  margin: 0;
}

.header-title em {
  font-style: normal;
  color: var(--text-muted);
  font-weight: 800;
}

.header-sub {
  font-size: 0.8rem;
  font-family: var(--font-main);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin: 0.4rem 0 0;
}

.header-line {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-color), transparent);
  margin-top: 2rem;
  opacity: 0.15;
}

/* ===================================================
   MAIN GRID
   =================================================== */
.main-grid {
  padding-bottom: 4rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* ===================================================
   CARDS
   =================================================== */
.card-ejercicio {
  position: relative;
  border-radius: var(--radius-card);
  min-height: 520px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
  display: flex;
  align-items: flex-end;
}

.card-ejercicio:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-hover);
}

/* Background image */
.card-ejercicio__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--transition);
}

.card-ejercicio:hover .card-ejercicio__bg {
  transform: scale(1.06);
}

/* Overlays */
.card-ejercicio__overlay {
  position: absolute;
  inset: 0;
  transition: opacity var(--transition);
}

.card-ejercicio__overlay--dark {
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.card-ejercicio__overlay--light {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.78) 100%);
}

/* Body */
.card-ejercicio__body {
  position: relative;
  z-index: 2;
  padding: 2rem 2rem 2.2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Badge / número */
.card-ejercicio__badge {
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  padding: 0.2em 0.7em;
  border-radius: 100px;
  width: fit-content;
  margin-bottom: 0.4rem;
}

.card-ejercicio__badge--dark {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-color);
  border-color: rgba(0, 0, 0, 0.2);
}

/* Títulos */
.card-ejercicio__title {
  font-family: var(--font-main);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1.05;
  margin: 0;
}

.card-ejercicio__title--dark {
  color: var(--text-color);
}

/* Descripción */
.card-ejercicio__desc {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.5;
}

.card-ejercicio__desc--dark {
  color: var(--text-muted);
}

/* Botón */
.card-ejercicio__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.6em 1.2em;
  border-radius: 100px;
  margin-top: 0.8rem;
  width: fit-content;
  transition:
    gap 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.card-ejercicio__btn--light {
  background: var(--accent);
  color: #1a1a18;
  border: none;
}

.card-ejercicio__btn--dark {
  background: var(--text-color);
  color: #f4f2ee;
}

.card-ejercicio__btn:hover {
  gap: 0.85rem;
}

.card-ejercicio__btn--light:hover {
  background: var(--accent-dark);
  color: #fff;
}

.card-ejercicio__btn--dark:hover {
  background: #333;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 768px) {
  .site-header {
    padding: 2.5rem 1.25rem 1.5rem;
  }

  .card-ejercicio {
    min-height: 380px;
  }

  .card-ejercicio__body {
    padding: 1.5rem 1.5rem 1.8rem;
  }
}
