/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d3436;
    --secondary-color: #0984e3;
    --accent-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --dark-color: #1a1a1a;
    --light-color: #f9f9f9;
    --gray-color: #636e72;
    --terminal-bg: #1e1e1e;
    --terminal-green: #00ff00;
    --terminal-blue: #4dabf7;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar {
    display: flex;
    gap: 25px;
}

.navbar a {
    text-decoration: none;
    color: var(--gray-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar a:hover {
    color: var(--secondary-color);
    background-color: rgba(9, 132, 227, 0.1);
}

.navbar a.active {
    color: white;
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 60px 0;
    align-items: center;
}

.hero-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.stat span {
    font-weight: 500;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(9, 132, 227, 0.3);
}

/* Terminal Preview */
.terminal-preview {
    background-color: var(--terminal-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.5s ease;
}

.terminal-preview:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.terminal-header {
    background-color: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27ca3f; }

.terminal-title {
    color: #aaa;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 25px;
    font-family: 'Courier New', monospace;
    color: #f0f0f0;
    line-height: 1.8;
}

.prompt {
    color: var(--terminal-green);
    font-weight: bold;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--terminal-blue);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Modules Section */
.section-title {
    text-align: center;
    margin: 40px 0;
    font-size: 2.2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: var(--secondary-color);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.module-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.module-icon {
    position: relative;
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.module-icon i {
    font-size: 2rem;
    color: white;
}

.module-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.module-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.module-card p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.module-topics {
    list-style: none;
    margin-bottom: 25px;
}

.module-topics li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-topics i {
    color: var(--accent-color);
}

.btn-module {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(9, 132, 227, 0.1);
    color: var(--secondary-color);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-module:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Resources Section */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.resource-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.resource-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.resource-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.resource-card p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.btn-resource {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-resource:hover {
    background-color: #00a085;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--gray-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--danger-color);
}

.cheatsheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.cheatsheet-category h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.cheatsheet-category p {
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    background-color: #f5f5f5;
    padding: 8px 12px;
    border-radius: 4px;
    overflow-x: auto;
}

.cheatsheet-category code {
    color: var(--danger-color);
    background-color: transparent;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section h4 i {
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #aaa;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--accent-color);
    text-decoration: none;
    margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }

    .header .container {
        flex-direction: column;
        gap: 20px;
    }

    .navbar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }
}

/* Estilos específicos para páginas de módulos */
.module-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 40px 0;
    box-shadow: var(--shadow);
}

.module-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.module-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.module-subtitle {
    color: var(--gray-color);
    font-size: 1.2rem;
}

.command-box {
    background-color: var(--terminal-bg);
    color: #f0f0f0;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
}

.command-box code {
    color: var(--terminal-green);
    display: block;
    margin-bottom: 10px;
}

.command-box .comment {
    color: #888;
    font-style: italic;
}

.info-box {
    background-color: rgba(9, 132, 227, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.warning-box {
    background-color: rgba(253, 203, 110, 0.2);
    border-left: 4px solid var(--warning-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.danger-box {
    background-color: rgba(214, 48, 49, 0.1);
    border-left: 4px solid var(--danger-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.section {
    margin-bottom: 40px;
}

.section h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.section ul, .section ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.section li {
    margin-bottom: 10px;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn.prev {
    background-color: #f5f5f5;
    color: var(--gray-color);
}

.nav-btn.next {
    background-color: var(--secondary-color);
    color: white;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.back-to-index {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
}

.back-to-index:hover {
    text-decoration: underline;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--primary-color);
}

tr:hover {
    background-color: #f5f5f5;
}