/* ═══════════════════════════════════════════
   GTA6ONLINE.ES — RESPONSIVE MOBILE CSS
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── GENERAL ── */
  html, body { overflow-x: hidden !important; }

  /* ── NAV ── */
  .nav-links { display: none !important; }
  .nav-right { display: none !important; }
  nav { padding: 0 16px !important; height: 52px !important; position: sticky !important; top: 0 !important; z-index: 1000 !important; }
  #gta-ticker { position: relative !important; z-index: 1 !important; }
  .nav-hamburger {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--muted,#5B6278); border-radius: 2px; transition: all .25s; }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: #F0B429; }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: #F0B429; }
  .nav-mobile-menu {
    position: fixed;
    top: 86px;
    left: 0;
    right: 0;
    background: rgba(8,10,15,0.98);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999 !important;
    padding: 8px 0;
    flex-direction: column;
    display: none !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  }
  .nav-mobile-menu.open { display: flex !important; }
  .nav-mobile-menu a {
    display: block;
    padding: 14px 24px;
    text-decoration: none;
    color: #5B6278;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .nav-mobile-menu a.active { color: #F0B429; background: rgba(240,180,41,0.05); }
  .nav-mobile-btns { display: flex; gap: 10px; padding: 14px 24px 8px; }
  .nav-mobile-btns button { flex: 1; padding: 10px; font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; border-radius: 3px; cursor: pointer; min-height: 44px; }
  .btn-ghost-m { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: #5B6278; }
  .btn-primary-m { background: #F0B429; border: none; color: #000; }

  /* ── TICKER ── */
  .tick-item { font-size: 11px !important; padding: 0 14px !important; }

  /* ── HERO ── */
  .hero { min-height: 70vh !important; }
  .hero-content { padding: 36px 20px !important; max-width: 100% !important; }
  .hero h1 { font-size: clamp(48px,14vw,80px) !important; }
  .hero h1 .l3 { font-size: clamp(28px,8vw,44px) !important; }
  .hero-desc { font-size: 13px !important; }
  .hero-stats { display: none !important; }
  .hero-ctas { flex-direction: column !important; gap: 10px !important; }
  .cta-main, .cta-sec { text-align: center !important; width: 100% !important; padding: 12px 20px !important; }

  /* ── PAGE HEROES ── */
  .page-hero { padding: 24px 18px 18px !important; }
  .page-title { font-size: 38px !important; }
  .page-desc { font-size: 12px !important; }

  /* ── SECTIONS ── */
  .section, .section-alt { padding: 28px 16px !important; }
  .sec-header { flex-wrap: wrap; gap: 8px; margin-bottom: 16px !important; }
  .sec-title { font-size: 26px !important; }

  /* ── GRIDS ── */
  .news-grid,
  .forum-grid,
  .community-strip,
  .featured-grid,
  .two-col,
  .flags-grid,
  .ban-grid,
  .automod-grid { grid-template-columns: 1fr !important; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .news-card.feat, .feat-card.main-feat { grid-row: span 1 !important; }
  .main-feat .card-img-inner { height: 180px !important; }
  .card-img-inner.sm { height: 140px !important; }
  .map-preview { height: 180px !important; }

  /* ── FOOTER ── */
  footer { flex-direction: column !important; align-items: center !important; text-align: center !important; padding: 18px !important; gap: 12px !important; }
  .footer-links { flex-wrap: wrap !important; justify-content: center !important; gap: 10px !important; }

  /* ── SEARCH BARS ── */
  .search-row { flex-wrap: wrap !important; gap: 8px !important; }
  .search-wrap { max-width: 100% !important; width: 100% !important; }
  .search-row .btn-search { width: 100% !important; }
  .search-action-row { flex-wrap: wrap !important; padding: 10px 14px !important; gap: 8px !important; }
  .sort-btns { width: 100% !important; }
  .sort-btn { flex: 1 !important; text-align: center !important; }
  .btn-new-post { width: 100% !important; justify-content: center !important; margin-left: 0 !important; }

  /* ── TRUCOS ── */
  .main { grid-template-columns: 1fr !important; }
  .cats-sidebar { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important; padding: 8px 0 !important; }
  #cat-nav, #cats-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px 12px !important;
    gap: 6px !important;
    scrollbar-width: none;
  }
  #cat-nav::-webkit-scrollbar, #cats-list::-webkit-scrollbar { display: none; }
  .cat-nav-item, .cat-item {
    flex-shrink: 0 !important;
    border-left: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
  }
  .cat-nav-item.active, .cat-item.active { border-left: none !important; border-bottom-color: #F0B429 !important; }
  .cat-nav-count, .online-dot { display: none !important; }
  .cat-nav-info .cat-nav-count { display: none !important; }
  .tricks-area { padding: 10px 12px !important; }
  .trick-card { flex-direction: column !important; }
  .trick-votes { flex-direction: row !important; padding: 8px 14px !important; border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.04) !important; min-width: unset !important; gap: 12px !important; }
  .trick-photo { width: 70px !important; height: 52px !important; }

  /* ── FORO ── */
  .thread-meta-col { display: none !important; }
  .thread-body { padding: 10px 12px !important; }
  .thread-title { font-size: 15px !important; }
  .thread-preview { font-size: 12px !important; -webkit-line-clamp: 3 !important; }
  .tp-img { width: 72px !important; height: 54px !important; }
  .thread-actions { flex-wrap: wrap !important; gap: 2px !important; }
  .ta-btn { font-size: 10px !important; padding: 4px 7px !important; min-height: 36px !important; }
  .thread-view-body { padding: 12px !important; }
  .op-photos.g2, .op-photos.g3 { grid-template-columns: 1fr 1fr !important; }
  .op-photo img { height: 120px !important; }
  .reply-composer { padding: 10px !important; }
  .threads-subheader { padding: 10px 12px !important; }
  .pinned-bar { padding: 6px 12px !important; font-size: 10px !important; }

  /* ── MAPA — sidebar visible arriba, mapa abajo ── */
  .layout {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    min-height: 0 !important;
  }
  .sidebar {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: 42vh !important;
    min-height: 160px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    background: #0E1117;
  }
  .search-wrap { padding: 10px 12px !important; }
  .filters { padding: 0 12px 8px !important; }
  .locs-list { padding: 0 12px 10px !important; -webkit-overflow-scrolling: touch !important; }
  .filter-btns {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
  }
  .filter-btns::-webkit-scrollbar { display: none; }
  .map-area {
    display: block !important;
    width: 100% !important;
    height: 58vh !important;
    min-height: 300px !important;
    position: relative !important;
    overflow: hidden !important;
  }
  .map-container {
    width: 100% !important;
    height: 100% !important;
  }
  .add-btn {
    top: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    font-size: 11px !important;
    padding: 7px 12px !important;
    z-index: 60 !important;
    min-height: 36px !important;
  }
  .add-panel {
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    top: 52px !important;
    bottom: auto !important;
    z-index: 60 !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
  }
  .map-legend {
    bottom: 6px !important;
    left: 6px !important;
    padding: 6px 10px !important;
    font-size: 10px !important;
  }

  /* ── NOTICIAS ── */
  .news-area { padding: 12px 14px !important; border-right: none !important; }
  .right-sidebar.news-sidebar { display: none !important; }
  .list-card { flex-direction: column !important; }
  .lc-img { width: 100% !important; height: 130px !important; }
  .forum-gen-card { flex-wrap: wrap !important; }
  .submit-bar { flex-direction: column !important; gap: 8px !important; align-items: flex-start !important; }

  /* ── ADMIN ── */
  .admin-main { overflow: auto !important; }
  .content { padding: 12px 14px !important; }
  .table-head { display: none !important; }
  .table-row { display: flex !important; flex-direction: column !important; gap: 6px !important; padding: 11px !important; }
  .row-actions { justify-content: flex-start !important; flex-wrap: wrap !important; }
  .cols-pending, .cols-users, .cols-reportes { grid-template-columns: 1fr !important; }
  .admin-sidebar { width: 200px !important; }
  .nav-label { font-size: 12px !important; }

  /* ── RANKINGS ── */
  .rankings-area { padding: 14px !important; border-right: none !important; }
  .right-sidebar { display: none !important; }

  /* PESTAÑAS (Siguiendo, Trucos, Mapa...) */
  .page-tabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    scrollbar-width: none !important;
    gap: 2px !important;
    padding: 3px !important;
  }
  .page-tabs::-webkit-scrollbar { display: none; }
  .page-tab {
    flex-shrink: 0 !important;
    padding: 7px 12px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    min-height: 36px !important;
  }

  /* PODIO TOP 3 */
  .podium {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    padding: 0 4px !important;
    align-items: flex-end !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .podium-step { flex: 1 !important; min-width: 90px !important; max-width: 140px !important; }
  .podium-card { padding: 10px 6px !important; }
  .podium-avatar { width: 36px !important; height: 36px !important; font-size: 12px !important; margin-bottom: 6px !important; }
  .podium-name { font-size: 12px !important; }
  .podium-pts { font-size: 16px !important; }
  .podium-rank { font-size: 9px !important; }
  .podium-follow { font-size: 10px !important; padding: 4px 6px !important; }
  .podium-crown { font-size: 16px !important; top: -10px !important; }
  .podium-bar { height: 40px !important; }
  .podium-1 .podium-bar { height: 40px !important; }
  .podium-2 .podium-bar { height: 28px !important; }
  .podium-3 .podium-bar { height: 20px !important; }

  /* LISTA RANKING */
  .rank-item { padding: 9px 10px !important; gap: 8px !important; }
  .rank-pos { font-size: 18px !important; width: 22px !important; }
  .rank-avatar { width: 32px !important; height: 32px !important; }
  .rank-name { font-size: 14px !important; }
  .rank-stats { display: none !important; }
  .rank-pts { font-size: 16px !important; min-width: 40px !important; }
  .rank-badges { gap: 3px !important; }
  .rbadge { font-size: 8px !important; padding: 1px 4px !important; }
  .follow-btn { font-size: 10px !important; padding: 5px 8px !important; white-space: nowrap !important; }
  .delta { font-size: 9px !important; min-width: 20px !important; }

  /* PERIODO SELECTOR */
  .period-row { flex-direction: column !important; gap: 8px !important; align-items: flex-start !important; }
  .period-btns { width: 100% !important; }
  .period-btn { flex: 1 !important; font-size: 11px !important; padding: 6px 8px !important; }
  .cat-filter { overflow-x: auto !important; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch !important; width: 100% !important; padding-bottom: 4px !important; }
  .cat-btn { flex-shrink: 0 !important; font-size: 10px !important; padding: 4px 8px !important; }

  /* ── MURO SOCIAL ── */
  .left-sidebar { display: none !important; }
  .main-feed { padding: 12px !important; border-right: none !important; }
  .composer-types, .type-pills { flex-wrap: wrap !important; gap: 4px !important; }
  .type-pill, .type-tag { font-size: 10px !important; padding: 4px 8px !important; }
  .photo-grid.grid-2, .photo-grid.grid-3, .photo-grid.grid-4 { grid-template-columns: 1fr 1fr !important; }
  .photo-cell { max-height: 150px !important; }
  .c-right { flex-wrap: wrap !important; gap: 6px !important; }
  .composer-top { gap: 8px !important; }

  /* ── MODALS ── */
  .modal, .profile-modal { width: 95vw !important; max-height: 85vh !important; }
  .modal-body { padding: 12px 14px !important; }
  .platform-grid, .plat-grid { grid-template-columns: repeat(2,1fr) !important; }
  .pm-stats { grid-template-columns: repeat(2,1fr) !important; }
  .pm-actions { flex-direction: column !important; }
  .pm-follow-btn, .pm-close-btn { width: 100% !important; }

  /* ── SHARE DROPDOWN ── */
  .share-dd, .share-dropdown {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    bottom: auto !important;
    top: 60px !important;
    position: fixed !important;
  }

  /* ── DONATE WIDGET ── */
  .donate-fab { bottom: 14px !important; left: 14px !important; }
  .dw-panel { width: calc(100vw - 28px) !important; }
  .dw-title { font-size: 12px !important; }
  .dw-sub { font-size: 9px !important; }
  .dw-icon { width: 28px !important; height: 28px !important; font-size: 13px !important; }
  .donate-btn-w { padding: 8px 14px 8px 10px !important; }
}

/* ── TABLET ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-links { gap: 14px !important; }
  .nav-links a { font-size: 11px !important; letter-spacing: 1px !important; }
  .hero h1 { font-size: clamp(56px,8vw,90px) !important; }
  .hero-stats { right: 20px !important; }
  .section { padding: 48px 28px !important; }
  .news-grid { grid-template-columns: 1fr 1fr !important; }
  .news-card.feat { grid-column: span 2 !important; grid-row: span 1 !important; }
  .main { grid-template-columns: 180px 1fr !important; }
  .main-layout { grid-template-columns: 1fr 260px !important; }
  .layout { grid-template-columns: 240px 1fr !important; }
}

/* ── DESKTOP — hamburger hidden ── */
@media (min-width: 769px) {
  .nav-hamburger { display: none !important; }
  .nav-mobile-menu { display: none !important; }
}

/* ── iOS FIXES (all sizes) ── */
* { -webkit-tap-highlight-color: transparent; }
button, a, .cat-nav-item, .cat-item { touch-action: manipulation; }
body { -webkit-overflow-scrolling: touch; }
input, textarea, select { font-size: 16px; } /* prevent iOS zoom */
