/* ══════════════════════════════════════════════════════════════════════════════
   GLOBAL STYLES — Aparcar Benidorm
   Archivo centralizado con variables, reset, componentes comunes y utilidades
   ══════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Color Theme ───────────────────────────────────────────────────────────── */
:root {
  /* Primary colors — Azul Playa (Mediterráneo) */
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #0ea5e9;

  /* Secondary colors — Dorado (Sol) */
  --secondary: #f59e0b;
  --secondary-dark: #d97706;

  /* Neutral colors */
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;

  /* Effects */
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 16px;

  /* Layout */
  --sidebar-w: 360px;

  /* Semantic UI colors */
  --success: #16a34a;
  --accent: #f97316;
  --surface-inverse: #1e293b;
  --overlay: rgba(0,0,0,0.75);
  --loader-bg: rgba(255,255,255,0.92);
  --footer-bg: #0f172a;

  /* Interactive states */
  --active-bg: #eff6ff;
  --nearest-active-bg: #f0f9ff;

  /* Chips */
  --chip-green-bg: #f0f9ff;
  --chip-green-border: #7dd3fc;

  /* Zone badges */
  --zona-levante-bg: #dbeafe;
  --zona-levante-text: #1e40af;
  --zona-poniente-bg: #fef3c7;
  --zona-poniente-text: #92400e;
}

/* ── Dark theme ────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 4px 24px rgba(0,0,0,0.5);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);

    --surface-inverse: #0f172a;
    --loader-bg: rgba(15,23,42,0.95);
    --footer-bg: #020617;

    --active-bg: #1e293b;
    --nearest-active-bg: #0f172a;

    --chip-green-bg: #164e63;
    --chip-green-border: #06b6d4;

    --zona-levante-bg: #0c4a6e;
    --zona-levante-text: #93c5fd;
    --zona-poniente-bg: #78350f;
    --zona-poniente-text: #fcd34d;
  }
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);

  --surface-inverse: #0f172a;
  --loader-bg: rgba(15,23,42,0.95);
  --footer-bg: #020617;

  --active-bg: #1e3a5f;
  --nearest-active-bg: #0c2a3d;

  --chip-green-bg: #0c2a3d;
  --chip-green-border: #0284c7;

  --zona-levante-bg: #1e3a5f;
  --zona-levante-text: #93c5fd;
  --zona-poniente-bg: #3d2a0a;
  --zona-poniente-text: #fcd34d;
}


/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: var(--primary);
  color: white !important; /* override dark-mode --text variable */
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

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

.btn-large {
  padding: 12px 32px;
  font-size: 16px;
  border-radius: 10px;
}

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  padding: 16px 20px;
}

a.navbar-brand, .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  font-size: 16px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.navbar-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.navbar-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.3s ease;
}

.navbar-links a:hover {
  color: var(--primary);
}

.btn-theme {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

@media (max-width: 768px) {
  .navbar-links {
    gap: 12px;
  }

  .navbar-links a:not(.btn) {
    display: none;
  }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--footer-bg);
  color: white;
  padding: 60px 20px 20px;
}

.footer .container {
  margin-bottom: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 14px;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
}

.footer-contact-link { margin-top: 12px; }
.footer-contact-note { font-size: 13px; color: rgba(255, 255, 255, 0.5); margin-top: 8px; }

.footer-section h4 {
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

@media (max-width: 768px) {
  .footer {
    padding: 40px 20px 20px;
  }

  .footer-content {
    gap: 32px;
  }
}

/* ── Utilities ─────────────────────────────────────────────────────────────── */

/* !important needed: utility class must override component-level display (e.g. #bus-sidebar { display:flex }) */
.is-hidden { display: none !important; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .navbar-brand {
    font-size: 14px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }
}
