/* ============ AJUSTES DO WORDPRESS ============
   Complementos ao CSS do layout aprovado (site.css e páginas):
   conteúdo do editor (blocos padrão), paginação, botão "Editar" e avisos. */

/* Avisos que só aparecem na prévia do editor */
.nautico-editor-empty { display: none; }

/* Botão flutuante "Editar esta página" (apenas para quem pode editar) */
.nautico-edit-link {
  position: fixed; z-index: 120; left: 1rem; bottom: 1rem;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .9rem; border-radius: 999px;
  background: #1e1e1e; color: #fff; text-decoration: none;
  font: 600 .8rem/1 var(--font); letter-spacing: .02em;
  box-shadow: var(--shadow-2); opacity: .85; transition: opacity .2s, transform .2s var(--ease);
}
.nautico-edit-link:hover, .nautico-edit-link:focus-visible { opacity: 1; transform: translateY(-2px); color: #fff; }
.nautico-edit-link svg { width: 14px; height: 14px; }

/* Foto real no lugar das iniciais (diretoria / comissão) */
.staff-avatar.has-photo { overflow: hidden; }
.staff-avatar__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Conteúdo das matérias (blocos padrão do editor) ---------- */
.blog-article > * + * { margin-top: 0; }
.blog-article .wp-block-image,
.blog-article .wp-block-gallery,
.blog-article .wp-block-embed,
.blog-article .wp-block-video,
.blog-article .wp-block-audio,
.blog-article .wp-block-quote,
.blog-article .wp-block-pullquote,
.blog-article .wp-block-group,
.blog-article .wp-block-file,
.blog-article .wp-block-table { margin-block: 1.75rem; }

.blog-article img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.blog-article figcaption,
.blog-article .wp-element-caption {
  margin-top: .55rem; font-size: var(--step--1); color: var(--grey); line-height: 1.45;
}
.blog-article a { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; }

/* Citação = destaque do layout */
.blog-article .wp-block-quote,
.blog-article .wp-block-pullquote {
  position: relative;
  margin-inline: 0;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  border: 0;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(194,25,40,.06), rgba(194,25,40,.02));
  box-shadow: inset 4px 0 0 var(--red);
  text-align: left;
}
.blog-article .wp-block-quote p,
.blog-article .wp-block-pullquote p {
  margin: 0; font-size: var(--step-1); font-weight: 600; font-style: italic; line-height: 1.5; color: var(--red-deep);
}
.blog-article .wp-block-quote cite,
.blog-article .wp-block-pullquote cite {
  display: block; margin-top: .75rem; font-size: var(--step--1); font-style: normal; font-weight: 700; color: var(--grey);
}

/* Galeria */
.blog-article .wp-block-gallery.has-nested-images {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem;
}
.blog-article .wp-block-gallery.has-nested-images figure.wp-block-image {
  width: 100% !important; margin: 0; overflow: hidden; border-radius: var(--r-md); background: var(--surface-3);
}
.blog-article .wp-block-gallery.has-nested-images figure.wp-block-image:first-child { grid-column: 1 / -1; }
.blog-article .wp-block-gallery.has-nested-images figure.wp-block-image img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0;
  transition: transform .6s var(--ease);
}
.blog-article .wp-block-gallery figure.wp-block-image:hover img { transform: scale(1.04); }
@media (min-width: 600px) {
  .blog-article .wp-block-gallery.has-nested-images.columns-3,
  .blog-article .wp-block-gallery.has-nested-images.columns-default { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Vídeo (YouTube) */
.blog-article .wp-block-embed.is-type-video .wp-block-embed__wrapper,
.blog-article .wp-block-video video {
  border-radius: var(--r-lg); overflow: hidden; background: #2a0a12; box-shadow: var(--shadow-2);
}
.blog-article .wp-block-embed.is-type-video iframe { border-radius: var(--r-lg); }

/* Áudio (podcast) */
.blog-article .wp-block-audio audio { width: 100%; }
.blog-article .wp-block-audio {
  padding: 1rem 1.25rem; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}

/* Estilo de grupo "Destaques" (caixa cinza com título em caixa-alta) */
.blog-article .wp-block-group.is-style-destaques {
  padding: 1.25rem 1.35rem; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.blog-article .wp-block-group.is-style-destaques h4,
.blog-article .wp-block-group.is-style-destaques h3 {
  margin: 0 0 .85rem; font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--red-deep);
}

/* Arquivos anexos (PDF) */
.blog-article .wp-block-file {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  padding: .9rem 1.1rem; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.blog-article .wp-block-file a:not(.wp-block-file__button) { font-weight: 700; }
.blog-article .wp-block-file .wp-block-file__button {
  margin-left: auto; padding: .45rem .9rem; border-radius: 999px; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; font-size: .8rem;
}

/* Tabelas */
.blog-article .wp-block-table table { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.blog-article .wp-block-table td, .blog-article .wp-block-table th { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }

/* ---------- Listagem do blog ---------- */
.blog-pagination { margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.blog-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; }
.blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem; padding: 0 .75rem;
  border-radius: 999px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .85rem;
}
.blog-pagination .page-numbers.current { background: var(--red); color: #fff; }
.blog-pagination a.page-numbers:hover { background: var(--red-deep); color: #fff; }
.blog-pagination .page-numbers.dots { background: none; }
.blog-filter { text-decoration: none; }
.blog-empty { padding: 2rem 0; color: var(--grey); }

/* Busca */
.blog-search { display: flex; gap: .5rem; }
.blog-search input[type="search"] {
  flex: 1; min-width: 0; height: 2.6rem; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line); font: inherit;
}

/* Página genérica (conteúdo livre do editor) */
.page-content { padding-block: var(--section-space); }
.page-content > .shell > * + * { margin-top: 1rem; }
.page-content .wp-block-image img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.staff-modal [data-staff-field="avatar"] { display: contents; }

/* Próximos jogos: com mais de 2 jogos, vira carrossel também no desktop (2 por vez) */
.matches__nav { display: none; }
@media (min-width: 721px) {
  .matches > .shell:has(.matches__grid--carousel) { position: relative; }
  .matches__grid--carousel {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - clamp(1.5rem, 5vw, 4rem)) / 2);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  .matches__grid--carousel::-webkit-scrollbar { display: none; }
  .matches__grid--carousel .match { scroll-snap-align: start; }
  .matches__grid--carousel .match + .match::before { left: calc(clamp(1.5rem, 5vw, 4rem) / -2 + 1px); }
  .matches__nav {
    display: flex; justify-content: space-between;
    position: absolute; z-index: 2; left: max(4px, calc(var(--gutter) / 2 - 23px)); right: max(4px, calc(var(--gutter) / 2 - 23px));
    top: 50%; transform: translateY(-50%); pointer-events: none;
  }
  .matches__nav .cbtn { pointer-events: auto; }
}

/* Destaques (hero): imagem/vídeo por dispositivo e elementos opcionais */
.hero [hidden] { display: none !important; }
.hero__slide picture { display: block; width: 100%; height: 100%; }
.hero__video { position: absolute; inset: 0; opacity: 0; }
.hero__video.is-playing, .nautico-block-preview .hero__video { opacity: 1; }
.hero__slide-link { position: absolute; inset: 0; z-index: 1; }
.hero__content { pointer-events: none; }
.hero__content a, .hero__content button { pointer-events: auto; }
.hero__scrim { transition: opacity .6s var(--ease); }
.hero.hero--no-scrim .hero__scrim { opacity: 0; }
.hero__img { object-position: var(--foco, 50% 50%); }
@media (max-width: 720px) { .hero__img { object-position: var(--foco-m, var(--foco, 50% 50%)); } }
.hero--center .hero__content { align-items: center; text-align: center; }
.hero--center .hero__tag { align-self: center; }
.hero--center .hero__title, .hero--center .hero__sub { margin-inline: auto; }
.hero--center .hero__cta, .hero--center .hero__dots { justify-content: center; }
.hero.is-media-only .hero__slide-link { z-index: 3; }

/* Banner de publicidade: versão quadrada no celular */
.ad picture { display: block; }
@media (max-width: 720px) {
  .ad.ad--has-mobile img { aspect-ratio: 1 / 1; object-position: center; }
}
@media (min-width: 721px) {
  .ad.ad--mobile-only { display: none; }
}

/* Selo "powered by Sofascore" nos heros com dados do Sofascore. */
.sofa-badge {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  margin-top: 1.5rem;
  padding: .7rem 1.1rem .7rem .95rem;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(60,0,8,.22), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.sofa-badge:hover,
.sofa-badge:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,.08));
  border-color: rgba(255,255,255,.55);
}
.sofa-badge:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.sofa-badge__label {
  padding-right: .85rem;
  border-right: 1px solid rgba(255,255,255,.35);
  font-size: .62rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
}
.sofa-badge__logo { display: block; width: auto; height: 1.35rem; }
.sofa-badge--player { margin: 1.1rem 0 .4rem; }
@media (max-width: 600px) {
  .sofa-badge { gap: .65rem; padding: .55rem .85rem .55rem .75rem; }
  .sofa-badge__label { padding-right: .65rem; font-size: .56rem; }
  .sofa-badge__logo { height: 1.1rem; }
}
