/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
:root {
  --primary-color: #004085;
  --primary-hover: #0040cc;
  --primary-dark: #003366;
  --border-color: #ddd;
  --text-dark: #374151;
  --text-muted: #6c757d;
  --bg-hover: #f4faff;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.1);
  --transition-base: all 0.3s ease;
  --transition-scale: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  --transition-scale-sm: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}












/* ==========================================================================
   UTILIDADES Y CLASES BASE
   ========================================================================== */
.justificado {
  text-align: justify;
}

.font-semibold {
  --bs-text-opacity: 1;
  color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
}

.img-fija {
  max-height: 400px !important;
  height: auto !important;
  width: auto !important;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

/* ==========================================================================
   COMPONENTES DE TARJETAS (CURSOS, TECNOLOGÍAS, CATEGORÍAS, CAT INICIO)
   ========================================================================== */
.card-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  background-color: #fff;
  transition: var(--transition-scale);
}

.card-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  background-color: var(--bg-hover);
}

.card-item h5 a,
.card-item h5 {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
  transition: color var(--transition-base);
}

.card-item h5 a:hover {
  color: var(--primary-hover);
}

.card-item img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.card-item:hover img {
  transform: scale(1.05);
  filter: brightness(90%);
}

/* Variante para cat-inicio (transición más suave) */
.cat-inicio {
  composes: card-item;
  transition: var(--transition-scale-sm);
  cursor: pointer;
}

.cat-inicio:hover {
  transform: scale(1.02);
  z-index: 5;
}

.cat-inicio p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Mantener clases específicas para compatibilidad */
.course-item,
.tecnologia-item,
.category-item {
  composes: card-item;
}

.category-item {
  /* Las categorías mantienen el estilo base sin hover */
}

/* ==========================================================================
   NAVEGACIÓN
   ========================================================================== */
nav a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
  position: relative;
  padding-left: 1.5em;
  display: inline-block;
  transition: color var(--transition-base);
}

nav a span {
  position: relative;
  display: inline-block;
}

nav a span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover span::after,
nav a.activa span::after {
  width: 100%;
}

nav a:hover,
nav a.activa {
  color: var(--primary-dark);
}

/* ==========================================================================
   TÍTULOS Y ENLACES
   ========================================================================== */
h3 a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

h3 a:hover {
  text-decoration: underline;
  color: #007bff;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn-dark-theme {
  color: white;
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  transition: var(--transition-base);
}

.btn-dark-theme:hover,
.btn-dark-theme:focus,
.btn-dark-theme:active,
.btn-dark-theme.btn-check:checked + .btn,
.btn-dark-theme.active,
.btn-dark-theme.show,
.btn-dark-theme:first-child:active,
.btn-dark-theme:not(.btn-check) + .btn:active {
  background-color: var(--primary-hover);
  color: white;
  border-color: var(--primary-hover);
}

/* ==========================================================================
   CONTENIDO HTML (Artículos, páginas, etc.)
   ========================================================================== */
.contenido-html {
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.contenido-html h1,
.contenido-html h2,
.contenido-html h3,
.contenido-html h4,
.contenido-html h5,
.contenido-html h6 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 1rem;
}

.contenido-html p {
  margin-bottom: 1rem;
  text-align: justify;
}

.contenido-html ul,
.contenido-html ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.contenido-html li {
  margin-bottom: 0.5rem;
}

.contenido-html img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

/* ==========================================================================
   CAROUSEL
   ========================================================================== */
.carousel-inner {
  overflow: visible !important;
}

/* ==========================================================================
   ESPACIADO Y LAYOUT
   ========================================================================== */
.space-y-4 > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) {
  padding-top: 60px;
}

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */
@media (max-width: 767.98px) {
  .row.align-items-start > [class*="col-"]:first-child {
    margin-bottom: 1.5rem;
  }
}

/* ==========================================================================
   FORMULARIO DE CONTACTO - ESTILOS GLOBALES
   ========================================================================== */
.cointeca-form .form-label {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 4px;
  display: inline-block;
}

.cointeca-form .form-control {
  border: 1.5px solid #d0d7e2;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  background-color: #fff;
  color: #374151;
}

.cointeca-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 64, 133, 0.15);
  outline: none;
}

.cointeca-form .form-control::placeholder {
  color: #9aa5b1;
}

.cointeca-form textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.cointeca-form .btn-primary,
.cointeca-form .btn-dark-theme {
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 64, 133, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cointeca-form .btn-primary:hover,
.cointeca-form .btn-dark-theme:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 64, 133, 0.3);
}

.cointeca-form .btn-primary:active,
.cointeca-form .btn-dark-theme:active {
  transform: translateY(0);
}

/* Botón en estado "cargando" */
.cointeca-form .btn.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.cointeca-form .btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  vertical-align: middle;
}

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

/* ==========================================================================
   ALERTAS FLASH (mensajes de éxito/error en formularios)
   ========================================================================== */
.cointeca-alert {
  border-radius: 10px;
  padding: 16px 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-left: 5px solid;
  animation: alert-slide-down 0.4s ease-out;
}

.cointeca-alert .ca-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 2px;
}

.cointeca-alert .ca-body { flex: 1; }
.cointeca-alert .ca-title { font-weight: 700; margin: 0 0 4px 0; font-size: 1rem; }
.cointeca-alert .ca-text  { margin: 0; font-size: 0.92rem; opacity: 0.95; }
.cointeca-alert ul { margin: 6px 0 0 18px; padding: 0; }

.cointeca-alert.alert-success {
  background: #d4edda;
  color: #155724;
  border-color: #28a745;
}
.cointeca-alert.alert-success .ca-icon { color: #28a745; }

.cointeca-alert.alert-error {
  background: #f8d7da;
  color: #721c24;
  border-color: #dc3545;
}
.cointeca-alert.alert-error .ca-icon { color: #dc3545; }

.cointeca-alert.alert-warning {
  background: #fff3cd;
  color: #856404;
  border-color: #ffc107;
}
.cointeca-alert.alert-warning .ca-icon { color: #ffc107; }

@keyframes alert-slide-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MEJORAS ADICIONALES PARA PÁGINAS DE CURSOS/TECNOLOGÍAS
   ========================================================================== */
main.container.my-5 h2 + p,
main.container.my-5 h5 + p {
  margin-bottom: 1rem;
}

/* Tarjetas más claras y modernas */
.card.h-100.shadow-sm {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card.h-100.shadow-sm:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12) !important;
}

/* Imágenes de tarjeta consistentes */
.card-img-top {
  object-fit: cover;
  height: 200px;
}

/* Footer más amigable */
footer.bg-dark {
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

/* Ajuste de imágenes responsivas en columnas */
.img-fluid.rounded.shadow {
  max-width: 100%;
  height: auto;
}

/* Mejor legibilidad en justificado */
.justificado {
  hyphens: auto;
  -webkit-hyphens: auto;
}












