/* ============================================================
   ITT — Instituto Tecnológico de Tlaxcala
   base.css — tokens, reset y componentes compartidos
   ittlax.mx · v1.0
   ============================================================ */

/* ── Tokens de diseño ─────────────────────────────────────── */
:root {
  /* Paleta institucional */
  --itt-navy:         #23305b;
  --itt-navy-deep:    #161e3a;
  --itt-navy-mid:     #2a3a6e;
  --itt-navy-light:   #e8eaf2;
  --itt-lavender:     #b7b5cd;
  --itt-orange:       #e07820;
  --itt-orange-hover: #c56a18;
  --itt-orange-light: #fdf0e4;
  --itt-green:        #2e9e63;
  --itt-green-hover:  #237a4c;
  --itt-green-light:  #eef6f1;
  --itt-green-dark:   #0f5b32;

  /* Semánticos */
  --color-danger:     #d94040;
  --color-danger-bg:  #fdf0f0;
  --color-warning:    #c47f00;
  --color-warning-bg: #fdf6e4;
  --color-success:    #2e9e63;
  --color-success-bg: #eef6f1;

  /* Neutros UI */
  --bg:       #f4f5f8;
  --surface:  #ffffff;
  --surface2: #f0f1f5;
  --tx:       #1d1d1b;
  --tx2:      #5a5a6a;
  --tx3:      #9999aa;
  --border:   #e2e2ea;

  /* Tipografía */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Espaciado */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

  /* Transiciones */
  --transition: 150ms ease;
}

/* ── Dark mode ────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0f1117;
    --surface:  #1a1d27;
    --surface2: #22263a;
    --tx:       #e8eaf2;
    --tx2:      #9999aa;
    --tx3:      #5a5a6a;
    --border:   #2a2e42;
    --itt-navy-light: #1e2340;
    --itt-orange-light: #2a1c0a;
    --itt-green-light:  #0d1f16;
  }
}

/* Dark mode explícito (toggle JS) */
[data-theme="dark"] {
  --bg:       #0f1117;
  --surface:  #1a1d27;
  --surface2: #22263a;
  --tx:       #e8eaf2;
  --tx2:      #9999aa;
  --tx3:      #5a5a6a;
  --border:   #2a2e42;
  --itt-navy-light: #1e2340;
  --itt-orange-light: #2a1c0a;
  --itt-green-light:  #0d1f16;
}

[data-theme="light"] {
  --bg:       #f4f5f8;
  --surface:  #ffffff;
  --surface2: #f0f1f5;
  --tx:       #1d1d1b;
  --tx2:      #5a5a6a;
  --tx3:      #9999aa;
  --border:   #e2e2ea;
  --itt-navy-light: #e8eaf2;
  --itt-orange-light: #fdf0e4;
  --itt-green-light:  #eef6f1;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--tx);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }
ul, ol { list-style: none; }

/* ── Tipografía ───────────────────────────────────────────── */
h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 600; line-height: 1.1; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
h4 { font-size: 15px; font-weight: 500; }

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--itt-orange);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
}

/* ── Layout helpers ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 4rem 0; }
.section--dark { background: var(--itt-navy-deep); }
.section--navy { background: var(--itt-navy); }
.section--gray { background: var(--bg); }
.section--white { background: var(--surface); }

/* ── Componentes UI ───────────────────────────────────────── */

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  border: none;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--itt-orange);
  color: #fff;
}
.btn--primary:hover { background: var(--itt-orange-hover); }

.btn--secondary {
  background: var(--itt-green);
  color: #fff;
}
.btn--secondary:hover { background: var(--itt-green-hover); }

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn--ghost:hover { border-color: rgba(255,255,255,0.6); }

.btn--outline {
  background: transparent;
  color: var(--itt-navy);
  border: 1px solid var(--border);
}
.btn--outline:hover { border-color: var(--itt-navy); }

.btn--sm {
  padding: 6px 14px;
  font-size: 12px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card__header {
  padding: 0.75rem 1.25rem;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
}

.card__action {
  font-size: 11px;
  font-weight: 500;
  color: var(--itt-green);
}

.card__body { padding: 1.25rem; }

/* Badges / Pills */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.badge--navy    { background: var(--itt-navy-light); color: var(--itt-navy); }
.badge--orange  { background: var(--itt-orange-light); color: #7a3d00; }
.badge--green   { background: var(--itt-green-light); color: var(--itt-green-dark); }
.badge--success { background: var(--color-success-bg); color: var(--color-success); }
.badge--danger  { background: var(--color-danger-bg); color: var(--color-danger); }
.badge--warning { background: var(--color-warning-bg); color: var(--color-warning); }

/* Pill (redondeado) */
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  border: 0.5px solid;
}
.pill--navy   { border-color: var(--itt-lavender); color: var(--itt-navy); background: var(--itt-navy-light); }
.pill--orange { border-color: #f0b87a; color: #7a3d00; background: var(--itt-orange-light); }
.pill--green  { border-color: #7ec9a0; color: var(--itt-green-dark); background: var(--itt-green-light); }

/* Formularios */
.field { margin-bottom: 1rem; }

.field__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--tx);
  margin-bottom: 6px;
}

.field__input {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--tx);
  transition: border-color var(--transition);
  outline: none;
}

.field__input:focus {
  border-color: var(--itt-navy);
  box-shadow: 0 0 0 3px rgba(35,48,91,0.1);
}

.field__input::placeholder { color: var(--tx3); }

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239999aa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

/* ── Navegación principal ─────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 3px solid var(--itt-orange);
  box-shadow: 0 1px 8px rgba(35,48,91,0.08);
  height: 68px;
  display: flex;
  align-items: center;
}

/* Dark mode: navbar gris muy oscuro para que el logo original siga legible */
[data-theme="dark"] .navbar { background: #1a1d27; box-shadow: 0 1px 8px rgba(0,0,0,0.3); }
@media (prefers-color-scheme: dark) { .navbar { background: #1a1d27; box-shadow: 0 1px 8px rgba(0,0,0,0.3); } }

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar__logo img { width: 40px; height: 40px; }

.navbar__brand-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--itt-navy);
  line-height: 1.2;
}

/* Dark mode: texto del brand en claro */
[data-theme="dark"] .navbar__brand-main { color: #e8eaf2; }
@media (prefers-color-scheme: dark) { .navbar__brand-main { color: #e8eaf2; } }

.navbar__brand-sub {
  font-size: 10px;
  color: var(--tx2);
  font-style: italic;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar__link {
  font-size: 13px;
  color: var(--tx2);
  transition: color var(--transition);
  font-weight: 500;
}
.navbar__link:hover,
.navbar__link--active { color: var(--itt-navy); }

[data-theme="dark"] .navbar__link:hover,
[data-theme="dark"] .navbar__link--active { color: #e8eaf2; }

.navbar__cta {
  background: var(--itt-orange);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition);
}
.navbar__cta:hover { background: var(--itt-orange-hover); }

/* Menú hamburguesa (mobile) */
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--itt-navy);
  font-size: 24px;
  padding: 4px;
}

[data-theme="dark"] .navbar__toggle { color: #e8eaf2; }
@media (prefers-color-scheme: dark) { .navbar__toggle { color: #e8eaf2; } }

/* Breadcrumb */
.breadcrumb {
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--tx3);
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
}

.breadcrumb a { color: var(--itt-navy); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb__sep { color: var(--border); }
.breadcrumb__current { color: var(--tx); font-weight: 500; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--itt-navy);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer__copy {
  font-size: 12px;
  color: var(--itt-lavender);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 12px;
  color: var(--itt-lavender);
  transition: color var(--transition);
}
.footer__links a:hover { color: #fff; }

/* ── Barra de acreditaciones ──────────────────────────────── */
.acred-bar {
  background: var(--itt-orange);
  padding: 1.25rem 0;
}

.acred-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.acred-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acred-item__badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.acred-item__main {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.acred-item__sub {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
}

.acred-sep {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.3);
}

/* ── Utilidades ───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-muted   { color: var(--tx2); }
.text-orange  { color: var(--itt-orange); }
.text-green   { color: var(--itt-green); }
.text-white   { color: #fff; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar__links { display: none; }
  .navbar__toggle { display: block; }
  .navbar__links--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: #ffffff;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    border-bottom: 3px solid var(--itt-orange);
    box-shadow: 0 4px 12px rgba(35,48,91,0.1);
    z-index: 99;
  }
  .acred-bar__inner { gap: 1.5rem; }
  .acred-sep { display: none; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .section { padding: 2.5rem 0; }
  h1 { font-size: 28px; }
  .container { padding: 0 1.25rem; }
}
