/* =====================================================
   Piofly — Shared Components
   Navbar, Footer, Bottom Nav, Page Hero, Filter Bar,
   Profile Topbar, Pio Strip, Settings Modal
   ===================================================== */

/* ── NAVBAR ──────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--slate-surface);
  border-bottom: 1px solid var(--slate-line);
  box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
/* Edgar 2026-06-29: en mobile el navbar es TRANSPARENTE (sin color)
   para que la foto del hero respire hasta arriba. */
@media (max-width: 760px) {
  .navbar,
  .navbar--minimal {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; max-width: var(--max-width); margin: 0 auto;
}
.navbar-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.navbar-logo-img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  filter: none; transform: translate(6px, -3px);
}
/* Edgar 2026-07-03: en mobile el navbar es transparent y el hero image
   detras tambien es naranja - el logo Piofly se camuflaba. Mantenemos
   la identidad naranja SIEMPRE (no cambiamos a blanco) y le damos un
   anillo blanco fino + sombra sutil para que resalte. Estilo avatar
   Instagram/Discord sobre fondo con imagen. */
@media (max-width: 760px) {
  .navbar-logo-img {
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.95),
      0 4px 16px rgba(0, 0, 0, 0.25);
  }
}
.navbar-logo-text {
  font-family: 'Nunito', sans-serif; font-size: 22px; font-weight: 800;
  color: var(--white); letter-spacing: -0.5px; text-transform: lowercase;
}
.navbar-logo-text span:first-child { color: var(--white); }
.navbar-logo-text span:last-child  { color: var(--gold); }
.logo-dot { display: none; }

.navbar-links {
  display: flex; align-items: center; gap: 4px;
}
.navbar-links a {
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.75);
  transition: var(--transition);
}
.navbar-links a:hover,
.navbar-links a.active { color: var(--gold); background: rgba(255, 138, 0,0.1); }

.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-actions .btn-outline { padding: 8px 18px; font-size: 14px; }
.navbar-actions .btn-gold    { padding: 9px 22px; font-size: 14px; font-weight: 800; }

/* Hamburger */
.navbar-hamburger {
  display: none; background: rgba(255,255,255,0.1); border: none;
  color: var(--white); font-size: 20px; cursor: pointer; padding: 8px 10px;
  border-radius: var(--r-sm); transition: var(--transition); line-height: 1;
}
.navbar-hamburger:hover { background: rgba(255,255,255,0.18); }
.navbar { position: relative; }

/* Mobile menu overlay */
#menu-overlay {
  display: none; position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.25s ease;
}
#menu-overlay.active { display: block; opacity: 1; }

/* Mobile dropdown */
.navbar-mobile {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--slate-elev); z-index: 999;
  border-top: 1px solid var(--slate-line);
  padding: 0 24px 20px; box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  transform: translateY(-8px); opacity: 0;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease;
}
.navbar-mobile.open { display: block; transform: translateY(0); opacity: 1; }
.navbar-mobile a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--white); font-size: 16px; font-weight: 700; transition: var(--transition);
}
.navbar-mobile a:hover { color: var(--gold); padding-left: 6px; }
.navbar-mobile button {
  width: 100%; text-align: center; cursor: pointer;
  font-family: 'Nunito', sans-serif; border: none;
}
.navbar-mobile .mobile-cta-primary {
  display: block; margin-top: 16px;
  background: var(--brand); color: var(--white); padding: 14px;
  border-radius: var(--r-md); font-size: 16px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.32);
}
.navbar-mobile .mobile-cta-secondary {
  display: block; margin-top: 10px;
  background: transparent; color: var(--white); padding: 13px;
  border-radius: var(--r-md); font-size: 15px; font-weight: 700;
  border: 1.5px solid rgba(255,255,255,0.35) !important;
}
.navbar-mobile .mobile-cta-secondary:hover { border-color: rgba(255,255,255,0.7) !important; }
.navbar-mobile .mobile-login-link {
  display: block; text-align: center; margin-top: 10px;
  color: rgba(255,255,255,0.65) !important; font-size: 14px !important;
  font-weight: 600 !important; padding: 6px 0 !important;
  border-bottom: none !important;
}
.navbar-mobile .mobile-nav-sep {
  height: 1px; background: rgba(255,255,255,0.12);
  margin: 14px 0;
}

/* ── PAGE HEROES (subpages) ──────────────────────────── */
.page-hero {
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(255, 138, 0, 0.10) 0%, transparent 65%),
    linear-gradient(180deg, var(--slate-surface) 0%, var(--slate-bg) 100%);
  border-bottom: 1px solid var(--slate-line);
  padding: 64px 0;
}
.page-hero .hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 138, 0,0.14); border: 1px solid rgba(255, 138, 0,0.35);
  border-radius: var(--r-full); padding: 5px 14px;
  font-size: 13px; font-weight: 700; color: var(--gold); margin-bottom: 20px;
}
.page-hero h1 { color: var(--white); margin-bottom: 14px; }
.page-hero h1 em { color: var(--gold); font-style: normal; }
.page-hero p { color: rgba(255,255,255,0.65); max-width: 560px; font-size: 16px; margin-bottom: 28px; }
.page-hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.page-hero-stat-val   { font-size: 24px; font-weight: 900; color: var(--gold); }
.page-hero-stat-label { font-size: 12px; color: rgba(255,255,255,0.5); }

/* ── FILTER BAR ──────────────────────────────────────── */
.filter-bar { background: var(--white); border-bottom: 1px solid var(--border); padding: 14px 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--white);
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ── PROFILE TOP BAR (app-style) ─────────────────────── */
.prof-topbar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 60px;
  background: #060B1A; border-bottom: 1px solid rgba(0,143,200,0.15);
  backdrop-filter: blur(12px);
}
.prof-topbar-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
}
.prof-topbar-logo img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.prof-topbar-logo span {
  font-family: Nunito, sans-serif; font-size: 18px; font-weight: 900;
  color: white; letter-spacing: -0.3px;
}
.prof-topbar-logo span em { color: var(--primary); font-style: normal; }
.prof-topbar-user {
  font-size: 15px; font-weight: 700; color: white;
  position: absolute; left: 50%; transform: translateX(-50%);
  white-space: nowrap; pointer-events: none;
}
.prof-topbar-settings {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8); cursor: pointer;
  transition: background 0.2s, color 0.2s; flex-shrink: 0;
}
.prof-topbar-settings:hover { background: rgba(0,143,200,0.25); color: var(--primary); }

/* ── PIO STRIP ──────────────────────────────────────── */
.pio-strip {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-mid) 100%);
  padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.pio-strip-inner {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  justify-content: space-between;
}
.pio-bubble {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255, 138, 0,0.3);
  border-radius: var(--r-xl); padding: 14px 20px;
  display: flex; align-items: center; gap: 16px; flex: 1; min-width: 280px;
}
.pio-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #3BADE0, #1A7BC0);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 138, 0,0.4);
}
.pio-text { color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 600; line-height: 1.5; }
.pio-text strong { color: var(--gold); }

/* ── BOTTOM NAV ──────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: #0A0F1C; border-top: 1px solid rgba(0,143,200,0.18);
  height: 68px; padding: 0 8px;
  justify-content: space-around; align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
  backdrop-filter: blur(16px);
}
.dashboard-page .bottom-nav { display: flex; }

.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px; border-radius: 12px; text-decoration: none;
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.4);
  transition: color 0.2s ease, background 0.2s ease; flex: 1; max-width: 72px;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item:hover { color: var(--gold); background: rgba(255, 138, 0,0.08); }
.bottom-nav-item.active,
.bottom-nav-item[data-active="true"] {
  color: var(--gold);
}
.bnav-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.bnav-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.bottom-nav-item.active .bnav-icon svg,
.bottom-nav-item[data-active="true"] .bnav-icon svg { stroke: var(--gold); }

/* Center button (ideas) */
.bottom-nav-item.bnav-center {
  position: relative;
}
.bottom-nav-item.bnav-center .bnav-icon {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 4px 16px rgba(0,143,200,0.45);
  margin-top: -14px;
  border: 3px solid #0A0F1C;
}
.bottom-nav-item.bnav-center .bnav-icon svg { width: 24px; height: 24px; stroke: white; }
.bottom-nav-item.bnav-center { color: var(--primary); }

/* Dashboard page padding */
.dashboard-page main,
.dashboard-page .db-body { padding-bottom: 84px !important; }

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  background: var(--slate-bg);
  border-top: 1px solid var(--slate-line);
  padding: 60px 0 32px;
}
.footer-top { display: grid; grid-template-columns: 300px 1fr; gap: 64px; margin-bottom: 48px; }
.footer-brand .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-tagline { color: rgba(255,255,255,0.45); font-size: 14px; line-height: 1.8; margin-bottom: 24px; }
.footer-socials { display: flex; gap: 10px; }
.footer-social {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: rgba(255,255,255,0.5); transition: var(--transition);
}
.footer-social:hover { background: rgba(255, 138, 0,0.22); color: var(--gold); }
.footer-links { display: flex; justify-content: flex-end; gap: 48px; }
.footer-col h5 { color: var(--white); font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,0.5); font-size: 14px; padding: 4px 0; transition: var(--transition); }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-copy   { color: rgba(255,255,255,0.35); font-size: 13px; }
.footer-credit { color: rgba(255, 138, 0,0.55); font-size: 13px; font-weight: 700; }

/* ── SETTINGS MODAL ──────────────────────────────────── */
.settings-modal {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  align-items: flex-end; justify-content: center;
}
.settings-modal.open { display: flex; }
.settings-sheet {
  background: white; border-radius: 24px 24px 0 0; padding: 28px 24px 40px;
  width: 100%; max-width: 500px;
  animation: slideUp 0.3s ease;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }

/* ── NAVBAR MINIMAL (landing) ────────────────────────────── */
/* Edgar 2026-06-30: glass blur look en DESKTOP. En mobile sigue
   transparente (se sobrescribe abajo en su @media). Premium tipo
   Apple — el navbar es vidrio esmerilado sobre las imágenes del
   hero, no las tapa pero mantiene presencia de marca. */
.navbar--minimal {
  position: absolute; top: 0; left: 0; right: 0;
  background: rgba(10, 13, 24, 0.42) !important;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2) !important;
}
@media (min-width: 769px) {
  .navbar--minimal .navbar-inner { padding-left: 8px; }
  .navbar--minimal .navbar-logo-img { width: 41px; height: 41px; }
  .navbar--minimal .navbar-logo-text { font-size: 26px; }
}
.navbar--minimal .navbar-links,
.navbar--minimal .navbar-actions,
.navbar--minimal .navbar-hamburger,
.navbar--minimal .navbar-mobile { display: none !important; }

/* Edgar 2026-06-29: navbar-lang reemplaza navbar-social.
   Selector compacto de idioma ES/EN/DE con flag emoji + código. */
.navbar-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}
.navbar-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.navbar-lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.navbar-lang-btn.is-active {
  background: rgba(255, 138, 0, 0.18);
  color: #FF8A00;
}
/* Edgar 2026-06-29: ahora es <img> de flagcdn (SVG/PNG real), no
   emoji — Windows no renderiza emojis de bandera correctamente. */
.navbar-lang-flag {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.navbar-lang-code { font-size: 11px; letter-spacing: 0.6px; }

@media (max-width: 540px) {
  /* En móvil compacto, esconder código y dejar solo flag */
  .navbar-lang-code { display: none; }
  .navbar-lang-btn { padding: 7px 9px; }
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-top   { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { justify-content: flex-start; flex-wrap: wrap; gap: 32px; }
}
@media (max-width: 768px) {
  .navbar-inner     { padding: 10px 18px; }
  .navbar-links, .navbar-actions { display: none; }
  .navbar-hamburger { display: block; }
  .footer           { padding: 44px 0 24px; }
  .footer-top       { grid-template-columns: 1fr; gap: 32px; }
  .footer-links     { flex-direction: column; gap: 24px; }
  .footer-bottom    { flex-direction: column; gap: 8px; text-align: center; }
  .pio-strip-inner { flex-direction: column; gap: 16px; }
  .pio-bubble      { min-width: unset; }
}
