/* ========================================
   MODERN UI COMPONENTS - Flatsome Child
   Carga condicional recomendada por página
   ======================================== */

/* ========================================
   1. COMPONENTES ATÓMICOS
   ======================================== */

/* --- Botones --- */
.button, .btn, input[type="submit"], .ux-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: #fff;
  background: var(--uam-x-blue);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.button:hover, .btn:hover {
  background: var(--uam-x-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0, 114, 206, 0.3);
}

/* Variantes de botones */
.btn-outline {
  background: transparent;
  color: var(--uam-x-blue);
  border-color: var(--uam-x-blue);
}
.btn-outline:hover {
  background: var(--uam-x-blue);
  color: #fff;
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* --- Tarjetas / Cards --- */
.card, .ux-banner, .feature-box {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover, .ux-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  border-color: var(--blue-300);
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: var(--space-2);
}

/* --- Formularios --- */
input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--uam-x-blue);
  box-shadow: 0 0 0 3px rgba(0, 114, 206, 0.15);
}

/* ========================================
   2. UTILIDADES (Helpers tipo Tailwind)
   ======================================== */

/* === Typography utilities === */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.text-center { text-align: center; }
.text-blue { color: var(--uam-x-blue); }

/* === Spacing utilities === */
.m-0 { margin: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* === Layout utilities === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-4 { gap: var(--space-4); }
.hidden { display: none; }

/* === Shadow & Radius utilities === */
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: 0.5rem; }
.shadow-sm { box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
.shadow-md { box-shadow: var(--shadow-md); }

/* ========================================
   3. SECCIONES Y LAYOUTS
   ======================================== */

/* Header sticky moderno */
#header, .header-wrapper {
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Hero sections */
.section-hero {
  background: linear-gradient(135deg, var(--slate-50) 0%, #fff 100%);
  padding: 3rem 0;
}

.section-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.2;
  margin-bottom: var(--space-6);
}

.section-hero .lead {
  font-size: var(--text-lg);
  color: var(--slate-600);
  max-width: 60ch;
  margin-bottom: var(--space-8);
}

/* ========================================
   4. RESPONSIVE ENHANCEMENTS
   ======================================== */
@media (max-width: 768px) {
  .section-hero {
    padding: 2rem 0;
    text-align: center;
  }
  
  .section-hero .hero-actions {
    justify-content: center;
  }
  
  .hide-mobile { display: none !important; }
}

@media (min-width: 1024px) {
  .hide-desktop { display: none !important; }
}

/* ========================================
   5. ANIMACIONES Y INTERACCIONES
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s ease forwards;
}

/* Hover effects optimizados */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

/* Reduced motion para accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}