/* =============================================
   ICA — Instituto de Culturas Aborígenes
   Manual de marca: colores y tipografía
   ============================================= */

:root {
  --purple: #3A003F;
  --purple-dark: #2a002e;
  --teal: #00D6A3;
  --green: #7DFF68;
  --text: #333333;
  --text-muted: #666666;
  --white: #ffffff;
  --bg: #f4f4f6;
  --bg-dots: #e8e8ec;

  --gradient-brand: linear-gradient(90deg, var(--teal) 0%, var(--green) 100%);
  --gradient-accent: linear-gradient(90deg, var(--purple) 0%, var(--teal) 100%);

  --font: 'Montserrat', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 32px rgba(58, 0, 63, 0.08);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
  --container: 1140px;
  --container-padding: clamp(1rem, 4vw, 2rem);
  --header-h: 64px;
}

/* Títulos de carreras y novedades — mayúsculas en el sitio público */
.hero-banner__title,
.news-card__title,
.news-item__title,
.career-title,
.career-detail__title {
  text-transform: uppercase;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: clip;
}

body.nav-is-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(calc(100% - 2 * var(--container-padding)), var(--container));
  margin-inline: auto;
}

/* ---- Botones ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.75rem 1.4rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: clamp(0.8125rem, 2vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--purple);
}

.btn-secondary {
  background: var(--teal);
  color: var(--white);
  width: 100%;
  margin-top: auto;
}

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0);
  background: var(--purple);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.logo {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}

.logo-img {
  display: block;
  height: clamp(32px, 8vw, 42px);
  width: auto;
  max-width: 105px;
}

.footer-brand .logo-img {
  height: clamp(16px, 4vw, 21px);
  max-width: 52px;
}

.main-nav {
  flex: 1;
  display: none;
  justify-content: center;
}

.nav-social {
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.nav-link--cta {
  background: var(--gradient-brand);
  color: var(--purple);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-link--cta:hover {
  background: var(--gradient-brand);
  opacity: 0.92;
}

.header-social {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.social-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  color: var(--white);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Menú móvil / tablet (hasta 1023px) */

#nav-open:checked ~ .main-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#nav-open:checked ~ .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#nav-open:checked ~ .nav-toggle span:nth-child(2) {
  opacity: 0;
}

#nav-open:checked ~ .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 99;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: 1rem var(--container-padding) 1.5rem;
  background: var(--purple-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.nav-list {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.nav-link {
  display: block;
  padding: 0.85rem 1rem;
  text-align: center;
  white-space: normal;
  font-size: 0.9375rem;
}

.nav-link--cta {
  margin-top: 0.35rem;
  border-radius: var(--radius-pill);
}

.header-social {
  display: none;
}

.nav-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-social .social-link {
  width: 44px;
  height: 44px;
}

/* ---- Portada ---- */

.hero {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(0.75rem, 2vw, 1.25rem);
  background: var(--bg);
}

.hero-banner {
  margin: 0;
  overflow: hidden;
  border-radius: clamp(12px, 2vw, var(--radius-lg));
  line-height: 0;
  position: relative;
}

.hero-banner--link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.hero-banner--link:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.hero-banner--link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to right,
    #fff 0% 14.2857%,
    #ffdd00 14.2857% 28.5714%,
    #f58220 28.5714% 42.8571%,
    #e31b23 42.8571% 57.1429%,
    #772d62 57.1429% 71.4286%,
    #1145a3 71.4286% 85.7143%,
    #008d36 85.7143% 100%
  );
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(58, 0, 63, 0.52);
  line-height: 1.45;
  pointer-events: none;
  text-align: center;
}

.hero-banner__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vw, 0.85rem);
  max-width: min(42rem, 100%);
}

.hero-banner__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 4.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.hero-banner__subtitle {
  margin: 0;
  color: var(--teal);
  font-size: clamp(1.05rem, 2.85vw, 1.65rem);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.news-card__body .news-subtitle,
.news-item__link .news-subtitle {
  margin: 0;
  color: var(--teal);
  font-size: clamp(0.8125rem, 1.9vw, 0.9375rem);
  font-weight: 600;
  line-height: 1.45;
}

.hero-banner__excerpt {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.8125rem, 2vw, 1rem);
  font-weight: 500;
  line-height: 1.55;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.hero-banner__read-more {
  margin: clamp(0.35rem, 1.2vw, 0.65rem) 0 0;
  color: var(--teal);
  font-size: clamp(0.9375rem, 2.2vw, 1.125rem);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  transition: color 0.2s ease;
}

/* Móvil / tablet: recorte centrado (oculta los laterales) */
.hero-banner {
  width: 100%;
  height: clamp(130px, 34vw, 200px);
}

.hero-banner--link {
  height: clamp(300px, 58vw, 380px);
}

@media (max-width: 767px) {
  .hero-banner--link {
    height: clamp(360px, 92vw, 520px);
  }
}

.hero-banner__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Escritorio: imagen completa a ancho del contenedor */
@media (min-width: 1024px) {
  .hero-banner {
    height: auto;
    aspect-ratio: 1022 / 243;
  }

  .hero-banner--link {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .hero-banner__img {
    width: 100%;
    height: auto;
  }
}

/* ---- Sección novedades ---- */

.news {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  background: var(--bg);
}

.news-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.news-card {
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(58, 0, 63, 0.06);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.news-card__media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 214, 163, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(125, 255, 104, 0.2) 0%, transparent 40%),
    linear-gradient(135deg, rgba(58, 0, 63, 0.08) 0%, rgba(58, 0, 63, 0.02) 100%);
}

.news-card__media::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

.news-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
  padding: clamp(1.25rem, 3vw, 1.5rem);
}

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.8125rem;
}

.news-card__category {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
}

.news-card__meta time {
  color: var(--text-muted);
}

.news-card__title {
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--purple);
}

.news-card__excerpt {
  margin: 0;
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.news-card__read-more,
.news-item__read-more {
  margin: 0.15rem 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--teal);
  transition: color 0.2s ease;
}

.news-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(58, 0, 63, 0.06);
  overflow: hidden;
}

.news-item {
  border-top: 1px solid rgba(58, 0, 63, 0.08);
}

.news-item:first-child {
  border-top: none;
}

.news-item__link {
  display: block;
  padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1.15rem, 3vw, 1.5rem);
  transition: background 0.2s ease;
}

.news-item__date {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
}

.news-item__title {
  margin: 0;
  font-size: clamp(0.9375rem, 2vw, 1rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--purple);
}

/* ---- Sección carreras ---- */

.careers {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2rem, 5vw, 4rem);
  background: var(--white);
}

.careers .section-header {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--purple);
}

.section-intro {
  margin: 0;
  color: var(--text-muted);
}

.section-header::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  margin: 1.25rem auto 0;
  border-radius: var(--radius-pill);
  background: var(--gradient-accent);
}

.careers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.career-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(58, 0, 63, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.career-card__ribbon {
  position: absolute;
  top: 14px;
  right: -36px;
  z-index: 2;
  width: 140px;
  padding: 0.4rem 0;
  background: linear-gradient(135deg, var(--purple) 0%, #5a1060 100%);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: rotate(45deg);
  box-shadow: 0 3px 10px rgba(58, 0, 63, 0.25);
  pointer-events: none;
}

.career-card__link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1rem 1rem 0.85rem;
  color: inherit;
  text-decoration: none;
}

.career-card__main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1;
}

.career-card__category {
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(58, 0, 63, 0.08);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--teal);
  text-align: left;
}

.career-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 9px;
  border-radius: 50%;
  background: rgba(0, 214, 163, 0.12);
}

.career-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--purple);
}

.career-card__body {
  flex: 1;
  min-width: 0;
}

.career-title {
  margin: 0 0 0.4rem;
  font-size: clamp(0.9375rem, 2vw, 1rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--purple);
  text-align: left;
}

.career-subtitle {
  margin: 0;
  font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--teal);
  text-align: left;
}

.career-icon__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.careers-empty {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}

/* ---- Ficha de carrera ---- */

.career-detail {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem);
  background: var(--white);
}

.career-detail__article {
  position: relative;
  overflow: hidden;
}

.career-detail__ribbon {
  top: 20px;
  right: -42px;
  width: 180px;
  padding: 0.5rem 0;
  font-size: 0.75rem;
}

.career-detail__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2rem;
}

.career-detail__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--purple);
  line-height: 1.25;
}

.career-detail__subtitle {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 500;
  color: var(--teal);
}

.news-detail .career-detail__subtitle {
  font-size: clamp(1.5rem, 2.75vw, 2.15rem);
  font-weight: 600;
  line-height: 1.3;
}

.career-detail__figure {
  margin: 0 auto 2rem;
  max-width: 900px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.career-detail__img {
  display: block;
  width: 100%;
  height: auto;
}

.career-detail__body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.career-detail__body h2,
.career-detail__body h3 {
  color: var(--purple);
  margin: 1.75rem 0 0.75rem;
}

.career-detail__body p {
  margin: 0 0 1rem;
}

.career-detail__body ul,
.career-detail__body ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.career-detail__body ul {
  list-style: disc;
}

.career-detail__body ol {
  list-style: decimal;
}

.career-detail__body li {
  margin-bottom: 0.35rem;
}

.career-detail__body li::marker {
  color: var(--teal);
}

.career-detail__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.career-detail__body .ica-tabla-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  -webkit-overflow-scrolling: touch;
}

.career-detail__body table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.career-detail__body table th,
.career-detail__body table td {
  border: 1px solid rgba(58, 0, 63, 0.12);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.career-detail__body table th {
  background: rgba(58, 0, 63, 0.08);
  color: var(--purple);
  font-weight: 700;
}

.career-detail__body table tr:nth-child(even) td {
  background: rgba(0, 214, 163, 0.05);
}

.career-detail__body .ica-destacado .ica-tabla-wrap {
  margin: 0.75rem 0 0;
}

.career-detail__body .ica-destacado {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 214, 163, 0.14) 0%, rgba(125, 255, 104, 0.12) 100%);
  border-left: 4px solid var(--teal);
  color: var(--purple);
  font-weight: 600;
  line-height: 1.65;
  box-shadow: 0 4px 20px rgba(58, 0, 63, 0.06);
}

.career-detail__body .ica-destacado p {
  margin: 0;
  color: var(--purple);
  font-weight: 600;
}

.career-detail__body .ica-destacado p + p {
  margin-top: 0.65rem;
}

.career-detail__body .ica-destacado ul,
.career-detail__body .ica-destacado ol {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
}

.career-detail__body .ica-destacado ul {
  list-style: disc;
}

.career-detail__body .ica-destacado ol {
  list-style: decimal;
}

.career-detail__body .ica-destacado li {
  margin-bottom: 0.35rem;
}

.career-detail__body .ica-destacado strong,
.career-detail__body .ica-destacado b {
  font-weight: 800;
  color: var(--purple);
}

.career-detail__body .ica-destacado a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--teal);
}

.career-detail__actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 5vw, 2.75rem);
  padding-top: clamp(1.5rem, 4vw, 2rem);
  border-top: 1px solid rgba(58, 0, 63, 0.08);
}

.careers-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

/* ---- Formulario inscripción / consulta ---- */

.enrollment-page {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem);
  background: var(--bg);
}

.enrollment-page__inner {
  max-width: 40rem;
}

.enrollment-page__header {
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.enrollment-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.35rem, 4vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid rgba(58, 0, 63, 0.08);
  box-shadow: var(--shadow-card);
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

.form-row--2 {
  grid-template-columns: 1fr;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field--otro {
  display: none;
}

.form-field--otro.is-visible {
  display: flex;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--purple);
}

.form-required {
  color: var(--teal);
}

.form-optional {
  font-weight: 500;
  color: #777;
}

.form-input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(58, 0, 63, 0.18);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 214, 163, 0.2);
}

.form-input--narrow {
  max-width: 14rem;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%233A003F' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.form-textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.55;
}

.form-fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

.form-fieldset .form-label {
  display: block;
  margin-bottom: 0.65rem;
}

.form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.form-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}

.form-radio input {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--teal);
}

.form-hint,
.form-notice {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.form-error {
  color: #922;
}

.form-input.is-invalid {
  border-color: rgba(192, 57, 43, 0.55);
}

.form-input.is-invalid:focus {
  border-color: rgba(192, 57, 43, 0.75);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.enrollment-form__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.enrollment-form__actions .btn-primary {
  width: 100%;
}

.enrollment-form__actions .btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.form-field--recaptcha {
  margin: 0.25rem 0 1rem;
  overflow: hidden;
}

.form-field--hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.enrollment-errors {
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
  color: #922;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.enrollment-errors ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.enrollment-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.35rem, 4vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid rgba(0, 136, 85, 0.25);
  box-shadow: var(--shadow-card);
}

.enrollment-success__title {
  margin: 0;
  font-size: 1.25rem;
  color: #065;
}

.enrollment-success p {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

.enrollment-admin-notice {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(230, 126, 34, 0.12);
  border: 1px solid rgba(230, 126, 34, 0.35);
  color: #7d4a12;
  font-size: 0.875rem;
  line-height: 1.5;
}

.enrollment-contact {
  padding: clamp(1.35rem, 4vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid rgba(58, 0, 63, 0.08);
  box-shadow: var(--shadow-card);
}

.enrollment-contact__body {
  margin-bottom: 1.5rem;
}

.enrollment-contact__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enrollment-contact__list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.enrollment-contact__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
}

.enrollment-contact__list a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}

.enrollment-contact__list a:hover {
  color: var(--green);
}

.main-nav--compact {
  margin-left: auto;
  display: flex;
  position: static;
  flex: 0 1 auto;
  flex-direction: row;
  align-items: center;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.main-nav--compact .nav-link {
  padding: 0.45rem 0.65rem;
  font-size: clamp(0.6875rem, 2.8vw, 0.8125rem);
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .main-nav--compact .nav-link {
    padding: 0.5rem 0.85rem;
    font-size: 0.8125rem;
  }
}

.site-footer--minimal {
  padding-top: 0;
}

.site-footer--minimal .footer-bottom-inner {
  padding: 1.5rem 0;
  text-align: center;
}

/* ---- Quiénes somos ---- */

.about {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem);
  background: var(--bg);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.about-col p {
  margin: 0 0 1rem;
  font-size: clamp(0.9375rem, 2vw, 1rem);
  line-height: 1.75;
  color: var(--text-muted);
}

.about-col p:last-child {
  margin-bottom: 0;
}

.about-col strong {
  color: var(--purple);
  font-weight: 700;
}

/* ---- Preguntas frecuentes ---- */

.faq-page {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem);
  background: var(--bg);
}

.faq-page__inner {
  max-width: 1100px;
}

.faq-page__header {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: clamp(0.65rem, 1.5vw, 0.85rem);
  max-width: 880px;
  margin: 0 auto;
}

.faq-item {
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid rgba(58, 0, 63, 0.08);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-item.is-open {
  border-color: rgba(0, 214, 163, 0.35);
  box-shadow: 0 8px 28px rgba(58, 0, 63, 0.08);
}

.faq-item__heading {
  margin: 0;
}

.faq-item__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1.15rem, 3vw, 1.5rem);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.faq-item__trigger:hover,
.faq-item__trigger:focus-visible {
  background: rgba(0, 214, 163, 0.06);
  outline: none;
}

.faq-item__trigger:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(0, 214, 163, 0.45);
}

.faq-item__title {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--purple);
}

.faq-item__icon {
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(-135deg);
}

.faq-item__panel {
  border-top: 1px solid rgba(58, 0, 63, 0.06);
}

.faq-item__body {
  padding: 0 clamp(1.15rem, 3vw, 1.5rem) clamp(1.15rem, 3vw, 1.5rem);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.faq-item__body > :first-child {
  margin-top: clamp(0.85rem, 2vw, 1rem);
}

.faq-item__body > :last-child {
  margin-bottom: 0;
}

.faq-empty {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}

/* ---- Página de mantenimiento ---- */

.maintenance-page .logo {
  cursor: default;
}

/* ---- Aviso mantenimiento (admin) ---- */

.maintenance-admin-ribbon {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 1500;
  width: 12rem;
  height: 12rem;
  overflow: hidden;
  pointer-events: none;
}

.maintenance-admin-ribbon__text {
  position: absolute;
  right: -3.75rem;
  bottom: 2.15rem;
  display: block;
  width: 18rem;
  padding: 0.6rem 0;
  background: #c0392b;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  transform: rotate(-45deg);
  transform-origin: center;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.28);
}

.maintenance-admin-ribbon--inscripcion {
  right: auto;
  left: 0;
}

.maintenance-admin-ribbon--inscripcion .maintenance-admin-ribbon__text {
  right: auto;
  left: -3.75rem;
  background: #d35400;
  transform: rotate(45deg);
}

.hero--maintenance {
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.hero-banner--maintenance {
  cursor: default;
}

.hero-banner--maintenance::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to right,
    #fff 0% 14.2857%,
    #ffdd00 14.2857% 28.5714%,
    #f58220 28.5714% 42.8571%,
    #e31b23 42.8571% 57.1429%,
    #772d62 57.1429% 71.4286%,
    #1145a3 71.4286% 85.7143%,
    #008d36 85.7143% 100%
  );
}

/* ---- Footer ---- */

.site-footer {
  background: var(--purple);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 clamp(1.75rem, 4vw, 2.5rem);
}

.footer-tagline {
  margin: 0.5rem 0 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 32ch;
}

.footer-heading {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.footer-links ul li,
.footer-contact ul li {
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--teal);
}

.footer-contact ul li {
  color: rgba(255, 255, 255, 0.75);
}

.footer-contact a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--teal);
}

.footer-social-links {
  display: flex;
  gap: 0.5rem;
}

.social-link--footer {
  border-color: rgba(255, 255, 255, 0.25);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom-inner {
  padding: 1.25rem 0;
}

.footer-bottom-inner p {
  margin: 0;
  font-size: clamp(0.72rem, 2.5vw, 0.8rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding-inline: 0.5rem;
}

/* ---- Responsive: tablet ---- */

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

  .news-compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-item:nth-child(odd) {
    border-right: 1px solid rgba(58, 0, 63, 0.08);
  }

  .news-item:nth-child(-n+2) {
    border-top: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Responsive: desktop ---- */

@media (min-width: 1024px) {
  :root {
    --header-h: 72px;
  }

  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .nav-link {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    text-align: left;
    white-space: nowrap;
    font-size: 0.8125rem;
  }

  .nav-link--cta {
    margin-left: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
  }

  .header-social {
    display: flex;
  }

  .nav-social {
    display: none;
  }

  .news-compact {
    grid-template-columns: repeat(4, 1fr);
  }

  .news-item {
    border-top: none;
    border-right: 1px solid rgba(58, 0, 63, 0.08);
  }

  .news-item:last-child {
    border-right: none;
  }

  .careers-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(0.85rem, 1.25vw, 1.15rem);
  }

  .career-card__link {
    padding: 0.95rem 0.85rem 0.8rem;
  }

  .career-card__main {
    gap: 0.7rem;
  }

  .career-card__category {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    font-size: 0.65rem;
  }

  .career-card__ribbon {
    top: 12px;
    right: -38px;
    width: 130px;
    font-size: 0.6rem;
  }

  .career-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
  }

  .career-title {
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 0.35rem;
  }

  .career-subtitle {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .about-content {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(2rem, 4vw, 3rem);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
    gap: 2.5rem;
  }
}

/* Hover solo en dispositivos con puntero fino */

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
  }

  .career-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(58, 0, 63, 0.12);
  }

  .news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(58, 0, 63, 0.12);
  }

  .news-item__link:hover {
    background: rgba(0, 214, 163, 0.06);
  }

  .news-card__link:hover .news-card__read-more,
  .news-item__link:hover .news-item__read-more,
  .hero-banner--link:hover .hero-banner__read-more {
    color: color-mix(in srgb, var(--teal) 72%, white);
  }
}

/* Reducir animaciones si el usuario lo prefiere */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Overlay de carga ---- */

body.ica-loading-open {
  overflow: hidden;
}

.ica-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ica-loading-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.ica-loading-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(58, 0, 63, 0.45);
  backdrop-filter: blur(2px);
}

.ica-loading-overlay__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-width: min(100%, 16rem);
  padding: 1.5rem 1.75rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(58, 0, 63, 0.22);
}

.ica-loading-overlay__spinner {
  width: 2.75rem;
  height: 2.75rem;
  border: 3px solid rgba(58, 0, 63, 0.12);
  border-top-color: #00D6A3;
  border-radius: 50%;
  animation: ica-loading-spin 0.75s linear infinite;
}

.ica-loading-overlay__text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #3A003F;
  text-align: center;
}

@keyframes ica-loading-spin {
  to { transform: rotate(360deg); }
}
