@font-face {
    font-family: 'Rustyne';
    src: url('Fonts/Rustyne-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --primary-blue: #f7815f;      /* coral — cor principal / sidebar */
    --secondary-blue: #9cd5e3;    /* azul céu — acentos secundários */
    --brand-orange: #f4cb57;      /* amarelo — badges e pills */
    --brand-yellow: #f4cb57;      /* amarelo — grifo/underline */
    --bg-color: #fff4e6;          /* creme — fundo da página */
    --sidebar-bg: #e8613d;        /* coral mais escuro — contraste melhor com texto branco */
    --sidebar-width: 260px;
    --font-heading: 'Londrina Solid', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-script: 'Rustyne', cursive; /* fonte de destaque/script da marca */
    --text-gray: #737373;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-gray);
}

/* Classe utilitária pra usar a fonte de destaque (Rustyne) — bom pra frases curtas,
   tipo "¡Bienvenida!" ou legendas de destaque. Evite usar em textos longos ou de UI,
   fontes script perdem legibilidade em blocos grandes de texto. */
.font-script {
    font-family: var(--font-script);
    font-weight: normal;
}

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

/* Sidebar Estilizada */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: #ffffff;
    padding: 30px 20px;
    box-sizing: border-box;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.brand-logo {
    max-width: 170px;
    height: auto;
    display: block;
}

.subtitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffd9c9;
    margin-bottom: 25px;
    font-weight: 600;
}

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

.nav-links li {
    margin-bottom: 4px;
}

.nav-links a {
    text-decoration: none;
    color: #fff0e8;
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 600;
    border-left-color: var(--brand-yellow);
}

/* Link do menu com ícone (ex: "Students") - ícone e texto alinhados na mesma linha */
.nav-icon-link {
    display: flex !important;
    align-items: center;
    gap: 16px;
}
.nav-icon-link svg {
    flex: none;
    margin-right: 4px;
}

.menu-category {
    font-size: 10px;
    text-transform: uppercase;
    color: #ffd9c9;
    font-weight: bold;
    letter-spacing: 1.2px;
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    box-sizing: border-box;
    max-width: 1150px;
}

.top-bar {
    margin-bottom: 35px;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14.5px;
    background: #fff;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    box-sizing: border-box;
    font-family: var(--font-body);
}

.search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0,74,173,0.1);
}

.section-block {
    margin-bottom: 40px;
}

/* --- CABEÇALHO DE SEÇÃO: título alinhado à grid, sem rotação --- */
.section-heading-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    margin-left: 2px;
}

.section-block h2 {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 32px;
    color: #4a3512;
    background-color: var(--brand-orange);
    padding: 6px 18px;
    margin: 0;
    font-weight: normal;
    line-height: 1.3;
    transform: rotate(-1.5deg);
    border-radius: 4px;
    box-shadow: 0 3px 8px rgba(244, 203, 87, 0.35);
}

.lesson-count {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* Grid de Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--level-color, var(--secondary-blue));
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    display: block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px) rotate(-0.3deg);
    box-shadow: 0 10px 20px rgba(0,74,173,0.1);
}

.card:hover .badge {
    transform: rotate(-4deg) scale(1.05);
}

.card-image-placeholder {
    width: 100%;
    height: 130px;
    background-color: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

/* Fallback quando a imagem quebra: fundo com a cor da marca em vez de ícone quebrado */
.card-image-placeholder.img-fallback {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    position: relative;
}

.card-image-placeholder.img-fallback::after {
    content: "Che Español";
    font-family: var(--font-heading);
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    text-align: center;
    padding: 0 20px;
}

.card-body {
    padding-top: 12px;
}

/* TÍTULO DO CARD: mantém a serifa da marca, com um grifo amarelo por baixo
   em vez de uma caixa cheia — dá o toque "marca-texto" sem competir com a leitura */
.card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #16233f;
    font-weight: normal;
    line-height: 1.3;
    display: inline;
    background-image: linear-gradient(var(--brand-yellow), var(--brand-yellow));
    background-repeat: no-repeat;
    background-size: 100% 8px;
    background-position: 0 88%;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    background: #fdeee9;
    color: var(--primary-blue);
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Tag de categoria: mesma linguagem visual do badge, só muda a cor */
.card-category-tag {
    display: inline-block;
    background-color: #fff7ea;
    color: #92580b;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14.5px;
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
}

/* --- CORREÇÃO COMPLETA DA PÁGINA DE OVERVIEW --- */

.lesson-header-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

.lesson-info {
    flex: 1;
}

.lesson-title-main {
    font-family: var(--font-heading);
    font-size: 44px;
    color: var(--navy, #0B162C);
    margin: 0 0 8px 0;
    font-weight: normal;
}

.lesson-category-tag {
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 15px 0;
}

.lesson-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    font-weight: 500;
}

.lesson-description {
    font-size: 15.5px;
    color: #334155;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Botão Launch tasks profissional */
.lesson-header-card .btn-primary {
    background-color: var(--primary-blue, #3b82f6);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    transition: transform 0.1s ease;
}

.lesson-header-card .btn-primary:hover {
    transform: translateY(-2px);
}

/* Frame Redondo à Direita */
.lesson-illustration-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.lesson-illustration-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Retângulo inferior com o azul mais claro da brand */
.lesson-details-box {
    background: #f0f4ff;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* Títulos com fundo laranja inclinado e letra em tom creme */
.section-title-brand {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 24px;
    color: #4a3512;
    background-color: var(--brand-orange, #f4cb57);
    padding: 6px 18px;
    border-radius: 6px;
    transform: rotate(-1.5deg);
    margin: 0 0 20px 0;
    box-shadow: 0 3px 10px rgba(244, 203, 87, 0.35);
    font-weight: normal;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* --- ESTILIZAÇÃO DO EXERCÍCIO DE VOCABULÁRIO (PADRÃO APP) --- */

.vocab-app-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px !important;
}

.vocab-instructions {
    font-size: 15px;
    color: #475569;
    font-weight: 500;
    margin-bottom: 25px;
}

.vocab-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.words-pool {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* Chips de palavras arrastáveis */
.vocab-chip {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1.5px solid #bfdbfe;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: grab;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.08);
    transition: all 0.2s ease;
}

.vocab-chip:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}

.vocab-chip:active {
    cursor: grabbing;
}

.vocab-chip.dragging {
    opacity: 0.4;
}

.targets-pool {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Caixas de destino */
.vocab-drop-target {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px 20px;
    min-height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
}

.vocab-drop-target.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
}

.target-text-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* Definição em Português */
.def-pt {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

/* Frase de exemplo em outra cor */
.example-phrase {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}

.drop-placeholder {
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

/* Estado quando a palavra é solta */
.vocab-drop-target .vocab-chip.dropped-chip {
    margin: 0;
    cursor: default;
    box-shadow: none;
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.vocab-drop-target.correct-match {
    border-style: solid;
    border-color: #22c55e;
    background: #f7fee7;
}

.vocab-drop-target.incorrect-match {
    border-style: solid;
    border-color: #ef4444;
    background: #fef2f2;
}
