
:root {
  --green-900: #1F5F3A;
  --green-700: #2f7a4f;
  --green-500: #6FBF73;
  --bg-soft: #F5F7F6;
  --amber: #E8A317;
  --text: #26312b;
  --muted: #5f6e65;
  --white: #fff;
  --shadow: 0 14px 36px rgba(20, 57, 38, .12);
  --radius: 22px;
  --radius-sm: 16px;
  --container: min(1120px, calc(100% - 32px));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Open Sans', system-ui, sans-serif;
  color: var(--text);
  background: #fff;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
.container { width: var(--container); margin: 0 auto; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-700);
  font-size: .82rem;
}
h1, h2, h3, .brand span, .stat-card strong { font-family: 'Poppins', sans-serif; }
h1 { font-size: clamp(2.2rem, 5vw, 4.3rem); line-height: 1.05; margin: 0 0 18px; }
h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.1; margin: 0; }
h3 { margin: 0 0 10px; }
p { line-height: 1.75; color: var(--muted); }
.topbar { background: var(--green-900); color: #edf6ef; font-size: .92rem; }
.topbar__inner { display: flex; justify-content: center; gap: 28px; padding: 10px 0; flex-wrap: wrap; }
.navbar {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31,95,58,.08);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; min-height: 82px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img, .footer__logo { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; border: 2px solid rgba(31,95,58,.12); }
.brand span { font-weight: 800; font-size: 1.2rem; color: var(--green-900); }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--text); font-weight: 600; }
.nav-toggle { display:none; width:48px; height:48px; border:0; background:var(--bg-soft); border-radius:12px; padding:10px; }
.nav-toggle span { display:block; height:2px; background:var(--green-900); margin:6px 0; border-radius:99px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-weight: 700; transition: .25s ease;
}
.btn--primary { background: var(--green-900); color: white; }
.btn--primary:hover { transform: translateY(-2px); background: var(--green-700); }
.btn--accent { background: var(--amber); color: #1f1d17; }
.btn--accent:hover { transform: translateY(-2px); filter: brightness(1.03); }
.btn--ghost { border: 1px solid rgba(255,255,255,.22); color: #fff; background: rgba(255,255,255,.08); }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.hero { position: relative; min-height: 88vh; display: grid; align-items: center; overflow: hidden; }
.hero__bg {
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(12,27,20,.78) 0%, rgba(17,35,25,.68) 42%, rgba(24,46,34,.26) 100%),
    url('assets/img/banner/BANNER.png') center/cover no-repeat;
  transform: scale(1.03);
}
.hero__content { position: relative; z-index: 1; width: var(--container); display:grid; place-items:center; text-align:center; }
.hero__text { max-width: 820px; color: #fff; padding: 80px 0; margin-inline:auto; text-align:center; }
.hero__text p { color: rgba(255,255,255,.9); }
.hero__lead { font-size: 1.07rem; max-width: 640px; }
.hero__actions { display:flex; gap:16px; flex-wrap:wrap; margin-top: 28px; justify-content:center; }
.hero__badges { display:flex; gap:12px; flex-wrap:wrap; margin-top:28px; justify-content:center; }
.hero__badges span {
  background: rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15); color:#fff;
  padding: 10px 14px; border-radius:999px; font-size:.92rem;
}
.stats__grid, .benefits-grid, .courses-grid, .gallery-grid, .reviews-grid, .areas-grid, .contact-cards {
  display:grid; gap:24px;
}
.stats__grid { grid-template-columns: repeat(3, minmax(220px, 280px)); justify-content:center; margin-top: -72px; position:relative; z-index:2; }
.stat-card {
  background:#fff; padding:28px; border-radius: var(--radius-sm); box-shadow: var(--shadow); text-align:center;
}
.stat-card strong { display:block; font-size:2.5rem; color: var(--green-900); }
.stat-card span { color: var(--muted); font-weight:600; }
.about { display:grid; grid-template-columns: 1.25fr .85fr; gap:30px; align-items:start; }
.about__panel { background:#fff; padding:30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.about__panel ul { padding-left: 20px; margin: 0; color: var(--muted); }
.about__panel li { margin: 10px 0; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom: 34px; }
.section-head.center { text-align:center; align-items:center; justify-content:center; flex-direction:column; }
.areas-grid { grid-template-columns: repeat(3, 1fr); }
.area-card {
  position:relative; min-height: 330px; border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow); cursor:pointer;
  isolation:isolate; background:#ddd;
}
.area-card img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.area-card::after {
  content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(15,32,23,.05), rgba(15,32,23,.72));
}
.area-card__body { position:absolute; inset:auto 22px 22px 22px; z-index:2; color:#fff; }
.area-card__body p { color: rgba(255,255,255,.88); margin: 8px 0 0; font-size:.95rem; line-height:1.6; }
.area-card:hover { transform: translateY(-4px); transition:.25s ease; }
.area-card.is-active { outline: 3px solid var(--amber); }
.benefits-grid { grid-template-columns: repeat(3, 1fr); }
.benefit-card {
  background:#fff; border-radius: var(--radius-sm); padding:26px; box-shadow: var(--shadow);
}
.benefit-card span { font-size: 2rem; display:block; margin-bottom: 12px; }
.course-toolbar { display:flex; flex-wrap:wrap; gap:10px; }
.filter-chip {
  border:1px solid rgba(31,95,58,.15); background:#fff; padding:10px 14px; border-radius:999px; cursor:pointer; font-weight:700;
}
.filter-chip.is-active { background: var(--green-900); color:#fff; border-color: var(--green-900); }
.courses-grid { grid-template-columns: repeat(3, 1fr); }
.course-card {
  background:#fff; border-radius: var(--radius-sm); overflow:hidden; box-shadow: var(--shadow); display:flex; flex-direction:column;
}
.course-card__image { position:relative; aspect-ratio: 1 / 1; overflow:hidden; }
.course-card__image img { width:100%; height:100%; object-fit:cover; transition: transform .35s ease; }
.course-card:hover .course-card__image img { transform: scale(1.04); }
.course-card__body { padding: 20px; display:flex; flex-direction:column; gap:12px; flex:1; }
.course-card__meta { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.badge {
  display:inline-flex; padding:7px 10px; border-radius:999px; background: rgba(31,95,58,.08); color: var(--green-900); font-size:.82rem; font-weight:700;
}
.course-card h3 { font-size:1.1rem; }
.course-card p { margin:0; }
.course-card__actions { margin-top:auto; display:flex; gap:12px; flex-wrap:wrap; }
.link-button {
  border:0; background:transparent; padding:0; color: var(--green-900); font-weight:800; cursor:pointer;
}
.faq-wrap { max-width: 980px; }
.faq-list { display:grid; gap:14px; }
.faq-list details { background:#fff; border-radius: 18px; padding: 22px 22px; box-shadow: var(--shadow); }
.faq-list summary { cursor:pointer; font-weight:700; color: var(--green-900); }
.contact-box {
  background: linear-gradient(135deg, var(--green-900), #163d29); color:#fff; border-radius: 28px; padding: 42px; display:grid; grid-template-columns: 1fr .9fr; gap:24px;
}
.contact-box p { color: rgba(255,255,255,.88); }
.contact-cards { grid-template-columns: repeat(3, 1fr); }
.contact-cards a {
  background: rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.14); padding:22px; border-radius:18px; color:#fff;
}
.footer { background:#0f2418; color:#d9e5dd; padding: 54px 0; }
.footer__inner { display:grid; grid-template-columns: 1.15fr .7fr .7fr; gap:26px; }
.footer h3 { color:#fff; }
.footer a { display:block; margin: 10px 0; color:#d9e5dd; }
.floating-whatsapp, #backToTop {
  position: fixed; right: 20px; width: 54px; height: 54px; border-radius: 50%; display:grid; place-items:center;
  color:#fff; box-shadow: var(--shadow); z-index: 70; transition: .25s ease;
}
.floating-whatsapp { bottom: 90px; background:#25D366; font-size: 1.5rem; }
#backToTop { bottom: 24px; border:0; background: var(--green-900); font-size: 1.35rem; cursor:pointer; opacity:0; visibility:hidden; }
#backToTop.is-visible { opacity:1; visibility:visible; }
.modal { position:fixed; inset:0; z-index:100; display:none; }
.modal.is-open { display:block; }
.modal__overlay { position:absolute; inset:0; background: rgba(0,0,0,.6); }
.modal__dialog {
  position:relative; z-index:1; width:min(920px, calc(100% - 24px)); max-height: calc(100vh - 32px); overflow:auto;
  margin: 16px auto; background:#fff; border-radius: 24px; box-shadow: var(--shadow);
}
.modal__close { position: sticky; top: 16px; margin-left:auto; right:16px; display:block; border:0; background:#fff; width:42px; height:42px; border-radius:50%; font-size:1.8rem; cursor:pointer; box-shadow: var(--shadow); }
.modal__content { padding: 0 26px 32px; }
.modal__hero { display:grid; grid-template-columns: .95fr 1.05fr; gap:24px; align-items:start; }
.modal__hero img { width:100%; border-radius: 20px; object-fit:cover; }
.modal__list { padding-left:18px; color:var(--muted); }
@media (max-width: 1080px) {
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid, .contact-cards, .stats__grid, .footer__inner, .about, .contact-box, .modal__hero { grid-template-columns: 1fr; }
  .stats__grid { margin-top: 0; }
}
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .nav-toggle { display:block; }
  .nav-links {
    position:absolute; left:16px; right:16px; top: calc(100% + 8px); background:#fff; border-radius: 20px; box-shadow: var(--shadow);
    flex-direction:column; align-items:flex-start; padding:18px; display:none;
  }
  .nav-links.is-open { display:flex; }
  .nav-cta { width:100%; }
  .section-head { flex-direction:column; align-items:flex-start; }
  .hero { min-height: 78vh; }
  .hero__text { padding: 72px 0; }
  .topbar__inner { justify-content:flex-start; gap:10px 18px; }
  .floating-whatsapp { bottom: 88px; }
}


/* Ajustes premium de centrado y visualización */
.topbar__inner,
.brand,
.section-heading,
.hero__content,
.hero__text,
.stat-card,
.area-card__content,
.course-card__body,
.benefit-card,
.gallery-tabs,
.contact-box,
.footer__inner,
.info-card,
.modal__content {
  text-align: center;
}

.topbar__inner,
.footer__inner,
.contact-box,
.split,
.hero__content {
  justify-items: center;
}

.hero__content {
  display: grid;
  place-items: center;
}

.hero__text {
  margin-inline: auto;
  max-width: 860px;
}

.hero__actions,
.course-card__actions,
.filters,
.contact-list,
.check-list {
  justify-content: center;
}

.section-heading {
  max-width: 840px;
  margin-inline: auto;
}

.section-heading--between {
  align-items: center;
}

.split,
.contact-box {
  align-items: center;
}

.info-card,
.stat-card,
.benefit-card,
.course-card__body {
  align-items: center;
}

.area-card__content,
.course-card__body,
.benefit-card,
.stat-card {
  display: flex;
  flex-direction: column;
}

.area-card__content p,
.course-card__body p,
.benefit-card p,
.info-card p,
.contact-box p,
.split p,
.faq-list p {
  margin-inline: auto;
  max-width: 72ch;
}

.area-card {
  min-height: 320px;
}

.course-card__media {
  aspect-ratio: 1 / 1;
}

.course-card__media img,
.gallery-item img,
.area-card img {
  object-position: center;
}

.gallery-item {
  aspect-ratio: 1 / 1;
}

.footer__inner > div,
.info-card ul,
.footer ul,
.contact-list,
.check-list {
  text-align: center;
  padding-left: 0;
  list-style-position: inside;
}

.modal-grid {
  align-items: center;
}

.modal-grid > div:last-child {
  text-align: center;
}

@media (max-width: 820px) {
  .section-heading--between { align-items: center; }
  .nav-links { text-align: center; }
}

@media (max-width: 640px) {
  .hero__text h1 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn,
  .course-card__actions .btn {
    width: 100%;
  }
  .course-card__actions {
    flex-direction: column;
    width: 100%;
  }
  .area-card { min-height: 270px; }
}


.section-head, .section-head.center { align-items:center; }
.section-head { text-align:center; }
.section-head > div, .about > div, .contact-box > div { margin-inline:auto; }
.stats__grid .stat-card { width:100%; }
.gallery-grid img, .reviews-grid img, .course-card__image img, .area-card img { object-position:center; }
@media (max-width: 768px) { .stats__grid { grid-template-columns: 1fr; justify-content:stretch; } .stat-card{max-width:none;} }


/* ===== CENTRADO SOLO PARA ESTADISTICAS ===== */
.stats{
display:flex;
justify-content:center;
align-items:center;
gap:30px;
flex-wrap:wrap;
max-width:1100px;
margin:60px auto;
}

.stat-card{
text-align:center;
}

@media (max-width:768px){

.stats{
flex-direction:column;
align-items:center;
}

.stat-card{
width:90%;
}

}


/* ===== Mejoras 2026 ===== */
body.is-locked { overflow: hidden; }
.stats { display: block; max-width: none; margin: 0; }
.stats__grid { display:grid; grid-template-columns: repeat(3, minmax(220px, 280px)); justify-content:center; margin-top:-72px; position:relative; z-index:2; gap:24px; }
.section-copy { max-width: 58ch; color: var(--muted); margin-top: 10px; }
.courses-controls { display:flex; flex-direction:column; align-items:flex-end; gap:14px; max-width: 620px; }
.search-box {
  width: min(360px, 100%);
  display:flex; align-items:center; gap:10px;
  padding: 0 16px; height: 52px;
  background:#fff; border-radius: 999px;
  border:1px solid rgba(31,95,58,.14); box-shadow: var(--shadow);
}
.search-box input {
  width:100%; border:0; outline:0; background:transparent;
  font: inherit; color: var(--text);
}
.search-box span { font-size: 1rem; }
.courses-count { margin: 0; color: var(--muted); font-weight: 700; }
.course-toolbar { justify-content:flex-end; }
.badge--soft { background: rgba(201, 159, 74, .14); color: #835b0d; }
.course-card { transition: transform .25s ease, box-shadow .25s ease; }
.course-card:hover { transform: translateY(-6px); }
.course-card__meta { align-items:flex-start; flex-wrap:wrap; }
.course-card h3 { min-height: 56px; }
.link-button { font-size: .98rem; }
.link-button:hover { color: var(--green-700); }
.empty-state {
  grid-column: 1 / -1;
  background:#fff; padding: 40px 28px; border-radius: 24px;
  text-align:center; box-shadow: var(--shadow);
}
.empty-state p { max-width: 56ch; margin: 0 auto 20px; }
.media-card {
  padding:0; border:0; background:transparent; cursor:pointer;
  border-radius: 18px; overflow:hidden; box-shadow: var(--shadow);
}
.media-card img {
  width:100%; display:block; transition: transform .3s ease;
}
.media-card:hover img { transform: scale(1.03); }
.lightbox {
  position: fixed; inset: 0; background: rgba(9, 14, 11, .92); z-index: 120;
  display:none; align-items:center; justify-content:center; padding: 24px;
}
.lightbox.is-open { display:flex; }
.lightbox__figure { margin: 0; max-width: min(92vw, 980px); text-align:center; }
.lightbox__figure img {
  max-width: 100%; max-height: 78vh; border-radius: 24px; box-shadow: var(--shadow);
}
.lightbox__figure figcaption {
  margin-top: 16px; color: rgba(255,255,255,.88); font-weight: 600;
}
.lightbox__close,
.lightbox__nav {
  position:absolute; border:0; cursor:pointer; color:#fff; background: rgba(255,255,255,.12);
  width: 52px; height: 52px; border-radius: 50%; display:grid; place-items:center;
  backdrop-filter: blur(6px);
}
.lightbox__close { top: 20px; right: 20px; font-size: 2rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 2.2rem; }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }
.modal__badges { display:flex; flex-wrap:wrap; gap:10px; }
.modal__cta { margin-top: 22px; }
.modal__dialog { overscroll-behavior: contain; }
.modal__hero > div { padding-bottom: 4px; }
@media (max-width: 1080px) {
  .courses-controls { align-items:flex-start; max-width:none; width:100%; }
  .course-toolbar { justify-content:flex-start; }
}
@media (max-width: 768px) {
  .stats__grid { grid-template-columns: 1fr; margin-top:0; }
  .search-box { width:100%; }
  .courses-controls { width:100%; }
  .course-toolbar { width:100%; overflow:auto; padding-bottom:4px; }
  .filter-chip { white-space: nowrap; }
  .course-card h3 { min-height: auto; }
  .modal__content { padding: 0 18px 24px; }
  .modal__dialog { width:min(100% - 16px, 920px); max-height: calc(100vh - 16px); margin: 8px auto; }
  .lightbox { padding: 18px 12px; }
  .lightbox__nav { width: 46px; height: 46px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
}


/* Banner actualizado */
.hero__bg { background-position: center center; }


/* ===== Ajustes finales marzo 2026 ===== */
.about__panel ul {
  list-style: none;
  padding-left: 0;
}
.about__panel li {
  position: relative;
  padding-left: 0;
}
#cursos .section-head {
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}
#cursos .section-head > div {
  max-width: 760px;
  margin-inline: auto;
}
#cursos .section-copy {
  margin-inline: auto;
}
.courses-controls {
  align-items: center;
}
.course-toolbar,
.courses-count {
  justify-content: center;
  text-align: center;
}

/* Reseñas en carrusel horizontal */
#resenas .container {
  overflow: hidden;
}
.reviews-grid {
  display: flex !important;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 12px max(8px, calc((100% - 980px) / 2));
  align-items: center;
  cursor: grab;
}
.reviews-grid::-webkit-scrollbar {
  display: none;
}
.reviews-grid .media-card {
  flex: 0 0 clamp(220px, 24vw, 320px);
  border-radius: 22px;
  overflow: hidden;
  background: #11161a;
  box-shadow: 0 18px 34px rgba(15, 27, 23, .14);
}
.reviews-grid .media-card.is-clone {
  pointer-events: none;
}
.reviews-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  background: #11161a;
}

@media (max-width: 900px) {
  .reviews-grid {
    gap: 16px;
    padding-inline: 16px;
  }
  .reviews-grid .media-card {
    flex-basis: min(78vw, 300px);
  }
}

/* Banner más centrado en móvil */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
  }
  .hero__content {
    min-height: 72vh;
    display: grid;
    place-items: center;
  }
  .hero__text {
    width: 100%;
    max-width: 640px;
    padding: 92px 0 56px;
  }
  .hero__bg {
    background-position: center center;
    transform: none;
  }
}


/* Carruseles automáticos de galería y reseñas */
.gallery-grid,
.reviews-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: stretch;
  padding: 8px 4px 10px;
}

.gallery-grid::-webkit-scrollbar,
.reviews-grid::-webkit-scrollbar {
  display: none;
}

.gallery-grid .media-card,
.reviews-grid .media-card {
  flex: 0 0 calc(25% - 18px);
  min-width: 240px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.gallery-grid .media-card img,
.reviews-grid .media-card img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.gallery-grid .media-card img {
  aspect-ratio: 1 / 1;
}

.reviews-grid .media-card {
  flex-basis: calc(33.333% - 16px);
  min-width: 260px;
}

.reviews-grid .media-card img {
  aspect-ratio: 4 / 3;
  background: #fff;
}

@media (max-width: 1080px) {
  .gallery-grid .media-card { flex-basis: calc(33.333% - 16px); }
  .reviews-grid .media-card { flex-basis: calc(50% - 12px); }
}

@media (max-width: 768px) {
  .gallery-grid,
  .reviews-grid {
    gap: 18px;
    padding-inline: 2px;
  }

  .gallery-grid .media-card,
  .reviews-grid .media-card {
    flex-basis: calc(100% - 12px);
    min-width: min(86vw, 340px);
  }
}


/* Ajuste final: reseñas centradas y visibles */
#resenas .container {
  overflow: hidden;
}

#resenas .section-head.center {
  text-align: center;
  align-items: center;
  justify-content: center;
}

.reviews-grid {
  display: flex !important;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 14px max(20px, calc((100% - 960px) / 2)) 10px;
}

.reviews-grid::-webkit-scrollbar {
  display: none;
}

.reviews-grid .media-card {
  flex: 0 0 clamp(240px, 26vw, 300px) !important;
  min-width: unset !important;
  border: 0;
  background: #11161a;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(15, 27, 23, .14);
}

.reviews-grid .media-card img {
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  display: block;
  object-fit: contain !important;
  object-position: center;
  background: #11161a;
}

@media (max-width: 900px) {
  .reviews-grid {
    gap: 18px;
    padding-inline: 16px;
  }

  .reviews-grid .media-card {
    flex-basis: min(74vw, 290px) !important;
  }
}

@media (max-width: 768px) {
  .reviews-grid {
    justify-content: flex-start;
    padding-inline: 14px;
  }

  .reviews-grid .media-card {
    flex-basis: min(82vw, 280px) !important;
  }
}


/* ===== Override final: cursos y empresas ordenados ===== */
:root {
  --card-width-course: 320px;
  --card-width-gallery: 250px;
  --card-width-review: 280px;
  --card-width-company: 220px;
}

#cursos .section-head,
#galeria .section-head,
#resenas .section-head,
#empresas .section-head { text-align:center; }

.carousel-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.carousel-arrow {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--green-900);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.courses-grid,
.gallery-grid,
.reviews-grid,
.companies-grid {
  display: flex !important;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 6px 14px;
  width: 100%;
  align-items: stretch;
}
.courses-grid::-webkit-scrollbar,
.gallery-grid::-webkit-scrollbar,
.reviews-grid::-webkit-scrollbar,
.companies-grid::-webkit-scrollbar { display: none; }

.course-card--carousel {
  flex: 0 0 var(--card-width-course);
  max-width: var(--card-width-course);
  min-height: 100%;
  border-radius: 26px;
}
.course-card--carousel .course-card__image { aspect-ratio: 1 / 1; }
.course-card--carousel .course-card__body {
  text-align: left;
  align-items: flex-start;
  padding: 22px;
}
.course-card--carousel h3 {
  min-height: 84px;
  margin-bottom: 4px;
}
.course-card--carousel p {
  max-width: none;
  color: var(--muted);
}
.course-card--carousel .course-card__actions {
  width: 100%;
  justify-content: space-between;
  align-items: center;
}
.course-card--carousel .btn { padding-inline: 24px; }

.gallery-grid .media-card {
  flex: 0 0 var(--card-width-gallery);
  border-radius: 22px;
}
.gallery-grid .media-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.reviews-grid .media-card {
  flex: 0 0 var(--card-width-review) !important;
  background: #11161a;
  border-radius: 22px;
}
.reviews-grid .media-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain !important;
  object-position: center;
  background: #11161a;
}

.companies-grid { align-items: center; }
.media-card--logo {
  flex: 0 0 var(--card-width-company);
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 22px;
  min-height: 148px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.media-card--logo img {
  max-width: 100%;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

#empresas .container,
#galeria .container,
#resenas .container,
#cursos .container { overflow: hidden; }

@media (max-width: 1080px) {
  :root {
    --card-width-course: 300px;
    --card-width-gallery: 220px;
    --card-width-review: 260px;
    --card-width-company: 210px;
  }
}

@media (max-width: 768px) {
  .carousel-shell { gap: 8px; }
  .carousel-arrow { display:none; }
  :root {
    --card-width-course: 84vw;
    --card-width-gallery: 74vw;
    --card-width-review: 78vw;
    --card-width-company: 64vw;
  }
  .course-card--carousel .course-card__body {
    text-align: center;
    align-items: center;
  }
  .course-card--carousel h3,
  .course-card--carousel p { text-align: center; }
  .course-card--carousel .course-card__actions {
    justify-content: center;
    flex-direction: column;
  }
  .media-card--logo { min-height: 128px; }
  .media-card--logo img { max-height: 72px; }
}


/* ============================================
   CARRUSEL AUTOMÁTICO EMPRESAS — CSS PURO
   Compatible con GitHub Pages, sin JS
   ============================================ */

.companies-marquee-wrap {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

/* Anular todos los estilos heredados del .companies-grid original */
.companies-marquee-track {
  display: block !important;
  overflow: visible !important;
  padding: 0 !important;
  gap: 0 !important;
  width: 100% !important;
  scroll-behavior: auto !important;
}

/* La banda animada — SIEMPRE horizontal */
.companies-band {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 24px;
  width: max-content;
  align-items: center;
  padding: 14px 0;
  animation: companies-scroll 22s linear infinite;
  will-change: transform;
}

@keyframes companies-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .companies-band { animation: none; }
}

.company-logo {
  flex: 0 0 auto;
  width: 170px;
  height: 96px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(20,57,38,.09);
  border: 1px solid rgba(31,95,58,.07);
  display: grid;
  place-items: center;
  padding: 14px 18px;
}

.company-logo img {
  max-width: 100%;
  max-height: 58px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
}

.company-logo img {
  max-width: 100%;
  max-height: 58px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ============================================
   FOOTER — BARRA LEGAL
   ============================================ */

.footer__legal {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .88rem;
  color: #8fa896;
}

.footer__legal p {
  margin: 0;
  color: #8fa896;
  line-height: 1;
}

.footer__legal-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__legal-links a {
  color: #8fa896;
  text-decoration: none;
  transition: color .2s;
  margin: 0;
}

.footer__legal-links a:hover {
  color: #fff;
}

.footer__legal-links span {
  color: #4d6155;
}

@media (max-width: 600px) {
  .footer__legal {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}


/* ============================================


/* ============================================
   MÓVIL ≤768px — ÁREAS: imagen arriba + texto abajo
   ============================================ */

@media (max-width: 768px) {

  /* Tarjeta: de overlay a flex columna */
  .area-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: unset !important;
    height: auto !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  /* Imagen: sacarla del absolute, altura fija arriba */
  .area-card img {
    position: relative !important;
    inset: unset !important;
    width: 100% !important;
    height: 130px !important;
    flex-shrink: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  /* Quitar el gradiente oscuro */
  .area-card::after {
    display: none !important;
  }

  /* Cuerpo: de absolute a estático, fondo blanco */
  .area-card__body {
    position: relative !important;
    inset: unset !important;
    padding: 10px 12px 14px !important;
    background: #fff !important;
    z-index: 1 !important;
  }

  .area-card__body h3 {
    font-size: .85rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #1a2a1e !important;
    margin: 0 0 4px !important;
  }

  .area-card__body p {
    font-size: .76rem !important;
    line-height: 1.4 !important;
    color: #555 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}
