* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.8;
    background-color: #ffffff;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(45deg, #266199, #6bc1ff);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0.3;
}

header h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeInDown 1s ease-in-out;
}

header p {
    font-size: 1.2rem;
    position: relative;
    animation: fadeInUp 1s ease-in-out 0.3s both;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    height: 100%;
    width: 250px;
    background-color: #266199;
    padding: 2rem;
    transition: left 0.3s ease-in-out;
    z-index: 1000;
}

.sidebar.active {
    left: 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin: 1.5rem 0;
}

.sidebar a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #25b216; /* Verde */
}

.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #25b216; /* Verde */
    border: none;
    color: white;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    z-index: 1100;
}

/* Chapters */
.chapter {
    background: white;
    padding: 2.5rem;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.8s ease-in-out forwards;
    animation-delay: calc(0.2s * var(--i));
}

.chapter h2 {
    color: #266199; /* Azul oscuro */
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid #db241e; /* Rojo */
    padding-bottom: 0.5rem;
}

.chapter h3.subsection-title {
    color: #266199;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.chapter ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.chapter p, .chapter li {
    color: #333;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(45deg, #266199, #6bc1ff);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Social Links */
.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #266199; /* Azul oscuro */
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 10px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #6bc1ff; /* Azul claro */
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .chapter {
        padding: 1.5rem;
    }

    .sidebar {
        width: 200px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .container {
        padding: 10px;
    }

    .chapter {
        padding: 1rem;
    }
}