/* ==========================================================================
   ESK8 Brasil — estilos globais (tokens + layout + tipografia “modern”)
   Incluído em header.php. Páginas específicas acrescentam boards.css, etc.
   ========================================================================== */

   :root {
    --vit-shadow-hover: 0 1rem 1.5rem rgba(0, 0, 0, 0.1);
    --vit-accent: #cc5500;
    --vit-accent-soft: rgba(204, 85, 0, 0.08);
    --vit-title: #111;
    --vit-text: #444;
    --vit-muted: #666;
    --vit-border: #eee;
    --vit-bg-soft: #f8f9fa;
    --vit-max: 75rem;
    --vit-radius: 1.25rem;
    --vit-shadow: 0 0.25rem 0.6rem rgba(0, 0, 0, 0.05);
    --vit-shadow-hover: 0 1rem 1.5rem rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   TIPOGRAFIA GLOBAL
   ========================================================================== */
   body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased; /* Deixa a fonte mais suave e legível em ecrãs Mac/iOS */
    -moz-osx-font-smoothing: grayscale;
}

/* Espaço sob header fixo — só onde o conteúdo não é full-bleed (ex.: hero em index) */
.site-main > .site__wrap.legacy-page,
.site-main > .site__wrap.vit-tight-top,
.site-main > .site__wrap.vit-rider-detail {
    padding-top: 6.5rem !important;
}

/* Painel cinza reutilizável (filtros, destaques) */
.vit-panel {
    background: #f9f9f9;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--vit-border);
}

/* Título de secção / página */
.vit-page-title {
    font-weight: 800;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--vit-title);
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* --- Conteúdo migrado (.legacy-page): limitar largura do legado esk8 --- */
.legacy-page .page {
    max-width: var(--vit-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 4%;
    padding-right: 4%;
}

.legacy-page .container-fluid.section {
    max-width: var(--vit-max);
    margin-left: auto;
    margin-right: auto;
}

.legacy-page .visual__wrap,
.legacy-page .visual {
    width: 100%;
}

.legacy-page .modern-text,
.legacy-page .media__text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--vit-text);
}

/* --- Bloco “modern” (board_detalhes, index, vitrine) --- */
.modern-wrapper {
    max-width: var(--vit-max);
    margin: 0 auto;
    padding-top: 0px !important; /* ZERA os 128px (8rem) que estavam sobrando */
    padding-bottom: 0px !important;
    padding-left: 4% !important;
    padding-right: 4% !important;
}

.board-header-row {
    border-bottom: 1px solid var(--vit-border);
}

.modern-title-main {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-top: 0;
    padding-bottom: 1.25rem;
}

.modern-section {
    padding: 2.5rem 0;
    margin-bottom: 1.25rem;
}

.modern-section-alt {
    background-color: var(--vit-bg-soft);
    border-radius: var(--vit-radius);
    padding: 3.75rem 2.5rem;
    margin: 2.5rem 0;
}

.modern-img {
    border-radius: var(--vit-radius);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
}

.modern-img:hover {
    transform: translateY(-0.3rem);
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.15);
}

.modern-img-valor {
    max-height: 37.5rem;
}

.modern-title {
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    color: var(--vit-title);
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modern-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 3.75rem;
    height: 0.3rem;
    background-color: var(--vit-accent);
    border-radius: 0.2rem;
}

.modern-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--vit-text);
}

.modern-text p {
    margin-bottom: 1.2rem;
}

.board-badges {
    display: flex;
    gap: 1.25rem;
    font-size: 0.95rem;
    color: var(--vit-muted);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06rem;
    flex-wrap: wrap;
    align-items: center;
}

.badge-orange {
    color: var(--vit-accent);
}

.badge-gold {
    color: #ffd700;
    font-size: 1rem;
}

.board-resumo {
    font-size: 1.25rem;
    font-weight: 300;
}

.citacao-modern {
    background: #222;
    color: #fff;
    padding: 2.5rem;
    border-radius: var(--vit-radius);
    box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.2);
}

.citacao-modern .specs-grid {
    column-count: 2;
    column-gap: 2.5rem;
    color: #ddd;
    font-size: 0.95rem;
}

.citacao-modern .specs-grid b {
    color: #fff;
}

.notas-alerta {
    background: #fff3cd;
    border-left: 0.3rem solid #ffc107;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.videoWrapper-modern {
    border-radius: var(--vit-radius);
    overflow: hidden;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.btn-voltar-home {
    font-weight: bold;
    color: var(--vit-accent);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.btn-voltar-home i {
    margin-right: 0.5rem;
}

@media (min-width: 768px) {
    .pl-md-custom {
        padding-left: 3.75rem !important;
    }
    .pr-md-custom {
        padding-right: 3.75rem !important;
    }
}

@media (max-width: 767px) {
    .citacao-modern .specs-grid {
        column-count: 1;
    }
}

/* Página rider (detalhe) — conteúdo antigo dentro do novo shell */
.vit-rider-detail .page__back a {
    color: var(--vit-accent);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.vit-rider-detail .page__back a:hover {
    text-decoration: underline;
}

.vit-rider-detail .page {
    max-width: var(--vit-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 4%;
    padding-right: 4%;
}

/* ==========================================================================
   MARCA COLLAPSIBLE (CLICÁVEL) E COMPONENTES GLOBAIS DE HOVER
   ========================================================================== */
.brand-collapsible-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.brand-trigger {
    cursor: pointer;
    border-bottom: 1px dotted var(--vit-accent);
    color: #666;
    font-weight: bold;
    transition: color 0.2s;
}

.brand-trigger:hover {
    color: var(--vit-accent);
}

.brand-collapse-content {
    display: none; /* Escondido por padrão */
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #eee;
    border-left: 4px solid var(--vit-accent);
    z-index: 999;
    margin-top: 10px;
    text-align: left;
    font-weight: normal;
}

/* Classe que será adicionada via Javascript */
.brand-collapse-content.is-active {
    display: block;
    animation: fadeInSlide 0.3s ease;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
    .brand-collapse-content {
        width: 280px;
        left: -20px;
    }
}