/* Reset y variables CSS */
:root {
  --bg: #0b0b0f;
  --fg: #f5f5f5;
  --muted: #9aa0a6;
  --accent: #ffd400;
  --accent-2: #3ddcff;
  --card: #11131a;
  --border: #202332;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1680px;
  --g: 16px;
  
  /* Variables tipográficas */
  --font-heading: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-heading: 1.15;
  --lh-body: 1.6;
  --tracking-heading: 0.01em;
  --tracking-body: 0em;
}

/* Reset básico */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html,
body {
  font-family: var(--font-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-body);
}

body {
  margin: 0;
  font-size: 16px;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--fg);
  text-decoration: none;
}

button {
  font: inherit;
}

/* Tipografía de encabezados */
h1, h2, h3, h4, .heading, .btn-primary, .nav-brand {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
  font-weight: 700;
}

/* Layout base */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Accesibilidad */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  background: #000;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Secciones base */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin-top: 0;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  display: inline-block;
  margin-bottom: 10px;
  text-shadow: 0 0 6px rgba(255,212,0,.18);
  font-size: clamp(22px, 2.1vw + 10px, 32px);
}

.section h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 8px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255,212,0,.22);
}

/* Componentes base */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.highlight {
  border-left: 4px solid var(--accent);
}

/* Botones base modernos */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 16px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000000;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(255, 215, 0, 0.5), 0 6px 20px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
  transition: all 0.1s;
}

.btn-accent {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000000;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-outline {
  background: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.btn-outline:hover {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000000;
  border-color: #FFD700;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-lg {
  padding: 16px 32px;
  font-weight: 700;
  font-size: 18px;
  border-radius: 20px;
  letter-spacing: 1px;
}

/* Botón Salir - Estilo específico */
.btn-logout,
a[href*="logout.php"].btn {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 1px solid #FFD700 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.btn-logout:hover,
a[href*="logout.php"].btn:hover {
  background: #1a1a1a !important;
  color: #FFFFFF !important;
  border-color: #FFD700 !important;
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4), 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

/* Animaciones base */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* Utilidades de transición */
.fade-out {
  opacity: 0 !important;
  transition: opacity .2s ease;
}

.fade-in {
  animation: fadeIn .22s ease both;
}

/* Media queries base */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  
  .section {
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  
  .section {
    padding: 32px 0;
  }
}
