/* Reset e Configurações Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --neutral-color: #6b7280;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --bg-dark: #1f2937;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', serif;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* Logo Alex Diniz */
.logo-container {
    margin-bottom: 1rem;
}

.logo-alex {
    width: 250px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

/* Botão Voltar ao Site */
.btn-voltar {
    display: inline-block;
    background: #fbbf24;
    color: #1f2937;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
    transition: var(--transition);
    text-decoration: none;
    border: 3px solid white;
}

.btn-voltar:hover {
    background: #f59e0b;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.6);
    color: #111827;
}

.header-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    color: white;
    margin: 0;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Navigation */
.navigation {
    background-color: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list li {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--accent-color);
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

.section {
    margin-bottom: 4rem;
    animation: fadeIn 0.6s ease-in;
}

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

.section-title {
    color: var(--primary-color);
    border-left: 5px solid var(--accent-color);
    padding-left: 1rem;
    margin-bottom: 2rem;
    font-size: 2.2rem;
}

/* Cards */
.content-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.content-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-box {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.card-box:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Boxes */
.highlight-box {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.info-box {
    background-color: #dbeafe;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.example-box {
    background-color: #f3f4f6;
    border: 2px dashed var(--neutral-color);
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
}

.equation-box {
    background-color: #1f2937;
    color: white;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: var(--shadow-md);
}

.equation-box.highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: 3px solid var(--accent-color);
}

.mechanism-box {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 2px solid var(--primary-color);
}

/* Lists */
.styled-list {
    list-style: none;
    padding-left: 0;
}

.styled-list li {
    padding: 0.5rem 0 0.5rem 2rem;
    position: relative;
}

.styled-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Images */
.image-container {
    margin: 2rem 0;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: white;
}

.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.image-container.interactive-hover {
    transition: var(--transition);
    cursor: pointer;
}

.image-container.interactive-hover:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.image-caption {
    padding: 1rem;
    background-color: var(--bg-secondary);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Grids */
.two-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.hydrolysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.tag.neutral {
    background-color: #d1d5db;
    color: #374151;
}

.tag.acidic {
    background-color: #fecaca;
    color: #991b1b;
}

.tag.basic {
    background-color: #bbf7d0;
    color: #166534;
}

.tag.variable {
    background-color: #e9d5ff;
    color: #6b21a8;
}

/* Accordion */
.accordion-container {
    margin: 2rem 0;
}

.accordion-item {
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item:hover {
    border-color: var(--primary-color);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background-color: var(--bg-secondary);
    transition: var(--transition);
}

.accordion-header:hover {
    background-color: #e5e7eb;
}

.accordion-header h4 {
    margin: 0;
    color: var(--primary-color);
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: var(--transition);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
    padding: 1.5rem;
}

/* Quiz Section */
.quiz-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
}

.quiz-section .section-title {
    color: white;
    border-left-color: var(--accent-color);
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.quiz-question h3 {
    color: white;
    margin-bottom: 1rem;
}

.quiz-question p {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quiz-option {
    background-color: white;
    border: 3px solid transparent;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-align: left;
    font-weight: 500;
}

.quiz-option:hover:not(:disabled) {
    background-color: #f3f4f6;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.quiz-option.correct {
    background-color: #d1fae5;
    border-color: var(--success-color);
}

.quiz-option.incorrect {
    background-color: #fee2e2;
    border-color: var(--danger-color);
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.quiz-feedback.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

.quiz-feedback.correct {
    background-color: #d1fae5;
    color: #065f46;
}

.quiz-feedback.incorrect {
    background-color: #fee2e2;
    color: #991b1b;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.quiz-nav-btn {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1rem;
}

.quiz-nav-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quiz-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#question-counter {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.quiz-results {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
}

.quiz-results.hidden {
    display: none;
}

.quiz-results h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

#score-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

/* Utility Classes */
.small-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-link {
        text-align: center;
        padding: 0.75rem 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .two-column-grid,
    .hydrolysis-grid,
    .prediction-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-section {
        padding: 2rem 1rem;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: white;
}
