:root {
    --bg-color: #f9f9f9;
    --text-color: #212529;
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --card-bg-color: #ffffff;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.04);
    --link-color: #007bff;
    --link-hover-color: #0056b3;
    --nav-bg-color: rgba(255, 255, 255, 0.8);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-color);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0d1117;
        --text-color: #c9d1d9;
        --primary-color: #58a6ff;
        --secondary-color: #8b949e;
        --card-bg-color: #161b22;
        --border-color: #30363d;
        --shadow-color: rgba(0, 0, 0, 0.2);
        --link-color: #58a6ff;
        --link-hover-color: #80b6ff;
        --nav-bg-color: rgba(13, 17, 23, 0.8);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

#nav-menu {
    background-color: var(--nav-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

#nav-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.8rem 0;
}

#nav-menu li {
    margin: 0.2rem 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--text-color);
}

.nav-link.active {
    color: var(--link-hover-color);
    background-color: var(--border-color);
}

main {
    padding: 1rem 0;
}

.section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.section:last-child {
    border-bottom: none;
}

.section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.section h3 {
    color: var(--text-color);
    margin: 2rem 0 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.content-box {
    background-color: var(--card-bg-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.objective {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
}

li {
    margin-bottom: 0.8rem;
}

.fase {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.fase:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.fase:first-child {
    padding-top: 0;
}

.fase h4 {
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.recurso-card {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recurso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.recurso-card h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.recurso-card p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.recurso-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.recurso-link:hover {
    text-decoration: underline;
    color: var(--link-hover-color);
}

.recurso-placeholder {
    color: var(--secondary-color);
    font-style: italic;
    font-size: 0.9rem;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

thead {
    border-bottom: 2px solid var(--border-color);
}

th, td {
    padding: 1rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--secondary-color);
}

tbody tr:last-child td {
    border-bottom: none;
}

tfoot {
    font-weight: bold;
}

tfoot td {
    border-top: 2px solid var(--border-color);
}

footer {
    text-align: center;
    padding: 1.3rem 0;
    margin-top: 2rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

footer a {
    color: var(--secondary-color);
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--text-color);
}

.section h2, header h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lucide {
    width: 1.8rem;
    height: 1.8rem;
}

header .lucide {
    width: 2.2rem;
    height: 2.2rem;
}

@media (max-width: 768px) {
    header {
        padding: 3rem 0;
    }
    header h1 {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    ul {
        margin-left: 1.5rem;
        margin-top: 1rem;
    }
    .section {
        padding: 2rem 0;
    }
    .section h2 {
        font-size: 1.8rem;
    }
    .content-box {
        padding: 1.5rem;
    }
    .lucide {
        width: 1.5rem;
        height: 1.5rem;
    }
    header .lucide {
        width: 2rem;
        height: 2rem;
    }
}
