/* =============================================================================
   main.css — Clínica Recuperando Vida
   Estilos base do tema. Design visual final será desenvolvido nas fases seguintes.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Variáveis CSS
   ----------------------------------------------------------------------------- */
:root {
    --color-primary:    #1a3a5c;
    --color-secondary:  #2e7d32;
    --color-accent:     #ff6f00;
    --color-text:       #333333;
    --color-text-light: #666666;
    --color-bg:         #ffffff;
    --color-bg-alt:     #f5f5f5;
    --color-border:     #e0e0e0;

    --font-base:        'Georgia', serif;
    --font-sans:        'Helvetica Neue', Arial, sans-serif;

    --spacing-xs:  0.5rem;
    --spacing-sm:  1rem;
    --spacing-md:  1.5rem;
    --spacing-lg:  2.5rem;
    --spacing-xl:  4rem;

    --max-width:   1200px;
    --border-radius: 4px;
}

/* -----------------------------------------------------------------------------
   Reset básico
   ----------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
    touch-action: none;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

iframe {
    max-width: 100%;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    list-style: none;
}

/* -----------------------------------------------------------------------------
   Layout base
   ----------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--spacing-sm);
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding-block: var(--spacing-lg);
}

/* Remove top-padding on homepage — hero extends edge-to-edge */
.home .site-main {
    padding-top: 0;
}

/* =============================================================================
   TOP BAR — Faixa institucional azul escuro
   Estrutura: Logo (esquerda) | Info boxes (centro) | WhatsApp + Social (direita)
   ============================================================================= */
.site-topbar {
    background-color: #0f2236;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    line-height: 1.4;
    border-bottom: none;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin-inline: auto;
    padding: 14px var(--spacing-sm);
    gap: var(--spacing-md);
}

/* Logo na topbar */
.topbar-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.topbar-logo img,
.topbar-logo .custom-logo {
    max-height: 52px;
    width: auto;
    display: block;
    object-fit: contain;
}

.topbar-logo .custom-logo-link {
    display: flex;
    align-items: center;
}

.topbar-logo__text {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.topbar-logo__text:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* Info boxes (centro) */
.topbar-info {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: center;
}

/* Info box — bloco individual com ícone + título/valor */
.topbar-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 24px;
    margin-right: 24px;
    padding-left: 32px;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.topbar-box--link:hover {
    color: #ffffff;
    text-decoration: none;
}

/* Divider vertical entre info boxes */
.topbar-box::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.12);
}

.topbar-box:last-child {
    padding-right: 0;
    margin-right: 0;
}

.topbar-box:last-child::after {
    display: none;
}

/* Ícone do info box */
.topbar-box__icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

/* Texto do info box — título + valor empilhados */
.topbar-box__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.topbar-box__title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.2;
}

.topbar-box__value {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    line-height: 1.3;
}

.topbar-box--link:hover .topbar-box__value {
    color: #ffffff;
}

/* Zona direita: WhatsApp + Social */
.topbar-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* WhatsApp link inline */
.topbar-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #25d366;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.2s;
    padding-right: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar-whatsapp:hover {
    opacity: 0.8;
    text-decoration: none;
    color: #25d366;
}

.topbar-whatsapp span {
    color: rgba(255, 255, 255, 0.9);
}

/* Redes sociais — círculos sutis */
.topbar-social {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.topbar-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.25s ease;
    text-decoration: none;
}

.topbar-social__link:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* =============================================================================
   HEADER — Design premium (fundo branco, texto escuro)
   Estrutura: nav | CTA + busca + hamburguer
   ============================================================================= */

/* Header base */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    color: var(--color-text);
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom-color: transparent;
}

/* Inner wrapper — duas zonas: nav + actions */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--spacing-sm);
    min-height: 60px;
}

/* -----------------------------------------------------------------------------
   Zona 1 — Navegação desktop (alinhada à esquerda)
   ----------------------------------------------------------------------------- */
.header-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Lista principal */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

/* Item de primeiro nível */
.nav-menu > li {
    position: relative;
    display: flex;
    align-items: center;
}

/* Link de primeiro nível */
.nav-menu > li > .nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 24px;
    height: 60px;
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-menu > li > .nav-link:hover,
.nav-menu > li:hover > .nav-link {
    color: var(--color-primary);
    background-color: transparent;
}

/* Item atual */
.nav-menu > li.current-menu-item > .nav-link,
.nav-menu > li.current-menu-parent > .nav-link,
.nav-menu > li.current-menu-ancestor > .nav-link {
    color: var(--color-primary);
    font-weight: 700;
    border-bottom: 3px solid var(--color-secondary);
}

/* Botão de toggle submenu (chevron) — indicador visual desktop */
.submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    margin-left: -8px;
    margin-right: 6px;
    color: #999;
    line-height: 1;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: color 0.2s;
    pointer-events: none;
    cursor: default;
}

.nav-menu > li:hover > .submenu-toggle {
    color: var(--color-primary);
}

/* Submenus internos (nível 2+): chevron menor */
.sub-menu .submenu-toggle {
    color: #aaa;
    margin-left: 0;
    margin-right: 10px;
}

.sub-menu li:hover > .submenu-toggle {
    color: var(--color-primary);
}

/* -----------------------------------------------------------------------------
   Dropdowns desktop
   ----------------------------------------------------------------------------- */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    max-height: 70vh;
    overflow-y: auto;
    background-color: white;
    border-top: 2px solid var(--color-secondary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 100;
}

/* Abrir dropdown no hover — desktop */
@media (hover: hover) and (pointer: fine) {
    .nav-menu > li:hover > .sub-menu {
        display: block;
    }
}

/* Links dentro do dropdown */
.nav-menu .sub-menu li {
    display: flex;
    align-items: center;
}

.nav-menu .sub-menu .nav-link {
    display: block;
    flex: 1;
    padding: 11px 20px;
    color: var(--color-text);
    font-size: 0.88rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.nav-menu .sub-menu .nav-link:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-primary);
    border-left-color: var(--color-secondary);
}

/* Item atual no dropdown */
.nav-menu .sub-menu li.current-menu-item > .nav-link {
    color: var(--color-primary);
    font-weight: 600;
}

/* Dropdown aberto via JS (aria-expanded) */
.nav-menu li.is-open > .sub-menu {
    display: block;
}

/* -----------------------------------------------------------------------------
   Zona 3 — Actions (WhatsApp + Busca + Hamburguer)
   ----------------------------------------------------------------------------- */
.header-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    padding-left: 16px;
    margin-left: 8px;
}

/* CTA Button — Header */
.header-cta {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background-color: var(--color-secondary);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
    transition: background-color 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

.header-cta:hover {
    background-color: #1b5e20;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.35);
    text-decoration: none;
    color: #fff;
}

/* Busca */
.header-search {
    display: flex;
    align-items: center;
    position: relative;
}

.header-search__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    border-radius: 50%;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
}

.header-search__toggle:hover {
    color: var(--color-primary);
}

.header-search__form {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 340px;
    background-color: white;
    border-top: 2px solid var(--color-secondary);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    padding: 14px;
    z-index: 200;
}

.header-search__form.is-open {
    display: block;
}

.header-search__input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 9px 12px;
    font-size: 0.9rem;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s ease;
}

.header-search__input:focus {
    border-color: var(--color-primary);
}

/* Hamburguer — oculto no desktop */
.header-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    padding: 8px;
    transition: background-color 0.2s ease;
}

.header-hamburger:hover {
    background-color: var(--color-bg-alt);
}

.header-hamburger__bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hamburguer animado quando aberto */
.nav-open .header-hamburger .header-hamburger__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-open .header-hamburger .header-hamburger__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-open .header-hamburger .header-hamburger__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============================================================================
   HEADER — Responsivo mobile (≤ 768px)
   ============================================================================= */
@media (max-width: 768px) {

    /* Topbar mobile: show only logo + hamburger (hide info boxes and social) */
    .site-topbar {
        display: block;
    }

    .topbar-inner {
        padding: 10px var(--spacing-sm);
    }

    .topbar-info,
    .topbar-right {
        display: none;
    }

    .header-inner {
        flex-wrap: nowrap;
        min-height: 56px;
        padding-inline: var(--spacing-sm);
    }

    /* Ocultar CTA no mobile */
    .header-cta {
        display: none;
    }

    /* Remove separator on mobile */
    .header-actions {
        position: relative;
        z-index: 1202;
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        gap: 8px;
    }

    /* Mostrar hamburguer */
    .header-hamburger {
        display: flex;
    }

    .header-search__toggle,
    .header-hamburger {
        width: 44px;
        height: 44px;
        color: var(--color-text);
        background-color: #ffffff;
        border: 1px solid var(--color-border);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .header-search__toggle:hover,
    .header-search__toggle:focus-visible,
    .header-hamburger:hover,
    .header-hamburger:focus-visible {
        color: var(--color-primary);
        background-color: #f8fafc;
        outline: 2px solid rgba(46, 125, 50, 0.25);
        outline-offset: 2px;
    }

    /* Nav: drawer vertical branco, organizado e oculto por padrão */
    .header-nav {
        display: block;
        position: fixed;
        top: var(--mobile-header-bottom, 56px);
        left: 0;
        width: min(360px, 92vw);
        height: calc(100vh - var(--mobile-header-bottom, 56px));
        height: calc(100dvh - var(--mobile-header-bottom, 56px));
        background-color: #ffffff;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(-105%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.28s ease, visibility 0.28s ease;
        z-index: 1200;
        padding: 10px 0 calc(var(--spacing-xl) + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    /* Nav aberto */
    .nav-open .header-nav {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        box-shadow: 18px 0 40px rgba(15, 34, 54, 0.16);
    }

    /* Overlay escuro ao abrir o menu */
    .nav-open::before {
        content: '';
        position: fixed;
        inset: var(--mobile-header-bottom, 56px) 0 0 0;
        background: rgba(15, 34, 54, 0.28);
        z-index: 1199;
    }

    /* Lista no mobile */
    .nav-menu {
        display: block;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0;
    }

    .nav-menu > li {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 48px;
        align-items: center;
        width: 100%;
        border-bottom: 1px solid #edf0f3;
        background-color: #ffffff;
    }

    .nav-menu > li:not(.menu-item-has-children) {
        grid-template-columns: 1fr;
    }

    /* Links no mobile — fundo branco com texto preto */
    .nav-menu .nav-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-width: 0;
        height: auto;
        min-height: 50px;
        padding: 14px 16px;
        color: #111827;
        font-size: 0.96rem;
        text-transform: none;
        letter-spacing: 0;
        line-height: 1.25;
        white-space: normal;
    }

    .nav-menu > li > .nav-link {
        font-weight: 600;
        height: auto;
        border-bottom: none;
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link:focus-visible,
    .nav-menu > li.current-menu-item > .nav-link,
    .nav-menu > li.current-menu-parent > .nav-link,
    .nav-menu > li.current-menu-ancestor > .nav-link {
        color: var(--color-primary);
        background-color: #f5f8fb;
        text-decoration: none;
        border-bottom: none;
    }

    /* Botão chevron no mobile */
    .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: auto;
        margin-right: 8px;
        border-radius: 50%;
        pointer-events: auto;
        cursor: pointer;
        color: #111827;
        background-color: #f4f6f8;
        transition: background-color 0.2s, transform 0.2s;
    }

    .submenu-toggle[aria-expanded="true"] {
        transform: rotate(180deg);
        color: var(--color-primary);
        background-color: #eaf3ed;
    }

    /* Submenus no mobile: ocultos por padrão, accordion */
    .nav-menu .sub-menu {
        grid-column: 1 / -1;
        display: none;
        position: static;
        max-height: none;
        overflow: visible;
        width: 100%;
        min-width: 0;
        background-color: #f8fafc;
        border-top: 1px solid #edf0f3;
        border-radius: 0;
        box-shadow: none;
        padding: 4px 0 6px;
    }

    .nav-menu .sub-menu.is-open {
        display: block;
    }

    .nav-menu .sub-menu li {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: center;
        width: 100%;
        border-bottom: 0;
        background-color: transparent;
    }

    .nav-menu .sub-menu li:not(.menu-item-has-children) {
        grid-template-columns: 1fr;
    }

    .nav-menu .sub-menu .nav-link {
        color: #1f2937;
        font-size: 0.875rem;
        min-height: 44px;
        padding: 11px 16px 11px 28px;
        border-left: 3px solid transparent;
    }

    .nav-menu .sub-menu .nav-link:hover {
        background-color: #eef4f0;
        color: var(--color-primary);
        border-left-color: var(--color-secondary);
    }

    /* Busca no mobile */
    .header-search {
        position: static;
    }

    .header-search__form {
        position: fixed;
        top: calc(var(--mobile-header-bottom, 56px) + 8px);
        right: 16px;
        left: 16px;
        transform: none;
        width: auto;
        max-width: none;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-top: 3px solid var(--color-secondary);
        border-radius: 12px;
        z-index: 1203;
        box-shadow: 0 18px 40px rgba(15, 34, 54, 0.18);
    }

    .header-search__input {
        min-height: 44px;
        font-size: 1rem;
    }
}

/* =============================================================================
   HERO SECTION — Homepage
   Layout split: texto esquerda + visual direita.
   Fundo claro com gradiente suave, texto escuro, accents em verde/navy.
   ============================================================================= */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 50%, #dce6f0 100%);
    color: #0f2236;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.hero--has-image {
    background-blend-mode: overlay;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(240, 244, 248, 0.88) 0%, rgba(232, 238, 245, 0.82) 60%, rgba(220, 230, 240, 0.75) 100%);
    z-index: 1;
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    align-items: center;
    gap: var(--spacing-xl);
    padding-block: 5rem;
}

.hero__content {
    max-width: 620px;
    padding-bottom: 1rem;
}

.hero__label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-secondary);
    background-color: rgba(46, 125, 50, 0.08);
    border: 1px solid rgba(46, 125, 50, 0.2);
    padding: 8px 18px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
    color: #0f2236;
}

/* Credibility badge */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(26, 58, 92, 0.06);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(26, 58, 92, 0.08);
}

.hero__badge-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-secondary);
    line-height: 1;
}

.hero__badge-text {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
    max-width: 180px;
}

.hero__subtitle {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #555;
    margin: 0 0 2.25rem;
    max-width: 560px;
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hero__cta--primary {
    background-color: var(--color-secondary);
    color: #fff;
    box-shadow: 0 6px 24px rgba(46, 125, 50, 0.3);
}

.hero__cta--primary:hover {
    background-color: #236b28;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.4);
    text-decoration: none;
    color: #fff;
}

.hero__cta--secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.hero__cta--secondary:hover {
    background-color: var(--color-primary);
    color: #fff;
    text-decoration: none;
}

.hero__cta-icon {
    flex-shrink: 0;
}

/* Visual decorativo — composição de 3 formas sobrepostas */
.hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 360px;
}

.hero__shape {
    position: absolute;
    border-radius: 50%;
}

.hero__shape--lg {
    width: 300px;
    height: 300px;
    border: 1px solid rgba(26, 58, 92, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: heroRotate 60s linear infinite;
}

.hero__shape--md {
    width: 200px;
    height: 200px;
    background: rgba(46, 125, 50, 0.06);
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    animation: heroPulse 6s ease-in-out infinite;
}

.hero__shape--sm {
    width: 120px;
    height: 120px;
    background: rgba(26, 58, 92, 0.08);
    filter: blur(40px);
    top: 45%;
    left: 45%;
    transform: translate(-50%, -50%);
}

@keyframes heroRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes heroPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50%      { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

/* Hero responsivo */
@media (max-width: 768px) {
    .hero {
        min-height: 440px;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        padding-block: 3.5rem;
        text-align: center;
    }

    .hero__content {
        max-width: 100%;
        padding-bottom: 0;
    }

    .hero__subtitle {
        max-width: 100%;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__badge {
        justify-content: center;
    }

    .hero__visual {
        display: none;
    }

    .hero__cta {
        padding: 14px 28px;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__cta {
        justify-content: center;
    }
}

/* -----------------------------------------------------------------------------
   Footer — Fase 3 (design premium)
   ----------------------------------------------------------------------------- */

/* ── Wrapper ─────────────────────────────────────────── */
footer.site-footer {
    background-color: #0f2236;
    color: rgba(255, 255, 255, 0.75);
    margin-top: auto;
    font-family: var(--font-sans);
}

/* ── Corpo: 4 blocos ────────────────────────────────── */
footer.site-footer .footer-body {
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

footer.site-footer .footer-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem;
    align-items: start;
    width: 100%;
}

/* ── Bloco ───────────────────────────────────────────── */
footer.site-footer .footer-col {
    display: block;
    min-width: 0;
}

footer.site-footer .footer-col__title {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: #fff;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.35);
    display: inline-block;
}

footer.site-footer .footer-col__text {
    font-size: 0.9rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.6);
    max-width: 38ch;
    margin: 0;
}

/* ── Menu rodapé (wp_nav_menu) ───────────────────────── */
footer.site-footer .footer-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

footer.site-footer .footer-nav-menu li a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s, gap 0.15s;
}

footer.site-footer .footer-nav-menu li a::before {
    content: '›';
    font-size: 1.1rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
}

footer.site-footer .footer-nav-menu li a:hover {
    color: #fff;
    gap: 0.65rem;
    text-decoration: none;
}

footer.site-footer .footer-nav-menu li a:hover::before {
    color: rgba(255, 255, 255, 0.8);
}

/* ── Expediente ──────────────────────────────────────── */
footer.site-footer .footer-expediente {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

footer.site-footer .footer-expediente li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

footer.site-footer .footer-expediente__dias {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

footer.site-footer .footer-expediente__hora {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

footer.site-footer .footer-expediente__aux {
    font-size: 0.82rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
    margin: 0.8rem 0 0;
    line-height: 1.6;
}

/* ── Mapa ────────────────────────────────────────────── */
footer.site-footer .footer-map {
    padding: 0;
}

footer.site-footer .footer-map__frame {
    overflow: hidden;
    line-height: 0;
}

footer.site-footer .footer-map__frame iframe {
    display: block;
    width: 100%;
    height: 320px;
    border: 0;
    filter: grayscale(25%) contrast(1.05);
    transition: filter 0.35s;
}

footer.site-footer .footer-map__frame iframe:hover {
    filter: grayscale(0%) contrast(1);
}

/* ── Copyright + Links Legais ────────────────────────── */
footer.site-footer .footer-copyright {
    background-color: rgba(0, 0, 0, 0.35);
    padding: 1rem 0;
    text-align: center;
}

footer.site-footer .footer-copyright p {
    margin: 0 0 0.6rem;
    text-align: center;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.38);
}

footer.site-footer .footer-legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

footer.site-footer .footer-legal-links li {
    display: inline-flex;
    align-items: center;
}

footer.site-footer .footer-legal-links li + li::before {
    content: '|';
    margin: 0 0.6rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.72rem;
}

footer.site-footer .footer-legal-links li a {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    transition: color 0.2s;
}

footer.site-footer .footer-legal-links li a:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

/* ── Responsivo: tablet (≤ 900px) ────────────────────── */
@media (max-width: 900px) {
    footer.site-footer .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2.25rem;
    }
}

/* ── Responsivo: mobile (≤ 600px) ────────────────────── */
@media (max-width: 600px) {
    footer.site-footer .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    footer.site-footer .footer-body {
        padding: 2.5rem 0 2rem;
    }

    footer.site-footer .footer-map__frame iframe {
        height: 240px;
    }

    footer.site-footer .footer-legal-links {
        flex-direction: column;
        gap: 0.3rem;
    }

    footer.site-footer .footer-legal-links li + li::before {
        display: none;
    }
}


/* =============================================================================
   Páginas institucionais e Unidades — SEO layout
   ============================================================================= */

.page-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0f2236 100%);
    color: #fff;
    padding: 3.75rem 0 3.25rem;
    overflow: hidden;
}

.page-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 2.5rem;
    align-items: center;
}

.page-hero__content--center {
    max-width: 820px;
    margin-inline: auto;
    text-align: center;
}

.page-hero__title {
    max-width: 880px;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.14;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.page-hero__excerpt {
    max-width: 760px;
    margin: 1rem 0 0;
    font-size: 1.08rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.86);
}

.page-hero__content--center .page-hero__excerpt {
    margin-inline: auto;
}

.page-hero__media {
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
    background: rgba(255, 255, 255, 0.08);
}

.page-hero__media img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.page-breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.86rem;
}

.page-breadcrumb__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-breadcrumb__item {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: rgba(255, 255, 255, 0.75);
}

.page-breadcrumb__item + .page-breadcrumb__item::before {
    content: '/';
    margin-right: 0.4rem;
    color: rgba(255, 255, 255, 0.38);
}

.page-breadcrumb__item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.page-breadcrumb__item a:hover {
    color: #fff;
    text-decoration: underline;
}

.page-breadcrumb__item span {
    overflow-wrap: anywhere;
}

.page-template-main {
    background: #fff;
}

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.75rem;
    align-items: start;
    padding: 3rem 0;
}

.page-entry {
    min-width: 0;
}

.page-entry__content {
    max-width: 780px;
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--color-text);
}

.page-entry__content > *:first-child {
    margin-top: 0;
}

.page-entry__content p,
.page-entry__content ul,
.page-entry__content ol {
    margin-bottom: 1.45rem;
}

.page-entry__content h2,
.page-entry__content h3,
.page-entry__content h4 {
    color: var(--color-primary);
    line-height: 1.25;
}

.page-entry__content h2 {
    margin: 2.4rem 0 1rem;
    font-size: 1.75rem;
}

.page-entry__content h3 {
    margin: 2rem 0 0.85rem;
    font-size: 1.35rem;
}

.page-entry__content h4 {
    margin: 1.6rem 0 0.7rem;
    font-size: 1.12rem;
}

.page-entry__content ul,
.page-entry__content ol {
    padding-left: 1.3rem;
}

.page-entry__content li {
    margin-bottom: 0.45rem;
}

.page-entry__content img,
.page-entry__content video,
.page-entry__content iframe {
    max-width: 100%;
}

.page-entry__content img {
    height: auto;
    border-radius: 12px;
}

.page-entry__content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.page-entry__content th,
.page-entry__content td {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--color-border);
}

.page-entry__content blockquote {
    margin: 1.6rem 0;
    padding: 1.25rem 1.5rem;
    background: #f7fafc;
    border-left: 4px solid var(--color-secondary);
    border-radius: 0 12px 12px 0;
    color: #475569;
}

.page-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.page-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.page-side-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 1.3rem;
    box-shadow: 0 8px 28px rgba(15, 34, 54, 0.08);
}

.page-side-card__title {
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--color-secondary);
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 800;
}

.page-side-card p {
    margin: 0 0 1rem;
    color: #52616f;
    line-height: 1.6;
}

.page-link-list,
.page-recent-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-link-list li,
.page-recent-list li {
    border-bottom: 1px solid #edf0f3;
}

.page-link-list li:last-child,
.page-recent-list li:last-child {
    border-bottom: 0;
}

.page-link-list a,
.page-recent-list a {
    display: block;
    padding: 0.65rem 0;
    color: #1f2937;
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none;
}

.page-link-list a:hover,
.page-recent-list a:hover {
    color: var(--color-secondary);
}

.page-recent-list time {
    display: block;
    margin-top: 0.2rem;
    color: #7b8794;
    font-size: 0.78rem;
    font-weight: 400;
}

.page-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.78rem 1.15rem;
    border-radius: 999px;
    background: var(--color-secondary);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(46, 125, 50, 0.22);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.page-cta__button:hover {
    background: #1b5e20;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.page-final-cta {
    background: linear-gradient(135deg, #f4f8f6 0%, #eaf3ed 100%);
    padding: 3rem 0;
}

.page-final-cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(15, 34, 54, 0.08);
}

.page-final-cta h2 {
    margin: 0 0 0.5rem;
    color: var(--color-primary);
    font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.page-final-cta p {
    margin: 0;
    color: #52616f;
    line-height: 1.65;
}

.unidade-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 3rem 0;
}

.unidade-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 34, 54, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.unidade-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(15, 34, 54, 0.12);
}

.unidade-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    background: #eef4f0;
    color: var(--color-secondary);
}

.unidade-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.unidade-card__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #fff;
}

.unidade-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem;
}

.unidade-card__title {
    margin: 0 0 0.65rem;
    font-size: 1.2rem;
    line-height: 1.3;
}

.unidade-card__title a {
    color: var(--color-primary);
    text-decoration: none;
}

.unidade-card__title a:hover {
    color: var(--color-secondary);
}

.unidade-card__excerpt {
    flex: 1;
    color: #52616f;
    font-size: 0.95rem;
    line-height: 1.65;
}

.unidade-card__excerpt p {
    margin: 0 0 1rem;
}

.unidade-card__link {
    align-self: flex-start;
    margin-top: auto;
    color: var(--color-secondary);
    font-weight: 800;
    text-decoration: none;
}

.unidade-card__link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 2rem;
    }

    .unidade-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 2.75rem 0 2.4rem;
    }

    .page-hero__grid,
    .page-layout,
    .page-final-cta__inner {
        grid-template-columns: 1fr;
    }

    .page-hero__media img {
        height: 240px;
    }

    .page-sidebar {
        position: static;
    }

    .page-entry__content {
        max-width: 100%;
        font-size: 1rem;
    }

    .page-final-cta__inner {
        padding: 1.5rem;
    }

    .unidade-grid {
        grid-template-columns: 1fr;
        padding: 2rem 0;
    }
}

@media (max-width: 430px) {
    .page-hero__title {
        overflow-wrap: anywhere;
    }

    .page-side-card,
    .page-final-cta__inner,
    .unidade-card__body {
        padding: 1.1rem;
    }
}

/* =============================================================================
   Blog — Página de listagem de posts (Fase 4)
   ============================================================================= */

/* ---- Hero ---- */
.blog-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0f2236 100%);
    color: #fff;
    text-align: center;
    padding: 4rem 0 3.5rem;
}

.blog-hero__title {
    font-size: 2.75rem;
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: -0.5px;
}

.blog-hero__desc {
    max-width: 680px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}

/* ---- Layout grid: conteúdo + sidebar ---- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    padding: 3rem 0;
    align-items: start;
}

.blog-content {
    min-width: 0;
}

/* ---- Controles lista/grade ---- */
.blog-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.blog-controls__label {
    font-size: 0.85rem;
    color: #666;
    margin-right: 0.25rem;
}

.blog-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-view-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.blog-view-btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ---- Cards de post (base) ---- */
.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.blog-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0f2f5;
    color: #bbb;
}

.blog-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.blog-card__cat {
    background: var(--color-accent, #ff6f00);
    color: #fff;
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.blog-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.6rem;
}

.blog-card__title a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card__title a:hover {
    color: var(--color-accent, #ff6f00);
}

.blog-card__excerpt {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card__excerpt p {
    margin: 0;
}

.blog-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent, #ff6f00);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.blog-card__btn:hover {
    border-bottom-color: var(--color-accent, #ff6f00);
}

/* ---- Modo LISTA ---- */
.blog-posts--list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-posts--list .blog-card {
    display: grid;
    grid-template-columns: 280px 1fr;
}

.blog-posts--list .blog-card__thumb {
    height: 100%;
    min-height: 200px;
}

/* ---- Modo GRADE ---- */
.blog-posts--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.blog-posts--grid .blog-card {
    display: flex;
    flex-direction: column;
}

.blog-posts--grid .blog-card__thumb {
    height: 200px;
}

/* ---- Paginação ---- */
.navigation.pagination {
    margin-top: 2.5rem;
    text-align: center;
}

.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.blog-empty {
    text-align: center;
    padding: 3rem 0;
    color: #888;
    font-size: 1.1rem;
}

/* ---- Sidebar ---- */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.sidebar-widget__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-accent, #ff6f00);
}

/* Busca sidebar */
.sidebar-search-form {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.sidebar-search-form:focus-within {
    border-color: var(--color-primary);
}

.sidebar-search-form__input {
    flex: 1;
    border: none;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
}

.sidebar-search-form__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    border: none;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-search-form__btn:hover {
    background: var(--color-accent, #ff6f00);
}

/* Categorias sidebar */
.sidebar-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-categories li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-categories li:last-child {
    border-bottom: none;
}

.sidebar-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.sidebar-categories a:hover {
    color: var(--color-accent, #ff6f00);
}

.sidebar-categories__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    background: #f0f2f5;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
}

/* Últimos posts sidebar */
.sidebar-recent {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-recent li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-recent li:last-child {
    border-bottom: none;
}

.sidebar-recent a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    text-decoration: none;
    transition: opacity 0.2s;
}

.sidebar-recent a:hover {
    opacity: 0.8;
}

.sidebar-recent__thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-recent__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-recent__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sidebar-recent__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.3;
}

.sidebar-recent time {
    font-size: 0.75rem;
    color: #999;
}

/* ---- Blog Responsivo ---- */
@media (max-width: 768px) {
    .blog-hero {
        padding: 3rem 0 2.5rem;
    }

    .blog-hero__title {
        font-size: 2rem;
    }

    .blog-hero__desc {
        font-size: 1rem;
    }

    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 0;
    }

    .blog-posts--list .blog-card {
        grid-template-columns: 1fr;
    }

    .blog-posts--list .blog-card__thumb {
        height: 200px;
        min-height: auto;
    }

    .blog-posts--grid {
        grid-template-columns: 1fr;
    }
}


/* =============================================================================
   Single Post — Leitura individual (Fase 5)
   ============================================================================= */

/* ---- Banner ---- */
.single-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0f2236 100%);
    color: #fff;
    text-align: center;
    padding: 3.5rem 0 3rem;
}

.single-banner__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.single-banner__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.92rem;
    opacity: 0.85;
}

.single-banner__sep {
    opacity: 0.5;
}

.single-banner__author a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.single-banner__author a:hover {
    color: var(--color-accent, #ff6f00);
}

.single-banner__cat {
    background: rgba(255,255,255,0.15);
    padding: 0.15rem 0.65rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: background 0.2s;
}

.single-banner__cat:hover {
    background: var(--color-accent, #ff6f00);
}

/* ---- Tags ---- */
.single-tags {
    padding: 1rem 0;
    background: var(--color-bg-alt, #f5f5f5);
}

.single-tags .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.single-tags__item {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--color-border, #e0e0e0);
    color: var(--color-primary);
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.single-tags__item:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ---- Layout 3 colunas ---- */
.single-layout {
    display: grid;
    grid-template-columns: 220px 1fr 300px;
    gap: 2.5rem;
    padding: 2.5rem 0;
    align-items: start;
}

body.single-no-toc .single-layout {
    grid-template-columns: 1fr 300px;
}

/* ---- TOC ---- */
.single-toc {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.single-toc.is-hidden {
    display: none;
}

.single-toc__nav {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.single-toc__title {
    font-size: 0;
    margin: 0;
}

.single-toc__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    padding: 0 0 0.6rem;
    border-bottom: 2px solid var(--color-accent, #ff6f00);
    margin-bottom: 0.75rem;
}

.single-toc__arrow {
    transition: transform 0.2s;
}

.single-toc__toggle[aria-expanded="false"] .single-toc__arrow {
    transform: rotate(-90deg);
}

.single-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.single-toc__list.is-collapsed {
    display: none;
}

.single-toc__list li {
    margin-bottom: 0.15rem;
}

.single-toc__list a {
    display: block;
    padding: 0.35rem 0.5rem;
    font-size: 0.82rem;
    color: #555;
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    line-height: 1.35;
    transition: all 0.2s;
}

.single-toc__list a:hover {
    color: var(--color-primary);
    background: rgba(26,58,92,0.04);
}

.single-toc__list a.is-active {
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-accent, #ff6f00);
    background: rgba(26,58,92,0.06);
}

.single-toc__sub {
    padding-left: 0.75rem;
}

/* ---- Conteúdo principal ---- */
.single-content {
    min-width: 0;
    max-width: 720px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text, #333);
}

.single-content p {
    margin: 0 0 1.5rem;
}

.single-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 2.5rem 0 1rem;
}

.single-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 2rem 0 0.75rem;
}

.single-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 1.5rem 0 0.5rem;
}

.single-content ul,
.single-content ol {
    margin: 0 0 1.5rem 1.5rem;
}

.single-content li {
    margin-bottom: 0.4rem;
}

.single-content blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--color-bg-alt, #f5f5f5);
    border-left: 4px solid var(--color-accent, #ff6f00);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.single-content blockquote p:last-child {
    margin-bottom: 0;
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.single-content a {
    color: var(--color-accent, #ff6f00);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.single-content a:hover {
    color: var(--color-primary);
}

.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.single-content th,
.single-content td {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border, #e0e0e0);
    text-align: left;
}

.single-content th {
    background: var(--color-bg-alt, #f5f5f5);
    font-weight: 600;
}

/* ---- Sidebar single ---- */
.single-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sw {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.sw__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-accent, #ff6f00);
}

.sw__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sw__item {
    border-bottom: 1px solid #f0f0f0;
}

.sw__item:last-child {
    border-bottom: none;
}

.sw__item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    text-decoration: none;
    transition: opacity 0.2s;
}

.sw__item a:hover {
    opacity: 0.8;
}

.sw__thumb {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}

.sw__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sw__info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sw__item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.3;
}

.sw__item time {
    font-size: 0.73rem;
    color: #999;
}

/* Categorias sidebar */
.sw__cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sw__cat-list li {
    border-bottom: 1px solid #f0f0f0;
}

.sw__cat-list li:last-child {
    border-bottom: none;
}

.sw__cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    color: #444;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.sw__cat-list a:hover {
    color: var(--color-accent, #ff6f00);
}

.sw__cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: #f0f2f5;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #888;
}

/* ---- Relacionados ---- */
.single-related {
    background: var(--color-bg-alt, #f5f5f5);
    padding: 3rem 0;
}

.single-related__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin: 0 0 2rem;
    position: relative;
}

.single-related__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent, #ff6f00);
    margin: 0.6rem auto 0;
    border-radius: 2px;
}

.single-related__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.related-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s, transform 0.3s;
}

.related-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.related-card__thumb {
    height: 150px;
    overflow: hidden;
}

.related-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0f2f5;
    color: #bbb;
}

.related-card__body {
    padding: 1rem 1.1rem 1.1rem;
}

.related-card__title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.35;
    margin: 0 0 0.35rem;
}

.related-card__body time {
    font-size: 0.75rem;
    color: #999;
}

/* ---- Responsivo single ---- */
@media (max-width: 992px) {
    .single-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .single-banner {
        padding: 2.5rem 0 2rem;
    }

    .single-banner__title {
        font-size: 1.75rem;
    }

    .single-layout {
        grid-template-columns: 1fr !important;
        gap: 0;
        padding: 1.5rem 0;
    }

    /* TOC: accordion acima do conteúdo no mobile */
    .single-toc {
        position: static;
        max-height: none;
        overflow: visible;
        order: -1;
        margin-bottom: 1.5rem;
    }

    .single-toc__toggle {
        cursor: pointer;
    }

    .single-content {
        max-width: 100%;
    }

    .single-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
        margin-top: 2rem;
    }
}

@media (max-width: 600px) {
    .single-related__grid {
        grid-template-columns: 1fr;
    }
}


/* -----------------------------------------------------------------------------
   Página 404
   ----------------------------------------------------------------------------- */
.error-404 {
    text-align: center;
    padding-block: var(--spacing-xl);
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--color-primary);
    line-height: 1;
}

.error-404 p {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-block: var(--spacing-md);
}

/* -----------------------------------------------------------------------------
   Utilitários
   ----------------------------------------------------------------------------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
