/* ==========================================================================
   1. VARIABLES GLOBALES (PALETA WCAG 2.1 AA)
   ========================================================================== */
:root {
  /* Colores de Interfaz (Accesibles) */
  --text-main: #2c3e50;      /* Azul Marino Oscuro (Titulares y Footer) */
  --text-body: #4a5568;      /* Gris Pizarra (Párrafos) */
  --bg-light: #f8fafc;       /* Gris muy suave para fondos de sección */
  --bg-white: #ffffff;       /* Blanco puro */
  --btn-primary: #0284c7;    /* Azul Océano (Botones principales) */
  --btn-hover: #0369a1;      /* Azul Océano Oscuro (Hover de botones) */
  --border-color: #e2e8f0;   /* Gris suave para bordes de tarjetas/divisores */

  /* Colores de Marca (Solo detalles decorativos) */
  --brand-orange: #e96d23;
  --brand-blue: #64c2e8;
  --brand-green: #a2c958;

  /* Tipografía */
  --font-heading: 'Quicksand', system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Importamos la fuente Quicksand de Google Fonts para los titulares */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;600;700&display=swap');

/* ==========================================================================
   2. CONFIGURACIÓN BASE
   ========================================================================== */
body {
  font-family: var(--font-body);
  color: var(--text-body);
  background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: var(--font-heading);
  color: var(--text-main);
}

/* ==========================================================================
   3. CLASES UTILITARIAS PERSONALIZADAS
   ========================================================================== */
.text-main { color: var(--text-main) !important; }
.bg-main { background-color: var(--text-main) !important; }
.text-brand-orange { color: var(--brand-orange) !important; }
.text-body { color: var(--text-body) !important; }

/* Letras separadas para la etiqueta pequeña de la Hero Section */
.tracking-wide { letter-spacing: 1.5px; }

.max-w-700 { max-width: 700px;}
/* ==========================================================================
   4. SOBREESCRITURA DE COMPONENTES BOOTSTRAP
   ========================================================================== */

/* Botón Primario Accesible */
.btn-primary {
  background-color: var(--btn-primary);
  border-color: var(--btn-primary);
  color: #ffffff;
  transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--btn-hover);
  border-color: var(--btn-hover);
  transform: translateY(-1px);
}

/* Enlaces del Menú de Navegación */
.navbar-nav .nav-link {
  transition: color 0.2s ease;
}
.navbar-nav .nav-link:hover {
  color: var(--btn-primary) !important;
}

/* Enlaces del Footer */
.footer-link {
  transition: all 0.2s ease;
}
.footer-link:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
  padding-left: 4px; /* Pequeño salto a la derecha al pasar el ratón */
}

/* ==========================================================================
   5. COMPONENTES RUEI (NUESTRAS TARJETAS)
   ========================================================================== */

.ruei-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%; /* Fundamental para que todas las tarjetas en un grid midan lo mismo */
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ruei-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.ruei-card-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-orange);
}

.ruei-card-title {
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.ruei-card-excerpt {
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.ruei-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--btn-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.ruei-card-link:hover {
  color: var(--btn-hover);
}

/* Animación de la flechita del botón de la tarjeta */
.ruei-card-link svg {
  transition: transform 0.2s ease;
}
.ruei-card-link:hover svg {
  transform: translateX(4px);
}

/* Foco accesible para navegación por teclado */
.ruei-card-link:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--brand-orange);
  outline-offset: 3px;
  box-shadow: none;
}


/* ==========================================================================
   6. FOOTER EDITORIAL (ESTILO PRENSA)
   ========================================================================== */

/* Titulares de columna con la pequeña línea superior (Estilo pie1.png) */
.footer-heading {
  position: relative;
  color: var(--text-body);
  font-weight: 700;
  font-size: 1rem;
  padding-top: 15px; /* Espacio para la línea */
}

/* La línea decorativa superior */
.footer-heading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px; /* Longitud de la línea corta */
  height: 2px;
  background-color: var(--text-body); /* Color gris/negro */
}

/* Enlaces del footer */
.footer-link {
  color: var(--text-main) !important; /* Gris/Azul muy oscuro por defecto */
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--btn-primary) !important; /* Azul corporativo al pasar el ratón */
  text-decoration: underline !important;
  padding-left: 2px; /* Un pequeñísimo efecto de movimiento opcional */
}

/* Sección inferior de Copyright */
.footer-bottom {
  border-top: 1px dotted #ccc; /* Línea punteada como en la captura */
}

.footer-legal-link {
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: var(--btn-primary) !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   7. GRID DE UNIVERSIDADES (LOGOS)
   ========================================================================== */
.logo-entidad {
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all 0.3s ease;
  cursor: pointer;
}

.logo-entidad:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.05); /* Pequeño zoom muy elegante */
}


/* ==========================================================================
   7. MENSAJES DE CONFIRMACION
   ========================================================================== */
#infInscripcion, #infConsulta{
  margin-top: 2rem;
}
