/* ═══════════════════════════════════════════════════════════
   Batuta Cursos — main.css
   Paleta: Creme #FAF4EC · Turquesa #7FB7B2 · Coral #D96C4F
           Marrom #8B4A2F · Bege #F2E6D8 · Laranja #C85A3A
   Fontes: Montserrat (display) · Poppins · Inter
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Cores */
    --creme:       #FAF4EC;
    --creme-d:     #F2E6D8;
    --turquesa:    #7FB7B2;
    --turquesa-d:  #5A9E99;
    --turquesa-lt: #E8F4F3;
    --coral:       #D96C4F;
    --coral-d:     #C85A3A;
    --coral-lt:    #FAEAE5;
    --marrom:      #8B4A2F;
    --marrom-lt:   #F5EBE4;
    --bege:        #F2E6D8;
    --laranja:     #C85A3A;

    /* Tons neutros */
    --texto:       #3D2B1F;
    --texto-md:    #6B4F3A;
    --texto-lt:    #9A7B65;
    --border:      #E8DDD4;
    --border-lt:   #F0E8E0;
    --surface:     #FFFFFF;
    --surface2:    #FAF4EC;
    --bg:          #FAF4EC;

    /* Sucesso / erro */
    --green:       #2D7D5A;
    --green-lt:    #D6F0E4;
    --red:         #C0392B;
    --red-lt:      #FDECEA;

    /* Fontes */
    --font-d:  'Montserrat', sans-serif;
    --font-b:  'Poppins', sans-serif;
    --font-t:  'Inter', sans-serif;

    /* Espaços e raios */
    --radius:    14px;
    --radius-sm: 9px;
    --radius-lg: 20px;
    --shadow:    0 4px 24px rgba(139,74,47,.10);
    --shadow-sm: 0 2px 10px rgba(139,74,47,.07);
    --trans:     .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--texto);
    font-family: var(--font-t);
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
}

a { color: var(--turquesa-d); text-decoration: none; transition: opacity var(--trans); }
a:hover { opacity: .8; }
img { max-width: 100%; display: block; }

/* ══ NAV ══════════════════════════════════════════════════ */
.bc-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250,244,236,.96);
    backdrop-filter: blur(12px);
    border-bottom: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.bc-nav__inner {
    max-width: 1200px; margin: 0 auto; padding: 0 28px;
    height: 64px; display: flex; align-items: center;
    justify-content: space-between; gap: 24px;
}
.bc-nav__logo {
    font-family: var(--font-d); font-size: 22px; font-weight: 900;
    letter-spacing: -.5px; color: var(--texto); text-decoration: none;
}
.bc-nav__logo-bat    { color: var(--turquesa-d); }
.bc-nav__logo-cursos { color: var(--marrom); }

.bc-nav__links { display: flex; align-items: center; gap: 4px; }
.bc-nav__link {
    color: var(--texto-md); font-family: var(--font-b); font-size: 14px;
    font-weight: 500; padding: 7px 14px; border-radius: var(--radius-sm);
    transition: all var(--trans);
}
.bc-nav__link:hover { color: var(--marrom); background: var(--marrom-lt); opacity: 1; }
.bc-nav__link--admin { color: var(--coral-d); font-weight: 600; }

/* ══ BOTÕES ═══════════════════════════════════════════════ */
.bc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; font-family: var(--font-b); font-weight: 600;
    border: none; cursor: pointer; transition: all var(--trans);
    border-radius: var(--radius-sm); text-decoration: none; white-space: nowrap;
}
.bc-btn--primary {
    background: var(--coral); color: var(--creme);
    padding: 11px 24px; font-size: 15px;
    box-shadow: 0 3px 12px rgba(217,108,79,.30);
}
.bc-btn--primary:hover { background: var(--coral-d); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(217,108,79,.35); opacity: 1; }
.bc-btn--outline {
    background: transparent; border: 1.5px solid var(--border);
    color: var(--texto-md); padding: 11px 24px; font-size: 15px;
}
.bc-btn--outline:hover { border-color: var(--turquesa); color: var(--turquesa-d); opacity: 1; }
.bc-btn--turquesa {
    background: var(--turquesa); color: var(--creme);
    padding: 11px 24px; font-size: 15px;
    box-shadow: 0 3px 12px rgba(127,183,178,.30);
}
.bc-btn--turquesa:hover { background: var(--turquesa-d); transform: translateY(-1px); opacity: 1; }
.bc-btn--danger  { background: var(--red); color: #fff; padding: 11px 24px; font-size: 15px; }
.bc-btn--sm      { padding: 7px 16px; font-size: 13px; }
.bc-btn--lg      { padding: 14px 32px; font-size: 17px; border-radius: var(--radius); }
.bc-btn--full    { width: 100%; }
.bc-btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ══ LAYOUT ═══════════════════════════════════════════════ */
.bc-main        { min-height: calc(100vh - 64px); }
.bc-container   { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.bc-section     { padding: 64px 0; }
.bc-section--sm { padding: 40px 0; }

/* ══ HERO ═════════════════════════════════════════════════ */
.bc-hero {
    padding: 80px 28px 64px; max-width: 1200px; margin: 0 auto; text-align: center;
}
.bc-hero__eyebrow {
    display: inline-block; font-family: var(--font-b); font-size: 12px;
    font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--turquesa-d); background: var(--turquesa-lt);
    padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
}
.bc-hero__title {
    font-family: var(--font-d); font-size: clamp(38px,6vw,72px);
    font-weight: 900; line-height: 1.05; letter-spacing: -.03em;
    color: var(--marrom); margin-bottom: 20px;
}
.bc-hero__title em { font-style: normal; color: var(--coral); }
.bc-hero__sub {
    font-family: var(--font-b); font-size: 18px; color: var(--texto-md);
    max-width: 540px; margin: 0 auto 40px; line-height: 1.6;
}

/* ══ BUSCA ════════════════════════════════════════════════ */
.bc-search {
    display: flex; max-width: 620px; margin: 0 auto;
    background: var(--surface); border: 2px solid var(--border);
    border-radius: 50px; overflow: hidden;
    transition: border-color var(--trans), box-shadow var(--trans);
    box-shadow: var(--shadow-sm);
}
.bc-search:focus-within { border-color: var(--turquesa); box-shadow: 0 0 0 4px rgba(127,183,178,.15); }
.bc-search__input {
    flex: 1; background: transparent; border: none; outline: none;
    padding: 15px 24px; font-size: 15px; font-family: var(--font-b);
    color: var(--texto);
}
.bc-search__input::placeholder { color: var(--texto-lt); }
.bc-search__btn {
    background: var(--coral); color: var(--creme); border: none;
    padding: 11px 24px; font-size: 14px; font-weight: 700;
    font-family: var(--font-b); cursor: pointer; border-radius: 50px;
    margin: 4px; transition: background var(--trans);
}
.bc-search__btn:hover { background: var(--coral-d); }

/* ══ CARDS DE CURSO ═══════════════════════════════════════ */
.bc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 20px; }

.bc-card {
    background: var(--surface); border: 1.5px solid var(--border-lt);
    border-radius: var(--radius); overflow: hidden;
    transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
    box-shadow: var(--shadow-sm);
}
.bc-card:hover {
    transform: translateY(-4px);
    border-color: var(--turquesa);
    box-shadow: 0 10px 32px rgba(127,183,178,.18);
}
.bc-card__body { padding: 18px; }
.bc-card__cat {
    font-family: var(--font-b); font-size: 11px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; color: var(--turquesa-d); margin-bottom: 6px;
}
.bc-card__title {
    font-family: var(--font-d); font-size: 17px; font-weight: 700;
    line-height: 1.3; margin-bottom: 8px; color: var(--marrom);
}
.bc-card__desc {
    font-size: 13px; color: var(--texto-md); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 12px;
}
.bc-card__meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--texto-lt); flex-wrap: wrap; }
.bc-card__ia-badge {
    display: inline-flex; align-items: center; gap: 4px; font-size: 10px;
    font-weight: 700; background: var(--turquesa-lt); color: var(--turquesa-d);
    padding: 3px 9px; border-radius: 20px; margin-left: auto; font-family: var(--font-b);
}

/* ══ BADGES ═══════════════════════════════════════════════ */
.bc-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; font-family: var(--font-b); }
.bc-badge--nivel-iniciante     { background: var(--green-lt);  color: var(--green); }
.bc-badge--nivel-intermediario { background: var(--turquesa-lt); color: var(--turquesa-d); }
.bc-badge--nivel-avancado      { background: var(--coral-lt);  color: var(--coral-d); }

/* ══ FORMULÁRIOS ══════════════════════════════════════════ */
.bc-form   { display: flex; flex-direction: column; gap: 18px; }
.bc-field  { display: flex; flex-direction: column; gap: 6px; }
.bc-label  { font-family: var(--font-b); font-size: 13px; font-weight: 600; color: var(--texto-md); }
.bc-input, .bc-textarea, .bc-select {
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); color: var(--texto);
    font-family: var(--font-t); font-size: 15px; padding: 11px 14px;
    outline: none; transition: border-color var(--trans), box-shadow var(--trans); width: 100%;
}
.bc-input:focus, .bc-textarea:focus, .bc-select:focus {
    border-color: var(--turquesa); box-shadow: 0 0 0 3px rgba(127,183,178,.15);
}
.bc-input::placeholder { color: var(--texto-lt); }
.bc-textarea { resize: vertical; min-height: 100px; }
.bc-select option { background: var(--creme); }
.bc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ══ AUTH ═════════════════════════════════════════════════ */
.bc-auth {
    min-height: calc(100vh - 64px); display: flex;
    align-items: center; justify-content: center; padding: 40px 24px;
    background: linear-gradient(135deg, var(--creme) 0%, var(--bege) 100%);
}
.bc-auth__box {
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 44px; width: 100%; max-width: 460px;
    box-shadow: 0 8px 40px rgba(139,74,47,.10);
}
.bc-auth__title { font-family: var(--font-d); font-size: 28px; font-weight: 800; color: var(--marrom); margin-bottom: 6px; }
.bc-auth__sub   { color: var(--texto-md); font-size: 14px; margin-bottom: 28px; }

/* ══ ALERTAS ══════════════════════════════════════════════ */
.bc-alert {
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 14px; border-left: 3px solid; margin-bottom: 16px;
    font-family: var(--font-b); font-weight: 500;
}
.bc-alert--error   { background: var(--red-lt);   border-color: var(--red);   color: var(--red); }
.bc-alert--success { background: var(--green-lt);  border-color: var(--green); color: var(--green); }
.bc-alert--info    { background: var(--turquesa-lt); border-color: var(--turquesa); color: var(--turquesa-d); }

/* ══ BARRA DE PROGRESSO ═══════════════════════════════════ */
.bc-progress { background: var(--bege); border-radius: 20px; height: 7px; overflow: hidden; }
.bc-progress__bar { height: 100%; background: linear-gradient(90deg, var(--turquesa), var(--coral)); border-radius: 20px; transition: width .4s ease; }

/* ══ CURSO LAYOUT ═════════════════════════════════════════ */
.bc-curso-layout { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 64px); }
.bc-curso-sidebar {
    background: var(--surface); border-right: 1.5px solid var(--border);
    padding: 24px; overflow-y: auto; position: sticky; top: 64px; height: calc(100vh - 64px);
}
.bc-curso-content { padding: 40px 52px; background: var(--creme); }

.bc-aula-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    cursor: pointer; transition: background var(--trans); margin-bottom: 4px;
    text-decoration: none; color: inherit;
}
.bc-aula-item:hover { background: var(--creme); }
.bc-aula-item--ativa { background: var(--turquesa-lt); border-left: 3px solid var(--turquesa); }
.bc-aula-check {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--border); display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 11px; color: var(--texto-lt); margin-top: 2px;
}
.bc-aula-item--concluida .bc-aula-check { background: var(--green-lt); border-color: var(--green); color: var(--green); }

/* ══ CONTEÚDO DE AULA ═════════════════════════════════════ */
.bc-aula-html h1,.bc-aula-html h2,.bc-aula-html h3 { font-family: var(--font-d); font-weight: 700; line-height: 1.3; margin-top: 28px; margin-bottom: 12px; }
.bc-aula-html h1 { font-size: 28px; color: var(--marrom); }
.bc-aula-html h2 { font-size: 22px; color: var(--turquesa-d); }
.bc-aula-html h3 { font-size: 18px; color: var(--marrom); }
.bc-aula-html p  { margin-bottom: 16px; color: var(--texto); text-align: justify; }
.bc-aula-html ul,.bc-aula-html ol { margin: 0 0 16px 24px; }
.bc-aula-html li { margin-bottom: 6px; }
.bc-aula-html strong { color: var(--marrom); font-weight: 600; }
.bc-aula-html code { background: var(--bege); padding: 2px 7px; border-radius: 5px; font-size: 14px; font-family: monospace; color: var(--coral-d); }
.bc-aula-html pre { background: var(--bege); padding: 18px; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 16px; font-size: 14px; border: 1px solid var(--border); }
.bc-aula-html blockquote { border-left: 3px solid var(--turquesa); padding-left: 16px; color: var(--texto-md); font-style: italic; margin-bottom: 16px; }

/* ══ QUIZ ═════════════════════════════════════════════════ */
.bc-quiz { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 26px; margin-top: 32px; box-shadow: var(--shadow-sm); }
.bc-quiz__title { font-family: var(--font-d); font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--marrom); }
.bc-quiz__pergunta { font-weight: 600; margin-bottom: 14px; font-size: 16px; color: var(--texto); font-family: var(--font-b); }
.bc-quiz__opcao {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; margin-bottom: 8px; transition: all var(--trans); font-size: 14px;
}
.bc-quiz__opcao:hover { border-color: var(--turquesa); background: var(--turquesa-lt); }
.bc-quiz__opcao--certa  { border-color: var(--green); background: var(--green-lt);  color: var(--green); }
.bc-quiz__opcao--errada { border-color: var(--red);   background: var(--red-lt);    color: var(--red); }

/* ══ CERTIFICADO / PAGAMENTO ══════════════════════════════ */
.bc-cert-box {
    max-width: 500px; margin: 60px auto;
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 44px; text-align: center;
    box-shadow: 0 8px 40px rgba(139,74,47,.10);
}
.bc-cert-icon { font-size: 56px; margin-bottom: 16px; }
.bc-cert-price { font-family: var(--font-d); font-size: 52px; font-weight: 900; color: var(--coral); line-height: 1; margin: 16px 0 4px; }
.bc-cert-price-sub { font-size: 13px; color: var(--texto-lt); margin-bottom: 28px; font-family: var(--font-b); }

/* ══ GERAÇÃO POR IA ═══════════════════════════════════════ */
.bc-gerar-box { max-width: 640px; margin: 0 auto; padding: 0 24px 60px; }
.bc-gerar-hero { text-align: center; margin-bottom: 36px; padding-top: 48px; }
.bc-gerar-hero__icon { font-size: 48px; margin-bottom: 16px; }
.bc-gerar-hero__title { font-family: var(--font-d); font-size: 32px; font-weight: 800; color: var(--marrom); margin-bottom: 10px; }
.bc-gerar-hero__sub { color: var(--texto-md); font-size: 16px; font-family: var(--font-b); }

.bc-gerar-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.bc-step {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px;
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; transition: all var(--trans);
    box-shadow: var(--shadow-sm);
}
.bc-step__num {
    width: 30px; height: 30px; border-radius: 50%; background: var(--bege);
    border: 1.5px solid var(--border); display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
    color: var(--texto-lt); font-family: var(--font-b);
}
.bc-step--ativo { border-color: var(--turquesa); background: var(--turquesa-lt); }
.bc-step--ativo .bc-step__num { background: var(--turquesa); color: var(--creme); border-color: var(--turquesa); }
.bc-step--concluido { border-color: var(--green); }
.bc-step--concluido .bc-step__num { background: var(--green-lt); color: var(--green); border-color: var(--green); }

.bc-streaming-output {
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; font-family: monospace;
    font-size: 12px; color: var(--texto-md); min-height: 100px;
    max-height: 260px; overflow-y: auto; line-height: 1.8;
}
.bc-cursor { display: inline-block; width: 8px; height: 13px; background: var(--coral); animation: bc-blink .7s step-end infinite; vertical-align: text-bottom; margin-left: 2px; }
@keyframes bc-blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ══ FOOTER ═══════════════════════════════════════════════ */
.bc-footer { border-top: 1.5px solid var(--border); padding: 36px 24px; text-align: center; background: var(--surface); }
.bc-footer__brand { font-family: var(--font-d); font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.bc-footer__brand span { color: var(--turquesa-d); }
.bc-footer__copy { font-size: 13px; color: var(--texto-lt); font-family: var(--font-b); }

/* ══ DIVIDER ══════════════════════════════════════════════ */
.bc-divider { display: flex; align-items: center; gap: 12px; color: var(--texto-lt); font-size: 13px; margin: 12px 0; }
.bc-divider::before,.bc-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ══ SPINNER ══════════════════════════════════════════════ */
.bc-spinner { width: 20px; height: 20px; border: 2.5px solid var(--border); border-top-color: var(--coral); border-radius: 50%; animation: bc-spin .7s linear infinite; display: inline-block; }
@keyframes bc-spin { to { transform: rotate(360deg); } }

/* ══ UTILITÁRIOS ══════════════════════════════════════════ */
.bc-text-muted   { color: var(--texto-lt); }
.bc-text-coral   { color: var(--coral); }
.bc-text-turq    { color: var(--turquesa-d); }
.bc-text-marrom  { color: var(--marrom); }
.bc-text-success { color: var(--green); }
.bc-text-danger  { color: var(--red); }
.bc-mt-8  { margin-top: 8px; }  .bc-mt-16 { margin-top: 16px; } .bc-mt-24 { margin-top: 24px; }
.bc-mb-8  { margin-bottom: 8px; } .bc-mb-16 { margin-bottom: 16px; } .bc-mb-24 { margin-bottom: 24px; }
.bc-flex  { display: flex; } .bc-flex-center { display: flex; align-items: center; justify-content: center; }
.bc-gap-8 { gap: 8px; } .bc-gap-16 { gap: 16px; }
.bc-w-full { width: 100%; }
.bc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ══ RESPONSIVO ═══════════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
    .bc-container { padding: 0 16px; }
    .bc-grid { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
}

/* Mobile */
@media (max-width: 768px) {
    /* Nav */
    .bc-nav__inner { padding: 0 16px; height: 56px; }
    .bc-nav__logo  { font-size: 18px; }
    .bc-nav__links .bc-nav__link { display: none; }
    .bc-nav__links .bc-btn { display: flex; font-size: 12px; padding: 6px 12px; }

    /* Hero */
    .bc-hero { padding: 40px 16px 32px; }
    .bc-hero__title { font-size: 28px; }
    .bc-hero__sub   { font-size: 15px; }

    /* Busca mobile -- totalmente integrado */
    .bc-search {
        border-radius: 50px;
        max-width: 100%;
        width: 100%;
        display: flex;
        align-items: center;
    }
    .bc-search__input {
        padding: 13px 16px;
        font-size: 15px;
        min-width: 0;
        flex: 1;
        width: 0;
    }
    .bc-search__btn {
        border-radius: 50px;
        margin: 4px;
        padding: 10px 18px;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 0;
    }

    /* Grid */
    .bc-grid { grid-template-columns: 1fr; gap: 12px; }
    .bc-container { padding: 0 14px; }

    /* Formularios */
    .bc-form-row  { grid-template-columns: 1fr; }
    .bc-auth      { padding: 24px 14px; align-items: flex-start; }
    .bc-auth__box { padding: 24px 18px; border-radius: var(--radius); }
    .bc-auth__title { font-size: 22px; }

    /* Curso player */
    .bc-curso-layout  { grid-template-columns: 1fr; }
    .bc-curso-sidebar { position: static; height: auto; max-height: 320px; overflow-y: auto; }
    .bc-curso-content { padding: 20px 14px; }

    /* Secoes */
    .bc-section     { padding: 40px 0; }
    .bc-section--sm { padding: 24px 0; }
}

/* Mobile pequeno */
@media (max-width: 420px) {
    .bc-hero__title { font-size: 24px; }
    .bc-nav__logo   { font-size: 16px; }
    .bc-auth__box   { padding: 20px 14px; }
    .bc-btn--lg     { padding: 12px 20px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
