/* betvip mobile CWV — Responsive / LCP / INP / CLS / Blog reading — v202609059mob */

:root {
  --betvip-header-h: 60px;
  --betvip-touch: 48px;
  --betvip-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --betvip-sticky-h: 56px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--betvip-header-h) + env(safe-area-inset-top, 0px) + 8px);
}

body {
  font-family: var(--betvip-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* CLS: reserve header height */
#site-header.fixed-scroll,
#site-header.has-sticky-mobile {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: env(safe-area-inset-top, 0);
}

#site-header-inner.container {
  min-height: var(--betvip-header-h);
  padding-left: max(15px, env(safe-area-inset-left, 0px));
  padding-right: max(15px, env(safe-area-inset-right, 0px));
}

#site-logo img,
#site-header .custom-logo {
  width: 112px;
  height: 40px;
  max-width: 140px;
  max-height: 40px;
  aspect-ratio: 112 / 40;
  object-fit: contain;
  object-position: center center;
}

/* LCP/CLS: hero carousel 16/9 box (no min-height guess) */
.elementor-image-carousel-wrapper,
.elementor-image-carousel-wrapper.swiper {
  aspect-ratio: 16 / 9;
  min-height: 0;
  width: 100%;
  background: #000000;
  contain: layout paint;
  overflow: hidden;
}

.elementor-image-carousel img,
.swiper-slide-image {
  background: #e5e7eb;
}

/* CLS: below-fold sections */
#betvip-soft-article,
#betvip-faq,
#betvip-inline-links {
  contain-intrinsic-size: auto 600px;
}

/* INP: instant tap feedback, no layout shift */
a,
button,
.mobile-menu,
.cms-download-btn,
.elementor-button,
.betvip-sticky-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.elementor-button:active,
.cms-download-btn:active,
.betvip-sticky-btn:active,
#mobile-dropdown .menu a:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.oceanwp-mobile-menu-icon .mobile-menu {
  min-width: var(--betvip-touch);
  min-height: var(--betvip-touch);
}

#mobile-dropdown {
  top: calc(var(--betvip-header-h) + env(safe-area-inset-top, 0px));
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  background-color: #000000 !important;
  color: #fff !important;
}

#mobile-dropdown .menu a,
#mobile-dropdown ul li a {
  min-height: var(--betvip-touch);
  font-size: 16px;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#footer-bottom {
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding-left: max(15px, env(safe-area-inset-left, 0px));
  padding-right: max(15px, env(safe-area-inset-right, 0px));
}

/* Blog list CLS */
body.blog .blog-entry.col.span_1_of_3 {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

body.blog #blog-entries .blog-entry:nth-child(-n + 2) {
  content-visibility: visible;
}

/* Blog sticky download bar (mobile) */
.betvip-mobile-sticky-cta {
  display: none;
}

@media (max-width: 767px) {
  body.blog.single-post {
    padding-bottom: calc(var(--betvip-sticky-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }

  body.blog.single-post .betvip-mobile-sticky-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    gap: 8px;
    padding: 8px max(12px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-right, 0px));
    background: rgba(22, 22, 22, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
  }

  .betvip-sticky-btn {
    flex: 1 1 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--betvip-touch);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.12s ease, opacity 0.12s ease;
  }

  .betvip-sticky-android {
    background: #d32f2f;
    color: #fff !important;
  }

  .betvip-sticky-ios {
    background: #f5e800;
    color: #000000 !important;
  }

  body.blog #primary.content-area {
    padding-right: 0;
  }

  body.blog .cms-post-content {
    font-size: 17px;
    line-height: 1.78;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
  }

  body.blog .cms-post-content h2,
  body.blog .cms-post-content h3 {
    scroll-margin-top: calc(var(--betvip-header-h) + 12px);
  }

  .elementor-button,
  .cms-download-btn,
  .down .elementor-button-wrapper a {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    min-height: var(--betvip-touch);
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  body.blog .blog-entry.col.span_1_of_3 {
    width: 100%;
  }

  .seo-table-wrap {
    margin-left: -4px;
    margin-right: -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .elementor-button:active,
  .cms-download-btn:active,
  .betvip-sticky-btn:active {
    transform: none;
  }
}

@media (hover: none) {
  .cms-download-btn:hover,
  .elementor-button:hover,
  .betvip-sticky-btn:hover {
    transform: none;
  }
}

/* === Mobile CWV v20260909m5 — Responsive / LCP / INP / CLS / leitura === */
img, video, svg, canvas {
  max-width: 100%;
  height: auto;
}

input, select, textarea, button {
  font-family: inherit;
}

/* iOS: 16px evita zoom ao focar; 48px tap */
@media (max-width: 1023px) {
  input,
  select,
  textarea,
  .wp-block-search__input,
  .mobile-searchform .field {
    font-size: 16px !important;
    min-height: var(--betvip-touch);
    line-height: 1.3;
  }

  #menu-footer a,
  #copyright a,
  .infinite-scroll-nav a,
  .cms-related a,
  .trail-item a {
    min-height: var(--betvip-touch);
    display: inline-flex;
    align-items: center;
  }

  #footer-bottom-menu .menu {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
  }
}

/* CLS: LCP hero = 16/9 estável (alinha com critical) */
.elementor-image-carousel-wrapper,
.elementor-image-carousel-wrapper.swiper {
  aspect-ratio: 16 / 9;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

body.blog article .thumbnail,
body.blog .blog-entry .thumbnail-link {
  aspect-ratio: 2 / 1;
  background: #e5e7eb;
  overflow: hidden;
  contain: layout paint;
}

body.blog article .thumbnail img,
body.blog .blog-entry .thumbnail-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2 / 1;
}

/* FAQ / blocos longos: não reservar 600px falso (CLS ao rolar) */
@media (max-width: 767px) {
  #betvip-soft-article,
  #betvip-faq,
  #betvip-inline-links {
    content-visibility: visible;
    contain-intrinsic-size: unset;
  }

  .elementor-button-wrapper {
    width: 100%;
  }

  .down .elementor-button-wrapper,
  .down .elementor-button {
    width: 100%;
    max-width: 100%;
  }

  h1, .elementor-heading-title.elementor-size-default {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .elementor-widget-text-editor,
  .elementor-widget-text-editor p {
    font-size: 16px;
    line-height: 1.7;
  }

  .seo-table-wrap table td,
  .seo-table-wrap table th {
    font-size: 14px;
    padding: 8px 10px;
  }
}

body.mobile-menu-open .betvip-mobile-sticky-cta,
body.mobile-menu-open #scroll-top {
  visibility: hidden;
  pointer-events: none;
}

/* Blog leitura mobile */
@media (max-width: 767px) {
  body.blog #content-wrap.container {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: 24px;
  }

  body.blog.single-post #content-wrap.container {
    padding-bottom: calc(var(--betvip-sticky-h) + env(safe-area-inset-bottom, 0px) + 28px);
  }

  body.blog .single-post-title {
    font-size: clamp(1.375rem, 6vw, 1.75rem);
    line-height: 1.28;
    letter-spacing: -0.01em;
  }

  body.blog .entry-meta-seo {
    font-size: 13px;
    line-height: 1.5;
  }

  body.blog .cms-post-content {
    font-size: 17px;
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: #222;
    max-width: 40rem;
  }

  body.blog .cms-post-content p {
    margin: 0 0 1.15em;
  }

  body.blog .cms-post-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
  }

  body.blog .cms-post-content a {
    text-underline-offset: 3px;
    padding: 2px 0;
  }

  body.blog .cms-related a {
    padding: 6px 0;
    line-height: 1.45;
  }

  body.blog .blog-entry-title {
    font-size: 1.125rem;
    min-height: 0;
  }

  body.blog .page-header {
    padding: 12px 0 10px;
    margin-bottom: 16px;
  }
}

/* Cards abaixo da dobra: sem content-visibility (CLS no mobile) */
@media (max-width: 767px) {
  body.blog .blog-entry.col.span_1_of_3 {
    content-visibility: visible;
    contain-intrinsic-size: unset;
  }
}

/* E-E-A-T disclosure + equipe (v20260909eeat) */
.cms-download-disclosure {
  margin: 10px 0 0;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #4b5563;
  background: #fffde8;
  border-left: 3px solid #f5e800;
  border-radius: 4px;
}
.cms-download-disclosure code { font-size: 0.8rem; }
.entry-meta-seo a.author-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.betvip-equipe-card { contain: layout style; }
img.attachment-full.size-full.wp-post-image { aspect-ratio: 2 / 1; object-fit: cover; height: auto; }
