:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --accent-color: #00ff88;
    --card-bg: #161b22;
    --border-color: #30363d;
    --blue-tech: #58a6ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: rgba(1, 4, 9, 0.95);
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: white;
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--accent-color);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

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

/* --- ESTRUCTURA DE LA PÁGINA DE INICIO ANIMADA --- */
.hero-container {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #161b22 0%, #0d1117 100%);
}

.hero-container::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(40px) translateZ(-200px); }
}

.hero-content {
    max-width: 1000px;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards 0.2s;
}

.hero-content h1 span {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #8b949e;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards 0.4s;
}

.hero-btn {
    display: inline-block;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    text-decoration: none;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards 0.6s;
}

.clean-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 5rem;
    text-align: left;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards 0.8s;
}

.clean-info-item {
    border-left: 2px solid var(--accent-color);
    padding-left: 1.5rem;
}

.full-width-item {
    grid-column: 1 / -1;
}

.clean-info-item h3 {
    color: var(--blue-tech);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.clean-info-item p {
    color: #c9d1d9;
    font-size: 0.95rem;
    line-height: 1.7;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    z-index: 1;
    color: #8b949e;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards 1.2s, bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* SECCIÓN 2: CARACTERÍSTICAS (HOME) */
.features-section {
    background-color: #010409;
    padding: 5rem 5%;
    border-top: 1px solid var(--border-color);
}

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

.section-title {
    text-align: center;
    color: white;
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

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

.feature-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: var(--blue-tech);
}

.feature-icon-text {
    color: var(--accent-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.feature-box h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.feature-box p {
    font-size: 0.95rem;
    color: #8b949e;
    line-height: 1.6;
}

/* --- ESTRUCTURA DEL LABORATORIO --- */
.full-width-container {
    padding: 2.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
}

.interactive-section h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.section-subtitle {
    color: #8b949e;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.lab-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.content-column {
    flex: 1;
    min-width: 0;
}

.terminal-column {
    flex: 1;
    display: none;
    position: sticky;
    top: 90px;
    height: calc(100vh - 120px);
}

.terminal-column.show {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

.tabs-menu {
    display: flex;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    color: #8b949e;
    padding: 0.8rem 1.4rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: white;
    background-color: #21262d;
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    background-color: var(--card-bg);
}

.tab-content {
    display: none;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content h3 {
    color: white;
    margin-bottom: 0.4rem;
    font-size: 1.6rem;
}

.tab-content h4 {
    color: var(--blue-tech);
    margin-bottom: 1.2rem;
    font-weight: 500;
    font-size: 1.15rem;
    margin-top: 1.8rem;
}

.tab-content p {
    color: #c9d1d9;
    font-size: 1rem;
    margin-bottom: 1rem;
}

strong {
    color: white;
    font-weight: 600;
}

.step-box {
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.step-box h5 {
    color: white;
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
}

.step-box p {
    font-size: 0.95rem;
}

pre {
    background-color: #161b22;
    padding: 1.2rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid #30363d;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #ff79c6;
    font-size: 0.95rem;
}

pre code {
    color: #e6edf3;
}

.sources-box {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background-color: rgba(88, 166, 255, 0.05);
    border: 1px dashed rgba(88, 166, 255, 0.3);
    border-radius: 6px;
}

.sources-box h5 {
    color: var(--blue-tech);
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.sources-box ul {
    list-style: none;
    font-size: 0.9rem;
    color: #8b949e;
}

.sources-box li {
    margin-bottom: 0.4rem;
}

.terminal-trigger-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.terminal-info h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.terminal-info p {
    color: #8b949e;
    font-size: 0.95rem;
    margin: 0;
}

.action-btn {
    background-color: var(--accent-color);
    color: #000;
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
    white-space: nowrap;
}

.action-btn:hover {
    background-color: #00cc6a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

/* TERMINAL EMULADOR */
#terminal-emulator {
    background-color: #000;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,255,136,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: #161b22;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #30363d;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #8b949e;
}

#terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
}

#terminal-output p {
    margin-bottom: 5px;
    word-break: break-all;
}

.terminal-input-row {
    display: flex;
    margin-top: 8px;
}

.prompt {
    color: #00ff88;
    margin-right: 12px;
    white-space: nowrap;
}

#terminal-input {
    background: transparent;
    border: none;
    color: white;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

/* --- ESTRUCTURA DE LA PÁGINA DE NOTICIAS --- */
.news-page-container {
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

.news-header {
    text-align: center;
    margin-bottom: 3rem;
}

.news-header h2 {
    font-size: 2.5rem;
    color: white;
}

.news-header span {
    color: var(--blue-tech);
}

.news-header p {
    color: #8b949e;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s;
    animation: fadeIn 0.5s ease-out;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--blue-tech);
}

.news-card .date {
    font-size: 0.85rem;
    color: #8b949e;
    margin-bottom: 0.8rem;
    font-family: 'Courier New', Courier, monospace;
}

.news-card h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-grow: 1;
}

.news-card h3 a {
    color: white;
    text-decoration: none;
}

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

.news-card .read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--blue-tech);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
}

.news-card .read-more:hover {
    text-decoration: underline;
}

/* --- ESTRUCTURA DE LA PÁGINA DE HERRAMIENTAS (TOOLKIT) --- */
.toolkit-page-container {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

.toolkit-header {
    text-align: center;
    margin-bottom: 3rem;
}

.toolkit-header h2 {
    font-size: 2.5rem;
    color: white;
}

.toolkit-header span {
    color: var(--blue-tech);
}

.toolkit-header p {
    color: #8b949e;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.toolkit-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.toolkit-card h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.tool-desc {
    color: #8b949e;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.tool-textarea {
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    color: white;
    width: 100%;
    height: 100px;
    resize: vertical;
    margin-bottom: 1rem;
    outline: none;
}

.tool-textarea:focus {
    border-color: var(--blue-tech);
}

.tool-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-btn {
    flex: 1;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    text-align: center;
}

.tool-result {
    background-color: #0d1117;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 1.2rem;
    margin-top: auto;
}

.tool-result h4 {
    color: var(--blue-tech);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.result-box {
    color: #c9d1d9;
    font-family: 'Courier New', Courier, monospace;
    word-break: break-all;
    font-size: 0.95rem;
}

.pass-box {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.tool-controls {
    margin-bottom: 1.5rem;
}

.tool-controls label {
    display: block;
    color: white;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.tool-slider {
    width: 100%;
    accent-color: var(--accent-color);
}

/* --- FOOTER GLOBAL --- */
footer {
    background-color: #010409;
    border-top: 1px solid var(--border-color);
    padding: 2rem 5%;
    margin-top: auto;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.footer-logo span {
    color: var(--accent-color);
}

footer p {
    color: #8b949e;
    font-size: 0.95rem;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsivo */
@media (max-width: 1024px) {
    .lab-wrapper {
        flex-direction: column;
    }
    .terminal-column {
        width: 100%;
        height: 500px;
        position: static;
    }
}

@media (max-width: 768px) {
    .clean-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 1rem;
    }
    header {
        flex-direction: column;
    }
    .tool-actions {
        flex-direction: column;
    }
}