/*VARIABLES */
:root {
    --color-bg-dark: #120000; /* Fondo muy oscuro, casi negro */
    --color-text-light: #F0F0F0; /* Blanco apagado para texto general */
    --color-accent-red: #FF0033; /* Rojo brillante para acentos */
    --color-text-red: #D90000; /* Rojo oscuro para textos de fondo */
    --color-border-dark: #400000; /* Borde sutil */
    --font-primary: 'Space Mono', monospace; /* Tipo de letra futurista */
}

/* Reset Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {scroll-behavior: smooth;}
body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    line-height: 1.6;
    padding: 3rem 10rem; /* Un padding general para que el contenido no pegue a los bordes */
}

a {
    color: var(--color-text-light);
    text-decoration: none;
}

h1, h2, h3 {
    text-transform: uppercase;
}

/*CABECERA (HEADER) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--color-border-dark);/* Borde inferior sutil para separación */
}

.logo {
    font-size: 1.5rem;
    color: var(--color-text-red);
}

.logo a {
    font-size: 1.5rem;
    color: var(--color-text-red);
}

.navbar ul {
    list-style: none;
    display: flex;
}

.navbar li {
    margin-left: 30px;
}

.navbar a {
    font-size: 0.8rem;
    color: var(--color-text-light);
    letter-spacing: 2px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s;
}

.navbar a:hover {
    color: var(--color-accent-red);
    border-bottom: 2px solid var(--color-accent-red);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--color-accent-red); 
    z-index: 1001; 
}

.menu-toggle svg {
    color: var(--color-accent-red);
}

.navbar.open {
    transform: translateX(0); 
}

/*SECCIÓN PRINCIPAL (HERO) */
.hero-section {
    display: flex;
    justify-content: start;
    gap: 3rem;
}

.hero-content {
    flex: 1; 
    max-width: 700px; 
    padding-top: 100px;
}

.tagline {
    font-size: 0.8rem;
    color: var(--color-text-red);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--color-accent-red);
    line-height: 1;
    margin-bottom: 20px;
}

.ml11 {
  font-weight: 700;
}

.ml11 .text-wrapper {
  position: relative;
  display: inline-block;
  padding-top: 0.1em;
  padding-right: 0.05em;
  padding-bottom: 0.15em;
}

.ml11 .line {
  opacity: 0;
  position: absolute;
  left: 0;
  height: 100%;
  width: 3px;
  background-color: var(--color-text-light);
  transform-origin: 0 50%;
}

.ml11 .line1 { 
  top: 0; 
  left: 0;
}

.ml11 .letter {
  display: inline-block;
  line-height: 1em;
}

.subtitle {
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--color-accent-red);
    color: var(--color-accent-red);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--color-accent-red);
    color: var(--color-bg-dark);
    font-weight: bold;
}

/* IMAGEN CENTRAL Y SIDEBAR */
.hero-image-and-sidebar {
    display: flex;
    gap: 40px;
}

.hero-image-container {
    width: 450px;
    height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.cosmic-drift-graphic {
    /* Simulación del remolino central */
    background: radial-gradient(circle at center, rgba(255, 0, 51, 0.4) 0%, rgba(255, 0, 51, 0) 60%), url('../img/cosmicdift.png');
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 50px;
}

.cosmic-drift-graphic h2 {
    font-size: 2rem;
    color: var(--color-accent-red);
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.8);
}

.cosmic-drift-graphic p {
    font-size: 0.9rem;
    color: var(--color-text-red);
    letter-spacing: 2px;
}

.sidebar {
    width: 250px; 
    padding-top: 50px; 
}

.carousel-container {
    height: 350px; 
    overflow: hidden; 
    border: 1px solid var(--color-border-dark);
    padding: 10px; 
}

.card-info {
    margin-bottom: 25px;
    padding: 15px 0; 
    border: none; 
    background-color: transparent; 
}

.carousel-track {
    display: flex;
    flex-direction: column; 
    transition: transform 0.5s ease-in-out; 
}

.card-title {
    font-size: 0.9rem;
    color: var(--color-accent-red);
    margin-bottom: 5px;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-color: var(--color-border-dark);
}

.card-text {
    font-size: 0.75rem;
    color: var(--color-text-light);
    line-height: 1.5;
}


/* CARRUSEL DE FRASES (HORIZONTAL) */
.quote-carousel-section {
    padding: 40px 0;
    margin-bottom: 20px;
}

.quote-carousel-container {
    height: 400px; 
    overflow: hidden; 
    width: 100%;
}

.quote-carousel-track {
    display: flex; 
    height: 100%;
    transition: transform 0.8s ease-in-out; 
}

.quote-slide {
    min-width: 100%; 
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 10%;
    
    /* Overlay oscuro para que el texto resalte */
    background-color: rgba(0, 0, 0, 0.6); 
    background-blend-mode: multiply; 
}

.quote-text {
    font-size: 2rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    max-width: 800px;
}

.quote-author {
    font-size: 1.1rem;
    color: var(--color-accent-red);
    letter-spacing: 2px;
}


/* SECCIÓN DE ARTÍCULOS (CHRONICLES) */
.chronicles-section {
    padding-top: 60px;
}

.chronicles-section h2 {
    font-size: 1.8rem;
    color: var(--color-accent-red);
    margin-bottom: 5px;
}

.articles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 3rem; 
}

.article-card {
    padding: 20px;
    border: 1px solid var(--color-border-dark);
    background-color: rgba(0, 0, 0, 0.3);
    display: flex; 
    flex-direction: column;
    transition: all 0.3s ease-in-out; 
}

.article-card:hover{
    border-color: var(--color-text-red);
    box-shadow: 0 0 10px var(--color-accent-red), 0 0 20px rgba(255, 0, 51, 0.4);
}

.article-title {
    font-size: 1rem;
    color: var(--color-accent-red);
    margin-bottom: 10px;
}

.article-excerpt {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.btn-secondary {
    display: inline-block;
    color: var(--color-accent-red);
    font-size: 0.8rem;
    text-transform: uppercase;
    border: none;
    padding-bottom: 2px;
    border-bottom: 1px dotted var(--color-accent-red);
}

.btn-secondary:hover {
    color: var(--color-text-light);
    border-bottom: 1px solid var(--color-text-light);
}

/* ESTILOS DE LA LLAMADA A LA ACCIÓN (GALERÍA) */
.cta-galeria-section {
    width: 100%;
    margin: 30px 0;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.3); 
    border: 1px solid var(--color-border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.cta-galeria-content {
    flex: 1.5; 
    max-width: 600px;
}

.cta-galeria-section h2 {
    font-size: 2.5rem;
    color: var(--color-accent-red);
    margin-bottom: 30px;
}

.cta-galeria-image-container {
    flex: 1; 
    max-width: 750px; 
    height: 25rem;
    overflow: hidden;
    border: 1px solid var(--color-border-dark);
}

.cta-galeria-image {
    width: 100%; 
    height: auto;
    display: block;
    object-fit: cover;
}

/* ESTILOS DE LA LLAMADA A LA ACCIÓN (FLUJO DE DATOS - TERMINAL) */
.cta-datos-section {
    width: 100%;
    margin: 40px 0;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.terminal-box {
    max-width: 700px;
    width: 100%;
    padding: 30px;
    background-color: #0d1a1b; 
    border: 2px solid var(--color-border-dark); 
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.6); 
    font-family: 'Space Mono', monospace;
    color: var(--color-text-red);
}

.terminal-title {
    font-size: 2rem;
    color: var(--color-text-red);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.terminal-line {
    font-size: 1rem;
    margin-bottom: 10px;
}

.terminal-prompt {
    font-size: 1.1rem;
    margin-bottom: 30px;
    border-top: 1px dashed rgba(255, 0, 51, 0.6); /* Separador sutil */
    padding-top: 15px;
}

.blinking-cursor {
    font-weight: bold;
    animation: blink-animation 1s steps(2, start) infinite;
}

/* La animación real */
@keyframes blink-animation {
    to {
        visibility: hidden;
    }
}

/* ESTILOS DE LA SECCIÓN COMUNIDAD (FORO) */
.community-section {
    padding: 60px 0;
    margin-top: 40px;
}

.community-section h2 {
    font-size: 1.8rem;
    color: var(--color-accent-red);
    margin-bottom: 5px;
}

.community-subtitle {
    font-size: 1rem;
    color: var(--color-text-red);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.topics-container {
    display: flex;
    flex-direction: column; 
    gap: 10px; 
}

.topic-card {
    display: grid;
    grid-template-columns: auto 1fr 100px;  /* Grid de 3 columnas*/
    align-items: center;
    padding: 12px 20px;
    border: 1px solid var(--color-border-dark);
    background-color: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.topic-card:hover {
    border-color: var(--color-accent-red);
    background-color: rgba(0, 0, 0, 0.5);
}

.topic-icon svg {
    color: var(--color-accent-red);
    margin-right: 20px;
}

.topic-main-info {
    padding-right: 20px;
    min-width: 0;
}

.topic-title {
    font-size: 1.2rem;
    color: var(--color-text-light);
    white-space: nowrap; /* Evita que el título se rompa */
    overflow: hidden; 
    text-overflow: ellipsis; /* Añade puntos suspensivos si se desborda */
    margin-bottom: 3px;
}

.topic-meta {
    font-size: 0.75rem;
    color: var(--color-text-red);
}

.topic-meta span {
    margin-right: 15px;
}

.topic-comments {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
}

.comments-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-accent-red);
    margin-right: 5px;
}

.topic-comments svg {
    color: var(--color-accent-red);
}

/* ESTILOS DEL PIE DE PÁGINA (FOOTER) */

.main-footer {
    background-color: #0d1a1b; 
    padding: 1rem;
    border-top: 1px solid var(--color-border-dark);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.footer-content .logo {
    font-size: 1.1rem; 
    margin-bottom: 15px;
}


.footer-navbar ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 15px 25px; 
    margin-bottom: 20px;
}

.footer-navbar a {
    font-size: 0.75rem;
    color: var(--color-text-light);
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-navbar a:hover {
    opacity: 1;
    color: var(--color-accent-red);
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--color-text-red);
    opacity: 0.5;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 0, 51, 0.1);
}

/* ANIMACIÓN DEL ICONO OVNI */
.ufo-animation-container {
    width: 100px; 
    margin: 5px auto 10px; 
    position: relative; 
    height: 30px;
}

.footer-ufo-icon {
    color: var(--color-accent-red); 
    position: absolute;
    left: 0;
    animation: ufo-drift 6s ease-in-out infinite alternate; 
}

/* Keyframes para la animación de deriva */
@keyframes ufo-drift {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 0.7;
    }
    50% {
        transform: translateX(70px) translateY(-5px); /* Movimiento a la derecha y un poco arriba */
        opacity: 1;
    }
    100% {
        transform: translateX(0) translateY(0);
        opacity: 0.7;
    }
}

/*---MQ---*/
@media (max-width: 1280px) {
    body {
        padding: 3rem; 
    }

    .navbar li {
        margin-left: 18px;
    }
    
    .navbar a {
        font-size: 0.75rem; 
    }

    .hero-section {
        gap: 2rem; 
    }

    .hero-content {
        padding-top: 50px; 
        max-width: 350px;
    }

    .hero-content h1 {
        font-size: 2rem; 
        margin-right: 5rem;
    }

    .hero-image-container {
        width: 400px;
        height: 400px;
    }

    .sidebar {
        width: 220px;
    }

    .articles-container {
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    /* Ajustes para tabletas y laptops pequeñas */
    .hero-image-container {
        width: 350px;
        height: 350px;
    }

    .sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    /* Ajustes para móviles y tabletas en vertical */
    body {
        padding: 1.5rem;
    }

    /* Ocultar la navegación y mostrar solo el logo para simplificar el header */
    .header {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
    }

    .menu-toggle {
        display: block; 
    }
    
    .navbar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--color-bg-dark); 
        padding-top: 80px;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
    }

    .navbar ul {
        flex-direction: column; 
        text-align: center;
    }

    .navbar li {
        margin: 10px 0;
    }

    .navbar a {
        font-size: 1.2rem;
    }


    .hero-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .hero-content {
        max-width: 100%; 
        padding-top: 0;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        margin-right: 1rem; 
    }

    .hero-image-and-sidebar {
        flex-direction: column; 
        gap: 30px;
        width: 100%;
    }

    .hero-image-container,
    .sidebar {
        width: 100%; 
        height: 300px; 
        padding-top: 0;
    }

    .quote-slide {
        padding: 0 5%;
    }
    .quote-text {
        font-size: 1.5rem;
    }

    .articles-container {
        grid-template-columns: 1fr;
    }

    .article-card {
        margin-bottom: 20px;
    }

    .cta-galeria-section {
        flex-direction: column; /* Apilamos el contenido e imagen en móviles */
        text-align: center;
        padding: 30px 20px;
    }

    .cta-galeria-section h2 {
        font-size: 1.6rem;
    }

    .cta-galeria-image-container {
        max-width: 100%;
        margin-top: 30px;
    }

    .terminal-title {
        font-size: 1.5rem;
    }
    .terminal-prompt{
        font-size: 0.9rem;
    }

    .topic-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        padding: 10px 15px;
    }

    .topic-icon {
        grid-row: 1 / 3;
        align-self: center;
    }
    
    .topic-main-info {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        min-width: 0;
    }
    
    .topic-comments {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        justify-content: flex-start; 
        margin-top: 5px;
    }
    
    .topic-meta {
        display: none; 
    }

    .topic-title{
        font-size: 0.7rem;
    }
}

/* ======================================= */
/* PAGINA GALERÍA BENTO GRID */
/* ======================================= */


.gallery-hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    border-bottom: 1px solid var(--color-border-dark);
    margin-bottom: 40px;
    background-color: #0d1a1b41;
}

.gallery-hero-section h1 {
    font-size: 3rem;
    color: var(--color-accent-red);
}

.gallery-hero-section p {
    color: var(--color-text-light);
    opacity: 0.8;
}

.bento-gallery-section {
    padding: 0 20px 60px;
}

.bento-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Base de 4 columnas (fácil de manejar y responsivo) */
    grid-auto-rows: 250px; 
    gap: 15px;
    max-width: 1400px; 
    margin: 0 auto;
}

.bento-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid var(--color-border-dark);
    transition: box-shadow 0.3s ease-in-out;
}

.bento-item:hover {
    box-shadow: 0 0 15px var(--color-accent-red);
    border-color: var(--color-accent-red);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.4s ease-in-out;
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--color-text-light);
    font-size: 0.9rem;
    opacity: 0; 
    transition: opacity 0.3s ease-in-out;
}

.bento-item:hover .item-overlay {
    opacity: 1; 
}


/* Ítem Horizontal (2 columnas x 1 fila) */
.bento-item-horizontal {
    grid-column: span 2; 
}

/* Ítem Vertical (1 columna x 2 filas) */
.bento-item-vertical {
    grid-row: span 2;
}

/* Ítem Grande (2 columnas x 2 filas) */
.bento-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

/*ESTILOS DEL MODAL*/
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; /* Asegura que esté por encima de todo (incluyendo el menú hamburger) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.9); 
    opacity: 0; 
    transition: opacity 0.3s ease-in-out;
}

/* La clase 'visible' se añade con JS para mostrar el modal */
.modal.visible {
    display: flex; /* Usamos flex para centrar el contenido */
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    margin: auto;
    width: 90%;
    max-width: 1000px;
    background-color: transparent;
}

.modal-body img {
    width: 100%;
    height: auto;
    display: block;
    border: 2px solid var(--color-accent-red); 
}


.close-button {
    color: var(--color-accent-red);
    position: absolute;
    top: -10px; 
    right: 5px;
    font-size: 35px;
    font-weight: bold;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: var(--color-text-light);
    text-decoration: none;
    cursor: pointer;
}

.image-caption {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1rem;
    padding: 10px 0;
    background-color: rgba(0, 0, 0, 0.5);
}


@media (max-width: 1280px) {
    .bento-grid-container {
        max-width: 1200px; 
        gap: 12px; 
        grid-auto-rows: 220px; 
    }
    .gallery-hero-section h1 {
        font-size: 2rem; 
    }
}

@media (max-width: 1024px) {
    .bento-grid-container {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px; 
    }
    .bento-item-horizontal {
        grid-column: span 2;
    }
    .bento-item-large {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 768px) {
    .bento-grid-container {
        grid-template-columns: 1fr; 
        grid-auto-rows: 300px; 
        gap: 20px;
    }
    .bento-item-horizontal,
    .bento-item-vertical,
    .bento-item-large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* ======================================= */
/* ESTILOS DE LA PÁGINA MANIFIESTO */
/* ======================================= */
.manifiesto-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
/* --- SECCIÓN POEMA --- */
.poema-content {
    margin-bottom: 40px;
}

.poema-text {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-text-light);
}

.poema-section h2 {
    text-align: center;
    color: var(--color-text-red);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.poema-image-banner {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--color-accent-red);
    /* Puedes añadir un overlay oscuro si quieres texto encima */
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 15px;
}

.banner-tag {
    font-size: 0.75rem;
    color: var(--color-text-light);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    letter-spacing: 2px;
}

/* --- SECCIÓN PROPÓSITO --- */
.proposito-section h2 {
    text-align: left;
    color: var(--color-accent-red);
    margin-bottom: 30px;
}

.proposito-grid {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.proposito-main-text {
    flex: 2;
    font-size: 1rem;
    line-height: 1.7;
    border-left: 3px solid var(--color-text-red);
    padding-left: 20px;
}

.proposito-list {
    flex: 1; 
    list-style: none;
    padding: 0;
    font-size: 0.95rem;
}

.proposito-list li {
    margin-bottom: 10px;
    color: var(--color-text-red); 
}

.list-dot {
    margin-right: 10px;
    color: var(--color-accent-red);
}

/* --- SECCIÓN CRÉDITOS --- */
.creditos-section {
    padding-bottom: 80px;
}

.creditos-data {
    margin: 20px 0 30px;
    padding-left: 10px;
    border-left: 2px solid var(--color-text-red);
}

.data-line {
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.data-value {
    color: var(--color-text-light);
}

.final-line {
    font-size: 1rem;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .proposito-grid {
        flex-direction: column;
    }

    .poema-image-banner {
        height: 200px;
    }
}

/* ======================================= */
/* FLUJO DE DATOS */
/* ======================================= */
.terminal-box-flujo {
    max-width: 1500px;
    width: 100%;
    padding: 30px;
    background-color: #0d1a1b; 
    border: 2px solid var(--color-border-dark); 
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.6); 
    font-family: 'Space Mono', monospace;
    color: var(--color-text-red);
}

/*canvas*/
#spaceCanvas {
  display: block;
  margin: 0 auto;
  background-color: var(--color-bg-dark);
  border: 1px solid var(--color-border-dark);
  box-shadow: 0 0 10px rgba(255, 0, 51, 0.4);
  width: 100%;
  max-width: 1000px;
  height: auto;
}

@media (max-width: 1280px) {
  #spaceCanvas {
    max-width: 900px;
  }
}

@media (max-width: 1024px) {
  #spaceCanvas {
    max-width: 700px;
  }
}

@media (max-width: 768px) {
  #spaceCanvas {
    max-width: 100%;
    padding: 0 10px;
  }

  .terminal-box-flujo {
    padding: 20px;
  }

  .terminal-title {
    font-size: 1.5rem;
  }

  .terminal-line,
  .terminal-prompt {
    font-size: 0.9rem;
  }
}

/* ======================================= */
/* ESTILOS DE LA PÁGINA COMUNIDAD */
/* ======================================= */

.forum-main-container {
    max-width: 1400px;
    margin: 40px auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 3fr 1fr; /* CLAVE: Definición de las columnas 75% / 25% */
    gap: 40px;
}

/* --- Columna Principal (Listado) --- */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border-dark);
}

.list-header .btn-primary{background-color:rgba(255, 255, 255, 0.02); font-size: 0.9rem;}
.list-header .btn-primary:hover{ background-color: var(--color-text-red);}

.list-header h2 {
    font-size: 1.5rem;
    color: var(--color-accent-red);
}

.topics-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* El topic-card ya tiene estilos base, solo mejoramos la interacción aquí */
.topic-card {
    transition: transform 0.2s, background-color 0.2s;
    background-color: rgba(255, 255, 255, 0.02);
}

.topic-card:hover {
    background-color: rgba(255, 255, 255, 0.05); 
    transform: translateY(-2px);
    border-color: var(--color-text-red);
}

.forum-pagination {
    display: flex;
    justify-content: center; 
    align-items: center;
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid var(--color-border-dark);
}

.page-link {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--color-text-light);
    border: 1px solid var(--color-border-dark);
    transition: all 0.2s ease-in-out;
    letter-spacing: 1px;
}

.page-link:hover:not(.active):not(.disabled) {
    background-color: rgba(255, 0, 51, 0.1);
    border-color: var(--color-accent-red);
    color: var(--color-accent-red);
}

.page-link.active {
    background-color: var(--color-accent-red);
    color: var(--color-bg-dark);
    border-color: var(--color-accent-red);
    font-weight: bold;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ellipsis {
    color: var(--color-text-light);
    margin: 0 8px;
    opacity: 0.6;
}

.page-link.prev,
.page-link.next {
    font-size: 0.85rem;
    padding: 8px 18px;
}

/* --- Columna Secundaria (Sidebar) --- */
.forum-sidebar {
    padding-top: 50px; 
}

.sidebar-widget {
    background-color: var(--color-bg-light);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--color-border-dark);
}

.sidebar-widget h3 {
    font-size: 1rem;
    color: var(--color-text-red);
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--color-text-red);
    padding-bottom: 5px;
}

/* Estilos para el widget de Tendencias */
.trending-widget ul {
    list-style: none;
    padding: 0;
}

.trending-widget li {
    margin-bottom: 8px;
}

.trending-widget a {
    font-size: 0.9rem;
    color: var(--color-text-light);
    opacity: 0.8;
}

/* Estilos para el widget de Subcomunidades */
.subcommunity-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px;
    border: 1px solid transparent;
    transition: background-color 0.3s;
}

.subcommunity-item:hover {
    background-color: rgba(255, 0, 51, 0.1);
    border-color: var(--color-accent-red);
}

.sub-icon {
    margin-right: 10px;
    color: var(--color-accent-red);
}

.sub-info h4 {
    font-size: 1rem;
    color: var(--color-text-light);
}

.sub-info p {
    font-size: 0.8rem;
    color: var(--color-text-red);
}


@media (max-width: 1024px) {
    .forum-main-container {
        grid-template-columns: 2.5fr 1fr; /*  70/30 */
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .forum-main-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .forum-sidebar {
        padding-top: 0;
    }
    
    .list-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list-header button {
        margin-top: 15px;
    }
}

@media (max-width: 500px) {
    .forum-pagination .page-link:not(.prev):not(.next):not(.active) {
        display: none;
    }
    
    .forum-pagination .ellipsis {
        display: none;
    }
}

/* ======================================= */
/* ESTILOS DE LA PÁGINA ARTÍCULOS (BITACORA ESTELAR) (BENTO NEWSPAPER) */
/* ======================================= */
.articles-grid-section {
    padding: 40px 20px 80px;
}

.articles-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;/* Grid de 3 columnas para el layout de periódico */
    grid-template-columns: 2fr 1fr 1fr; 
    grid-auto-rows: minmax(200px, auto); /* Altura base para las filas */
    gap: 20px;
}

/* --- Estilos Base de los Ítems (Artículos) --- */
.article-item {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid var(--color-border-dark);
    transition: box-shadow 0.3s, border-color 0.3s;
    background-color: var(--color-bg-light); 
    max-height: 500px;
}

.article-item:hover {
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.4);
    border-color: var(--color-accent-red);
}

.article-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.4s;
}

.article-item:hover img {
    transform: scale(1.03);
}

.article-info {
    padding: 15px;
    color: var(--color-text-light);
    flex-grow: 1; 
    background-color: rgba(0, 0, 0, 0.3);
    height: 10px;
}

.article-category {
    font-size: 0.75rem;
    color: var(--color-accent-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 5px;
}

.article-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

/* --- Estilos de los Tipos de Artículos (Bento Positioning) --- */
/*2 columnas x 2 filas) */
.featured-main {
    grid-column: span 2;
    grid-row: span 2;
    background-color: #0d1a1b; 
}

.featured-main img {
    height: 60%;
}

.featured-main .article-info {
    height: 40%;
    background-color: transparent;
}

.featured-main .article-info h3 {
    font-size: 1.8rem;
    color: var(--color-accent-red);
}

.article-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: 10px;
}

/* (1 columna x 2 filas) */
.featured-secondary {
    grid-row: span 2;
}

.featured-secondary img {
    height: 70%;
}

.featured-secondary .article-info {
    height: 30%;
}

/* Artículos 1x1 */
.article-item:not(.featured-main):not(.featured-secondary) img {
    height: 60%;
}

/* --- Tira de Crónicas Recientes (Horizontal) --- */
.article-strip-container {
    grid-column: span 3; 
    display: flex;
    flex-direction: column; 
    padding: 15px;
    border: 1px dashed var(--color-text-red);
    background-color: rgba(0, 255, 85, 0.05);
    height: auto; 
    min-height: min-content;
}

.strip-title {
    font-size: 1.1rem;
    color: var(--color-text-red);
    border-bottom: 1px solid var(--color-text-red);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.strip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted rgba(0, 255, 85, 0.3);
    color: var(--color-text-light);
}

.strip-item:hover {
    background-color: rgba(0, 255, 85, 0.1);
    color: var(--color-text-red);
}

.strip-category {
    font-size: 0.7rem;
    color: var(--color-accent-red);
    text-transform: uppercase;
    flex-basis: 15%;
}

.strip-headline {
    font-size: 0.9rem;
    flex-basis: 70%;
}

.strip-date {
    font-size: 0.7rem;
    opacity: 0.7;
    flex-basis: 15%;
    text-align: right;
}

@media (max-width: 1024px) {
    .articles-grid-container {
        grid-template-columns: 1fr 1fr; /* Cambio a 2 columnas */
    }
    .featured-main {
        grid-column: span 2;
    }
    .article-strip-container {
        grid-column: span 2;
    }
    .article-item:not(.featured-main) {
        grid-row: span 1; 
    }
}

@media (max-width: 768px) {
    .articles-grid-container {
        grid-template-columns: 1fr; 
        grid-auto-rows: minmax(200px, auto);
    }
    .featured-main,
    .featured-secondary,
    .article-strip-container {
        grid-column: span 1; 
        grid-row: span 1; 
    }
    .featured-main .article-info{
        height: auto;
    }
    .featured-secondary img {
    height: 50%;
    }
    .featured-secondary .article-info {
    height: 50%;
    }
    .article-strip-container{
        font-size: 0.7rem;
        gap: 0.5rem;
    }
    .strip-item{
        flex-direction:column;
    }
    .strip-headline{
        font-size: 0.7rem;
    }
}
