/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --background-color: #fff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

/* Tipografia */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.last-update {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Índice */
.table-of-contents {
    background-color: var(--gray-light);
    padding: 2rem 0;
    margin-bottom: 3rem;
    border-top: 3px solid var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
}

.table-of-contents h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.table-of-contents ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.table-of-contents a:hover {
    background-color: white;
    border-left-color: var(--secondary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

/* Main content */
main {
    margin-bottom: 4rem;
}

/* Sections */
section {
    margin-bottom: 4rem;
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

section:hover {
    box-shadow: var(--shadow-hover);
}

section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-medium);
    position: relative;
}

section h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

section h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
}

section p {
    margin-bottom: 1.2rem;
    text-align: justify;
    line-height: 1.8;
}

/* Lists */
ul {
    margin: 1rem 0 1.5rem 1.5rem;
}

li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

li strong {
    color: var(--primary-color);
}

/* Contact info */
.contact-info {
    background-color: var(--gray-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
    margin-top: 1.5rem;
}

.contact-info p {
    margin-bottom: 0.8rem;
}

.contact-info strong {
    color: var(--primary-color);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

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

footer p {
    margin: 0;
    opacity: 0.9;
}

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

/* Responsividade para tablets */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        padding: 2rem 0;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .table-of-contents ul {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
    }
}

/* Responsividade para smartphones */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    header {
        padding: 1.5rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .last-update {
        font-size: 0.9rem;
    }
    
    .table-of-contents {
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }
    
    .table-of-contents h2 {
        font-size: 1.3rem;
    }
    
    section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    section h2 {
        font-size: 1.3rem;
    }
    
    section h3 {
        font-size: 1.1rem;
    }
    
    ul {
        margin-left: 1rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1.1rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.6s ease-out;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e9ecef;
        --text-light: #adb5bd;
        --background-color: #121212;
        --gray-light: #1e1e1e;
        --gray-medium: #2d2d2d;
        --border-color: #404040;
    }
    
    section {
        background-color: #1a1a1a;
    }
    
    .contact-info {
        background-color: var(--gray-medium);
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus states para acessibilidade */
a:focus,
button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .back-to-top,
    .table-of-contents {
        display: none;
    }
    
    section {
        box-shadow: none;
        border: 1px solid var(--border-color);
        break-inside: avoid;
    }
    
    header {
        background: var(--primary-color) !important;
        color: white !important;
    }
}