/* ==========================================
   ESTILOS BASE - YACHAY
   ========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 70px; /* Espaciado optimizado del header */
}

/* Utilidades para espaciado del header */
.page-container {
  padding-top: calc(var(--header-height) + var(--spacing-lg));
}

.hero-container {
  padding-top: calc(var(--header-height) + var(--spacing-2xl));
}

.admin-container {
  padding-top: calc(var(--header-height) + var(--spacing-lg));
}

/* Resetear padding del main para evitar conflictos */
#site-main {
  padding-top: 0 !important;
  margin-top: 0;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-700);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main {
  position: relative;
}

/* Mejora visual: Transición suave entre header y contenido */
main::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.2), rgba(147, 51, 234, 0.2), rgba(2, 132, 199, 0.2));
  z-index: 1;
}

/* Utilidades */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-lg);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--primary-600);
  border: 2px solid var(--primary-600);
}

.btn-secondary:hover {
  background: var(--primary-600);
  color: var(--text-white);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  border: 2px solid var(--text-white);
}

.btn-outline:hover {
  background: var(--text-white);
  color: var(--primary-600);
}

/* Botones outline con colores temáticos - MODO CLARO: Negro */
.btn-outline-themed {
  background: transparent;
  color: #000 !important;
  border: 2px solid #000 !important;
  transition: all 0.3s ease;
}

.btn-outline-themed:hover {
  background: #000 !important;
  color: #fff !important;
}

.btn-outline-themed i {
  color: inherit !important;
}

/* MODO OSCURO: Blanco */
.dark-mode .btn-outline-themed,
[data-theme="dark"] .btn-outline-themed {
  color: #fff !important;
  border-color: #fff !important;
}

.dark-mode .btn-outline-themed:hover,
[data-theme="dark"] .btn-outline-themed:hover {
  background: #fff !important;
  color: #000 !important;
}

.dark-mode .btn-outline-themed i,
[data-theme="dark"] .btn-outline-themed i {
  color: inherit !important;
}

/* Botón específico para el acceso rápido al panel admin */
.btn-admin {
  color: var(--primary-600);
  border-color: var(--primary-600);
  background: transparent;
}

.btn-admin i {
  color: inherit;
}

.btn-admin:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Cards */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

/* Secciones */
.section {
  padding: var(--spacing-3xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section-title h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-xl);
}

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

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-600);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-xl);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: var(--z-fixed);
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-700);
  transform: translateY(-3px);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--text-white);
  animation: spin 0.6s linear infinite;
}

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

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* ==========================================
   ESTILOS PARA SWEETALERT CON TEMAS
   ========================================== */

/* Estilos base para botones de SweetAlert */
.swal2-confirm-btn, .swal2-cancel-btn {
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

/* Estilos específicos para tema claro de SweetAlert */
.swal2-light-theme {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.swal2-light-theme .swal2-title {
    color: #111827 !important;
}

.swal2-light-theme .swal2-html-container {
    color: #4b5563 !important;
}

/* Estilos específicos para tema oscuro de SweetAlert */
.swal2-dark-theme {
    border: 1px solid #374151 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.swal2-dark-theme .swal2-title {
    color: #f9fafb !important;
}

.swal2-dark-theme .swal2-html-container {
    color: #d1d5db !important;
}

/* Progress bar personalizada para modo oscuro */
.swal2-dark-theme .swal2-timer-progress-bar {
    background: rgba(59, 130, 246, 0.6) !important;
}
