/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --text-dark: #111827;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

/* Header y Navegación */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.95;
}

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

/* Secciones */
.section {
    background: white;
    margin: 2rem 0;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
}

.section h3 {
    color: var(--text-dark);
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.section p {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 1.05rem;
}

.section ol, .section ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.section li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.8;
}

.section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.section a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
}

.info-box h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.info-box ul {
    margin-bottom: 0;
}

/* Tips Box */
.tips-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
    margin: 1.5rem 0;
}

.tips-box p {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.tips-box p:last-child {
    margin-bottom: 0;
}

.tips-box strong {
    color: #92400e;
}

/* Exercise Box */
.exercise {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--success-color);
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.exercise h3 {
    color: var(--success-color);
    margin-top: 0;
    font-size: 1.6rem;
}

.exercise p {
    color: var(--text-dark);
}

.exercise-tasks {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exercise-tasks label {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.exercise-tasks label:hover {
    background: #f0fdf4;
    transform: translateX(5px);
}

.exercise-tasks input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: var(--success-color);
}

.time-estimate {
    color: #065f46;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Lesson Content */
.lesson-content {
    margin-top: 1.5rem;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tip-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.tip-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.tip-card p {
    margin-bottom: 0;
    color: var(--text-light);
}

/* Resources */
.resources {
    margin-top: 1.5rem;
}

.resources h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
}

.resources ul {
    margin-left: 2rem;
}

.resources li {
    margin-bottom: 0.75rem;
}

.platform-formats {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.platform-formats p {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
    border-bottom-color: white;
}

.cta-section p {
    color: white;
    font-size: 1.1rem;
}

.final-challenge {
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.final-challenge h3 {
    color: white;
    margin-top: 0;
}

.final-challenge p {
    color: white;
    margin-bottom: 0;
}

.encouragement {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 2rem;
}

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

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    .section h3 {
        font-size: 1.2rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    .exercise {
        padding: 1.5rem;
    }

    .exercise-tasks label {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .section {
        padding: 1rem;
    }

    .section h2 {
        font-size: 1.4rem;
    }

    .exercise {
        padding: 1rem;
    }

    .exercise-tasks input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
}

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

.section {
    animation: fadeIn 0.6s ease-out;
}

/* Accesibilidad */
input[type="checkbox"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header {
        background: white;
        color: black;
    }

    .section {
        box-shadow: none;
        border: 1px solid var(--border-color);
        page-break-inside: avoid;
    }

    footer {
        background: white;
        color: black;
        border-top: 1px solid var(--border-color);
    }
}
