/* =========================================================================
   HidalgoJunior — Design System do site
   CSS próprio, mobile-first: o que está fora de media query é o layout de
   celular; tablet (min-width:768px) e desktop (992px/1200px) só acrescentam.
   Tema escuro é o padrão; `[data-theme="light"]` no <html> troca os tokens.

   Índice
     1. Tokens                                  10. Cards
     2. Reset / base                            11. Alertas / badges
     3. Container e grid                        12. Cabeçalho e navegação
     4. Utilitários de layout                   13. Rodapé
     5. Tipografia                              14. Seções e herói
     6. Bordas, sombras e foco                  15. Blocos da home
     7. Botões                                  16. WhatsApp e avisos
     8. Formulários                             17. Animações
     9. Imagens                                 18. Impressão / acessibilidade
                                                19. Plataforma de aulas
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
    --font-heading: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --brand: #1688E8;
    --brand-dark: #0757A8;
    --brand-light: #55B8FF;
    --accent: #F59E0B;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;

    --bg: #05070A;
    --bg-soft: #0A1424;
    --surface: #0B1017;
    --surface-2: #111821;
    --surface-3: #161F2B;
    --border: #202833;
    --border-strong: #2C3846;

    --text: #F5F7FA;
    --text-muted: #8993A0;
    --text-soft: #D7DCE2;

    --gradient: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
    --gradient-soft: linear-gradient(135deg, rgba(22, 136, 232, .18), rgba(7, 87, 168, .06));

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .25);
    --shadow: 0 12px 34px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);

    /* Alturas de layout (usadas pelo cabeçalho fixo e pelo WhatsApp) */
    --header-h: 64px;
    --float-bottom: 18px;

    --transition: .22s cubic-bezier(.4, 0, .2, 1);
}

/* Tema claro — mesmos nomes de token, valores claros. */
[data-theme="light"] {
    --bg: #F6F8FC;
    --bg-soft: #EEF2F9;
    --surface: #FFFFFF;
    --surface-2: #FFFFFF;
    --surface-3: #F1F5FB;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;

    --text: #0F172A;
    --text-muted: #64748B;
    --text-soft: #334155;

    /* O azul claro existe para fundo escuro: no branco ele fica ilegível. */
    --brand-light: #0B6FCB;

    --gradient-soft: linear-gradient(135deg, rgba(22, 136, 232, .10), rgba(7, 87, 168, .04));

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .07);
    --shadow: 0 10px 30px rgba(15, 23, 42, .10);
    --shadow-lg: 0 22px 55px rgba(15, 23, 42, .16);
}

/* O botão cheio usa `--brand-light` como fundo: no claro, escurece em vez de clarear. */
[data-theme="light"] .btn-primary:hover { background: var(--brand-dark); color: #fff; }

/* -------------------------------------------------------------------------
   2. Reset / base
   ------------------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
    /* A gaveta fica posicionada fora da tela: sem isto ela cria rolagem lateral. */
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Fundo com brilho sutil (só no tema escuro, para dar profundidade) */
[data-theme="dark"] body {
    background:
        radial-gradient(900px 420px at 88% -8%, rgba(22, 136, 232, .16), transparent 62%),
        radial-gradient(700px 420px at -10% 14%, rgba(7, 87, 168, .18), transparent 58%),
        linear-gradient(170deg, var(--bg) 0%, var(--surface) 55%, var(--bg-soft) 100%);
    background-attachment: fixed;
}

img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
iframe { border: 0; }

/* -------------------------------------------------------------------------
   3. Container e grid
   ------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 18px;
}

.section { padding-block: 44px; }

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr; }

/* -------------------------------------------------------------------------
   4. Utilitários de layout
   ------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 34px; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.full { grid-column: 1 / -1; }
.hide { display: none !important; }
/* Utilitário de visibilidade: precisa de !important para vencer .btn/.card. */
.only-desktop { display: none !important; }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }

/* -------------------------------------------------------------------------
   5. Tipografia
   ------------------------------------------------------------------------- */
h1, h2, h3, h4, .brand-name { font-family: var(--font-heading); line-height: 1.2; letter-spacing: -.01em; }

h1 { font-size: clamp(1.85rem, 7vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 4.6vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.06rem; font-weight: 700; }
h4 { font-size: .95rem; font-weight: 700; }

p { color: var(--text-muted); }
.lead { font-size: 1.02rem; color: var(--text-soft); max-width: 60ch; }
small, .small { font-size: .82rem; }
.muted { color: var(--text-muted); }
.strong { color: var(--text); font-weight: 600; }

/* Selo curto acima do título (eyebrow/kicker) */
.eyebrow, .kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--brand-light);
}

/* Cabeçalho de seção */
.section-head { margin-bottom: 24px; max-width: 66ch; }
.section-head h2 { margin-top: 8px; }
.section-head p { margin-top: 8px; }

/* -------------------------------------------------------------------------
   6. Bordas, sombras e foco
   ------------------------------------------------------------------------- */
.round { border-radius: var(--radius); }
.round-lg { border-radius: var(--radius-lg); }
.shadow { box-shadow: var(--shadow); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--brand-light);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* -------------------------------------------------------------------------
   7. Botões
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition),
                color var(--transition), transform var(--transition);
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-light); color: #05070A; transform: translateY(-1px); }

.btn-ghost { border-color: var(--border-strong); color: var(--text-soft); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-light); }

.btn-light { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-light:hover { border-color: var(--brand); color: var(--brand-light); }

.btn-link { padding: 0; color: var(--brand-light); font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

.btn-sm { padding: 9px 14px; font-size: .82rem; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

/* -------------------------------------------------------------------------
   8. Formulários
   ------------------------------------------------------------------------- */
label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 600; color: var(--text-soft); }

input[type=text], input[type=email], input[type=tel], input[type=url],
input[type=search], input[type=password], input[type=date], input[type=number],
select, textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color var(--transition);
}

input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { min-height: 130px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .8; }

.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 14px; }

/* -------------------------------------------------------------------------
   9. Imagens
   ------------------------------------------------------------------------- */
.media { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--radius); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-3-2 { aspect-ratio: 3 / 2; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-9-16 { aspect-ratio: 9 / 16; }

/* -------------------------------------------------------------------------
   10. Cards
   ------------------------------------------------------------------------- */
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

a.card:hover, .card.is-link:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { color: var(--brand-light); }
.card-meta { font-size: .78rem; color: var(--text-muted); }
.card-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    background: var(--gradient-soft); border: 1px solid var(--border);
    font-size: 1.2rem; margin-bottom: 2px;
}
.card-actions { margin-top: auto; padding-top: 10px; }

/* -------------------------------------------------------------------------
   11. Alertas / badges
   ------------------------------------------------------------------------- */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: .9rem; margin-bottom: 16px; }
.alert-success { border-color: rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .1); color: var(--success); }
.alert-error { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .1); color: var(--danger); }
.alert-info { border-color: rgba(22, 136, 232, .4); background: rgba(22, 136, 232, .1); color: var(--brand-light); }
.alert-warning { border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .1); color: #FBBF24; }

[data-theme="light"] .alert-warning { color: #B45309; }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: var(--radius-pill);
    background: var(--surface-2); border: 1px solid var(--border);
    font-size: .74rem; font-weight: 600; color: var(--text-soft);
}
.badge-brand { border-color: rgba(22, 136, 232, .45); background: rgba(22, 136, 232, .14); color: var(--brand-light); }

/* -------------------------------------------------------------------------
   12. Cabeçalho e navegação
   ------------------------------------------------------------------------- */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.site-header {
    position: sticky; top: 0; z-index: 60;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
    display: flex; align-items: center; gap: 12px;
    min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.brand img { height: 38px; width: auto; border-radius: 8px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-size: .95rem; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tag { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; flex: none;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-soft); font-size: 1rem;
    transition: border-color var(--transition), color var(--transition);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand-light); }

/* Botão de menu (celular) */
.menu-toggle { display: inline-flex; }
.menu-toggle span {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle .bars { display: flex; flex-direction: column; gap: 4px; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Navegação: no celular vira gaveta; no desktop, barra horizontal */
.nav {
    position: fixed; inset: 0 0 0 auto; z-index: 70;
    width: min(340px, 88vw);
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 18px 18px 24px;
    display: flex; flex-direction: column; gap: 4px;
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(102%);
    /* Fechada também sai do foco do teclado (não só da tela). */
    visibility: hidden;
    transition: transform var(--transition), visibility var(--transition);
    box-shadow: var(--shadow-lg);
}
.nav.is-open { transform: none; visibility: visible; }

.nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nav-title { font-family: var(--font-heading); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--text-muted); }

.nav-link {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 13px 4px; font-size: 1rem; font-weight: 500; color: var(--text-soft);
    border-bottom: 1px solid var(--border);
}
.nav-link:hover, .nav-link.is-active { color: var(--brand-light); }

/* Grupo com submenu (acordeão no celular) */
.nav-group > summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 13px 4px; font-size: 1rem; font-weight: 500; color: var(--text-soft);
    border-bottom: 1px solid var(--border);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: '▾'; font-size: .7rem; opacity: .7; transition: transform var(--transition); }
.nav-group[open] > summary { color: var(--brand-light); }
.nav-group[open] > summary::after { transform: rotate(180deg); }
.nav-sub { display: flex; flex-direction: column; padding: 4px 0 8px 14px; border-left: 1px solid var(--border); margin: 6px 0 6px 4px; }
.nav-sub a { padding: 9px 4px; font-size: .92rem; color: var(--text-muted); }
.nav-sub a:hover, .nav-sub a.is-active { color: var(--brand-light); }

.nav-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
.nav-divider { height: 1px; background: var(--border); margin: 12px 0; }
.nav-secondary { display: flex; flex-direction: column; }

.nav-backdrop {
    position: fixed; inset: 0; z-index: 65;
    background: rgba(5, 7, 10, .62);
    opacity: 0; visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

/* -------------------------------------------------------------------------
   13. Rodapé
   ------------------------------------------------------------------------- */
.site-footer {
    margin-top: 52px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    padding-top: 40px;
}

.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer-col h4 { margin-bottom: 14px; font-family: var(--font-heading); font-size: .74rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--text); }
.footer-col a { display: block; padding: 6px 0; color: var(--text-muted); font-size: .92rem; }
.footer-col a:hover { color: var(--brand-light); }
.footer-about p { font-size: .92rem; max-width: 34ch; }
.footer-brand { display: inline-flex; margin-bottom: 14px; }
.footer-brand img { height: 44px; }

.footer-bottom {
    margin-top: 34px; padding: 18px 0;
    border-top: 1px solid var(--border);
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
    font-size: .82rem; color: var(--text-muted);
}
.footer-bottom a:hover { color: var(--brand-light); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 14px; }

/* -------------------------------------------------------------------------
   14. Seções e herói
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding-block: 46px 34px;
    overflow: hidden;
}

.hero h1 { margin-top: 14px; }
.hero h1 span { color: var(--brand-light); }
.hero .lead { margin-top: 14px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-note { margin-top: 18px; font-size: .82rem; color: var(--text-muted); }

/* Herói com vídeo de fundo */
.hero-media { position: relative; min-height: 74vh; display: flex; align-items: center; padding-block: 60px; }
.hero-media .video-layer { position: absolute; inset: 0; overflow: hidden; background: #000; }
.hero-media .video-layer .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero-media .video-layer .slide.is-active { opacity: 1; }
.hero-media .video-layer iframe {
    position: absolute; top: 50%; left: 50%;
    width: 177.78vh; height: 56.25vw; min-width: 100%; min-height: 100%;
    /* Leve zoom: cobre a interface do YouTube (título e "assistir no YouTube"),
       deixando o vídeo como fundo de verdade. */
    transform: translate(-50%, -50%) scale(1.35);
    pointer-events: none;
}
.hero-media .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(5, 7, 10, .72) 0%, rgba(5, 7, 10, .82) 55%, var(--bg) 100%);
}
[data-theme="light"] .hero-media .overlay { background: linear-gradient(180deg, rgba(246, 248, 252, .82) 0%, rgba(246, 248, 252, .9) 55%, var(--bg) 100%); }
.hero-media .container { position: relative; z-index: 2; }

.hero-dots { display: flex; gap: 8px; justify-content: center; margin-top: 26px; }
.hero-dots button { width: 30px; height: 4px; border-radius: 4px; background: var(--border-strong); transition: background var(--transition); }
.hero-dots button.is-active { background: var(--brand-light); }

/* Faixa de destaque (CTA grande) */
.band {
    display: flex; flex-direction: column; gap: 20px;
    padding: 28px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--gradient-soft);
}
.band h2 { font-size: clamp(1.3rem, 5vw, 1.9rem); }
.band p { max-width: 56ch; }

/* Números/estatísticas */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.stat {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}
.stat strong { display: block; font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: var(--text); }
.stat small { color: var(--text-muted); font-size: .78rem; }

/* -------------------------------------------------------------------------
   15. Blocos da home
   ------------------------------------------------------------------------- */
/* Grade de fotos/vídeos */
.media-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }

/* Vídeo embutido (16/9 com marca d'água) */
.embed { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.embed-mark {
    position: absolute; right: 10px; bottom: 10px; z-index: 2;
    padding: 4px 9px; border-radius: var(--radius-pill);
    background: rgba(5, 7, 10, .62); color: #fff; font-size: .68rem; letter-spacing: .04em;
}

/* Cidades / atalhos */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: var(--surface);
    font-size: .88rem; color: var(--text-soft);
    transition: border-color var(--transition), color var(--transition);
}
.chip:hover { border-color: var(--brand); color: var(--brand-light); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip.is-active:hover { color: #fff; }

/* Depoimentos */
.quote {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; flex-direction: column; gap: 12px;
}
.quote p { color: var(--text-soft); font-size: .95rem; }
.quote footer { font-size: .82rem; color: var(--text-muted); }
.quote footer strong { color: var(--text); display: block; }

/* Instagram */
.instagram-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.instagram-grid a { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.instagram-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform var(--transition); }
.instagram-grid a:hover img { transform: scale(1.04); }

/* Post do blog */
.post-title { font-size: 1.02rem; }
.post-date { font-size: .76rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }

/* -------------------------------------------------------------------------
   16. WhatsApp e avisos
   ------------------------------------------------------------------------- */
.whatsapp-float {
    position: fixed; right: 16px; bottom: var(--float-bottom); z-index: 55;
    display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; border-radius: 50%;
    background: #25D366; color: #fff;
    box-shadow: 0 10px 26px rgba(37, 211, 102, .38);
    transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { width: 28px; height: 28px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: rgba(5, 7, 10, .92); padding: 18px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: var(--radius); }
.lightbox-btn { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.1rem; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.2rem; }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

/* -------------------------------------------------------------------------
   17. Animações
   ------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   18. Impressão / acessibilidade
   ------------------------------------------------------------------------- */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media print {
    .site-header, .site-footer, .whatsapp-float, .nav, .nav-backdrop { display: none !important; }
    body { background: #fff; color: #000; }
}

/* -------------------------------------------------------------------------
   15b. Páginas internas (cabeçalho, filtros, listagens, detalhe)
   ------------------------------------------------------------------------- */
/* Cabeçalho da página interna */
.page-hero { padding-block: 34px 6px; }
.page-hero h1 { margin-top: 10px; font-size: clamp(1.5rem, 5.5vw, 2.5rem); }
.page-hero p { margin-top: 10px; max-width: 62ch; }

/* Selo com emoji do topo (usado pelos hubs do CMS) */
.hero-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 60px; height: 60px; margin-bottom: 14px;
    border-radius: var(--radius);
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    font-size: 1.8rem;
}

/* Imagem de destaque do cabeçalho */
.hero-image {
    width: 100%; max-height: 380px; object-fit: cover;
    margin-top: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; color: var(--text-muted); margin-bottom: 8px; }
.breadcrumb a:hover { color: var(--brand-light); }

/* Barra de filtros da listagem */
.filters {
    display: grid;
    gap: 10px;
    padding: 14px;
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.filters select, .filters input { font-size: .9rem; }
.filters-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters-actions .push { margin-left: auto; }

/* Listagem de fotos em mosaico (mais densa que os cards de conteúdo) */
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.photo-tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.photo-tile img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform var(--transition); }
.photo-tile:hover img { transform: scale(1.04); }
.photo-tile figcaption {
    position: absolute; inset: auto 0 0 0;
    padding: 22px 12px 10px;
    background: linear-gradient(180deg, transparent, rgba(5, 7, 10, .85));
    color: #fff; font-size: .84rem; font-weight: 600;
}
.photo-tile .pin { position: absolute; top: 10px; left: 10px; }
.photo-tile .pin-right { position: absolute; top: 10px; right: 10px; }
.photo-tile .pin-right a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 11px; border-radius: var(--radius-pill);
    background: rgba(5, 7, 10, .72);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff; font-size: .76rem; font-weight: 600;
}
.photo-tile .pin-right a:hover { background: var(--brand); border-color: var(--brand); }

/* Paginação (o Blade padrão do Laravel usa Tailwind, que não usamos) */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 30px; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: .88rem; color: var(--text-soft);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand-light); }
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pagination .is-disabled { opacity: .45; }
.pagination .dots { border-color: transparent; }

/* Texto longo (descrições, artigos) */
.prose { color: var(--text-soft); }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: 1.3rem; margin-top: 28px; }
.prose h3 { font-size: 1.08rem; margin-top: 22px; }
.prose ul, .prose ol { margin-left: 20px; color: var(--text-muted); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { color: var(--brand-light); text-decoration: underline; }
.prose strong { color: var(--text); }

/* Lista de itens inclusos (serviços) */
.feature-list { display: grid; gap: 10px; margin-top: 6px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--text-muted); }
.feature-list li::before { content: '✓'; color: var(--brand-light); font-weight: 700; flex: none; }

.price { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: var(--text); }
.price small { font-family: var(--font-body); font-size: .82rem; font-weight: 500; color: var(--text-muted); }

.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--text-muted); }

/* Compartilhar */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-row .label { font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: transparent;
    color: var(--text-soft); font-size: .8rem; font-weight: 600;
    transition: border-color var(--transition), color var(--transition);
}
.share-btn:hover { border-color: var(--brand); color: var(--brand-light); }

/* Estado vazio */
.empty {
    padding: 30px 18px; text-align: center;
    border: 1px dashed var(--border-strong); border-radius: var(--radius);
    color: var(--text-muted); font-size: .95rem;
}
.empty a { color: var(--brand-light); }

/* Aviso de formulário */
.form-errors { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .1); color: var(--danger); font-size: .88rem; }
.form-errors div + div { margin-top: 4px; }

/* Duas colunas (formulário + informações) */
.split { display: grid; gap: 28px; }
.info-card { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.info-card + .info-card { margin-top: 14px; }
.info-card .icon { font-size: 1.3rem; margin-bottom: 8px; }
.info-card h3 { font-size: 1rem; }
.info-card p { font-size: .9rem; margin-top: 6px; }
.info-card a { color: var(--brand-light); }

/* -------------------------------------------------------------------------
   15c. Blocos de conteúdo (FAQ, etapas, timeline do CMS, embeds)
   ------------------------------------------------------------------------- */

/* Linha de ações centralizada no fim de uma seção */
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions-row.center { justify-content: center; }

/* Acordeão (FAQ, dúvidas, blocos recolhíveis) */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.accordion details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s;
}
.accordion details[open] { border-color: var(--border-strong); }
.accordion summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-heading);
    font-size: .98rem;
    font-weight: 700;
    color: var(--text);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
    content: "+";
    margin-left: auto;
    flex: none;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--brand-light);
    transition: transform .2s;
}
.accordion details[open] summary::after { content: "−"; }
.accordion summary:hover { color: var(--brand-light); }
.accordion .accordion-body { padding: 0 18px 18px; }
.accordion .accordion-body > * + * { margin-top: 10px; }
.accordion .accordion-body a { color: var(--brand-light); }

/* Timeline de itens com período (bloco "list" do CMS) */
.timeline { position: relative; display: flex; flex-direction: column; gap: 22px; }
.timeline::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 5px;
    width: 2px;
    background: var(--border);
}
.timeline .item { position: relative; padding-left: 28px; }
.timeline .item::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 4px var(--surface);
}
.timeline .item small {
    display: block;
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-light);
}
.timeline .item h3 { margin-top: 6px; }
.timeline .item p { margin-top: 6px; font-size: .94rem; }
.timeline .item a { color: var(--brand-light); }

/* Moldura para iframes de sistemas externos (formulários, painéis, apps) */
.frame {
    position: relative;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-3);
}
.frame iframe {
    display: block;
    width: 100%;
    height: min(78vh, 780px);
    border: 0;
}

/* Aviso curto em destaque suave */
.note {
    max-width: 72ch;
    margin-inline: auto;
    padding: 26px 22px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.note p { font-size: .94rem; }

/* Selo de seção dentro de um bloco de texto */
.block-kicker { margin-bottom: 10px; }

/* Perfil profissional (abre a home, logo abaixo do hero) */
.perfil-resumo > * + * { margin-top: 24px; }
.perfil-resumo .prose > h3:first-child { margin-top: 0; }
.perfil-resumo .prose h3 { font-size: 1.06rem; color: var(--text); }

/* Linha do tempo enxuta (cabe no card lateral da home) */
.timeline-compact { gap: 16px; margin-top: 14px; }
.timeline-compact .item { padding-left: 24px; }
.timeline-compact .item h3 { font-size: .96rem; margin-top: 4px; }
.timeline-compact .item p { font-size: .86rem; margin-top: 4px; }

/* -------------------------------------------------------------------------
   15d. Agendamento (calendário e horários)
   ------------------------------------------------------------------------- */
/* `fieldset` com cara de campo normal — o legend se comporta como label. */
.booking-field { border: 0; padding: 0; margin: 0 0 16px; }
.booking-field legend {
    display: block; margin-bottom: 6px; padding: 0;
    font-size: .85rem; font-weight: 600; color: var(--text-soft);
}

.booking-calendar {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    user-select: none;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-family: var(--font-heading); font-size: .95rem; color: var(--text); }
.cal-nav {
    width: 32px; height: 32px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: .95rem; line-height: 1;
}
.cal-nav:hover { border-color: var(--brand); color: var(--brand-light); }

.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week span {
    padding: 4px 0; text-align: center;
    font-size: .68rem; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--text-muted);
}
.cal-day {
    display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    color: var(--text); font-size: .85rem; font-weight: 500;
    transition: background var(--transition), border-color var(--transition);
}
.cal-day:hover:not(:disabled) { background: var(--surface-3); }
.cal-day:disabled { color: var(--text-muted); opacity: .45; cursor: not-allowed; }
.cal-day.booked { text-decoration: line-through; }
.cal-day.selected { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

.booking-note { min-height: 1.2em; margin-top: 6px; font-size: .82rem; color: var(--brand-light); }

.booking-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; margin-top: 8px; }
.booking-slots .slot {
    padding: 9px 6px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: .85rem;
    transition: background var(--transition), border-color var(--transition);
}
.booking-slots .slot:hover:not(:disabled) { background: var(--surface-3); border-color: var(--brand); }
.booking-slots .slot:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.booking-slots .slot.selected { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.booking-slots .booking-loading { font-size: .82rem; color: var(--text-muted); }

/* -------------------------------------------------------------------------
   15e. Reels (vídeos verticais 9:16)
   ------------------------------------------------------------------------- */
.reels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    align-items: start;
}

.reel-media {
    position: relative;
    aspect-ratio: 9 / 16;
    background: #000;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.reel-media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Camada que cobre o player: o toque abre a página do vídeo. */
.reel-open { position: absolute; inset: 0; z-index: 2; }

.reel-info {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 3;
    padding: 44px 14px 14px;
    background: linear-gradient(180deg, transparent, rgba(5, 7, 10, .88));
    color: #fff;
    pointer-events: none;
}
.reel-info h3 {
    margin-top: 8px;
    font-size: .98rem;
    line-height: 1.3;
}
.reel-info small { display: block; margin-top: 4px; font-size: .76rem; color: #cbd2da; }
.reel-badge {
    display: inline-flex;
    padding: 4px 10px;
    background: rgba(22, 136, 232, .9);
    border-radius: var(--radius-pill);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   15f. Mapa (Leaflet) — /explore
   ------------------------------------------------------------------------- */
#map {
    height: 62vh;
    min-height: 380px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 1;
}
#map.map-ready { background: var(--surface-2); }
.map-loading { padding: 18px; }

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
    font-size: .8rem;
    color: var(--text-muted);
}
.map-key { display: inline-flex; align-items: center; gap: 6px; }
.map-key i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }

/* Balão do mapa no tema do site */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip { background: var(--surface); color: var(--text); }
.leaflet-popup-content-wrapper {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.leaflet-popup-content { font-family: var(--font-body); margin: 12px 14px; }
.leaflet-popup-content a { color: var(--brand-light); font-weight: 600; text-decoration: none; }
.leaflet-container a.leaflet-popup-close-button { color: var(--text-muted); }
.popup-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.popup-sub { color: var(--text-muted); font-size: .82rem; }

/* -------------------------------------------------------------------------
   15g. Galeria de entrega do cliente
   ------------------------------------------------------------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.gallery-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.gallery-card > .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.gallery-card .card-body h3 { font-size: .92rem; }

/* Botão de favorito flutuando sobre a miniatura */
.fav-form { position: absolute; top: 10px; right: 10px; z-index: 2; }
.fav-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    background: rgba(5, 7, 10, .65);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 1.05rem; line-height: 1;
    backdrop-filter: blur(4px);
    transition: transform var(--transition), background var(--transition);
}
.fav-btn:hover { background: rgba(5, 7, 10, .85); transform: scale(1.06); }
.fav-btn[aria-pressed="true"] { border-color: rgba(239, 68, 68, .5); }

/* Código de 6 dígitos da verificação em duas etapas */
.code-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.3rem;
    letter-spacing: .3em;
    text-align: center;
    padding: 13px 14px;
}

/* =========================================================================
   Aparelhos estreitos: o selo da marca sai de cena e sobra espaço para os botões.
   ========================================================================= */
@media (max-width: 420px) {
    .brand-tag { display: none; }
    .header-actions { gap: 6px; }
    .icon-btn { width: 40px; height: 40px; }
}

/* =========================================================================
   Tablet — a partir de 768px
   ========================================================================= */
@media (min-width: 768px) {
    :root { --header-h: 72px; }

    .container { padding-inline: 24px; }
    .section { padding-block: 60px; }

    .grid { gap: 20px; grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    .media-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .instagram-grid { grid-template-columns: repeat(3, 1fr); }
    .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .split { grid-template-columns: 1.15fr .85fr; }
    .filters { display: flex; flex-wrap: wrap; align-items: center; }
    .filters select, .filters input { width: auto; min-width: 190px; }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .field-row { grid-template-columns: repeat(2, 1fr); }

    .band { flex-direction: row; align-items: center; justify-content: space-between; padding: 36px 32px; }

    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }

    .hero-media { min-height: 82vh; }
    .hero { padding-block: 64px 44px; }

    .whatsapp-float { right: 24px; --float-bottom: 24px; width: 58px; height: 58px; }

    .accordion summary { padding: 18px 22px; font-size: 1rem; }
    .accordion .accordion-body { padding: 0 22px 20px; }
    .timeline .item { padding-left: 34px; }
    .timeline .item h3 { font-size: 1.14rem; }
    .note { padding: 34px 32px; }
}

/* =========================================================================
   Desktop — a partir de 992px
   ========================================================================= */
@media (min-width: 992px) {
    .section { padding-block: 76px; }

    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }

    /* No desktop a navegação deixa de ser gaveta e vira barra */
    .menu-toggle { display: none; }
    .nav-backdrop { display: none; }
    .only-desktop { display: inline-flex !important; }

    .nav {
        position: static; width: auto; padding: 0; visibility: visible;
        background: transparent; border: 0; box-shadow: none;
        transform: none; overflow: visible;
        flex-direction: row; align-items: center; gap: 4px;
        margin-left: auto;
    }
    .nav-head, .nav-divider, .nav-foot, .nav-secondary { display: none; }
    .nav-link, .nav-group > summary {
        padding: 9px 12px; font-size: .9rem; border-bottom: 0;
        border-radius: var(--radius-sm); white-space: nowrap;
    }
    .nav-link:hover, .nav-group > summary:hover { background: var(--surface-2); }

    .nav-sub {
        position: absolute; top: 100%; left: 0; z-index: 20;
        min-width: 240px; margin: 0; padding: 8px;
        background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius); box-shadow: var(--shadow);
        border-left: 0;
    }
    .nav-sub a { padding: 9px 12px; border-radius: var(--radius-sm); font-size: .88rem; }
    .nav-sub a:hover { background: var(--surface-2); }

    /* Submenu abre no hover e no teclado */
    .nav-group { position: relative; }
    .nav-group > .nav-sub { display: none; }
    .nav-group:hover > .nav-sub,
    .nav-group:focus-within > .nav-sub { display: flex; }

    .header-actions { margin-left: 10px; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
}

/* =========================================================================
   Desktop largo — a partir de 1200px
   ========================================================================= */
@media (min-width: 1200px) {
    .media-grid { grid-template-columns: repeat(3, 1fr); }
    .instagram-grid { grid-template-columns: repeat(6, 1fr); }
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
    .hero-media { min-height: 86vh; }
}

/* =========================================================================
   19. Plataforma de aulas
   ------------------------------------------------------------------------
   Componentes próprios da área de estudo: herói de entrada por código,
   cards de matéria e de aula, tela de aula e tela de bloqueio.
   Mobile-first: o que está fora de media query é o celular.
   ========================================================================= */

/* ---- Selo da turma ativa (cabeçalho, rodapé, herói) ---- */
.class-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .1);
    color: var(--success);
    font-size: .8rem;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Herói da home ---- */
.aulas-hero {
    position: relative;
    padding-block: 34px 8px;
}

.aulas-hero-inner { display: grid; gap: 26px; }

.aulas-hero-text h1 { margin-top: 12px; font-size: clamp(1.75rem, 7vw, 3rem); }
.aulas-hero-text .lead { margin-top: 14px; }

.aulas-hero-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.aulas-card-title { font-size: 1.1rem; }

.stats-compact { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-compact .stat { padding: 12px; }
.stats-compact .stat strong { font-size: 1.35rem; }
.stats-compact .stat small { font-size: .72rem; }

/* ---- Seção com fundo levemente destacado ---- */
.section-soft {
    background: var(--gradient-soft);
    border-block: 1px solid var(--border);
}

.section-label {
    font-family: var(--font-heading);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ---- Grades de matéria e de aula ---- */
.subject-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.lesson-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }

/* ---- Card de matéria ---- */
.subject-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.subject-card::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: var(--accent, var(--brand));
}

.subject-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.subject-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
    overflow: hidden;
}

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

.subject-cover-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--brand)) 22%, transparent), transparent 70%);
}

.subject-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(5, 7, 10, .72);
    border: 1px solid var(--border-strong);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.subject-body { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.subject-icon { font-size: 1.1rem; line-height: 1; }
.subject-body strong { font-family: var(--font-heading); font-size: .98rem; line-height: 1.3; }
.subject-body small { color: var(--text-muted); font-size: .8rem; }

.subject-card.is-locked .subject-cover img,
.subject-card.is-locked .subject-cover-fallback { filter: grayscale(.7); opacity: .55; }

/* ---- Card de aula ---- */
.lesson-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.lesson-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
}

.lesson-thumb {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
}

.lesson-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lesson-thumb-fallback { font-size: 1.5rem; opacity: .85; }

.lesson-flag {
    position: absolute;
    bottom: 5px;
    right: 5px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: rgba(5, 7, 10, .78);
    color: #fff;
    font-size: .62rem;
    font-weight: 600;
    white-space: nowrap;
}

.lesson-flag.is-free {
    left: 5px;
    right: auto;
    background: rgba(34, 197, 94, .9);
}

.lesson-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lesson-body strong { font-family: var(--font-heading); font-size: .98rem; line-height: 1.3; }
.lesson-body small { color: var(--text-muted); font-size: .82rem; }

.lesson-subject,
.lesson-index {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.lesson-subject { color: var(--accent, var(--brand-light)); }

.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    font-size: .74rem;
    color: var(--text-muted);
}

.lesson-card.is-locked { opacity: .72; }
.lesson-card.is-locked:hover { transform: none; border-color: var(--border); box-shadow: none; }

/* ---- Passos "como funciona" ---- */
.step-grid { display: grid; gap: 14px; }

.step {
    position: relative;
    padding: 22px 20px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.step-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: .95rem;
}

.step h3 { font-size: 1.02rem; }
.step p { margin-top: 6px; font-size: .9rem; color: var(--text-muted); }
.step p a { color: var(--brand-light); font-weight: 600; }

/* ---- Tela de aula ---- */
.lesson-layout { display: grid; gap: 26px; }

.lesson-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 22px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}

.lesson-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.lesson-content { font-size: 1rem; }

.materials { margin-top: 30px; }

.material-list {
    display: grid;
    gap: 10px;
    list-style: none;
}

.material-item {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.material-icon { font-size: 1.2rem; text-align: center; }
.material-info { display: flex; flex-direction: column; min-width: 0; }
.material-info strong { font-size: .92rem; }
.material-info small { color: var(--text-muted); font-size: .78rem; }

/* ---- Navegação entre aulas ---- */
.lesson-nav {
    display: grid;
    gap: 10px;
    margin-top: 34px;
}

.lesson-nav-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color var(--transition);
}

.lesson-nav-item:hover { border-color: var(--brand); }
.lesson-nav-item.next { text-align: right; }
.lesson-nav-item .dir { font-size: .74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.lesson-nav-item strong { font-size: .92rem; font-family: var(--font-heading); }

.sibling-list { display: grid; gap: 2px; margin-top: 10px; }
.sibling-list a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: .86rem;
    color: var(--text-muted);
}
.sibling-list a:hover { background: var(--surface-2); color: var(--brand-light); }

/* =========================================================================
   Área do aluno e leitura
   Tudo o que veio com as entregas de atividade: identidade no cabeçalho,
   cartões de atividade, formulário de envio, boletim e o leitor de PDF.
   ========================================================================= */

/* ---- Identidade de quem está logado ---- */
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface-2);
    max-width: 230px;
    transition: border-color var(--transition);
}

.user-pill:hover { border-color: var(--brand); }
.user-pill.is-block { width: 100%; border-radius: var(--radius); padding: 8px; max-width: none; }

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-family: var(--font-heading);
    font-size: .78rem;
    font-weight: 700;
}

.user-info { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.user-info strong { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info small { font-size: .68rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Selos de situação e conceito ---- */
.status-chip,
.subject-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.status-chip.tone-ok { border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .12); color: #4ADE80; }
.status-chip.tone-info { border-color: rgba(22, 136, 232, .45); background: rgba(22, 136, 232, .12); color: var(--brand-light); }
.status-chip.tone-warn { border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .12); color: #FBBF24; }
.status-chip.tone-danger { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .12); color: #F87171; }
.status-chip.tone-muted { color: var(--text-muted); }

[data-theme="light"] .status-chip.tone-ok { color: #15803D; }
[data-theme="light"] .status-chip.tone-warn { color: #B45309; }
[data-theme="light"] .status-chip.tone-danger { color: #B91C1C; }

.subject-chip { border-color: transparent; background: var(--gradient-soft); color: var(--brand-light); }

.concept {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
}

.concept strong { font-family: var(--font-heading); font-size: .9rem; }
.concept small { font-size: .68rem; color: var(--text-muted); }

.concept-mb { border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .12); }
.concept-mb strong { color: #4ADE80; }
.concept-b { border-color: rgba(22, 136, 232, .5); background: rgba(22, 136, 232, .12); }
.concept-b strong { color: var(--brand-light); }
.concept-r { border-color: rgba(245, 158, 11, .5); background: rgba(245, 158, 11, .12); }
.concept-r strong { color: #FBBF24; }
.concept-i { border-color: rgba(239, 68, 68, .5); background: rgba(239, 68, 68, .12); }
.concept-i strong { color: #F87171; }
.concept-na { color: var(--text-muted); }
.concept-na strong { color: var(--text-muted); }

[data-theme="light"] .concept-mb strong { color: #15803D; }
[data-theme="light"] .concept-r strong { color: #B45309; }
[data-theme="light"] .concept-i strong { color: #B91C1C; }

/* ---- Cartões de atividade (lista do aluno) ---- */
.assignment-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }

.assignment-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    border-left: 3px solid var(--border-strong);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.assignment-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); }
.assignment-card.is-info { border-left-color: var(--brand); }
.assignment-card.is-ok { border-left-color: var(--success); }
.assignment-card.is-warn { border-left-color: var(--warning); }
.assignment-card.is-danger { border-left-color: var(--danger); }

.assignment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.assignment-title { font-family: var(--font-heading); font-size: 1.02rem; line-height: 1.35; }
.assignment-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: .78rem; color: var(--text-muted); }
.assignment-meta .due-hint { color: var(--warning); font-weight: 600; }
.assignment-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- Tela da atividade ---- */
.assignment-layout { display: grid; gap: 26px; }
.assignment-status-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.assignment-description { margin-bottom: 6px; }
.assignment-block { margin-top: 32px; }

.submit-card,
.result-card {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.submit-card + .info-card,
.result-card + .submit-card { margin-top: 16px; }

.submit-card h2 { font-size: 1.05rem; margin-bottom: 12px; }
.result-card { border-color: rgba(34, 197, 94, .35); }
.result-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.result-text { margin-top: 12px; font-size: .92rem; color: var(--text-soft); white-space: pre-line; }
.result-files { margin-top: 14px; }

.next-due {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(22, 136, 232, .4);
    background: var(--gradient-soft);
}

.next-due-info { display: flex; flex-direction: column; gap: 3px; }
.next-due-info strong { font-family: var(--font-heading); font-size: 1.05rem; }
.next-due-info small { color: var(--text-muted); font-size: .8rem; }

/* ---- Formulário de entrega ---- */
.submission { display: grid; gap: 16px; }

.dropzone {
    position: relative;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition: border-color var(--transition), background var(--transition);
}

.dropzone.is-over { border-color: var(--brand); background: rgba(22, 136, 232, .08); }
.dropzone.has-files { border-style: solid; }

.dropzone-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px 16px;
    margin: 0;
    text-align: center;
    cursor: pointer;
}

.dropzone-label strong { font-size: .92rem; }
.dropzone-label small { color: var(--text-muted); font-size: .76rem; }
.dropzone-icon { font-size: 1.5rem; }

.file-list { display: grid; gap: 6px; padding: 0 12px 12px; margin: 0; list-style: none; }
.file-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: .84rem;
}

.file-list .file-name { flex: 1 1 auto; min-width: 0; word-break: break-all; }
.file-list small { color: var(--text-muted); font-size: .74rem; }
.file-list.is-static { padding: 0; }
.file-list.is-static li { background: transparent; }

.link-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.link-row { display: grid; gap: 8px; }

.link-list { display: grid; gap: 4px; margin-top: 8px; list-style: none; }
.link-list li { display: flex; gap: 8px; align-items: center; font-size: .84rem; }
.link-list a { color: var(--brand-light); word-break: break-all; }

.field-error {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, .45);
    background: rgba(239, 68, 68, .1);
    color: #F87171;
    font-size: .84rem;
}

[data-theme="light"] .field-error { color: #B91C1C; }

/* ---- Conteúdos de apoio (sites e vídeos) ---- */
.support { margin-top: 30px; }
.support-grid { display: grid; gap: 12px; margin-top: 12px; }

.support-video,
.support-link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color var(--transition), transform var(--transition);
}

.support-video:hover,
.support-link:hover { border-color: var(--brand); transform: translateY(-2px); }

.support-thumb {
    position: relative;
    flex: none;
    width: 96px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
}

.support-thumb img { width: 100%; height: 100%; object-fit: cover; }
.support-thumb-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

.support-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .9rem;
    background: rgba(5, 7, 10, .35);
}

.support-icon { flex: none; font-size: 1.4rem; }
.support-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.support-body strong { font-size: .92rem; }
.support-body small { color: var(--text-muted); font-size: .76rem; }
.support-go { margin-left: auto; color: var(--brand-light); }

/* ---- Histórico de versões ---- */
.versions { margin-top: 32px; }
.version-list { display: grid; gap: 12px; margin-top: 12px; list-style: none; }

.version-item {
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    border-left: 3px solid var(--brand);
}

.version-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.version-item .note-body { font-size: .86rem; color: var(--text-soft); }

/* ---- Devolutivas na lista ---- */
.feedback-list { display: grid; gap: 12px; list-style: none; }

.feedback-item {
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.feedback-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 6px; }

/* ---- Boletim ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.table tbody tr:hover { background: var(--surface-2); }

.concept-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }

.concept-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.concept-summary-item strong { font-family: var(--font-heading); font-size: 1.3rem; }
.concept-summary-item small { color: var(--text-muted); font-size: .74rem; }

.grades-block { margin-top: 30px; }
.filters-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.filters-bar .filters { margin: 0; }

/* ---- Páginas de entrada (login e cadastro) ---- */
.auth-wrap { display: grid; gap: 26px; }
.auth-page { padding-block: 34px 60px; }

.auth-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-card h1 { margin-top: 10px; font-size: clamp(1.4rem, 5vw, 1.9rem); }
.auth-alt { margin-top: 18px; font-size: .86rem; color: var(--text-muted); }
.auth-alt a { color: var(--brand-light); font-weight: 600; }

.auth-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, .45);
    background: rgba(239, 68, 68, .1);
    color: #F87171;
    font-size: .85rem;
}

[data-theme="light"] .auth-error { color: #B91C1C; }

.check-inline { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .85rem; font-weight: 500; color: var(--text-soft); }
.check-inline input { width: auto; }

.auth-side h2 { font-family: var(--font-heading); }
.auth-steps { display: grid; gap: 14px; margin-top: 16px; counter-reset: passo; list-style: none; }
.auth-steps li { position: relative; padding-left: 38px; counter-increment: passo; }

.auth-steps li::before {
    content: counter(passo);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-family: var(--font-heading);
    font-size: .78rem;
    font-weight: 700;
}

.auth-steps strong { display: block; font-size: .92rem; }
.auth-steps small { color: var(--text-muted); font-size: .82rem; }

.auth-benefits { display: grid; gap: 10px; margin-top: 16px; list-style: none; }
.auth-benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-soft); }

/* ---- Tela de espera (cadastro aguardando liberação) ---- */
.waiting-list { display: grid; gap: 12px; margin-top: 18px; list-style: none; }

.waiting-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.waiting-list li > span:first-child { font-size: 1.15rem; flex: none; }
.waiting-list strong { display: block; font-size: .92rem; }
.waiting-list small { color: var(--text-muted); font-size: .8rem; }

/* ---- Convite da turma (QR Code / link curto) ---- */.invite-code {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 16px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-strong, var(--border));
    background: var(--surface-2);
}

.invite-code .label {
    font-size: .66rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.invite-code .code {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .16em;
}

.invite-status {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.invite-status strong { font-size: .92rem; }
.invite-status small { color: var(--text-muted); font-size: .8rem; }
.invite-status.is-ok { border-color: var(--success, #1f9d55); background: color-mix(in srgb, var(--success, #1f9d55) 10%, transparent); }
.invite-status.is-waiting { border-color: #d9a441; background: color-mix(in srgb, #d9a441 12%, transparent); }

.invite-note {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-soft);
}

.invite-qr { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }

.invite-qr summary {
    cursor: pointer;
    font-size: .86rem;
    font-weight: 600;
    color: var(--text-soft);
}

.invite-qr .qr-preview {
    width: 200px;
    height: 200px;
    margin: 14px auto 6px;
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
}

.invite-qr .qr-preview svg { width: 100%; height: 100%; display: block; }
.invite-qr small { display: block; text-align: center; }

/* ---- Caderno de anotações do aluno ---- */
.notebook-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.notebook { display: grid; gap: 18px; }
.notebook-editor, .notebook-preview { display: grid; gap: 10px; min-width: 0; }

.notebook-toolbar { display: flex; flex-wrap: wrap; gap: 6px; }

.md-btn {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-soft);
    font: inherit;
    font-size: .8rem;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}

.md-btn:hover { border-color: var(--brand); color: var(--brand-light); }

.notebook-input {
    width: 100%;
    min-height: 420px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: ui-monospace, Menlo, monospace;
    font-size: .92rem;
    line-height: 1.6;
    resize: vertical;
}

.notebook-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(22, 136, 232, .18);
}

.notebook-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.notebook-rendered {
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    overflow-wrap: anywhere;
}

.notebook-rendered > * + * { margin-top: 10px; }
.notebook-rendered h1 { font-size: 1.3rem; }
.notebook-rendered h2 { font-size: 1.1rem; }
.notebook-rendered h3 { font-size: 1rem; }

.notebook-rendered ul, .notebook-rendered ol { display: grid; gap: 4px; padding-left: 22px; }

.notebook-rendered blockquote {
    padding-left: 12px;
    border-left: 3px solid var(--brand);
    color: var(--text-muted);
}

.notebook-rendered code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--surface-3);
    font-family: ui-monospace, Menlo, monospace;
    font-size: .85rem;
}

.notebook-rendered .md-code {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    overflow-x: auto;
}

.notebook-rendered .md-code code { padding: 0; background: none; }
.notebook-rendered hr { border: none; border-top: 1px solid var(--border); }
.notebook-rendered a { color: var(--brand-light); text-decoration: underline; }

.notebook-rendered img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: block;
}

/* ---- Imagens anexadas pelo professor (aula/atividade) ---- */
.material-images {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.material-image {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.material-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
}

.material-image figcaption { display: grid; gap: 6px; }
.material-image figcaption small { color: var(--text-muted); }
.material-image .material-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (min-width: 768px) {
    .material-images { grid-template-columns: repeat(2, 1fr); }
}

.notebook-help {
    display: grid;
    gap: 6px;
    margin: 10px 0 12px;
    padding-left: 0;
    list-style: none;
    font-size: .86rem;
    color: var(--text-soft);
}

.notebook-shortcut {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition);
}

.notebook-shortcut:hover { border-color: var(--brand); }
.notebook-shortcut .icon { font-size: 1.3rem; }
.notebook-shortcut strong { display: block; }
.notebook-shortcut small { color: var(--text-muted); }
.notebook-shortcut .go { margin-left: auto; color: var(--brand-light); }

@media (min-width: 992px) {
    .notebook { grid-template-columns: 1.05fr .95fr; align-items: start; }
    .notebook-preview { position: sticky; top: calc(var(--header-h) + 18px); }
}

/* ---- Mapa do site (visual) ---- */
.map-subjects { margin-bottom: 22px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.map-grid {
    display: grid;
    gap: 18px;
    margin-top: 8px;
}

.map-block {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.map-block-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.map-block-icon { font-size: 1.6rem; }
.map-block-head h2 { font-size: 1.05rem; }
.map-block-head small { color: var(--text-muted); }

.map-list { display: grid; gap: 12px; list-style: none; }
.map-item { display: flex; gap: 10px; align-items: flex-start; }
.map-item-icon { flex: none; font-size: 1.05rem; line-height: 1.5; }
.map-item-text { display: grid; gap: 2px; }
.map-item-text a, .map-item-text strong { font-size: .95rem; }
.map-item-text small { color: var(--text-muted); font-size: .82rem; }
.map-lock { margin-left: 4px; font-size: .85rem; }

.map-footer {
    display: grid;
    gap: 6px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
    .map-grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
}

@media (min-width: 1200px) {
    .map-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Pontuação do aluno ---- */
.score-hero {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--gradient-soft);
}

.score-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.score-total .label {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.score-total strong {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    line-height: 1;
    color: var(--brand-light);
}

.score-total small { color: var(--text-muted); }

.score-rules { display: grid; gap: 12px; margin-top: 12px; list-style: none; }
.score-rules li { display: flex; gap: 10px; align-items: flex-start; }
.score-rules li > span:first-child { flex: none; font-size: 1.05rem; }
.score-rules strong { display: block; font-size: .92rem; }
.score-rules small { color: var(--text-muted); font-size: .82rem; }

.is-positive { color: var(--success); }
.is-negative { color: var(--danger); }

.chip-static { cursor: default; }

.status-chip.tone-muted {
    border-color: var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .score-hero { grid-template-columns: auto 1fr; align-items: center; }
    .score-total { flex-direction: column; gap: 2px; align-items: flex-start; }
}

/* ---- Avisos no celular (PWA) ---- */
.push-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.push-card .icon { font-size: 1.35rem; }
.push-card .push-text { flex: 1 1 240px; min-width: 200px; }
.push-card strong { display: block; }
.push-card small { color: var(--text-muted); }

/* Ligado: o botão vira "desligar", em estilo discreto. */
.push-card .btn.is-on {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-soft);
}

/* ---- Página offline do PWA ---- */
.offline-card {
    display: grid;
    gap: 12px;
    max-width: 540px;
    margin: 48px auto;
    padding: 30px 26px;
    text-align: center;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.offline-card .icon { font-size: 2rem; }
.offline-card .actions-row { justify-content: center; }

/* ---- Modo tela cheia (aula em projetor/telão) ---- */
body.is-fullscreen { --header-h: 0px; }
body.is-fullscreen main { min-height: 100vh; }
body.is-fullscreen .container { max-width: 1440px; }
body.is-fullscreen .section,
body.is-fullscreen .auth-page { padding-block: 22px 44px; }
body.is-fullscreen .site-header,
body.is-fullscreen .site-footer,
body.is-fullscreen .whatsapp-float { display: none; }

.fs-dock {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fs-dock .fs-exit { position: static; }

.fs-exit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--text-soft);
    font-size: .82rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    opacity: .88;
    cursor: pointer;
    transition: opacity var(--transition), border-color var(--transition), color var(--transition);
}

/* O botão só de ícone (tema) fica quadrado, do tamanho do outro. */
.fs-dock > .fs-exit-btn { padding: 10px 12px; font-size: .95rem; }

.fs-exit-btn:hover { opacity: 1; border-color: var(--brand); color: var(--brand-light); }

/* Leitor de PDF ---- */
body.is-reading .site-footer,
body.is-reading .whatsapp-float { display: none; }

.reader {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-h));
    background: var(--surface-2);
}

.reader-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: var(--header-h);
    z-index: 5;
}

.reader-bar-start { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; min-width: 0; }
.reader-info { display: flex; gap: 10px; align-items: center; min-width: 0; }
.reader-icon { font-size: 1.2rem; flex: none; }
.reader-text { display: flex; flex-direction: column; min-width: 0; }
.reader-text strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
.reader-text small { color: var(--text-muted); font-size: .72rem; }

.reader-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.reader-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.icon-btn.sm { width: 32px; height: 32px; font-size: .8rem; border-radius: 50%; }
.reader-counter { font-size: .8rem; color: var(--text-soft); min-width: 46px; text-align: center; }

.reader-stage {
    flex: 1;
    padding: 18px 14px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.reader-status { color: var(--text-muted); font-size: .9rem; padding: 30px 0; }
.reader-pages { display: grid; gap: 16px; width: 100%; justify-items: center; }

.reader-page {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: var(--ratio, 1 / 1.414);
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.reader-page::after {
    content: 'Carregando página…';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: .8rem;
}

.reader-page.is-ready::after { content: none; }
.reader-page canvas { display: block; width: 100%; height: auto; }

.reader-frame {
    width: 100%;
    min-height: 78vh;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

/* Tela cheia do navegador: o cabeçalho sai da conta e a barra fica no topo. */
.reader:fullscreen { --header-h: 0px; background: var(--bg); padding: 0; }
.reader:fullscreen .reader-stage { padding: 18px 20px 40px; }

/* Leitor embutido no painel (iframe): ocupa todo o quadro. */
body.is-embed { background: var(--surface-2); }
body.is-embed .reader { min-height: 100vh; }
body.is-embed .reader-bar { position: sticky; top: 0; }

.reader-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

/* =========================================================================
   Tablet — a partir de 768px
   ========================================================================= */
@media (min-width: 768px) {
    .aulas-hero { padding-block: 52px 16px; }
    .aulas-hero-inner { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 34px; }

    .subject-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .lesson-grid { grid-template-columns: repeat(2, 1fr); }
    .lesson-grid-list { grid-template-columns: 1fr; }

    .step-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }

    .material-item { padding: 14px 16px; }

    /* Área do aluno */
    .assignment-grid { grid-template-columns: repeat(2, 1fr); }
    .assignment-status-bar { gap: 14px; }
    .auth-wrap { grid-template-columns: 1.05fr .95fr; align-items: start; gap: 32px; }
    .concept-summary { grid-template-columns: repeat(3, 1fr); }
    .support-grid { grid-template-columns: repeat(2, 1fr); }
    .link-row { grid-template-columns: 1fr 2fr auto; align-items: center; }
    .reader-stage { padding: 22px 20px 32px; }
    .reader-text strong { max-width: none; }
}

/* =========================================================================
   Desktop — a partir de 992px
   ========================================================================= */
@media (min-width: 992px) {
    .aulas-hero { padding-block: 66px 24px; }
    .subject-grid { grid-template-columns: repeat(3, 1fr); }

    .lesson-layout { grid-template-columns: 1fr 320px; align-items: start; gap: 34px; }
    .lesson-side { position: sticky; top: calc(var(--header-h) + 18px); }

    .enter-wrap { max-width: 640px; margin-inline: auto; }

    /* Área do aluno */
    .assignment-layout { grid-template-columns: 1fr 360px; align-items: start; gap: 34px; }
    .assignment-side { position: sticky; top: calc(var(--header-h) + 18px); }
    .concept-summary { grid-template-columns: repeat(5, 1fr); }
    .support-grid { grid-template-columns: repeat(3, 1fr); }
    .auth-wrap { grid-template-columns: 1fr 1fr; gap: 46px; }
    .auth-card { padding: 34px; }
}

@media (min-width: 1200px) {
    .subject-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Trabalho em equipe (entrega compartilhada) ---- */
.team-note {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-strong);
    background: var(--surface-2);
}

.team-note strong { font-size: .92rem; }
.team-note .check-inline { font-size: .88rem; }

.team-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--gradient-soft);
    color: var(--brand-light);
    font-size: .78rem;
    font-weight: 600;
}

/* -------------------------------------------------------------------------
   Boletim (matérias × bimestres)
   ------------------------------------------------------------------------- */
.report-card th.center,
.report-card td.center { text-align: center; }

.report-card td small { display: block; color: var(--text-muted); font-size: .72rem; }

.is-provisional { opacity: .72; }
.is-provisional::after { content: "•"; color: var(--warning); margin-left: 2px; }

.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }

.tag-report {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .16);
    color: var(--success);
    font-size: .76rem;
    font-weight: 700;
}

.tag-report.is-alert {
    border-color: rgba(239, 68, 68, .35);
    background: rgba(239, 68, 68, .16);
    color: var(--danger);
}
