/*
Theme Name: Sindclubes DF
Theme URI: https://www.sindclubes-df.org.br/
Author: Sindclubes DF
Description: Tema do Sindclubes DF (renovação do site). Layout institucional em vermelho, com convenções, boletim e filiação em destaque.
Version: 1.0.5
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: sindclubes
*/

:root {
  --red: oklch(0.56 0.21 25);        /* vermelho do logo / camiseta */
  --red-deep: oklch(0.36 0.13 22);
  --ink: oklch(0.2 0.015 20);
  --muted: oklch(0.42 0.02 20);
  --mist: oklch(0.965 0.008 20);
  --line: oklch(0.88 0.012 20);
  --white: #fff;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Libre Franklin", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --z-sticky: 10;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible, .join :focus-visible, .page-head :focus-visible { outline-color: var(--white); }

.wrap { width: min(1200px, 100% - 2 * clamp(16px, 4vw, 48px)); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--white); padding: 10px 14px; z-index: 20; }
.skip:focus { top: 12px; }

/* barra superior */
.topbar { background: var(--ink); color: oklch(0.85 0.01 20); font-size: .75rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; }
.topbar-links { display: flex; gap: 20px; flex-shrink: 0; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--white); text-decoration: underline; }

/* cabeçalho */
.site-header { background: var(--white); position: sticky; top: 0; z-index: var(--z-sticky); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.brand img { width: 170px; }
#menu { font-weight: 600; font-size: .9rem; }
.menu-btn { display: none; font: 600 .9rem var(--body); background: none; border: 2px solid var(--ink); border-radius: 4px; padding: 8px 14px; cursor: pointer; }

/* botões */
.btn { display: inline-block; font-weight: 700; text-decoration: none; padding: 12px 22px; border-radius: 4px; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-white { background: var(--white); color: var(--red-deep); }
.btn-white:hover { background: var(--ink); color: var(--white); }

/* hero: a faixa vermelha */
.hero { background: var(--red); color: var(--white); padding-block: clamp(48px, 8vw, 104px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(3.4rem, 8vw, 6rem); line-height: .9; letter-spacing: -.01em; }
h1 .line { display: block; overflow: hidden; }
h1 .line > span { display: inline-block; animation: rise .9s var(--ease) both; }
h1 .line:nth-child(2) > span { animation-delay: .08s; }
h1 .line:nth-child(3) > span { animation-delay: .16s; }
h1 .line:nth-child(4) > span { animation-delay: .24s; }
h1 .line:nth-child(5) > span { animation-delay: .32s; color: var(--ink); }
@keyframes rise { from { transform: translateY(105%); } }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 34rem; margin: 28px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.link-white { color: var(--white); font-weight: 600; text-underline-offset: 5px; }
.link-white:hover { text-decoration-thickness: 2px; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; transform: rotate(1.5deg); box-shadow: 0 6px 0 var(--red-deep); }
.hero-photo figcaption { margin-top: 18px; font-size: .85rem; }
.hero-photo figcaption a { font-weight: 600; }

/* seletor de convenção */
.picker { padding-block: clamp(56px, 8vw, 104px); }
.picker h2, .services h2, .about h2, .join h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .95; letter-spacing: -.005em; }
.picker h2 { font-size: clamp(2.6rem, 5.5vw, 4.25rem); }
.picker-sub { color: var(--muted); font-size: 1.1rem; margin: 12px 0 36px; }
.picker-list { list-style: none; padding: 0; margin: 0 0 28px; border-top: 2px solid var(--ink); }
.picker-list a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 26px 8px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color .25s, padding .35s var(--ease); }
.picker-name { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.4rem); text-transform: uppercase; line-height: 1; }
.picker-doc { color: var(--muted); }
.picker-arrow { font-size: 1.8rem; color: var(--red); transition: transform .35s var(--ease); }
.picker-list a:hover { background: var(--mist); padding-left: 20px; }
.picker-list a:hover .picker-name { color: var(--red); }
.picker-list a:hover .picker-arrow { transform: translateX(6px); }
.link-red { color: var(--red); font-weight: 700; text-underline-offset: 5px; }

/* serviços */
.services { background: var(--mist); padding-block: clamp(56px, 7vw, 88px); }
.services-grid { display: grid; grid-template-columns: 1fr 2.6fr; gap: clamp(24px, 4vw, 64px); }
.services h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); }
.services-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; }
.services-list a { text-decoration: none; padding: 4px 28px 8px; border-left: 1px solid var(--line); }
.services-list h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.services-list p { margin: 0; color: var(--muted); }
.services-list a:hover h3 { color: var(--red); text-decoration: underline; text-underline-offset: 4px; }

/* sobre */
.about { padding-block: clamp(56px, 8vw, 104px); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about h2 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); margin-bottom: 18px; }
.about-grid > div p { max-width: 32rem; color: var(--muted); font-size: 1.1rem; margin: 0; }
.about-links { list-style: none; padding: 0; margin: 0; }
.about-links a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.about-links li:first-child a { border-top: 1px solid var(--line); }
.about-links a::after { content: "→"; float: right; color: var(--red); transition: transform .3s var(--ease); }
.about-links a:hover { color: var(--red); }
.about-links a:hover::after { transform: translateX(4px); }

/* filiação */
.join { background: var(--red-deep); color: var(--white); padding-block: clamp(48px, 7vw, 88px); }
.join-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px 48px; }
.join h2 { font-size: clamp(2.6rem, 6vw, 4.75rem); }
.join p { margin: 0; max-width: 26rem; font-size: 1.1rem; }

/* rodapé */
.site-footer { background: var(--ink); color: oklch(0.85 0.01 20); font-size: .9rem; padding-top: 48px; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid oklch(0.35 0.015 20); }
.footer-name { font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; color: var(--white); letter-spacing: .01em; }
.footer-grid p { margin: 8px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 28px; align-content: start; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--white); text-decoration: underline; }
.preview-note { font-size: .78rem; padding-block: 18px 28px; margin-block: 0; }

/* responsivo */
@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  #menu { display: none; width: 100%; padding-bottom: 8px; }
  #menu.open { display: block; }
}
@media (max-width: 820px) {
  .hero-grid, .about-grid, .services-grid { grid-template-columns: 1fr; }
  .hero-photo img { transform: none; }
  .picker-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .picker-doc { grid-row: 2; font-size: .9rem; }
  .picker-arrow { grid-row: 1 / 3; grid-column: 2; }
  .services-list a { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0; }
  .join-inner { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 560px) {
  .topbar .wrap > span:first-child { display: none; }
  .topbar .wrap { justify-content: flex-end; }
  .brand img { width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== WordPress: menu, submenus ===== */
#menu ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
#menu li { position: relative; }
#menu li > a { display: block; text-decoration: none; padding: 8px 11px; border-radius: 4px; }
#menu li:not(.menu-cta) > a:hover, #menu li:focus-within > a { background: var(--mist); }
#menu .current-menu-item > a, #menu .current-menu-ancestor > a { color: var(--red); }
#menu .menu-item-has-children > a::after { content: "▾"; margin-left: 5px; font-size: .75em; }
#menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--red); padding: 6px; list-style: none; z-index: var(--z-sticky); box-shadow: 0 8px 16px oklch(0.2 0.015 20 / .12); }
#menu li:hover > .sub-menu, #menu li:focus-within > .sub-menu { display: block; }
#menu .sub-menu a { padding: 10px 12px; white-space: nowrap; }
#menu .menu-cta > a { background: var(--red); color: var(--white); font-weight: 700; margin-left: 8px; padding: 10px 20px; }
#menu .menu-cta > a:hover { background: var(--red-deep); }
#menu a:not(.btn)[aria-current] { color: var(--red); }

/* acessibilidade: tamanho do texto */
.a11y { display: flex; gap: 6px; }
.a11y button { font: 600 .75rem var(--body); background: none; color: inherit; border: 1px solid oklch(0.5 0.01 20); border-radius: 3px; padding: 2px 8px; cursor: pointer; }
.a11y button:hover { background: var(--white); color: var(--ink); }

/* ===== páginas internas ===== */
.page-head { background: var(--red); color: var(--white); padding-block: clamp(32px, 5vw, 64px); }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
.page-head h1 .line > span { animation: none; }
.crumbs { font-size: .85rem; margin: 0 0 14px; }
.crumbs a { text-underline-offset: 3px; }
.page-meta { margin: 14px 0 0; font-size: .9rem; }
.page-body { padding-block: clamp(40px, 6vw, 80px); }
.entry { max-width: 46rem; font-size: 1.05rem; }
.entry > * + * { margin-top: 1em; }
.entry h2, .entry h3 { font-family: var(--display); text-transform: uppercase; line-height: 1; margin-top: 1.6em; }
.entry h2 { font-size: 2rem; } .entry h3 { font-size: 1.5rem; }
.entry a { color: var(--red); text-underline-offset: 3px; }
.entry img { max-width: 100%; height: auto; border-radius: 4px; }
.entry table { border-collapse: collapse; width: 100%; }
.entry td, .entry th { border: 1px solid var(--line); padding: 8px 10px; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.entry-wide { max-width: none; }

/* listas de arquivos */
.docs h2 { margin: 0 0 12px; }
.docs + .docs { margin-top: 40px; }
.docs ul { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.docs li a { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 6px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; transition: background-color .2s; }
.docs li a:hover { background: var(--mist); color: var(--red); }
.docs .tipo { font: 700 .72rem var(--body); letter-spacing: .06em; background: var(--ink); color: var(--white); border-radius: 3px; padding: 3px 7px; text-transform: uppercase; }
.docs-note { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.cat-list { list-style: none; padding: 0; margin: 0 0 40px; border-top: 2px solid var(--ink); max-width: 46rem; }
.cat-list a { display: flex; justify-content: space-between; padding: 22px 6px; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 1.9rem; text-transform: uppercase; text-decoration: none; line-height: 1; }
.cat-list a:hover { color: var(--red); background: var(--mist); }

/* boletim */
.posts { list-style: none; padding: 0; margin: 0; max-width: 56rem; border-top: 2px solid var(--ink); }
.posts li { border-bottom: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 7.5rem 1fr; gap: 20px; padding: 20px 6px; text-decoration: none; }
.posts time { color: var(--muted); font-size: .9rem; padding-top: .2em; }
.posts strong { display: block; font-size: 1.1rem; line-height: 1.3; }
.posts p { margin: 6px 0 0; color: var(--muted); }
.posts a:hover strong { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--ink); color: var(--white); border-color: var(--ink); }
.post-cover { max-width: 46rem; margin-bottom: 28px; }

/* início: últimas do boletim */
.latest { background: var(--mist); padding-block: clamp(48px, 7vw, 88px); }
.latest-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.latest h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(2rem, 3.5vw, 2.8rem); line-height: .95; }
.latest .posts { max-width: none; }

/* contato */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 80px); }
.contact-info dt { font-weight: 700; margin-top: 18px; }
.contact-info dd { margin: 2px 0 0; }
.form-row { margin-bottom: 18px; display: grid; gap: 6px; }
.form-row label { font-weight: 600; }
.form-row input, .form-row select, .form-row textarea { font: inherit; padding: 12px; border: 1px solid oklch(0.55 0.01 20); border-radius: 4px; width: 100%; background: var(--white); }
.form-row textarea { min-height: 150px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: 4px; margin-bottom: 24px; font-weight: 600; }
.notice-ok { background: oklch(0.93 0.06 150); color: oklch(0.3 0.08 150); }
.notice-err { background: oklch(0.93 0.05 25); color: var(--red-deep); }
button.btn { border: 0; cursor: pointer; font: 700 1rem var(--body); }

/* busca */
.search-form { display: flex; gap: 8px; max-width: 28rem; }
.search-form input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid oklch(0.55 0.01 20); border-radius: 4px; }

/* cookies */
.cookie-bar { position: fixed; inset: auto 0 0 0; z-index: 30; background: var(--ink); color: var(--white); padding: 14px 0; font-size: .9rem; }
.cookie-bar .wrap { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-bar a { text-underline-offset: 3px; }
.cookie-bar button { font: 700 .9rem var(--body); background: var(--white); color: var(--ink); border: 0; border-radius: 4px; padding: 10px 18px; cursor: pointer; }
.cookie-bar[hidden] { display: none; }
.footer-contact { margin: 8px 0 0; line-height: 1.7; }
.footer-contact a { text-underline-offset: 3px; }

@media (max-width: 1100px) {
  #menu ul { flex-direction: column; align-items: stretch; width: 100%; gap: 0; }
  #menu li > a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  #menu .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; }
  #menu .menu-item-has-children > a::after { content: none; }
  #menu .menu-cta > a { margin: 12px 0 0; text-align: center; border-radius: 4px; border: 0; }
}
@media (max-width: 820px) {
  .contact-grid, .form-two { grid-template-columns: 1fr; }
  .posts a { grid-template-columns: 1fr; gap: 4px; }
}
/* celular: aviso de cookies em uma faixa baixa, sem cobrir tanto o conteúdo */
@media (max-width: 560px) {
  .cookie-bar { padding: 10px 0; font-size: .8rem; line-height: 1.35; }
  .cookie-bar .wrap { flex-wrap: nowrap; gap: 12px; }
  .cookie-bar button { flex-shrink: 0; padding: 9px 14px; font-size: .85rem; }
}
/* o botão do VLibras é criado pelo script deles e fica fixo à direita: deixa folga para ele não cobrir texto */
@media (max-width: 820px) {
  main .wrap { padding-right: 44px; }
}

/* celular: cada linha do título da home cabe inteira ("tem sindicato." numa linha só) */
@media (max-width: 560px) {
  .hero h1 { font-size: min(3.4rem, calc((100vw - 80px) / 6.4)); }
  .hero h1 .line > span { white-space: nowrap; }
}
