/* Estilos generales con temática retro para TecnoAprende */
:root {
    --color-primary: #4a148c;
    --color-secondary: #ff6d00;
    --color-accent: #00e676;
    --color-background: #121212;
    --color-text: #e0e0e0;
    --color-card: #1e1e1e;
    --font-retro: 'Press Start 2P', cursive;
    --font-text: 'VT323', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-text);
    background-color: var(--color-background);
    color: var(--color-text);
    font-size: 18px;
    line-height: 1.6;
    background-image: 
        linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.9)),
        url('../img/grid-bg.png');
}

/* Estilos del encabezado */
header {
    background-color: var(--color-primary);
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 4px solid var(--color-secondary);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.logo {
    font-family: var(--font-retro);
    font-size: 2.5rem;
    color: var(--color-accent);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.slogan {
    font-size: 1.2rem;
    color: var(--color-text);
    text-align: center;
}

/* Estilos de navegación */
nav {
    display: flex;
    justify-content: center;
}

.menu {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.menu li {
    margin: 0 0.5rem;
}

.menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-retro);
    font-size: 0.8rem;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.menu a:hover, .menu a.active {
    background-color: var(--color-secondary);
    border-color: var(--color-accent);
    color: var(--color-background);
    transform: translateY(-2px);
}

/* Estilos de la sección hero */
.hero {
    height: 300px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--color-accent);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/grid-overlay.png');
    opacity: 0.2;
}

.hero-content {
    z-index: 1;
    padding: 2rem;
    max-width: 800px;
}

.hero h2 {
    font-family: var(--font-retro);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8);
}

.hero p {
    font-size: 1.5rem;
    color: var(--color-text);
}

/* Estilos de la sección de artículos */
.articulos {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-retro);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-accent);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: var(--color-secondary);
    margin: 1rem auto;
}

.articulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.articulo-card {
    background-color: var(--color-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid var(--color-primary);
}

.articulo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 16px rgba(0, 0, 0, 0.7);
    border-color: var(--color-secondary);
}

.articulo-img {
    height: 180px;
    overflow: hidden;
}

.articulo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.articulo-card:hover .articulo-img img {
    transform: scale(1.1);
}

.articulo-content {
    padding: 1.5rem;
}

.articulo-content h3 {
    font-family: var(--font-retro);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.articulo-content p {
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.btn-leer {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-background);
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-family: var(--font-retro);
    font-size: 0.8rem;
    border: 2px solid var(--color-accent);
    transition: all 0.3s;
}

.btn-leer:hover {
    background-color: var(--color-accent);
    color: var(--color-background);
    transform: translateY(-2px);
}

/* Estilos del pie de página */
footer {
    background-color: var(--color-primary);
    padding: 2rem;
    border-top: 4px solid var(--color-secondary);
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo h2 {
    font-family: var(--font-retro);
    font-size: 1.8rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.footer-links h3, .footer-contact h3 {
    font-family: var(--font-retro);
    font-size: 1.2rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--color-text);
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.btn-contacto {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-background);
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-family: var(--font-retro);
    font-size: 0.8rem;
    border: 2px solid var(--color-accent);
    margin-top: 1rem;
    transition: all 0.3s;
}

.btn-contacto:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

/* Estilos del botón de menú móvil */
.menu-toggle {
    display: none;
    background: var(--color-secondary);
    border: 2px solid var(--color-accent);
    color: var(--color-background);
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.menu-toggle:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.menu-toggle.active {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }
    
    nav {
        flex-direction: column;
        align-items: center;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .menu {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
        opacity: 0;
        visibility: hidden;
    }
    
    .menu.active {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.5s ease-in, opacity 0.5s ease-in, visibility 0s;
    }
    
    .menu li {
        margin: 0.3rem 0;
        width: 100%;
        text-align: center;
    }
    
    .hero {
        height: 250px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Efectos retro adicionales */
.articulo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 65%, var(--color-accent) 100%);
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

/* Animaciones */
@keyframes glitch {
    0% {
        text-shadow: 3px 3px 0 rgba(255, 0, 0, 0.5), -3px -3px 0 rgba(0, 255, 0, 0.5);
    }
    25% {
        text-shadow: -3px 3px 0 rgba(255, 0, 0, 0.5), 3px -3px 0 rgba(0, 255, 0, 0.5);
    }
    50% {
        text-shadow: 3px -3px 0 rgba(255, 0, 0, 0.5), -3px 3px 0 rgba(0, 255, 0, 0.5);
    }
    75% {
        text-shadow: -3px -3px 0 rgba(255, 0, 0, 0.5), 3px 3px 0 rgba(0, 255, 0, 0.5);
    }
    100% {
        text-shadow: 3px 3px 0 rgba(255, 0, 0, 0.5), -3px -3px 0 rgba(0, 255, 0, 0.5);
    }
}

.logo:hover {
    animation: glitch 0.5s infinite;
}

.fecha-publicacion {
    font-size: 0.75rem;
    color: var(--color-text);
    opacity: 0.85;
    margin-bottom: 0.8rem;
    font-family: var(--font-retro);
}