/* Tema compartido de las landings de Pregrado Presencial: azul profundo,
   rojo vivo, hero editorial y componentes responsive comunes a los campus. */

:root {
  --bg: #001b5e;
  --accent: #ee1c25;
}

/* Respeta los saltos editoriales definidos en el título de cada campus en desktop. */
.hero-title .main-title {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  white-space: pre;
}

@media (max-width: 767px) {
  .hero-title .main-title {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
}

/* Chevron accent after the hero's bold title line, echoing "salir adelante›"
   / "te impulsa›" / "tus logros›" from the reference creatives. Scoped to
   the hero title only — .beneficios-section-title / .inscribete-title are
   letter-split and GSAP-animated by title-splitter.js, so a static ::after
   there would sit still while the rest of the word animates in. */
.hero-title .main-title::after {
  content: "\203A";
  display: inline-block;
  margin-left: 0.12em;
  color: #ee1c25;
  font-weight: 900;
}

/* Admission Date Card (Solid Cyan variant) */
.class-start-card {
  background: #00C1FF !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 12px rgba(0, 193, 255, 0.3) !important;
}

/* Top nav CTA pill */
#topNav .nav-inline-links li:last-child a.roll-link {
  background-color: #ee1c25 !important;
  box-shadow: 0 4px 12px rgba(238, 28, 37, 0.3);
}

#topNav .nav-inline-links li:last-child a.roll-link:hover {
  background-color: #be161e !important;
  box-shadow: 0 6px 16px rgba(238, 28, 37, 0.4);
}

/* Sticky nav CTA pill */
.nav-cta-pill {
  background: #ee1c25 !important;
}

.nav-cta-pill:hover {
  background-color: #be161e !important;
}

/* Burger menu button — editorial-style.css uses var(--accent-light) here
   (#0094ff, a bright cyan-blue) which reads off-brand next to the deep navy.
   --accent-light itself is left untouched because the slide-out menu panel
   (background: var(--bg)) uses it for hover-state text/dot color — overriding
   the variable globally would make that hover text invisible against the
   navy panel. Targeting .burger-btn directly avoids that. */
.burger-btn {
  background-color: #001b5e;
  border: 2px solid #ffffff;
}

/* ¿Sabías que..? section */
#custom-sabiasque {
  background: linear-gradient(
    to bottom,
    transparent 80px,
    #001b5e 80px
  ) !important;
}

@media (max-width: 767px) {
  #custom-sabiasque {
    background: linear-gradient(
      to bottom,
      transparent 60px,
      #001b5e 60px
    ) !important;
  }
}

@media (max-width: 575px) {
  #custom-sabiasque {
    background: linear-gradient(
      to bottom,
      transparent 40px,
      #001b5e 40px
    ) !important;
  }
}

.sabiasque-card {
  box-shadow: 0 15px 35px rgba(0, 27, 94, 0.15);
}

.sabiasque-title {
  color: #001b5e;
}

.sabiasque-number {
  color: #ee1c25;
}

.sabiasque-text {
  color: #001b5e !important;
}

/* ¿Sabías que..? — image-left variant (components/sabiasque-custom.php,
   this page only). Overrides the shared centered-grid card layout with a
   two-column split: image left, title + intro + 3 cards right. */
.sabiasque-split {
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.sabiasque-split-image {
  flex: 0 0 42%;
  min-height: 480px;
  position: relative;
}

.sabiasque-split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sabiasque-split-content {
  flex: 1;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

/* The shared heading-animation rule (campus.css) forces
   display:flex + flex-wrap:wrap !important on .sabiasque-title so
   multi-word titles can reflow word-by-word — on this page's narrower
   split column that wraps "¿Sabías que..?" onto two lines. Override wrap
   and centering here (flex-wrap/justify-content, not white-space, since
   the element is a flex container) and cap the font-size so the one-line
   title still fits the column at any width. */
.sabiasque-split .sabiasque-title {
  text-align: center;
  margin: 0 0 20px 0;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  font-size: clamp(32px, 3vw, 46px) !important;
}

.sabiasque-intro {
  color: #001b5e;
  font-size: 18px;
  line-height: 1.5;
  margin: 0 auto 36px auto;
  max-width: 520px;
  text-align: center;
}

.sabiasque-cards-row {
  display: flex;
  gap: 28px;
}

.sabiasque-cards-row .sabiasque-item {
  flex: 1;
  min-width: 0;
}

.sabiasque-cards-row .sabiasque-icon {
  height: 70px;
  margin-bottom: 10px;
}

.sabiasque-cards-row .sabiasque-icon img {
  height: 56px;
}

.sabiasque-cards-row .sabiasque-number {
  font-size: clamp(30px, 3vw, 40px) !important;
}

.sabiasque-split .sabiasque-source {
  text-align: center;
  margin: 24px 0 0 0;
}

@media (max-width: 991px) {
  .sabiasque-split {
    flex-direction: column;
  }
  .sabiasque-split-image {
    flex: none;
    width: 100%;
    min-height: 260px;
  }
  .sabiasque-split-content {
    padding: 40px 32px;
  }
}

@media (max-width: 575px) {
  .sabiasque-split-content {
    padding: 32px 20px;
  }
  .sabiasque-split .sabiasque-title {
    text-align: center;
  }
  .sabiasque-intro {
    text-align: center;
    max-width: none;
  }
  .sabiasque-split .sabiasque-source {
    text-align: center;
  }

  /* One card at a time on mobile — swap the 3-up row for the swiper */
  .sabiasque-cards-row {
    display: none;
  }
  .sabiasque-swiper {
    display: block;
    width: 100%;
    padding-bottom: 36px;
  }
  .sabiasque-swiper .swiper-slide {
    height: auto;
  }
  .sabiasque-swiper .sabiasque-item {
    align-items: center;
    text-align: center;
  }
  .sabiasque-pagination {
    bottom: 0;
  }
  .sabiasque-pagination .swiper-pagination-bullet {
    background: #001b5e;
    opacity: 0.25;
  }
  .sabiasque-pagination .swiper-pagination-bullet-active {
    opacity: 1;
  }
}

/* FAQ section (components/faq-custom.php, this page only) — image left,
   4-question accordion right. Sits between Logros (navy) and Footer, so it
   gets the same rounded-top overlap treatment as .logros-section /
   .editorial-footer (editorial-style.css): negative margin-top pulls it up
   over Logros, rounded top corners, z-index above Logros' (12) so it sits
   on top; the Footer (z-index 13, same convention) still overlaps its
   bottom edge correctly since it comes later in the DOM. */
#faq-seccion {
  position: relative;
  z-index: 13;
  background-color: #f4f4f2;
  margin-top: -32px;
  padding: 80px 24px 120px 24px;
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

@media (min-width: 1024px) {
  #faq-seccion {
    margin-top: -64px;
    border-top-left-radius: 64px;
    border-top-right-radius: 64px;
  }
}

.faq-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.faq-grid {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.faq-image {
  flex: 0 0 40%;
  border-radius: 32px;
  overflow: hidden;
  position: sticky;
  top: 96px;
  align-self: flex-start;
}

.faq-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 500 / 750;
  object-fit: cover;
  display: block;
}

.faq-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.faq-title {
  color: #001b5e;
  font-family: "MessinaSans Semibold", sans-serif;
  font-size: clamp(32px, 4vw, 78px);
  font-weight: 800;
  text-transform: none;
  line-height: 1.2;
  margin: 0 0 32px 0;
  text-align: left;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border-bottom: 1px solid rgba(0, 27, 94, 0.15);
  padding-bottom: 16px;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 0;
  text-align: left;
  cursor: pointer;
  color: #001b5e;
  font-family: var(--font-display), sans-serif;
  font-size: 19px;
  font-weight: 700;
}

.faq-toggle-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ee1c25;
  position: relative;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #ee1c25;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.faq-toggle-icon::before {
  width: 12px;
  height: 2px;
}

.faq-toggle-icon::after {
  width: 2px;
  height: 12px;
}

.faq-item.active .faq-toggle-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 1400px;
}

.faq-answer p {
  color: #001C63;
  font-size: 16px;
  line-height: 1.5;
  margin: 12px 0 4px 0;
  white-space: pre-line;
}

@media (max-width: 991px) {
  #faq-seccion {
    padding: 60px 24px 90px 24px;
  }
  .faq-grid {
    flex-direction: column;
    gap: 32px;
  }
  .faq-image {
    flex: none;
    width: 100%;
    min-height: 260px;
  }
}

@media (max-width: 575px) {
  #faq-seccion {
    padding: 48px 15px 70px 15px;
  }
  .faq-title {
    margin-bottom: 28px;
  }
  .faq-question {
    font-size: 16px;
  }
}

/* Beneficios Tabs section */
#beneficios-tabs-seccion {
  background-color: #001b5e;
}

.beneficios-tab-btn.active {
  color: #001b5e !important;
}

.beneficio-desc .highlight {
  color: #ffffff;
}

/* En pantallas angostas, los cuatro badges no caben en una sola fila. La
   cuadrícula 2x2 conserva el aspecto de píldora y evita cortes laterales. */
@media (max-width: 575px) {
  .beneficios-tab-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border-radius: 24px;
  }

  .beneficios-tab-btn {
    width: 100%;
    min-width: 0;
    padding: 11px 8px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.beneficio-number {
  color: #ee1c25;
}

/* Carreras section — force the Pregrado tab content to stay visible always.
   campus_build_carreras_tabs() builds 3 generic blocks (pregrado/posgrado/
   sube), toggled by the shared beneficios-carreras-tabs.js matching each
   block's id against whichever beneficios tab was clicked. This page's
   $beneficios_tabs uses aspect-based keys instead (experiencia/
   infraestructura/calidad/empleo — see data/page-content.php), so no click
   ever matches #carreras-pregrado; the shared JS strips its .active class
   and the section collapses (display:none in campus.css). This page is
   Pregrado-only, so it should never be dynamic with Beneficios — pin it
   visible regardless of that class. */
#carreras-seccion .carreras-tab-content#carreras-pregrado {
  display: block !important;
}

/* Carreras cards */
.carrera-card .card-subtitle,
.carrera-card .card-title {
  color: #001b5e;
}

.btn-descubre-mas {
  background-color: #ee1c25;
  box-shadow: 0 4px 14px rgba(238, 28, 37, 0.3);
}

.btn-descubre-mas:hover {
  background-color: #be161e;
  box-shadow: 0 6px 20px rgba(238, 28, 37, 0.45);
}

/* Carreras modal */
.carreras-modal-content {
  box-shadow: 0 24px 60px rgba(0, 27, 94, 0.25);
}

.modal-title-count {
  color: #001b5e;
}

.modal-carreras-list li {
  color: #001b5e;
}

/* Inscríbete section */
#inscribete-seccion {
  background-color: #001b5e;
}

/* Mobile: slot debajo del hero donde el script en index.php mueve la
   tarjeta del formulario (#form-section) para que se vea sin bajar
   hasta Inscríbete. Vacía en desktop (:empty) y en mobile antes de
   que el script mueva el nodo, así no deja un hueco en blanco. */
.hero-mobile-form:empty {
  display: none;
}

@media (max-width: 991px) {
  .hero-mobile-form:not(:empty) {
    display: flex;
    justify-content: center;
    padding: 32px 20px;
    background-color: #001b5e;
  }
}

/* Footer overrides */
.editorial-footer .footer-copyright-text {
  color: #001b5e !important;
}

.editorial-footer .time-label {
  color: rgba(0, 27, 94, 0.6) !important;
}

.editorial-footer .time-value {
  color: #001b5e !important;
}

.editorial-footer .time-value:hover {
  color: #ee1c25 !important;
}

.editorial-footer .scroll-top-btn {
  color: #001b5e !important;
  border: 1px solid rgba(0, 27, 94, 0.1) !important;
}

.editorial-footer .scroll-top-btn:hover {
  background-color: #001b5e !important;
}

/* Logros / Achievements section */
.logros-section {
  background-color: #001b5e !important;
}

.achievements-prev:hover,
.achievements-next:hover {
  color: #001b5e !important;
}



.achievements-slider-controls {
  padding-bottom: 30px;
}

@media (min-width: 1248px) {
  #topNav .nav-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
