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

:root {
    --primary-color: #00b4d8;
    --secondary-color: #0077b6;
    --accent-color: #48cae4;
    --text-color: #333;
    --bg-light: #f8f9fa;
    --bg-dark: #212529;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

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

/* Header y Navegación */
.header {
    background: var(--secondary-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 150px 0 100px;
    text-align: center;
    margin-top: 60px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.hero-quote {
    font-style: italic;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #90e0ef;
    transform: translateY(-2px);
}

/* Secciones de Contenido */
.content, .examples, .resources, .contact {
    padding: 80px 0;
}

.content {
    background: var(--bg-light);
}

.examples {
    background: var(--white);
}

.resources {
    background: var(--bg-light);
}

.contact {
    background: var(--secondary-color);
    color: var(--white);
}

/* Títulos de Sección */
h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.resources h2, .contact h2 {
    color: var(--white);
}

/* Módulos */
.modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.module {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.module:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.module h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.module ul {
    list-style: none;
    padding-left: 0;
}

.module ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.module ul li::before {
    content: "✓";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.btn-module {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-module:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.topics {
    padding: 100px 0;
    background: var(--white);
}

.topics-intro {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.topic-card {
    background: var(--white);
    border: 2px solid #eee;
    border-radius: 15px;
    padding: 2rem;
    transition: var(--transition);
}

.topic-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 180, 216, 0.15);
    transform: translateY(-5px);
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.topic-icon { font-size: 2rem; }
.topic-header h3 { color: var(--secondary-color); font-size: 1.3rem; }

.topic-list { list-style: none; margin-bottom: 1.5rem; }
.topic-list li { padding: 0.7rem 0; border-bottom: 1px solid #f5f5f5; }
.topic-list li:last-child { border-bottom: none; }
.topic-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.3rem 0;
}
.topic-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.btn-topic {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.btn-topic:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

.topic-content { max-width: 900px; margin: 0 auto; }

.content-detail {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 2rem;
    scroll-margin-top: 100px;
    display: none;
}

.content-detail h3 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}
.content-detail h4 { color: var(--primary-color); font-size: 1.4rem; margin: 2rem 0 1rem; }
.content-body p { line-height: 1.8; margin-bottom: 1rem; color: #444; }
.content-body ul, .content-body ol { margin: 1rem 0 1rem 2rem; line-height: 1.8; }
.content-body li { margin-bottom: 0.5rem; color: #444; }
.content-body pre {
    background: var(--bg-dark);
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.content-body code { font-family: 'Consolas', monospace; font-size: 0.9rem; }
.content-body a { color: var(--primary-color); text-decoration: none; }
.content-body a:hover { text-decoration: underline; }

.info-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.info-table th, .info-table td { padding: 1rem; text-align: left; border: 1px solid #eee; }
.info-table th { background: var(--primary-color); color: var(--white); }
.info-table tr:nth-child(even) { background: #f8f9fa; }

.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 10px 10px 0;
    margin: 2rem 0;
}
.info-box strong { color: var(--secondary-color); }

.btn-back {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    background: var(--bg-light);
    color: var(--secondary-color);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid #eee;
}
.btn-back:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Bloques de Código */
.code-block {
    background: var(--bg-dark);
    color: #f8f8f2;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.code-block h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.code-block pre {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block code {
    color: #8be9fd;
}

/* Grid de Recursos */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.resource-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.resource-card ul {
    list-style: none;
}

.resource-card ul li {
    padding: 0.5rem 0;
}

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

.resource-card a:hover {
    color: var(--accent-color);
}

/* Contacto */
.contact-title {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-info {
    text-align: center;
}

.contact-info p {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

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

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    h2 {
        font-size: 2rem;
    }

    .modules, .resource-grid {
        grid-template-columns: 1fr;
    }
}

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

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

.module, .resource-card, .code-block {
    animation: fadeIn 0.5s ease-out;
}
