/* ==========================================================================
   Secciones reutilizables (home + otras páginas)
   Usar: .sg-section (o .home-section), .section-inner, .section-title,
   .sg-hero / .home-hero, .sg-quote / .home-quote, .card, .sg-bullet-text, etc.
   ========================================================================== */

@media (max-width: 767px) {
  .section-title.somos-genios-display {
    margin-left: auto;
    margin-right: auto;
  }
  .home-cards .section-title.somos-genios-display {
    margin-left: auto;
    margin-right: auto;
  }
  .home-videos .section-title.somos-genios-display {
    max-width: 100%;
  }
  .home-videos .videos-text {
    padding-right: 30px;
    background-size: 3.25em 1.40em;
    padding-left: 3.30em;
    padding-top: 0.4em;
  }
}

/* ----- Hero (div1): reutilizable .sg-hero / .home-hero ----- */
/* Desktop: assets/desktop/div1-background-image.png 1441×774 */
.sg-hero,
.home-hero {
  position: relative;
  width: 100vw;
  max-width: none;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  left: 0;
  right: 0;
  background-color: var(--color-bg);
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  min-height: calc(100vw * 625 / 1490);
  display: flex;
  flex-direction: column;
  overflow: visible;
  box-sizing: border-box;
}

/* Móvil: MISMA imagen desktop, sin "zoom" (que se vean varios personajes) */
@media (max-width: 530px) {
  .sg-hero,
  .home-hero {
    background-size: 145% auto;
    background-position: center bottom;
    min-height: calc(100vw * 625 / 1490);
  }
}

@media (max-width: 767px) {
  h1.hero-title.somos-genios-display.somos-genios-display--primary {
    margin-top: 3rem;
  }

  .hero-text {
    margin: 0 0 5rem !important;
    font-size: var(--font-body-size) !important;
  }

  .somos-genios-btn {
    text-align: center;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: calc(var(--spacing-unit) * 3) var(--content-padding-x);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-title {
  margin: 0 0 1.5rem;
  font-weight: 300;
}

.hero-text {
  margin: 0 0 10.5rem;
  font-size: var(--font-body-size);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
}

/* Hero: 531px–1023px only (from 1024px use base / 1024px rules) */
@media (min-width: 531px) and (max-width: 1023px) {
  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    margin: 0 0 0.5rem;
    font-weight: 300;
  }

  .hero-text {
    margin: 0 0 8rem;
    font-size: var(--font-body-size);
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text);
    width: 370px;
  }

  /* Buttons 80% width, centered */
  .hero-buttons {
    align-items: center;
  }

  .hero-buttons .somos-genios-btn {
    width: 80%;
  }
}

.hero-brand {
  color: var(--color-section-orange);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.hero-buttons .somos-genios-btn {
  min-width: min(100%, 260px);
}

.hero-buttons--single .somos-genios-btn {
  min-width: min(100%, 260px);
}

@media (min-width: 768px) {
  .hero-buttons .somos-genios-btn {
    min-width: 260px;
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-title {
    margin-bottom: 1.25rem;
  }

  .hero-text {
    margin-bottom: 12rem;
  }
}

.hero-orange-bar {
  height: 80px;
  background: var(--color-section-orange);
  width: 100%;
  margin-top: auto;
}

/* ----- div2: Esto es para ti si ----- */
.home-para-ti {
  background: var(--color-section-orange);
  color: var(--color-text-on-dark);
  margin-bottom: 15px;
}

.home-para-ti .section-inner {
  padding-bottom: calc(var(--section-padding-y) + 0.1rem);
}

.home-para-ti--green {
  background: var(--color-primary);
}

@media (min-width: 1024px) {
  .home-para-ti .section-inner--split {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
    gap: 2.75rem;
  }

  .home-para-ti .section-title {
    margin-top: 0.1rem;
    margin-bottom: 0;
    line-height: 1.1;
  }
}

.para-ti-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--font-body-size);
  line-height: 1.6;
}

.para-ti-list li {
  margin-bottom: 1rem;
}

.para-ti-list li:last-child {
  margin-bottom: 0;
}

.para-ti-list strong {
  font-weight: 700;
}

.home-para-ti .para-ti-list-desktop {
  line-height: 1.25;
}

.home-para-ti .para-ti-list-desktop li {
  margin-bottom: 1.15rem;
}

@media (max-width: 767px) {
  .home-para-ti .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
  }
  .home-para-ti .para-ti-list-desktop {
    display: none;
  }
  .home-para-ti .para-ti-list-mobile {
    display: block;
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 1.5em;
    margin: 0;
    font-size: var(--font-body-size);
    line-height: 1.5;
    text-align: left;
  }
  .home-para-ti .para-ti-list-mobile li {
    margin-bottom: 1.25rem;
  }
  .home-para-ti .para-ti-list-mobile li:last-child {
    margin-bottom: 0;
  }
  .home-para-ti .para-ti-list-mobile li::marker {
    color: var(--color-primary);
    font-size: 0.9em;
  }
}

@media (min-width: 768px) {
  .home-para-ti .para-ti-list-mobile {
    display: none;
  }
}

/* ----- div4: Cards ----- */
.home-cards {
  background: var(--color-bg);
}

/* Home (front page) spacing for the cards section */
.somos-genios-front .home-cards {
  margin-bottom: 0;
}

.home-cards .section-title {
  text-align: center;
  margin-bottom: 2rem;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 0;
  padding-right: 0;
}

.home-cards-subtitle {
  margin: 0.5rem 0 1.5rem;
  text-align: left;
}

.home-feature-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.home-feature-card {
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius);
  padding: 1rem 1.45rem 1rem;
  display: grid;
  grid-template-rows: auto minmax(8.2rem, auto) minmax(10.5rem, auto) auto;
  min-height: 100%;
}

.home-feature-card__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: clamp(1.75rem, 3vw, var(--font-card-title-size));
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-text);
  text-align: center;
}

.home-feature-card__title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.home-feature-card__image {
  max-width: 220px;
  margin: 0 auto 0.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-feature-card__image img {
  width: 100%;
  height: auto;
  display: block;
}

.home-feature-card__desc {
  margin: 0;
  font-size: var(--font-body-size);
  line-height: 1.3;
  color: var(--color-text);
}

.home-feature-card__desc-link {
  color: var(--color-primary);
  text-decoration: underline;
}

.home-feature-card__actions {
  margin-top: 0;
  display: flex;
  justify-content: center;
}

.home-feature-card__actions .somos-genios-btn {
  min-width: 20rem;
  min-height: 0;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.2;
}

@media (min-width: 1024px) {
  .home-feature-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    margin-bottom: 2.25rem;
  }

  .home-feature-card {
    min-height: 700px;
    padding: 2.15rem 2rem 3.1rem;
    grid-template-rows: auto minmax(6.5rem, auto) minmax(9.2rem, auto) auto;
  }

  .home-feature-card__image {
    max-width: 235px;
    margin-top: 0;
    margin-bottom: 0.65rem;
  }

  .home-feature-card__desc {
    font-size: var(--font-body-size);
    line-height: 1.22;
  }
}

@media (max-width: 767px) {
  /* Mapa + Orientación: mismo respiro lateral que .cards-list .card y sin recorte por botón ancho fijo */
  .home-feature-card {
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
    min-width: 0;
  }

  .home-feature-card__actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .home-feature-card__actions .somos-genios-btn {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ----- div6: Membresía ----- */
.home-membresia {
  position: relative;
  background: var(--color-bg);
  color: var(--color-text);
  overflow: hidden;
  border-top: 14px solid #fff;
  border-bottom: 14px solid #fff;
}

section#home-quote-2 {
  padding: 4rem;
}

.home-membresia .section-inner--split {
  padding-top: calc(var(--spacing-unit) * 2.6);
  padding-bottom: calc(var(--spacing-unit) * 2.8);
  grid-template-columns: 1fr;
  position: relative;
  z-index: 1;
}

.membresia-background {
  display: block;
  position: absolute;
  right: 0%;
  top: 0;
  bottom: 0;
  width: min(55vw, 760px);
  background-position: right center;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

.membresia-content {
  text-align: left;
  max-width: 64%;
}

.membresia-content .section-title {
  margin-bottom: 1.75rem;
  color: var(--color-text);
}

.membresia-text {
  margin: 0 0 0.95rem;
  padding-right: 0;
  font-size: var(--font-body-size);
  line-height: 1.22;
  display: block;
  text-align: justify;
  max-width: 100ch;
}

.home-membresia .membresia-actions {
  margin-top: 2.2rem;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.membresia-content .somos-genios-btn {
  margin-top: 0;
  min-width: 410px;
}

@media (min-width: 768px) and (max-width: 1120px) {
  .membresia-background {
    right: -24%;
    width: min(62vw, 680px);
  }

  .membresia-content {
    max-width: 70%;
  }

  .membresia-content .somos-genios-btn {
    min-width: 360px;
  }
}

@media (max-width: 767px) {
  .home-membresia {
    border-top-width: 10px;
    border-bottom-width: 10px;
  }

  .home-membresia .section-inner--split {
    padding-top: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit) * 2.2);
  }

  .membresia-background {
    left: 45%;
    right: 0;
    top: 65px;
    bottom: 0;
    width: auto;
    opacity: 0.42;
  }

  .membresia-content {
    max-width: 100%;
  }

  .home-membresia .membresia-text {
    font-size: var(--font-body-size);
    line-height: 1.3;
    max-width: 29ch;
    padding-left: 2.8em;
    padding-right: 0;
    background-size: 2.7em 1.2em;
    background-position: left 0.3em;
  }

  .home-membresia .membresia-actions {
    margin-left: auto;
    margin-right: auto;
  }

  .home-membresia .membresia-content .somos-genios-btn {
    min-width: 0;
    width: 100%;
    max-width: 24rem;
  }
}

.membresia-title-mobile {
  display: none;
}

.membresia-btn-mobile {
  display: none;
}

@media (max-width: 767px) {
  .membresia-title-desktop {
    display: none;
  }

  .membresia-title-mobile {
    display: block;
  }

  .membresia-btn-desktop {
    display: none;
  }

  .membresia-btn-mobile {
    display: inline-flex;
  }
}

.membresia-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.membresia-image img {
  max-width: 280px;
  width: 100%;
  height: auto;
}

@media (max-width: 1023px) {
  .membresia-image {
    order: -1;
  }
}

/* ----- div7: Tu compañía ----- */
.home-compania {
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}

.home-compania .section-inner {
  padding-bottom: calc(var(--spacing-unit) * 10);
}

.compania-background {
  display: none;
}

/* 768px–1024px: tablet compañía background */
@media (min-width: 768px) and (max-width: 1024px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 485px;
    height: 70%;
    min-height: 220px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* Desktop: from 1025px */
@media (min-width: 1025px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 398px;
    height: 113%;
    min-height: 380px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 58% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* 1024px–1100px: compañía background */
@media (min-width: 1024px) and (max-width: 1100px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 260px;
    height: 114%;
    min-height: 380px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 75% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* 1100px–1290px: compañía background */
@media (min-width: 1100px) and (max-width: 1290px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 201px;
    height: 113%;
    min-height: 380px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 58% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* 1291px–1410px: compañía background */
@media (min-width: 1291px) and (max-width: 1410px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 240px;
    height: 113%;
    min-height: 380px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 58% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* 1411px–1525px: compañía background */
@media (min-width: 1411px) and (max-width: 1525px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 285px;
    height: 113%;
    min-height: 380px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 58% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* 1525px–1656px: compañía background */
@media (min-width: 1525px) and (max-width: 1656px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 335px;
    height: 113%;
    min-height: 380px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 58% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* 1657px–1663px: top 398 from 1025+ rule */
/* 1664px–1801px: same pattern, top +113 */
@media (min-width: 1664px) and (max-width: 1801px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 379px;
    height: 113%;
    min-height: 380px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 58% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* 1802px–1940px: compañía background */
@media (min-width: 1802px) and (max-width: 1940px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 430px;
    height: 113%;
    min-height: 427px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 68% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

/* 1941px+: compañía background */
@media (min-width: 1941px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 737px;
    height: 113%;
    min-height: 380px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 58% auto;
    z-index: 0;
    pointer-events: none;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

.compania-content {
  text-align: justify;
}

.compania-content .section-title {
  text-align: left;
}

.compania-text {
  margin: 0 0 1rem;
  font-size: var(--font-body-size);
  line-height: 1.5;
  color: var(--color-text);
  display: block;
  text-align: justify;
  max-width: 100%;
}

.compania-brand {
  color: var(--color-section-orange);
}

.compania-list {
  margin: 1rem 0;
  padding-left: 5em;
  line-height: 1.6;
  color: var(--color-text);
  list-style-type: disc;
  list-style-position: outside;
  text-align: justify;
}

.compania-list li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.compania-list li::marker {
  color: var(--color-primary);
  font-size: 1.25em;
}

.compania-list strong {
  color: var(--color-text);
}

.compania-actions {
  margin-top: 1rem;
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

@media (max-width: 767px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 665px;
    height: 40%;
    min-height: 220px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
    pointer-events: none;
  }

  /* Keep content and button above the background figures */
  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
    isolation: isolate;
  }
}

@media (min-width: 531px) and (max-width: 677px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 515px;
    height: 54%;
    min-height: 220px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
  }
}

@media (min-width: 678px) and (max-width: 768px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 410px;
    height: 70%;
    min-height: 220px;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
  }

  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 530px) {
  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 630px;
    z-index: 0;
  }
}

/* Compañía text rules: up to 768px */
@media (max-width: 768px) {
  .home-compania .section-inner--narrow {
    position: relative;
    z-index: 1;
    isolation: isolate;
    text-align: center;
  }

  .home-compania .compania-text {
    padding-right: 30px;
    background-size: 3.25em 1.40em;
    padding-left: 3.30em;
    padding-top: 0.4em;
  }

  .home-compania .compania-list {
    padding-right: 30px;
    text-align: justify;
  }

  .home-compania .compania-actions {
    margin-top: 2.5rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Title style up to 450px (same for compañía and membresía) */
@media (max-width: 450px) {
  .home-compania .section-title {
    margin-bottom: 2.75rem;
  }

  .home-membresia .membresia-content {
    text-align: left;
    width: 100%;
    max-width: 100%;
  }

  .home-membresia .membresia-content .section-title {
    margin-bottom: 1.5rem;
  }

  .compania-background {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 760px;
    z-index: 0;
  }
}

/* From 451px: desktop title style for compañía and membresía */
@media (min-width: 451px) {
  .home-compania .section-inner--narrow {
    text-align: left;
  }

  .home-compania .section-title {
    margin-bottom: 3rem;
  }

  .home-membresia .membresia-content {
    text-align: left;
  }

  .home-membresia .membresia-content .section-title {
    margin-bottom: 1.75rem;
  }
}

.compania-content .somos-genios-btn {
  margin: 1rem 0;
}

/* ----- div8: Fundación Geniotipo ----- */
.home-fundacion {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  border: 16px solid #fff;
  box-sizing: border-box;
}

.home-fundacion .section-inner--split {
  grid-template-columns: 1fr;
  max-width: 1220px;
}

.fundacion-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.fundacion-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.44);
}

.home-fundacion .section-inner {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--spacing-unit) * 4);
  padding-bottom: 6rem;
}

.fundacion-content {
  max-width: 100ch;
}

.fundacion-title {
  font-size: var(--font-display-size);
  font-weight: 600;
  letter-spacing: var(--font-display-letter-spacing);
  line-height: var(--font-display-line-height);
  color: var(--color-text-on-dark);
  margin: 0 0 1.55rem;
  text-align: left;
  max-width: 100%;
}

.fundacion-title strong {
  font-family: var(--font-body);
  font-size: var(--font-display-size);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.fundacion-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.fundacion-text {
  margin: 0 0 0.85rem;
  line-height: 1.24;
  color: var(--color-text-on-dark);
  display: block;
  text-align: justify;
  max-width: 75ch;
}

.fundacion-text.sg-bullet-text {
  padding-left: 3.9em;
  background-size: 3.5em 1.9em;
  background-repeat: no-repeat;
  background-position: left center;
  min-height: 1.6em;
}

.fundacion-actions {
  margin-top: 2.55rem;
  margin-bottom: 2rem;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.fundacion-content .somos-genios-btn {
  margin-top: 0;
  min-width: 360px;
}

@media (max-width: 767px) {
  .home-fundacion {
    min-height: 460px;
    border-width: 10px;
  }

  .fundacion-background::after {
    background: rgba(0, 0, 0, 0.5);
  }

  .fundacion-title {
    margin-bottom: 1.1rem;
    font-size: clamp(1.75rem, 8vw, var(--font-display-size));
  }

  .fundacion-text {
    font-size: var(--font-body-size);
    line-height: 1.28;
    max-width: 33ch;
  }

  .fundacion-text.sg-bullet-text {
    padding-left: 2.9em;
    background-size: 2.45em 1.25em;
  }

  .fundacion-content .somos-genios-btn {
    min-width: 0;
    width: 100%;
    max-width: 24rem;
  }

  .fundacion-title strong {
    font-size: 1em;
  }
}

/* ----- div9: Videos ----- */
.home-videos {
  background: var(--color-bg);
}

.videos-intro {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.videos-intro-image {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  min-height: 280px;
}

@media (max-width: 767px) {
  .videos-intro-image {
    min-height: 280px;
    background-size: contain;
    background-position: center center;
  }
}

@media (min-width: 768px) {
  .videos-intro {
    display: grid;
    grid-template-columns: 1fr 35%;
    align-items: start;
    min-height: 200px;
  }
  .videos-intro-image {
    background-position: right top;
    background-size: 100% auto;
    min-height: 200px;
  }
}

@media (min-width: 1024px) {
  .videos-intro {
    grid-template-columns: 1fr 32%;
    min-height: 280px;
    align-items: start;
  }
  .videos-intro-image {
    background-size: contain;
    background-position: right top;
    min-height: 360px;
  }
  .videos-intro-title {
    width: 100%;
    white-space: nowrap;
  }
  /* Desktop: text uses full column width; grid provides space for the image */
  .home-videos .videos-text {
    padding-right: 0;
    padding-left: 5em;
    background-size: 4.75em 2.75em;
    background-position: left 0.35em;
  }
}

.videos-intro-content {
  text-align: left;
}

.videos-text {
  margin: 0 0 1rem;
  padding-right: 0;
  font-size: var(--font-body-size);
  line-height: 1.5;
  color: var(--color-text);
  display: block;
  text-align: justify;
  max-width: 100%;
}

.videos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .videos-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Carrusel de vídeos (Videos Home desde LearnDash) – horizontal, uno detrás de otro */
.videos-carousel-wrapper {
  position: relative;
  margin-top: 1.5rem;
}

/* El contenedor con ancho fijo es el que hace scroll; el track solo agrupa las tarjetas */
.videos-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 3rem;
  width: calc(100% - 6rem);
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.videos-carousel::-webkit-scrollbar {
  height: 8px;
}

.videos-carousel::-webkit-scrollbar-track {
  background: var(--color-bg-alt, #f1f1f1);
  border-radius: 4px;
}

.videos-carousel::-webkit-scrollbar-thumb {
  background: var(--color-card-border, #ccc);
  border-radius: 4px;
}

.videos-carousel-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1.5rem;
  padding: 0.25rem 0;
  width: max-content;
  min-width: 100%;
}

.video-card--carousel {
  flex: 0 0 auto;
  min-width: min(280px, 85vw);
  width: min(280px, 85vw);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.video-card--carousel .video-card-title {
  display: none;
}

@media (min-width: 600px) {
  .video-card--carousel {
    min-width: min(360px, 45vw);
    width: min(360px, 45vw);
  }
}

@media (min-width: 1024px) {
  .video-card--carousel {
    min-width: 340px;
    width: 340px;
  }
}

.video-card-thumb--embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.video-card-thumb--embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.videos-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--color-card-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-body-size-small);
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.videos-carousel-btn:hover:not(:disabled),
.videos-carousel-btn:focus:not(:disabled) {
  background: var(--color-bg-alt);
  border-color: var(--color-text);
  outline: none;
}

.videos-carousel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--color-bg-alt, #f5f5f5);
  border-color: var(--color-card-border, #ddd);
  color: #999;
}

.videos-carousel-btn--prev {
  left: 0;
}

.videos-carousel-btn--next {
  right: 0;
}

.video-card {
  border: 2px solid var(--color-card-border);
  border-radius: var(--border-radius);
  padding: 1rem;
  background: var(--color-bg);
}

.video-card-title {
  margin: 0 0 0.75rem;
  font-size: var(--font-body-size-small);
  font-weight: 700;
  color: var(--color-text);
}

.video-card-thumb {
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.video-card-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

