/* Definição da Paleta de Cores e Fontes */
:root {
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Cormorant Garamond', serif;
    --brand-bg: #f9f6f3; /* Um tom de branco envelhecido/bege mais refinado */
    --brand-text: #4a4a4a; /* Um cinza escuro mais suave que o preto total */
    --accent-dark: #5c4b3a;
    --accent-light: #8a6e56;
    --brand-gradient: linear-gradient(45deg, var(--accent-light), var(--accent-dark));
}

body {
    font-family: var(--font-primary);
    background-color: var(--brand-bg);
    color: var(--brand-text);
}

h1, h2, h3 {
    font-family: var(--font-secondary);
}

/* Esconde o scroll da página principal quando a aula está aberta */
body.lesson-active {
    overflow: hidden;
}

/* Animação de fade-in para elementos */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efeito de gradiente no texto */
.gradient-text {
    background-image: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Estilo do Accordion de Módulos */
.module-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, padding 0.5s ease;
    padding: 0 1.5rem;
}

.module.active .module-content {
    padding: 0;
    max-height: 5000px; /* Aumentado para garantir que qualquer conteúdo caiba */
}

.module-header .icon {
    transition: transform 0.5s ease;
}

.module.active .module-header .icon {
    transform: rotate(45deg);
}

/* Fundo de imagem com parallax simulado */
.hero-section {
    background-image: url('images/fundo.png');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Estilo para os itens de aula clicáveis */
.topic-item .icon {
    transition: transform 0.3s ease, color 0.3s ease;
}
.topic-item:hover .icon {
    transform: translateX(4px);
    color: var(--accent-light);
}

/* Estilos da página de aula */
#lesson-page {
    background-color: var(--brand-bg);
}
#lesson-page.active {
    transform: translateX(0);
}

/* Customização do scrollbar na página da aula */
#lesson-content-area::-webkit-scrollbar {
    width: 8px;
}

#lesson-content-area::-webkit-scrollbar-track {
    background: transparent;
}

#lesson-content-area::-webkit-scrollbar-thumb {
    background-color: #c4b5a6; /* Cor de areia/bege */
    border-radius: 20px;
    border: 3px solid var(--brand-bg);
}

/* Customização da tipografia dentro da aula */
#lesson-content-area .prose h4 {
    font-family: var(--font-secondary);
    color: var(--accent-dark);
}

#lesson-content-area .prose strong {
    color: var(--brand-text);
}

/* ... existing code ... */
#lesson-content-area .prose strong {
    color: #333;
}

/* --- New Styles for Color Combiner --- */
.step-container {
    padding: 1.5rem;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.75rem; /* rounded-xl */
    background-color: #f9fafb; /* gray-50 */
}

.step-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: bold;
    font-size: 1.5rem; /* text-2xl */
    color: #374151; /* gray-700 */
    text-align: center;
    margin-bottom: 0.5rem;
}

.step-subtitle {
    text-align: center;
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* gray-500 */
    margin-bottom: 1.5rem;
}

/* Buttons for piece type selection */
.piece-type-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db; /* gray-300 */
    border-radius: 9999px; /* rounded-full */
    font-weight: 500;
    color: #4b5563; /* gray-600 */
    transition: all 0.2s ease-in-out;
    background-color: white;
}

.piece-type-btn:hover {
    border-color: #9ca3af; /* gray-400 */
}

.piece-type-btn.active {
    background-color: #8a6e56; /* Custom brown */
    color: white;
    border-color: #8a6e56;
}

.piece-type-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f3f4f6; /* gray-100 */
}

/* Color swatch for selection - REMOVED since we are using a picker */

/* Container for result categories */
.result-category {
    padding: 1rem;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    background-color: white;
}

/* Resulting color swatches */
.result-swatch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.result-swatch {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #d1d5db; /* gray-300 */
    margin-bottom: 0.5rem;
}

/* --- New Styles for iro.js Color Picker --- */
.color-picker-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* gap-6 */
}

.selected-color-info {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* gap-3 */
    padding: 0.5rem 1rem; /* py-2 px-4 */
    background-color: white;
    border-radius: 9999px; /* rounded-full */
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); /* shadow */
}

#selected-color-display {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #e5e7eb; /* gray-200 */
}


/* --- NOVOS ESTILOS: Glossário e Recursos --- */
.glossary-item, .resource-category {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.glossary-term, .resource-title {
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-dark);
    margin-bottom: 0.75rem;
}

.glossary-definition {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--brand-text);
}

.resource-link {
    color: var(--brand-text);
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.resource-link:hover {
    color: var(--accent-light);
}