/* =========================================================
   Ajuste final de responsividade + espaços de imagem
   Carregado por último para padronizar computador, tablet e celular.
   ========================================================= */
:root{
  --layout-max:1180px;
  --layout-gutter:clamp(14px,3.6vw,34px);
  --card-pad:clamp(18px,2.5vw,32px);
  --soft-blue:#f4f8ff;
  --slot-bg:#eef4ff;
  --slot-line:#cfe0f7;
  --slot-text:#17345c;
}

html,body{max-width:100%;overflow-x:hidden;}
body{min-width:320px;}
.container{width:min(var(--layout-max),calc(100% - (var(--layout-gutter) * 2)))!important;margin-inline:auto!important;padding-inline:0!important;}
main{isolation:isolate;}
img,video,canvas,svg,iframe{max-width:100%;}

/* Tipografia com quebra segura */
h1,h2,h3,p,.lead,.eyebrow,.pill,.btn,.field label,.field input,.field textarea,.field select{overflow-wrap:anywhere;}
h1,h2,.section-head h2{text-wrap:balance;}
.lead{text-wrap:pretty;}

/* Cabeçalho e navegação */
.header,.event-header{z-index:100!important;}
.navbar{width:100%;}
.navlinks{min-width:0;}
.navlinks a,.navlinks button{min-height:40px;align-items:center;}
.event-topline{min-width:0;flex-wrap:wrap;}
.event-topline span{white-space:normal;}
.brand{min-width:0;}
.brand span:last-child{min-width:0;line-height:1.05;}
.logo img{width:100%!important;height:100%!important;object-fit:contain!important;padding:4px;}

/* Grades principais */
.hero-grid,.layout,.event-detail-pro,.event-single-shell,.event-single-grid,.intro-grid,.process-grid,.validation-grid,.dashboard-grid,.wallet-grid,.ticket-confirm-row,.success-info-grid{gap:clamp(16px,2.5vw,28px)!important;}
.section{position:relative;}
.section-head{gap:16px;}
.panel,.form-card,.event-card,.city-event-card,.hero-card,.detail,.stat-card,.ticket-card,.result-card,.success-card,.reward-wheel-card,.reward-history-card,.solidario-feature-card,.event-section-card{overflow:hidden;}
.form-card,.panel.detail,.detail{padding:var(--card-pad)!important;}

/* Formulários corretos no desktop e no celular */
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px!important;}
.field.full{grid-column:1 / -1;}
.field input,.field textarea,.field select{width:100%;min-width:0;}
textarea{min-height:118px;resize:vertical;}
.check-line{align-items:flex-start!important;line-height:1.45;}
.check-line input{margin-top:.25rem;flex:0 0 auto;}

/* Botões e ações */
.actions,.event-actions,.event-secondary-actions,.solidario-actions,.reward-actions,.reward-modal-actions,.success-actions,.toolbar{gap:10px!important;}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:42px;text-align:center;}
.btn-small{min-height:36px;}

/* Imagens de eventos: sempre enquadradas, sem informação cortada */
.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,.admin-image-slot{
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(135deg,#eaf2ff,#f7fbff)!important;
  border-color:var(--slot-line)!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;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
}
.event-card:hover .event-cover img,.rodeo-event-card:hover .rodeo-thumb img,.city-event-card:hover .city-event-cover img,.event-carousel-slide:hover .event-carousel-figure img{transform:none!important;}
.event-cover,.rodeo-thumb,.event-art,.event-carousel-figure{aspect-ratio:480/625;min-height:0!important;height:auto!important;padding:8px!important;}
.event-cover img,.rodeo-thumb img,.event-art img,.event-carousel-figure img{border-radius:14px;}
.gallery figure,.gallery.event-gallery-three figure{aspect-ratio:4/3;height:auto!important;min-height:170px;padding:8px!important;}
.sector-map-frame{aspect-ratio:576/697;height:auto!important;padding:8px!important;}

/* Novos espaços de imagem editáveis pelo arquivo assets/image-slots.config.js */
.image-showcase-section{padding-block:clamp(28px,5vw,64px)!important;}
.image-showcase-panel{position:relative;border:1px solid var(--eventim-line,var(--slot-line));border-radius:clamp(22px,3vw,34px);background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(244,248,255,.92));box-shadow:0 18px 48px rgba(0,31,91,.10);padding:clamp(18px,3vw,32px);overflow:hidden;}
.image-showcase-panel::before{content:"";position:absolute;inset:-35% auto auto -12%;width:320px;height:320px;border-radius:999px;background:radial-gradient(circle,rgba(0,87,217,.13),transparent 67%);pointer-events:none;animation:imageFloat 7s ease-in-out infinite;}
.image-showcase-head{position:relative;display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px;}
.image-showcase-head h2{margin:.35rem 0 0;font-size:clamp(1.7rem,3.4vw,2.8rem);line-height:1.02;color:var(--eventim-text,var(--text));letter-spacing:-.04em;}
.image-showcase-head p{max-width:680px;margin:0;color:var(--eventim-muted,var(--muted));line-height:1.55;}
.image-slot-grid{position:relative;display:grid;grid-template-columns:1.25fr .85fr .85fr;gap:14px;}
.image-slot-grid.two{grid-template-columns:1fr 1fr;}
.image-slot-grid.single{grid-template-columns:1fr;}
.image-slot-card{position:relative;display:grid;gap:10px;min-width:0;}
.image-slot-figure{position:relative;display:grid;place-items:center;width:100%;border:1px solid var(--eventim-line,var(--slot-line));border-radius:22px;background:radial-gradient(circle at 20% 0%,rgba(0,168,255,.14),transparent 34%),linear-gradient(135deg,#eef6ff,#ffffff);overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.65);}
.image-slot-figure::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 0 35%,rgba(255,255,255,.55) 48%,transparent 60%);transform:translateX(-120%);animation:slotShine 4.8s ease-in-out infinite;pointer-events:none;}
.image-slot-figure img{width:100%;height:100%;object-fit:var(--slot-fit,contain);object-position:center;border-radius:inherit;}
.image-slot-placeholder{display:grid;place-items:center;text-align:center;padding:22px;color:var(--slot-text);}
.image-slot-placeholder b{display:block;font-size:clamp(1rem,2vw,1.2rem);font-weight:900;margin-bottom:6px;}
.image-slot-placeholder span{display:block;color:var(--eventim-muted,var(--muted));font-size:.88rem;line-height:1.4;}
.image-slot-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;color:var(--eventim-muted,var(--muted));font-size:.85rem;line-height:1.35;}
.image-slot-meta strong{color:var(--eventim-blue,var(--brand));}
.image-slot-ratio-1920x720{aspect-ratio:1920/720;}
.image-slot-ratio-1920x600{aspect-ratio:1920/600;}
.image-slot-ratio-1600x900{aspect-ratio:16/9;}
.image-slot-ratio-1200x800{aspect-ratio:3/2;}
.image-slot-ratio-1080x1350{aspect-ratio:4/5;}
.image-slot-ratio-1080x1920{aspect-ratio:9/16;}
.image-slot-ratio-480x625{aspect-ratio:480/625;}
.image-slot-ratio-576x697{aspect-ratio:576/697;}
.image-slot-ratio-1x1{aspect-ratio:1/1;}
.image-slot-wide{grid-column:span 2;}

.side-media-pack{display:grid;gap:14px;margin-top:16px;}
.side-media-pack .image-slot-grid{grid-template-columns:1fr;}
.auth-layout-with-image{grid-template-columns:minmax(290px,500px) minmax(290px,520px)!important;align-items:center!important;place-items:center!important;gap:clamp(16px,3vw,30px)!important;width:min(1080px,calc(100% - (var(--layout-gutter) * 2)))!important;margin-inline:auto!important;}
.auth-layout-with-image>.form-card{width:100%!important;}
.auth-image-panel{width:100%;}
.page-image-strip{margin-top:-10px;padding-top:0!important;}
.success-card .image-slot-card,.ticket-view .image-slot-card{margin:18px 0;}
.city-hero .image-slot-card{max-width:min(760px,100%);margin:22px auto 0;}
.wallet-banner-slot{margin-top:18px;}

/* Admin: imagens e tabelas mais usáveis */
.admin-shell{align-items:start;}
.admin-menu .toolbar{display:grid!important;grid-template-columns:1fr!important;}
.image-manager-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.admin-image-slot{border-radius:18px;}
.table-wrap{max-width:100%;overflow:auto!important;-webkit-overflow-scrolling:touch;}
.table-wrap table{min-width:820px;}

/* Animações suaves */
.reveal,.image-slot-card,.event-card,.city-event-card,.feature,.panel,.form-card{will-change:transform;}
.image-slot-card{animation:slotIn .55s ease both;}
.image-slot-card:nth-child(2){animation-delay:.08s;}
.image-slot-card:nth-child(3){animation-delay:.14s;}
@keyframes imageFloat{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(16px,14px,0)}}
@keyframes slotShine{0%,45%{transform:translateX(-120%)}70%,100%{transform:translateX(120%)}}
@keyframes slotIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

@media (min-width:981px){
  .events-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .stats-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;}
  .city-event-card{grid-template-columns:minmax(230px,360px) 1fr!important;}
}

@media (max-width:980px){
  :root{--layout-gutter:clamp(14px,4vw,24px);}
  .container{width:min(100%,calc(100% - (var(--layout-gutter) * 2)))!important;}
  .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,.validation-grid,.ticket-confirm-row,.success-info-grid{grid-template-columns:1fr!important;}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .events-grid,.feature-grid,.company-features,.city-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .image-slot-grid,.image-slot-grid.two{grid-template-columns:1fr 1fr;}
  .image-slot-wide{grid-column:1 / -1;}
  .auth-layout-with-image{grid-template-columns:1fr!important;}
  .auth-image-panel{order:-1;}
  .admin-menu{position:relative!important;top:auto!important;}
  .admin-menu .toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .image-manager-grid{grid-template-columns:1fr!important;}
}

@media (max-width:760px){
  :root{--layout-gutter:14px;--card-pad:18px;}
  body{font-size:15px;}
  .header,.event-header{position:sticky!important;top:0!important;}
  .navbar{min-height:auto!important;padding-block:10px!important;align-items:stretch!important;}
  .event-topline,.navlinks{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:4px;}
  .event-topline::-webkit-scrollbar,.navlinks::-webkit-scrollbar{display:none;}
  .navlinks a,.navlinks button,.event-topline span{flex:0 0 auto;white-space:nowrap;}
  .brand{width:100%;}
  .brand span:last-child{white-space:normal!important;}
  .page-title,.city-hero,.hero,.corporate-hero{padding-top:clamp(28px,8vw,42px)!important;padding-bottom:clamp(26px,8vw,42px)!important;}
  .section{padding-block:clamp(30px,8vw,52px)!important;}
  h1{font-size:clamp(2.05rem,10.5vw,3.55rem)!important;line-height:1.02!important;}
  .section-head h2,.detail h2,.panel h2,.form-card h1,.form-card h2{font-size:clamp(1.65rem,8.4vw,2.55rem)!important;line-height:1.04!important;}
  .lead{font-size:.98rem!important;line-height:1.58!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-slot-grid,.image-slot-grid.two{grid-template-columns:1fr!important;}
  .image-slot-wide{grid-column:auto;}
  .image-showcase-head{display:grid;align-items:start;}
  .image-showcase-panel{border-radius:24px;padding:16px;}
  .image-slot-figure{border-radius:18px;}
  .image-slot-meta{font-size:.8rem;}
  .event-cover,.rodeo-thumb,.event-art,.event-carousel-figure{aspect-ratio:480/625!important;}
  .event-banner-display,.premium-banner,.event-single-banner,.city-event-cover{width:100%!important;max-width:min(440px,100%)!important;margin-inline:auto!important;padding:8px!important;}
  .gallery figure,.gallery.event-gallery-three figure{min-height:190px!important;}
  .actions,.event-actions,.event-secondary-actions,.solidario-actions,.reward-actions,.reward-modal-actions,.success-actions,.toolbar,.city-event-body .actions{display:grid!important;grid-template-columns:1fr!important;width:100%!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,.toolbar .btn,.city-event-body .btn{width:100%!important;}
  .sidebar{display:grid!important;grid-template-columns:1fr!important;overflow:visible!important;padding:0!important;}
  .admin-menu .toolbar{grid-template-columns:1fr!important;}
  .filter-chips{display:grid!important;grid-template-columns:1fr 1fr 1fr!important;gap:8px!important;}
  .chip{padding:.72rem .4rem!important;font-size:.82rem!important;}
  .map-frame,.render-map{min-height:260px!important;height:300px!important;}
}

@media (max-width:420px){
  :root{--layout-gutter:12px;--card-pad:16px;}
  .navlinks a,.navlinks button{font-size:.78rem!important;padding:8px 10px!important;}
  .event-topline span{font-size:.78rem!important;padding:8px 10px!important;}
  .logo{width:42px!important;height:42px!important;flex-basis:42px!important;}
  .image-slot-placeholder{padding:16px;}
  .image-slot-placeholder b{font-size:.96rem;}
  .image-slot-placeholder span{font-size:.78rem;}
  .filter-chips{grid-template-columns:1fr!important;}
}

@media (prefers-reduced-motion:reduce){
  .image-slot-card,.image-showcase-panel::before,.image-slot-figure::after{animation:none!important;}
}
