/*
Theme Name: K2 Montanha
Theme URI: https://k2consultoria.com
Author: K2 Consultoria Econômica
Description: Tema do site da K2 Consultoria Econômica (identidade "Montanha"). Funciona junto com o plugin K2 Processos, que guarda os processos e as movimentações.
Version: 1.8.2
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: k2-montanha
*/

/* ---------- Fontes (hospedadas no próprio site) ---------- */
/* latin-ext */
@font-face {
  font-family: 'Google Sans Flex';
  font-style: normal;
  font-weight: 1 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/fonts/google-sans-flex-1-1000-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Google Sans Flex';
  font-style: normal;
  font-weight: 1 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/fonts/google-sans-flex-1-1000-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-400-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-400-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-500-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-500-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base (igual ao protótipo) ---------- */
html { scroll-behavior: smooth; }
body { margin: 0; background: #FFFDF7; color: #0C2340; font-family: "Google Sans Flex", "Helvetica Neue", Helvetica, sans-serif; -webkit-font-smoothing: antialiased; text-wrap: pretty; }
a { color: #0C2340; text-decoration: none; }
a:hover { color: #5A5A3E; }
::selection { background: #C4D1D7; }
input::placeholder { color: rgba(12,35,64,0.45); }
img { max-width: 100%; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 78px; }
.k2-ev { scroll-margin-top: 150px; }
:focus-visible { outline: 2px solid #5A5A3E; outline-offset: 3px; }
.k2-dark :focus-visible, .k2-dark:focus-visible { outline-color: #C4D1D7; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.k2-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: #0C2340; color: #FFFDF7; border-radius: 999px; }
.k2-skip:focus { top: 12px; color: #FFFDF7; }

/* ---------- Efeitos de passar o mouse (os estilos do protótipo estão inline) ---------- */
.hv-navy:hover { background: #0C2340 !important; color: #FFFDF7 !important; }
.hv-olive:hover { background: #5A5A3E !important; color: #FFFDF7 !important; }
.hv-olive-bg:hover { background: #5A5A3E !important; }
.hv-mist:hover { background: #C4D1D7 !important; }
.hv-mist25:hover { background: rgba(196,209,215,0.25) !important; }
.hv-bd-navy:hover { border-color: #0C2340 !important; }
.hv-bd-cream:hover { border-color: #FFFDF7 !important; }
.hv-c-mist:hover { color: #C4D1D7 !important; }
.hv-c-cream:hover { color: #FFFDF7 !important; }
.hv-op:hover { opacity: .8; }
a, button { transition: background-color .15s, color .15s, border-color .15s, opacity .15s; }

/* ---------- Cabeçalho ---------- */
.k2-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 0 clamp(20px,4vw,64px); height: 78px; background: rgba(255,253,247,0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid #C4D1D7; view-transition-name: k2-header; }
.admin-bar .k2-header { top: 32px; }
.k2-logo { display: flex; align-items: center; }
.k2-logo img { display: block; height: 46px; width: auto; }
.k2-nav { display: flex; align-items: center; gap: clamp(16px,2.4vw,36px); font-size: 14px; font-weight: 500; letter-spacing: 0.01em; }
.k2-nav a.is-current { color: #5A5A3E; }
.k2-nav .k2-cta { display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 999px; background: #0C2340; color: #FFFDF7; }
.k2-nav .k2-cta:hover { background: #5A5A3E; color: #FFFDF7; }
.k2-menu-btn { display: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: #0C2340; background: transparent; border: 1px solid #C4D1D7; border-radius: 999px; padding: 10px 18px; }

@media (max-width: 860px) {
	.k2-menu-btn { display: block; }
	.k2-nav { display: none; position: absolute; top: 78px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px clamp(20px,4vw,64px) 20px; background: #FFFDF7; border-bottom: 1px solid #C4D1D7; font-size: 17px; }
	.k2-nav.is-open { display: flex; }
	.k2-nav a { padding: 14px 0; border-bottom: 1px solid rgba(196,209,215,0.6); }
	.k2-nav .k2-cta { margin-top: 14px; justify-content: center; border-bottom: 0; }
	.k2-logo img { height: 38px; }
}

/* ---------- Página inicial: abas de processos ---------- */
.k2-aba { cursor: pointer; font-family: inherit; border: 1px solid #C4D1D7; background: transparent; color: #0C2340; padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 500; letter-spacing: 0.01em; }
.k2-aba:hover { border-color: #0C2340; }
.k2-aba.is-active { border-color: #0C2340; background: #0C2340; color: #FFFDF7; font-weight: 600; }
.k2-aba span { opacity: .55; }
.k2-caso { background: #FFFDF7; min-height: 48px; padding: 22px 26px; border-bottom: 1px solid #C4D1D7; border-right: 1px solid #C4D1D7; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: clamp(17px, 1.35vw, 19px); font-weight: 600; line-height: 1.25; text-transform: uppercase; }
.k2-caso:hover { background: #C4D1D7; color: #0C2340; }
.k2-caso small { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 400; color: #5A5A3E; text-transform: none; }

/* ---------- Página inicial: dúvidas ---------- */
.k2-faq-btn { cursor: pointer; font-family: inherit; width: 100%; background: transparent; border: 0; padding: 26px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; text-align: left; color: #0C2340; }
.k2-faq-btn:hover .k2-faq-q { color: #5A5A3E; }

/* ---------- Página do processo: fases ---------- */
.k2-fase { cursor: pointer; font-family: inherit; text-align: left; background: transparent; border: 0; padding: 0 18px 20px 0; color: #0C2340; display: flex; flex-direction: column; gap: 14px; }
.k2-fase:hover { opacity: .8; }
.k2-fase-bar { display: none; height: 3px; width: 100%; background: #0C2340; }
.k2-fase.is-sel .k2-fase-bar { display: block; }

/* ---------- Página do processo: alternadores e filtros ---------- */
.k2-vista { cursor: pointer; font-family: inherit; border: 0; background: transparent; color: #0C2340; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.k2-vista.is-active { background: #0C2340; color: #FFFDF7; font-weight: 600; }
.k2-filtro { cursor: pointer; font-family: inherit; border: 1px solid #C4D1D7; background: transparent; color: #0C2340; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; display: flex; gap: 6px; }
.k2-filtro:hover { border-color: #0C2340; }
.k2-filtro span { opacity: .55; }
.k2-filtro.is-active { border-color: #0C2340; background: #0C2340; color: #FFFDF7; font-weight: 600; }
.k2-filtro.is-active span { opacity: .6; font-weight: 400; }
.k2-busca input[type=search]::-webkit-search-cancel-button { cursor: pointer; }
.k2-busca:focus-within { border-color: #0C2340 !important; }
.k2-busca input:focus-visible { outline: none; }

/* ---------- Página do processo: linha do tempo ---------- */
.k2-ev-btn { cursor: pointer; font-family: inherit; width: 100%; text-align: left; background: transparent; border: 0; padding: 18px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; color: #0C2340; }
.k2-ev-btn:hover { background: rgba(196,209,215,0.25); }
.k2-ev.is-preview > div:last-child > div { outline: 2px dashed #5A5A3E; outline-offset: 4px; }
.k2-ev-txt a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.k2-ev-flash > div:last-child > div { animation: k2flash 1.6s ease-out 1; }
@keyframes k2flash { 0% { background: #C4D1D7; } 100% { background: #FFFDF7; } }
.k2-preview-bar { position: sticky; bottom: 0; z-index: 60; padding: 12px clamp(20px,4vw,64px); background: #5A5A3E; color: #FFFDF7; font-size: 14px; text-align: center; }

/* Documentos em tabela */
.k2-docs-row { display: grid; grid-template-columns: 110px minmax(0,1fr) 150px 150px; gap: 16px; }
.k2-rels-row { display: grid; grid-template-columns: 150px minmax(0,1fr) 150px; gap: 16px; }

@media (max-width: 700px) {
	.k2-docs-head { display: none !important; }
	.k2-docs-row { grid-template-columns: 1fr auto; row-gap: 4px; }
	.k2-docs-row > :nth-child(1) { grid-column: 1 / -1; }
	.k2-docs-row > :nth-child(3) { grid-column: 1; }
	.k2-docs-row > :nth-child(2) { grid-column: 1 / -1; }
	.k2-docs-row > :nth-child(4) { grid-column: 2; grid-row: 3; }
	.k2-rels-row { grid-template-columns: 1fr auto; row-gap: 4px; }
	.k2-rels-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
	.k2-rels-row > :nth-child(3) { grid-column: 2; grid-row: 1; }
	.k2-ev-grid { grid-template-columns: 40px 12px minmax(0,1fr) !important; column-gap: 12px !important; }
	.k2-aside { position: static !important; }
}

/* ---------- Páginas comuns (conteúdo do site antigo) ---------- */
.k2-conteudo { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.7; color: rgba(12,35,64,0.85); }
.k2-conteudo > * { margin: 0 0 1.1em; }
.k2-conteudo h2, .k2-conteudo h3, .k2-conteudo h4 { color: #0C2340; line-height: 1.2; letter-spacing: -0.02em; margin: 1.8em 0 .6em; }
.k2-conteudo h2 { font-size: clamp(24px,2.6vw,32px); }
.k2-conteudo h3 { font-size: 22px; }
.k2-conteudo a { text-decoration: underline; text-underline-offset: 3px; }
.k2-conteudo ul, .k2-conteudo ol { padding-left: 1.3em; }
.k2-conteudo img { height: auto; }
.k2-conteudo table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.k2-conteudo th, .k2-conteudo td { border-bottom: 1px solid #C4D1D7; padding: 10px 8px; text-align: left; }
.k2-conteudo .wp-block-button__link, .k2-conteudo .wp-block-file__button { display: inline-block; padding: 10px 18px; border-radius: 999px; background: #0C2340; color: #FFFDF7; text-decoration: none; }

/* ---------- Transição suave entre páginas ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

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

/* Números da abertura: espaço igual entre os quatro blocos */
.k2-numeros { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px clamp(24px,4vw,64px); }
@media (max-width: 600px) {
	.k2-numeros { display: grid; grid-template-columns: 1fr 1fr; }
}
#k2-movs { scroll-margin-top: 90px; }

/* Textos corridos justificados (no celular, à esquerda: a coluna é estreita) */
p, .k2-just { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 600px) { p, .k2-just { text-align: left; } }

/* Áreas de atuação: 4 caixas lado a lado (2 no tablet, 1 no celular) */
.k2-areas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(196,209,215,0.22); border: 1px solid rgba(196,209,215,0.22); }
.k2-area-lista { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; }
.k2-area-lista li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.45; color: #C4D1D7; }
.k2-area-lista li::before { content: ""; flex: 0 0 auto; width: 4px; height: 4px; margin-top: 9px; border-radius: 50%; background: #C4D1D7; }
@media (max-width: 1000px) { .k2-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .k2-areas { grid-template-columns: 1fr; } }

/* Página Modelos no celular: botão de download abaixo do texto */
@media (max-width: 700px) {
	.k2-modelo { grid-template-columns: 36px minmax(0, 1fr) !important; row-gap: 14px; }
	.k2-modelo .k2-modelo-btn { grid-column: 2; justify-self: start; }
}

/* Cabeçalho do processo: nome à esquerda; "Última atualização" sempre no canto direito */
.k2-proc-topo { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: clamp(28px, 5vw, 80px); row-gap: 20px; }
.k2-proc-status { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; white-space: nowrap; }
@media (max-width: 700px) {
	.k2-proc-topo { grid-template-columns: 1fr; }
	.k2-proc-status { align-items: flex-start; text-align: left; }
}

/* Links longos dentro de textos quebram sem estourar a coluna */
.k2-info-texto a, .k2-ev-txt a { overflow-wrap: anywhere; hyphens: none; }

/* Nomes de anexo longos sem espaço (ex.: números de processo) quebram em vez de estourar a tela */
.k2-ev-corpo a span, .k2-doc span, .k2-rel span, .k2-modelo h2, .k2-aside a span { overflow-wrap: anywhere; min-width: 0; }
