/* ============================================================
   Design tokens — fuente única de verdad para todo el proyecto
   ============================================================ */
:root {
  /* Colores */
  --color-primary:      #388e3c;
  --color-primary-dark: #2e7d32;
  --color-accent:       #ff9800;
  --color-accent-dark:  #f57c00;
  --color-secondary:    #1565c0;
  --color-text:         #1a1a1a;
  --color-text-muted:   #5f6368;
  --color-bg:           #f2faf5;
  --color-card:         #ffffff;
  --color-border:       #dadce0;

  /* Tipografía */
  --font-base: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Consolas', 'Monaco', monospace;

  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.10);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

/* ============================================================
   Header
   ============================================================ */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: linear-gradient(90deg, var(--color-primary), #4caf50);
  border-bottom: 2px solid var(--color-accent);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(5px);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.1);
}

/* Menú principal (desktop) */
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.menu li a {
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: all 0.3s ease;
  text-align: center;
  background: linear-gradient(90deg, #43a047, #66bb6a);
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
}

.menu li a:hover {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
}

/* Botón hamburguesa */
.menu-toggle {
  font-size: 24px;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

/* Botones de autenticación */
.auth-buttons {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0 1rem;
}

/* ============================================================
   Navegación móvil
   ============================================================ */
.mobile-nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: rgba(46, 125, 50, 0.97);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1001;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-menu li a {
  display: block;
  padding: 13px 20px;
  color: #ffffff;
  text-decoration: none;
  text-align: left;
}

.mobile-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu .menu-section {
  padding: 0.6rem 1.25rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: default;
}

.mobile-nav.hidden {
  display: none;
}

/* ============================================================
   Contenedor dinámico (área de contenido)
   ============================================================ */
#Contenedor-Dinamico {
  margin-top: 80px;
  padding: 0 1rem;
  flex: 1;
}

@media (max-width: 768px) {
  #Contenedor-Dinamico {
    margin-top: 70px;
  }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  width: 100%;
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
  text-align: center;
  padding: 1.25rem 1rem;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.85);
}

.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
  letter-spacing: 0.01em;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

/* ============================================================
   Spinner de carga
   ============================================================ */
#spinner-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 11000;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================================
   Utilidades globales
   ============================================================ */
.hidden {
  display: none !important;
}

.disclaimer {
  background: rgba(255, 152, 0, 0.08);
  border-left: 3px solid var(--color-accent);
  color: #b45309;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  text-align: justify;
}

/* Contenedor del dropdown */
.dropdown-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Botón de cerrar dropdown */
.close-dropdown {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--color-text-muted);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-dropdown:hover {
  background: var(--color-text);
}
