/* ── Cursos Especializados Online – Shared Styles ──────── */

/* ── Hero with background image ────────────────────────── */
.esp-hero {
  position: relative;
  background: url('../assets/images/reunion-de-negocios-oficina-joven-tarde-monitor-de-computadora-noche-negocios-trabajo-en-equipo-oficina-trabajando-plazo-empresario-mujer-de-negocios-scaled.jpg') center center / cover no-repeat;
  padding: 160px 24px 56px;
  text-align: center;
  color: #fff;
}
.esp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,120,145,.82) 0%, rgba(4,78,95,.88) 100%);
}
.esp-hero__inner {
  position: relative;
  z-index: 1;
}
.esp-hero h1 {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
}
.esp-hero p {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 1.15rem;
  opacity: .92;
  margin: 0;
  color: #fff;
}

/* ── Breadcrumb ────────────────────────────────────────── */
.esp-breadcrumb {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 24px 0;
  font-family: 'Lato', Arial, sans-serif;
  font-size: .85rem;
  color: #888;
}
.esp-breadcrumb a {
  color: #067891;
  text-decoration: none;
}
.esp-breadcrumb a:hover {
  text-decoration: underline;
}
.esp-breadcrumb span {
  margin: 0 6px;
  color: #bbb;
}

/* ── Sections ──────────────────────────────────────────── */
.esp-section {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px 24px 40px;
}

/* ── Section navigation cards (landing page) ───────────── */
.esp-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 1024px) {
  .esp-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.esp-nav-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
  text-decoration: none !important;
  color: inherit;
}
.esp-nav-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(6,120,145,.18);
}
.esp-nav-card__img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.esp-nav-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.esp-nav-card:hover .esp-nav-card__img {
  transform: scale(1.06);
}
.esp-nav-card__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.05) 100%);
}
.esp-nav-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  background: #067891;
  color: #fff;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}
.esp-nav-card__content {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.esp-nav-card__title {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #067891;
  margin: 0 0 10px;
}
.esp-nav-card__desc {
  font-family: 'Lato', Arial, sans-serif;
  font-size: .92rem;
  line-height: 1.6;
  color: #555;
  margin: 0 0 20px;
  flex-grow: 1;
}
.esp-nav-card__btn {
  display: inline-block;
  align-self: flex-start;
  padding: 10px 22px;
  background-color: #067891;
  color: #fff !important;
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none !important;
  border-radius: 8px;
  border: 2px solid #067891;
  transition: background-color .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease;
}
.esp-nav-card:hover .esp-nav-card__btn {
  background-color: #fff;
  color: #067891 !important;
  box-shadow: 0 6px 20px rgba(6,120,145,.3);
}

/* ── Course card grid ──────────────────────────────────── */
.esp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Course card – catalog style ───────────────────────── */
.esp-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.esp-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(6,120,145,.18);
}
.esp-card__img-wrap {
  position: relative;
  height: 170px;
  overflow: hidden;
}
.esp-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.esp-card:hover .esp-card__img {
  transform: scale(1.06);
}
.esp-card__content {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.esp-card__title {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #067891;
  margin: 0 0 10px;
  line-height: 1.35;
}
.esp-card__desc {
  font-family: 'Lato', Arial, sans-serif;
  font-size: .9rem;
  line-height: 1.6;
  color: #555;
  margin: 0 0 20px;
  flex-grow: 1;
}

/* ── CTA Button – blue ─────────────────────────────────── */
.esp-cta {
  display: inline-block;
  align-self: flex-start;
  padding: 10px 22px;
  background-color: #067891;
  color: #fff !important;
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none !important;
  border-radius: 8px;
  border: 2px solid #067891;
  transition: background-color .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease;
}
.esp-cta:hover {
  background-color: #fff;
  color: #067891 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6,120,145,.3);
}
.esp-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(6,120,145,.2);
}

/* ── Region sub-headers ────────────────────────────────── */
.esp-region-header {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #067891;
  margin: 48px 0 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #fdc437;
  display: flex;
  align-items: center;
  gap: 10px;
}
.esp-region-header:first-of-type {
  margin-top: 0;
}
.esp-region-header__icon {
  font-size: 1.2rem;
}

/* General course (before regions) */
.esp-general-course {
  margin-bottom: 48px;
}

/* ── Entrance animations ───────────────────────────────── */
.esp-card,
.esp-nav-card {
  opacity: 0;
  transform: translateY(24px);
  animation: espCardIn .55s ease forwards;
}
.esp-card:nth-child(1),
.esp-nav-card:nth-child(1) { animation-delay: .05s; }
.esp-card:nth-child(2),
.esp-nav-card:nth-child(2) { animation-delay: .12s; }
.esp-card:nth-child(3) { animation-delay: .19s; }
.esp-card:nth-child(4) { animation-delay: .26s; }
.esp-card:nth-child(5) { animation-delay: .33s; }
.esp-card:nth-child(6) { animation-delay: .40s; }
.esp-card:nth-child(7) { animation-delay: .47s; }
.esp-card:nth-child(8) { animation-delay: .54s; }
.esp-card:nth-child(9) { animation-delay: .61s; }
.esp-card:nth-child(10) { animation-delay: .68s; }

@keyframes espCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .esp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .esp-grid,
  .esp-nav-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .esp-card__img-wrap {
    height: 150px;
  }
  .esp-hero {
    padding: 130px 20px 44px;
  }
  .esp-region-header {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .esp-card,
  .esp-nav-card {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .esp-card__img,
  .esp-nav-card__img {
    transition: none;
  }
}
