/* Correção final de layout mobile e enquadramento de artes
   Carregado por último para sobrescrever estilos antigos/inline. */
:root{
  --mobile-page-gap:clamp(14px,4vw,22px);
  --mobile-card-radius:clamp(20px,5vw,28px);
}

*{min-width:0}
html,body{width:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%}
body{touch-action:manipulation}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
a,button,.btn,.pill,.lead,h1,h2,h3,p,span,b,strong,small,td,th,.wallet-id,.reward-code{overflow-wrap:anywhere}
.container{width:min(1180px,calc(100% - 32px));max-width:1180px}

/* Artes e imagens sem corte: sempre mostrar a imagem inteira em moldura organizada */
.event-banner-display,
.premium-banner,
.event-single-banner,
.city-event-cover,
.event-cover,
.event-art,
.rodeo-thumb,
.event-carousel-figure,
.gallery figure,
.gallery.event-gallery-three figure,
.sector-map-frame,
.image-slot-frame,
.event-list-thumb,
.reward-showcase-slot,
.reward-prize-image,
.reward-modal-prize,
.photo-preview{
  background:
    radial-gradient(circle at 50% 0,rgba(236,173,32,.12),transparent 34%),
    linear-gradient(180deg,rgba(7,17,28,.82),rgba(3,12,42,.88)) !important;
  background-size:cover!important;
  background-position:center!important;
  overflow:hidden!important;
}

.event-banner-display img,
.premium-banner img,
.event-single-banner img,
.city-event-cover img,
.event-cover img,
.event-art img,
.rodeo-thumb img,
.event-carousel-figure img,
.gallery img,
.gallery.event-gallery-three img,
.sector-map-frame img,
.image-slot-frame img,
.event-list-thumb img,
.reward-showcase-slot img,
.reward-prize-image img,
.reward-modal-prize img,
.photo-preview img,
.admin-image-slot img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:none!important;
}

.hero-card:hover .event-art img,
.event-card:hover .event-cover img,
.rodeo-event-card:hover .rodeo-thumb img,
.event-carousel-slide:hover .event-carousel-figure img,
.city-event-card:hover .city-event-cover img,
.event-gallery-three img:hover{
  transform:none!important;
}

/* Molduras principais de banner/poster */
.event-banner-display,
.event-single-banner,
.premium-banner,
.city-event-cover{
  display:grid!important;
  place-items:center!important;
  padding:clamp(8px,1.8vw,14px)!important;
  border-radius:var(--mobile-card-radius)!important;
  aspect-ratio:480/625!important;
}

.event-banner-display img,
.event-single-banner img,
.premium-banner img,
.city-event-cover img{
  border-radius:calc(var(--mobile-card-radius) - 8px)!important;
}

.gallery,
.gallery.event-gallery-three{
  align-items:stretch;
}
.gallery figure,
.gallery.event-gallery-three figure{
  display:grid!important;
  place-items:center!important;
  height:auto!important;
  min-height:0!important;
  padding:8px!important;
  aspect-ratio:4/3!important;
}
.gallery figure img,
.gallery.event-gallery-three figure img{
  border-radius:14px!important;
}

.event-cover,
.event-art,
.rodeo-thumb,
.event-carousel-figure,
.event-list-thumb{
  display:grid!important;
  place-items:center!important;
  padding:6px!important;
}

/* Evita cards e textos apertados em qualquer tela */
.hero-card,.panel,.event-card,.form-card,.stat-card,.ticket-card,.result-card,
.solidario-feature-card,.event-section-card,.city-event-card,.success-card,
.reward-wheel-card,.reward-history-card,.center-feedback-card{
  max-width:100%;
}

.actions,.event-actions,.event-secondary-actions,.solidario-actions,.reward-actions,.reward-modal-actions,.toolbar{
  align-items:center;
}

/* Ajuste para celulares e tablets */
@media (max-width:980px){
  .container{width:100%;padding-inline:var(--mobile-page-gap)}
  .hero-grid,
  .layout,
  .event-detail-pro,
  .event-single-shell,
  .event-single-grid,
  .intro-grid,
  .process-grid,
  .admin-shell,
  .builder,
  .dashboard-grid,
  .wallet-grid,
  .reward-wheel-card,
  .city-selector-head,
  .ticket-confirm-row,
  .success-info-grid{
    grid-template-columns:1fr!important;
  }

  .events-grid,
  .feature-grid,
  .company-features,
  .city-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .section-head{
    align-items:flex-start!important;
    flex-direction:column!important;
    gap:12px!important;
  }

  .navbar{
    width:100%;
    min-height:auto!important;
    align-items:flex-start!important;
    flex-direction:column!important;
    gap:12px!important;
  }

  .brand{
    width:100%;
    min-width:0!important;
  }

  .brand > span:last-child{
    min-width:0;
    white-space:normal!important;
    line-height:1.05!important;
  }

  .navlinks{
    width:100%;
    max-width:100%;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding-bottom:4px!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .navlinks::-webkit-scrollbar{display:none}
  .navlinks a,.navlinks button{flex:0 0 auto;white-space:nowrap}

  .sidebar{
    position:relative!important;
    top:auto!important;
    max-height:none!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    display:flex!important;
    gap:10px!important;
    padding:0 0 8px!important;
    scroll-snap-type:x proximity;
  }
  .sidebar .event-list-item,
  .sidebar .professional-event-item{
    min-width:min(360px,86vw)!important;
    scroll-snap-align:start;
  }

  .event-single-media{order:1!important}
  .event-single-copy{order:2!important}
  .event-media-column{position:relative!important;top:auto!important}
  .premium-banner,.event-single-banner,.event-banner-display{width:min(430px,100%)!important;margin-inline:auto!important}

  .reward-wheel-card{text-align:center!important}
  .reward-actions,.reward-modal-actions{justify-content:center!important}
  .reward-wheel-stage{width:100%!important}
  .reward-wheel-viewport{width:min(100%,calc(100vw - 54px))!important}

  .table-wrap{max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  table{min-width:720px}
}

@media (max-width:760px){
  .header,.header.is-scrolled,.event-header{
    position:relative!important;
    top:auto!important;
    background:rgba(7,17,28,.96)!important;
    backdrop-filter:none!important;
    box-shadow:none!important;
  }

  .page-title,.city-hero,.hero{
    padding-top:clamp(30px,9vw,46px)!important;
  }

  .section{padding-block:clamp(32px,9vw,56px)!important}
  .section[style*="padding-top:10px"],.section[style*="padding-top:14px"],.city-section{padding-top:10px!important}

  h1{font-size:clamp(2.05rem,12vw,3.45rem)!important;line-height:1!important;text-wrap:balance}
  .section-head h2,.detail h2,.panel h2,.form-card h1,.form-card h2{font-size:clamp(1.75rem,9vw,2.65rem)!important;line-height:1.02!important}
  .lead{font-size:.98rem!important;line-height:1.55!important}

  .hero-card,.panel,.event-card,.form-card,.stat-card,.ticket-card,.result-card,
  .solidario-feature-card,.event-section-card,.city-event-card,.success-card,
  .reward-wheel-card,.reward-history-card,.center-feedback-card{
    border-radius:var(--mobile-card-radius)!important;
  }

  .events-grid,
  .feature-grid,
  .company-features,
  .city-grid,
  .form-grid,
  .stats-grid,
  .wallet-stats,
  .kpis,
  .detail-grid,
  .event-single-kpis,
  .gallery,
  .gallery.event-gallery-three,
  .image-manager-grid,
  .photo-preview{
    grid-template-columns:1fr!important;
  }

  .city-event-card{grid-template-columns:1fr!important;gap:0!important}
  .city-event-body,.event-body,.rodeo-card-body{padding:18px!important}
  .city-event-body{text-align:left!important}
  .city-summary span,.city-meta span,.meta span,.pill{max-width:100%}

  .event-banner-display,
  .event-single-banner,
  .premium-banner,
  .city-event-cover{
    width:100%!important;
    max-width:min(430px,100%)!important;
    max-height:none!important;
    padding:8px!important;
  }

  .event-cover,
  .event-art,
  .rodeo-thumb,
  .event-carousel-figure{
    height:auto!important;
    min-height:0!important;
    aspect-ratio:480/625!important;
  }

  .gallery figure,
  .gallery.event-gallery-three figure{
    aspect-ratio:auto!important;
    min-height:170px!important;
  }
  .gallery figure img,
  .gallery.event-gallery-three figure img{
    height:auto!important;
    max-height:72dvh!important;
  }

  .actions,
  .event-actions,
  .event-secondary-actions,
  .solidario-actions,
  .reward-actions,
  .reward-modal-actions,
  .success-actions,
  .ticket-card .actions,
  .city-event-body .actions,
  .center-feedback-actions,
  .toolbar{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    gap:10px!important;
  }
  .actions .btn,.actions a,.actions button,
  .event-actions .btn,.event-actions a,.event-actions button,
  .event-secondary-actions .btn,.event-secondary-actions a,.event-secondary-actions button,
  .solidario-actions .btn,.solidario-actions a,.solidario-actions button,
  .reward-actions .btn,.reward-actions a,.reward-actions button,
  .reward-modal-actions .btn,.reward-modal-actions a,.reward-modal-actions button,
  .success-actions .btn,.success-actions a,.success-actions button,
  .center-feedback-actions .btn,
  .city-event-body .btn{
    width:100%!important;
    justify-content:center!important;
  }

  .wallet-head{display:grid!important;grid-template-columns:1fr!important;text-align:center!important;align-items:start!important}
  .wallet-id{justify-self:center!important;width:100%;padding:14px!important}
  .ticket-meta,.ticket-card-main{grid-template-columns:1fr!important}
  .ticket-qr-mini,.qr-img{width:min(230px,72vw)!important;height:min(230px,72vw)!important;margin-inline:auto!important}

  .reward-wheel-card{padding:18px 14px!important;gap:16px!important}
  .reward-copy h2{font-size:clamp(1.85rem,9vw,2.55rem)!important;line-height:1.02!important}
  .reward-status{font-size:.92rem!important;line-height:1.42!important}
  .reward-rail-wrap{min-height:230px!important}
  .reward-rail-wrap .reward-wheel-shell{width:100%!important;padding:16px 0!important;border-radius:24px!important}
  .reward-wheel-viewport{width:min(100%,calc(100vw - 48px))!important;min-height:148px!important;padding:18px 0!important}
  .reward-prize-card{flex-basis:88px!important;width:88px!important;border-radius:16px!important;padding:6px!important}
  .reward-prize-image{border-radius:11px!important}
  .reward-showcase-slot{width:100%!important;margin-bottom:12px!important;padding:8px!important}
  .reward-showcase-slot img{height:auto!important;max-height:260px!important}

  .reward-modal{align-items:flex-start!important;padding:12px!important;overflow-y:auto!important}
  .reward-modal-shell{grid-template-columns:1fr!important;width:100%!important;max-height:none!important;gap:12px!important}
  .reward-modal-card,.reward-tutorial-card{width:100%!important;padding:22px 16px!important;border-radius:26px!important}
  .reward-tutorial-gallery{grid-template-columns:1fr!important}
  .reward-tutorial-shot img{height:auto!important;max-height:72dvh!important;object-fit:contain!important}

  .map-frame,.render-map{min-height:260px!important;height:300px!important;border-radius:20px!important}
  .sector-map-frame{width:100%!important;height:auto!important;aspect-ratio:576/697!important}

  .footer .container{display:grid!important;grid-template-columns:1fr!important;text-align:center!important;gap:10px!important}
  .whatsapp-support{right:12px!important;bottom:12px!important;max-width:calc(100vw - 24px)!important}
}

@media (max-width:420px){
  .container{padding-inline:12px!important}
  .navlinks a,.navlinks button{font-size:.8rem!important;padding:8px 10px!important}
  .logo{width:44px!important;height:44px!important;flex-basis:44px!important}
  .brand > span:last-child{font-size:.82rem!important}
  .brand small{font-size:.55rem!important;letter-spacing:.12em!important}
  .event-banner-display,.event-single-banner,.premium-banner,.city-event-cover{border-radius:20px!important}
  .reward-wheel-viewport{width:min(100%,calc(100vw - 36px))!important}
  .reward-prize-card{flex-basis:82px!important;width:82px!important}
  .reward-rail-wrap .reward-wheel-labels{gap:8px!important}
  .center-feedback-modal{padding:12px!important}
}
