/* ─── BOTTOM TAB BAR ─── Mobile only (≤768px) ─── */
/* Se añade encima de lo existente. No modifica nada del desktop. */

.mobile-tabbar {
  display: none; /* Oculto en desktop */
}

@media (max-width: 768px) {
  .mobile-tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--color-bg-deep, #080E1C);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.3);
  }

  .mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--color-text-on-dark-low, rgba(255,255,255,0.35));
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
    min-width: 56px;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-tabbar a:active {
    background: rgba(255,255,255,0.05);
  }

  .mobile-tabbar a.active {
    color: var(--color-accent, #0D9488);
  }

  .mobile-tabbar a.active svg {
    stroke: var(--color-accent, #0D9488);
  }

  .mobile-tabbar svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-tabbar a.active svg.fill-icon {
    fill: var(--color-accent, #0D9488);
    fill-opacity: 0.15;
  }

  .mobile-tabbar span {
    line-height: 1;
  }

  /* ─── Espacio inferior para que el contenido no quede tapado ─── */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ─── Ocultar header nav items redundantes en móvil ─── */
  /* El header ya se gestiona en header.css, esto es solo refuerzo */
}

/* ─── Garantizar que NO aparece en desktop ─── */
@media (min-width: 769px) {
  .mobile-tabbar {
    display: none !important;
  }
  body {
    padding-bottom: 0 !important;
  }
}

/* ─── Page fade-in transition ─── */
@keyframes gm-fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  animation: gm-fadeIn 0.2s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
}

/* ─── Skeleton loading ─── */
.gm-skeleton {
  background: linear-gradient(90deg,
    var(--color-bg-card, #111827) 25%,
    rgba(255,255,255,0.06) 50%,
    var(--color-bg-card, #111827) 75%
  );
  background-size: 200% 100%;
  animation: gm-shimmer 1.5s infinite ease-in-out;
  border-radius: 8px;
}

@keyframes gm-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gm-skeleton-card {
  height: 200px;
  margin-bottom: 12px;
}

.gm-skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  width: 70%;
}

.gm-skeleton-text.short {
  width: 40%;
}

@media (prefers-reduced-motion: reduce) {
  .gm-skeleton {
    animation: none;
    background: var(--color-bg-card, #111827);
  }
}
