:root {
    --primary: #2ecc71;
    --primary-hover: #27ae60;
    --dark-overlay: rgba(10, 15, 24, 0.85);
    --glass: rgba(20, 20, 20, 0.7);
    --text: #e0e0e0;
    --card-bg: rgba(30, 30, 30, 0.6);
}

body, html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(to bottom, var(--dark-overlay), rgba(10, 15, 24, 0.95)),
                url('../img/cybersinfronteras_bkg.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    overflow-x: hidden;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
}

/* --- Navegación --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(46, 204, 113, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-links a {
    color: #aaa;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

/* --- Layout Contenido --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

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

.hero-text h1 {
    font-size: 2.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Grid de Artículos (Cargado por JSON) --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.2);
    border-color: var(--primary);
}

.article-card h3 {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.article-card p {
    line-height: 1.6;
    color: #ccc;
    font-size: 0.95rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem;
    color: #777;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 40px;
}

/* --- Home Specifics --- */
.home-center {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.home-menu {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.btn-main {
    padding: 15px 30px;
    background: transparent;
    border: 2px solid var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
    text-transform: uppercase;
}

.btn-main:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.parallax-hero {
    position: relative;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(46, 204, 113, 0.3);
}

.parallax-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    margin-bottom: -1.5px;
    background: linear-gradient(to bottom, rgba(10,15,24,0.5), var(--dark-overlay));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-size: 3rem;
    color: white;
    text-shadow: 0 4px 15px rgba(0,0,0,0.9);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}


.article-card {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.article-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: inline-block;
}

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

@media (max-width: 768px) {
    .parallax-hero {
        background-attachment: scroll; /* Mejor rendimiento en móvil */
        height: 40vh;
    }
}

.section-std {
    padding: 80px 20px;
    transform: translateY(-3px);
    margin-bottom: -3px;
    position: relative;
    z-index: 2;
}

.bg-dark { background-color: var(--dark-bg); }
.bg-glass-dark { background-color: rgba(10, 15, 24, 0.95); }

.split-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.split-content { flex: 1; min-width: 300px; }
.split-image { flex: 1; min-width: 300px; }

.split-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(46, 204, 113, 0.2);
    transition: transform 0.3s;
}

.split-image img:hover { transform: scale(1.02); }

.split-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.split-content h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin-top: 10px;
}

.parallax-strip {
    height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.strip-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    max-width: 80%;
}

.strip-content h2 { font-size: 2rem; color: var(--primary); margin: 0; }
.strip-content p { font-size: 1.2rem; color: white; margin-top: 10px; }

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.stat-item i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: white;
}

.stat-label {
    font-size: 1.1rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Call to Action Final */
.cta-full {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Ajustes Responsive */
@media (max-width: 768px) {
    .split-layout { flex-direction: column; }
    .split-layout.reverse { flex-direction: column-reverse; } /* Para alternar orden en móvil */
    .section-std { padding: 50px 20px; }
    .parallax-strip { height: 300px; background-attachment: scroll; }
}

/* =========================================
   MEDIA QUERIES (ESTILO PARA MÓVILES)
   ========================================= */
@media (max-width: 768px) {
    /* Ajuste de Navegación */
    nav {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 6px 12px;
        border: 1px solid rgba(255,255,255,0.1); /* Borde para que parezcan botones */
    }

    /* Ajuste de Textos Grandes */
    .hero-text h1 {
        font-size: 2rem; /* Más pequeño en móvil */
    }

    .hero-text p {
        font-size: 1rem;
    }

    /* Ajuste del Home */
    header h1 {
        font-size: 2.5rem !important; /* Forzamos tamaño menor en home */
    }

    .home-menu {
        flex-direction: column;
        width: 100%;
    }

    .btn-main {
        width: 100%; /* Botones de ancho completo en móvil */
        text-align: center;
    }

    /* Ajuste del Grid (aunque auto-fit ya ayuda, forzamos un poco márgenes) */
    .content-grid {
        grid-template-columns: 1fr; /* Una sola columna obligatoria en muy pequeños */
        gap: 1.5rem;
    }

    .card-item {
        padding: 1.5rem;
    }
}
