/* ==========================================================
   mobile.css — Responsividade total (smartphone / tablet / notebook)
   Carregue este arquivo *depois* do style.css + demais CSS.
   Objetivo: evitar quebra de layout, remover "larguras fixas",
   manter elegância e melhorar leitura/toque em telas menores.
   ========================================================== */

:root{
  /* gutters/spacing fluido */
  --gutter: 24px;
  --gutter-sm: 16px;
  --radius-lg: 16px;

  /* alturas de mídia (fallback p/ browsers sem aspect-ratio) */
  --media-h-sm: 220px;
  --media-h-md: 320px;
}

html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body{
  overflow-x: hidden;
}

/* Safe-area (iPhone notch) + quickbar fixa */
body.has-quickbar{
  padding-top: calc(64px + env(safe-area-inset-top, 0px));
}

@supports (padding: max(0px)) {
    body.has-quickbar {
        padding-top: calc(0px + max(env(safe-area-inset-top), 0px));
    }
}

/* Container: devolve "gutter" real em telas menores (o style.css força 0px em um ponto) */
@media (max-width: 580px){
.container{
  width: min(1240px, calc(100% - var(--gutter))) !important;
  margin-inline: auto !important;
}

/* Imagens/vídeos/iframes sempre fluidos */
img, svg, video, canvas{
  max-width: 100%;
  height: auto;
}

iframe{
  max-width: 100%;
}

/* Evita textos estourando cards */
h1, h2, h3, h4, h5, h6, p, a, span{
  overflow-wrap: anywhere;
}

/* ==========================================================
   Top strip (#VEMJOGAR) — remove largura fixa de 1240px
   ========================================================== */
.space-white{
  width: min(1240px, calc(100% - var(--gutter))) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  gap: 14px !important;
  flex-wrap: wrap;
}

.space-white img{
  width: clamp(150px, 44vw, 210px) !important; /* sobrescreve inline */
  height: auto !important;
}

/* ==========================================================
   Jogos / Carrossel timeline
   ========================================================== */
.games-carousel-bg {
    padding-inline: 0;
    margin-top: 70px;
}

.games-carousel.games-timeline{
  padding: 18px 0 !important;
  border-radius: 10px;
}

.games-carousel.games-timeline .games-track{
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 12px;
}

.games-carousel.games-timeline .date-group{
  scroll-snap-align: start;
}

/* Botões do carrossel mais “tocáveis” */
.games-carousel .carousel-btn,
.games-carousel .pbtn{
  touch-action: manipulation;
}
}
/* ==========================================================
   Vídeos (Home + Página do vídeo)
   ========================================================== */

/* Home (video-ui): troca alturas fixas por aspect-ratio em telas menores */
@media (max-width: 980px){
  .videos-layout{
    gap: 12px !important;
  }

  .videos-layout.video-ui .video-feature,
  .videos-layout.video-ui .video-hero{
    height: auto !important;
    max-height: none !important;
  }

  .videos-layout.video-ui .video-hero{
    aspect-ratio: 16 / 9;
    border-radius: 0;
  }

  .videos-layout.video-ui .video-hero iframe,
  .videos-layout.video-ui .video-hero video{
    width: 100%;
    height: 100% !important;
  }

  .video-ui .video-title{
    font-size: clamp(16px, 4.6vw, 22px) !important;
    left: 14px !important;
    bottom: 12px !important;
    right: 12px;
  }

  .video-ui .play-btn{
    width: 64px !important;
    height: 64px !important;
    font-size: 28px !important;
    border-width: 3px !important;
  }
}

/* Página /videos/view.php (video.css): player responsivo */
.video-player{
  border-radius: 16px;
}

.video-player iframe,
.video-player video{
  width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

/* Fallback para browsers antigos */
@supports not (aspect-ratio: 16 / 9){
  .video-player iframe,
  .video-player video{
    height: var(--media-h-md) !important;
  }
}

/* ==========================================================
   Posts (post.css)
   ========================================================== */
   
@media (max-width: 670px){
.post-title{
  font-size: clamp(20px, 4.6vw, 28px);
}

.post-subtitle {
    width: auto !important;
    max-width: 100% !important;
}

.post-head {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    overflow: hidden;
    display: block;
}

.post-date {
    width: 200px;
    color: rgb(84 84 84 / 92%);
    font-size: .78rem;
    font-weight: 600;
    background: rgb(204 203 203 / 16%);
    border: 1px solid rgb(198 198 198);
    padding: 6px 10px;
    border-radius: 8px;
    text-align: center;
    margin: 15px;
}

.post-header-image{
  height: clamp(220px, 42vw, 320px);
}

/* data do post não pode sair da tela */
.post-date {
  margin-top: 12px !important;
  max-width: calc(100% - 24px);
}

/* Texto e imagens dentro do conteúdo (evita overflow de imagens grandes) */
.post-text img,
.post-text iframe,
.post-text video{
  max-width: 100% !important;
  height: auto !important;
}
}

/* ==========================================================
   Ajustes por breakpoint
   ========================================================== */

/* Notebooks pequenos / tablets paisagem */
@media (max-width: 1100px){
  :root{ --gutter: 22px; }
  .sports-grid{ gap: 0; }
}

/* Tablets / celulares grandes */
@media (max-width: 980px){
  :root{ --gutter: 20px; }

  /* mantém “respiro” e evita colar nas bordas */
  .lower-columns{
    padding: 16px !important;
    gap: 18px !important;
  }

  .hero-banner{
    height: clamp(240px, 52vw, 320px) !important;
  }

  .news-body h3{
    font-size: 15px !important;
  }

  /* Footer: logo não pode cobrir conteúdo */
  .site-footer.ndu-footer .footer-logo{
    width: 160px !important;
    right: 14px !important;
    bottom: 14px !important;
  }
}

/* Celulares */
@media (max-width: 700px){
  :root{ --gutter: 16px; }

  .container{
    width: calc(100% - var(--gutter)) !important;
  }

  /* Top strip */
  .space-white{
    justify-content: center !important;
    text-align: center;
    padding: 8px 0 4px !important;
  }

  .joga-junto{
    font-size: clamp(14px, 4.2vw, 18px) !important;
  }

  /* carrossel jogos */
  .games-carousel.games-timeline{
    padding: 14px 0 !important;
  }

  /* cards de posts na home */
  .post-card{
    border-radius: 0px;
  }

  /* footer social */
  .site-footer.ndu-footer .social-icons{
    gap: 22px !important;
  }
}

/* Celulares pequenos */
@media (max-width: 520px){
  :root{ --gutter: 14px; }

  /* quickbar: garante que nada gere scroll horizontal */
  .quickbar-inner{
    gap: 8px !important;
    padding-inline: 0 !important;
  }

  .quickbar-nextgame{
    gap: 8px !important;
  }

  .q-team{
    max-width: 72px !important;
    font-size: 12px !important;
  }

  .q-chip{
    font-size: 11px !important;
  }

  /* hero */
  .hero-content{
    padding: 16px !important;
  }
  .hero-content h1{
    font-size: clamp(18px, 5vw, 22px) !important;
  }

  /* news cards */
  .news-thumb{
    height: 140px !important;
  }

  /* posts */
  .post-body{
    padding: 12px !important;
  }

  /* footer */
  .site-footer.ndu-footer .footer-grid{
    gap: 14px !important;
  }
}

/* Extra: telas MUITO pequenas */
@media (max-width: 380px){
  :root{ --gutter: 12px; }
  .q-team{ max-width: 64px !important; }
  .video-ui .play-btn{ width: 58px !important; height: 58px !important; }
}

/* ==========================================================
   Acessibilidade / performance
   ========================================================== */
@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* Botão "modo foco" (home videos) — evita cortar em telas pequenas */
@media (max-width: 700px){
    #featuredFocusBtn {
        left: 12px !important;
        right: 12px !important;
        top: 0px !important;
        bottom: auto !important;
        width: auto !important;
        display: inline-flex;
        justify-content: center;
        padding: 10px 12px !important;
        width: 110px !important;
        background: white !important;
    }
}


/* TOPO FIXO */

/* ==========================================================
   QUICKBAR — hamburger + dropdown elegante (mobile/tablet)
   ========================================================== */

.no-scroll {
    overflow: hidden !important;
}

/* garante sobreposição acima do resto */
.ndu-quickbar {
    position: sticky;
    top: 0;
    z-index: 9999999;
    display: grid;
    justify-content: space-between;
}

.quickbar-brand {
    display: inline-flex;
}

/* botão hamburger (some no desktop) */
.q-burger {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(0,0,0,.10);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

    .q-burger:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(15,23,42,.10);
    }

    .q-burger .line {
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        opacity: .92;
        transition: transform .18s ease, opacity .18s ease;
    }

/* overlay (clicar fora fecha) */
.q-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.38);
    z-index: 9998;
    border: 0;
}

/* ======= MOBILE/TABLET ======= */
@media (max-width: 980px) {

    /* a quickbar vira “header” com burger */
    .quickbar-inner {
        position: relative;
        gap: 10px !important;
        display: flex;
        justify-content: space-between;
    }

    /* mostra hamburger */
    .q-burger {
        display: inline-flex;
        color: white;
    }

    /* nav vira dropdown que desce */
    .quickbar-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 10px);
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 10px;
        border-radius: 18px;
        background: linear-gradient(141deg, #44007e, #570095a1);
        color: #fff;
        border: 1px solid rgba(255,255,255,.12);
        backdrop-filter: blur(10px);
        max-height: calc(100vh - 110px);
        overflow: auto;
        opacity: 0;
        transform: translateY(-8px) scale(.98);
        pointer-events: none;
        transition: opacity .18s ease, transform .18s ease;
        z-index: 9999;
    }

        /* links ocupam a largura toda */
        .quickbar-nav .q-link,
        .quickbar-nav .q-dd-btn {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 13px 14px;
            border-radius: 14px;
            background: rgba(255,255,255,.08);
            border: 1px solid rgba(255,255,255,.10);
            color: inherit;
            text-decoration: none;
            cursor: pointer;
        }

            .quickbar-nav .q-link:active,
            .quickbar-nav .q-dd-btn:active {
                transform: scale(.99);
            }

        .quickbar-nav .q-item {
            position: relative;
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }

    /* dropdowns (submenu) viram accordion */
    .q-item.has-dd .q-dd-menu {
        position: static !important;
        display: none;
        margin-top: 6px;
        padding-left: 8px;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .q-item.has-dd.is-open .q-dd-menu {
        display: block;
    }

    .q-item.has-dd .q-dd-menu a {
        display: block;
        padding: 12px 14px;
        border-radius: 12px;
        margin-top: 6px;
        background: rgba(0,0,0,.22);
        border: 1px solid rgba(255,255,255,.08);
        color: #fff;
        text-decoration: none;
        font-weight: 600;
    }

    .q-caret {
        transition: transform .18s ease;
    }

    .q-item.has-dd.is-open .q-caret {
        transform: rotate(180deg);
    }

    /* quando abrir menu */
    .ndu-quickbar.is-open .quickbar-nav {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .ndu-quickbar.is-open .q-overlay {
        display: block;
    }

    /* anima hamburger -> X */
    .ndu-quickbar.is-open .q-burger .line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .ndu-quickbar.is-open .q-burger .line:nth-child(2) {
        opacity: 0;
    }

    .ndu-quickbar.is-open .q-burger .line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .site-footer.ndu-footer .footer-main.footer-image-bg {
        position: relative;
        color: #fff;
        background-color: #310759;
        background-image: none;
        padding: 60px 30px;
        overflow: hidden;
        border-bottom: 10px solid #ff2a86;
    }
}

/* Força o accordion dos submenus quando o hamburger está aberto */
.ndu-quickbar.is-open .q-item.has-dd > .q-dd-menu {
    display: none !important;
}

.ndu-quickbar.is-open .q-item.has-dd.is-open > .q-dd-menu {
    display: block !important;
    width: 100%;
    background: linear-gradient(45deg, #471499, #a300aa9e) !important;
}