:root[data-theme="dark"] {
    --bg-page: #0b0904;
    --frame-3: #5b4e26;
    --frame-4: #241d0e;
    --gold: #e8c766;
    --gold-bright: #ffe9a8;
    --text-cream: #f4ead0;
    --nav-bg: #0c0a06;
    --red-tag-bg: rgba(120, 20, 20, .35);
    --red-tag-text: #ff8080;
    --lore-bg: #0b0904;
    --border-soft: rgba(244, 234, 208, .15);
    --hover-tint: rgba(255, 255, 255, .05);
    --green: #7cd992;
    --panel-bg: #17130a;
    --panel-bg-2: #1d1810;
    --text-muted: rgba(244, 234, 208, .62);
    --shadow-color: rgba(0, 0, 0, .55);
    --gold-glow: rgba(232, 199, 102, .35);
}

:root[data-theme="light"] {
    --bg-page: #f4ecd8;
    --frame-3: #cdb46e;
    --frame-4: #b99f56;
    --gold: #6b4f10;
    --gold-bright: #4a3607;
    --text-cream: #362a11;
    --nav-bg: #efe2ba;
    --red-tag-bg: rgba(180, 40, 40, .15);
    --red-tag-text: #a11d1d;
    --lore-bg: #f4ecd8;
    --border-soft: rgba(54, 42, 17, .15);
    --hover-tint: rgba(54, 42, 17, .08);
    --green: #15803d;
    --panel-bg: #ede1c2;
    --panel-bg-2: #e5d7b2;
    --text-muted: rgba(54, 42, 17, .68);
    --shadow-color: rgba(54, 42, 17, .2);
    --gold-glow: rgba(107, 79, 16, .25);
}

* { box-sizing: border-box; }

body.home {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-cream);
    font-family: Georgia, 'Times New Roman', serif;
}

.home-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: var(--nav-bg);
    padding: 0.9rem 1.75rem;
    border-bottom: 1px solid var(--border-soft);
    font-family: 'Courier New', ui-monospace, monospace;
}

.home-nav__brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--gold-bright);
    font-weight: 700;
    letter-spacing: .08em;
    white-space: nowrap;
}

.home-nav__logo {
    height: 1.8rem;
    width: auto;
}

.home-nav__links {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .6rem 1.1rem;
    font-size: .78rem;
}

.home-nav__links a {
    color: var(--gold);
    text-decoration: none;
    letter-spacing: .05em;
}

.home-nav__links a.active {
    color: var(--gold-bright);
    text-decoration: underline;
}

.home-nav__links a:hover {
    color: var(--gold-bright);
}

.home-nav__store {
    color: var(--green) !important;
    font-weight: 700;
}

/* Vive dentro de .home-nav__actions (no de .home-nav__links), así que no
   hereda el text-decoration ni el color de aquel contenedor: se define todo
   aquí para que se vea igual junto a los botones de tema e idioma. */
.home-nav__backnomia {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--gold-bright);
    font-weight: 700;
    letter-spacing: .05em;
    text-decoration: none;
    white-space: nowrap;
    padding: .25rem .7rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    transition: background-color .15s, color .15s;
}

.home-nav__backnomia:hover {
    background: rgba(232, 199, 102, .14);
    color: #ffe9a8;
}

.home-nav__dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.home-nav__dropdown-toggle {
    background: none;
    border: none;
    color: var(--gold);
    font-family: inherit;
    letter-spacing: .05em;
    font-size: .78rem;
    cursor: pointer;
    padding: 0;
}

.home-nav__dropdown-toggle:hover {
    color: var(--gold-bright);
}

.home-nav__dropdown-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + .9rem);
    left: 0;
    background: var(--frame-4);
    border: 1px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    min-width: 220px;
    padding: .5rem 0;
    z-index: 30;
}

.home-nav__dropdown-menu.open {
    display: flex;
}

.home-nav__dropdown-group + .home-nav__dropdown-group {
    border-top: 1px solid var(--border-soft);
    margin-top: .4rem;
    padding-top: .4rem;
}

.home-nav__dropdown-label {
    display: block;
    padding: .4rem 1rem .3rem;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .65rem;
    letter-spacing: .08em;
    color: var(--gold);
    opacity: .6;
}

.home-nav__dropdown-menu a {
    display: block;
    padding: .4rem 1rem;
    color: var(--gold);
    text-decoration: none;
    font-size: .82rem;
    white-space: nowrap;
}

.home-nav__dropdown-menu a:hover {
    background: var(--hover-tint);
    color: var(--gold-bright);
}

.home-nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .78rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: transparent;
    border: none;
    color: var(--gold);
    font-family: inherit;
    font-size: .78rem;
    letter-spacing: .05em;
    cursor: pointer;
}

.lang-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--gold);
    font-family: inherit;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    padding: .3rem .6rem;
    cursor: pointer;
}

.lang-toggle-btn:hover {
    color: var(--gold-bright);
    border-color: var(--gold);
}

.theme-toggle__swatch {
    width: .8rem;
    height: .8rem;
    background: var(--gold-bright);
    display: inline-block;
    border: 1px solid var(--border-soft);
}

.btn-session {
    border: 1px solid var(--gold);
    color: var(--gold-bright);
    padding: .35rem .8rem;
    text-decoration: none;
    letter-spacing: .05em;
}

.btn-session:hover {
    background: var(--gold);
    color: var(--nav-bg);
}

.btn-session--ghost {
    border-color: var(--border-soft);
    color: var(--gold);
}

.btn-session--ghost:hover {
    background: transparent;
    color: var(--gold-bright);
    border-color: var(--gold);
}

.portal-tag {
    display: block;
    width: fit-content;
    margin: 1.5rem auto 0;
    background: var(--red-tag-bg);
    color: var(--red-tag-text);
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .7rem;
    letter-spacing: .08em;
    padding: .4rem .9rem;
}

.portal-featured {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 1100px;
    margin: 1.5rem auto 0;
    padding: 0 2rem;
}

.portal-card {
    display: block;
    background: var(--frame-4);
    border: 1px solid var(--border-soft);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, transform .15s ease;
}

.portal-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.portal-card--big {
    padding: 2rem;
}

.portal-card__eyebrow {
    display: block;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .7rem;
    letter-spacing: .08em;
    color: var(--gold);
    margin-bottom: .6rem;
}

.portal-card__title {
    margin: 0 0 .5rem;
    color: var(--gold-bright);
}

.portal-card--big .portal-card__title {
    font-size: 1.4rem;
}

.portal-card__excerpt {
    margin: 0;
    color: var(--text-cream);
    line-height: 1.6;
    font-size: .92rem;
}

.portal-strip {
    max-width: 1100px;
    margin: 2.5rem auto 0;
    padding: 0 2rem;
}

.portal-strip__title {
    font-family: 'Courier New', ui-monospace, monospace;
    letter-spacing: .05em;
    color: var(--gold-bright);
    font-size: .95rem;
    margin: 0 0 .9rem;
}

.portal-strip__row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .5rem;
}

.portal-thumb {
    flex: 0 0 auto;
    width: 150px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--gold-bright);
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .85rem;
    letter-spacing: .04em;
}

.portal-thumb__img {
    width: 150px;
    height: 100px;
    background: var(--frame-3);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.portal-thumb__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-thumb__caption {
    display: block;
    margin-top: .4rem;
    font-size: .78rem;
    line-height: 1.35;
}

.portal-thumb:hover .portal-thumb__img {
    border-color: var(--gold);
}

.portal-lists {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 3rem auto 0;
    padding: 0 2rem 3rem;
}

.portal-list h3 {
    color: var(--gold-bright);
    font-size: 1rem;
    margin: 0 0 .5rem;
}

.portal-list p {
    color: var(--text-cream);
    opacity: .8;
    font-size: .85rem;
    line-height: 1.5;
    margin: 0 0 .9rem;
}

.portal-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border-soft);
}

.portal-list li {
    border-bottom: 1px solid var(--border-soft);
}

.portal-list a {
    display: block;
    padding: .55rem 0;
    color: var(--gold);
    text-decoration: none;
    font-size: .9rem;
}

.portal-list a:hover {
    color: var(--gold-bright);
}

@media (max-width: 760px) {
    .portal-featured, .portal-lists {
        grid-template-columns: 1fr;
    }
}

.lore {
    background: var(--lore-bg);
    padding: 4rem 2rem;
    max-width: 760px;
    margin: 0 auto;
}

.lore h2 {
    font-family: 'Courier New', ui-monospace, monospace;
    letter-spacing: .05em;
    color: var(--gold-bright);
    font-size: 1.1rem;
}

.lore__index {
    color: var(--gold);
    margin-right: .5rem;
}

.lore p {
    line-height: 1.7;
    color: var(--text-cream);
}

.lore .dropcap {
    float: left;
    font-size: 3.2rem;
    line-height: .8;
    padding: .1rem .35rem 0 0;
    color: var(--gold-bright);
}

.home-footer {
    text-align: center;
    padding: 2.5rem 1rem 3rem;
    background: var(--lore-bg);
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .72rem;
    letter-spacing: .05em;
    color: var(--gold);
    border-top: 1px solid var(--border-soft);
}

.home-footer__disclaimer {
    margin-top: .4rem;
    opacity: .7;
}

@media (max-width: 720px) {
    .home-nav { flex-wrap: wrap; }
    .home-nav__links { order: 3; width: 100%; }
}

.account-menu {
    position: relative;
}

.account-menu__toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--gold-bright);
    padding: .3rem .7rem .3rem .3rem;
    cursor: pointer;
    font-family: inherit;
    font-size: .8rem;
}

.account-menu__avatar {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
}

.account-menu__badge {
    background: #e11d48;
    color: #fff;
    border-radius: 999px;
    font-size: .65rem;
    padding: .05rem .4rem;
}

.account-menu__dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    background: var(--nav-bg);
    border: 1px solid var(--border-soft);
    min-width: 200px;
    z-index: 20;
}

.account-menu__dropdown.open {
    display: flex;
}

.account-menu__dropdown a {
    padding: .6rem .9rem;
    color: var(--gold);
    text-decoration: none;
    font-size: .85rem;
}

.account-menu__dropdown a:hover {
    background: var(--hover-tint);
    color: var(--gold-bright);
}

.account-menu__divider {
    border-top: 1px solid var(--border-soft);
    margin: .3rem 0;
}

.account-menu__stat {
    padding: .5rem .9rem .3rem;
    font-size: .75rem;
    color: var(--text-muted);
}

.account-menu__premium {
    color: var(--gold-bright) !important;
    font-weight: 700;
}

/* ---- animación de bienvenida (una sola vez, tras login/registro) ---- */

html.welcome-lock,
html.welcome-lock body {
    overflow: hidden;
}

.welcome-splash {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0904;
    overflow: hidden;
    animation: welcomeFadeOut .6s ease 2.6s forwards;
}

.welcome-splash__glow {
    position: absolute;
    inset: -30%;
    background: conic-gradient(from 0deg, transparent, rgba(232, 199, 102, .22), transparent 30%, transparent 60%, rgba(232, 199, 102, .12), transparent 90%);
    animation: welcomeSpin 5s linear infinite;
}

@keyframes welcomeSpin {
    to { transform: rotate(360deg); }
}

.welcome-splash__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.welcome-splash__particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffe9a8;
    opacity: 0;
    box-shadow: 0 0 6px 1px rgba(255, 233, 168, .8);
    animation: welcomeParticle 2.6s ease-in infinite;
}

.welcome-splash__particles span:nth-child(1)  { left: 8%;  top: 82%; animation-delay: .1s; }
.welcome-splash__particles span:nth-child(2)  { left: 18%; top: 88%; animation-delay: .6s; }
.welcome-splash__particles span:nth-child(3)  { left: 27%; top: 76%; animation-delay: 1.1s; }
.welcome-splash__particles span:nth-child(4)  { left: 36%; top: 92%; animation-delay: .3s; }
.welcome-splash__particles span:nth-child(5)  { left: 45%; top: 80%; animation-delay: 1.4s; }
.welcome-splash__particles span:nth-child(6)  { left: 54%; top: 90%; animation-delay: .8s; }
.welcome-splash__particles span:nth-child(7)  { left: 63%; top: 78%; animation-delay: 1.8s; }
.welcome-splash__particles span:nth-child(8)  { left: 72%; top: 86%; animation-delay: .2s; }
.welcome-splash__particles span:nth-child(9)  { left: 81%; top: 74%; animation-delay: 1.2s; }
.welcome-splash__particles span:nth-child(10) { left: 90%; top: 90%; animation-delay: .5s; }
.welcome-splash__particles span:nth-child(11) { left: 15%; top: 60%; animation-delay: 2s; }
.welcome-splash__particles span:nth-child(12) { left: 50%; top: 65%; animation-delay: 1.6s; }
.welcome-splash__particles span:nth-child(13) { left: 85%; top: 62%; animation-delay: .9s; }
.welcome-splash__particles span:nth-child(14) { left: 33%; top: 55%; animation-delay: 2.2s; }

@keyframes welcomeParticle {
    0%   { opacity: 0; transform: translateY(0) scale(.6); }
    15%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-180px) scale(1.3); }
}

.welcome-splash__content {
    position: relative;
    text-align: center;
    padding: 0 1.5rem;
    animation: welcomeRise .8s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes welcomeRise {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-splash__logo {
    width: 72px;
    height: auto;
    filter: drop-shadow(0 0 14px rgba(255, 233, 168, .5));
    animation: welcomePulse 1.8s ease-in-out infinite;
}

@keyframes welcomePulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 233, 168, .35)); }
    50%      { filter: drop-shadow(0 0 26px rgba(255, 233, 168, .75)); }
}

.welcome-splash__eyebrow {
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .72rem;
    letter-spacing: .3em;
    color: #7cd992;
    margin: 1.1rem 0 .6rem;
    opacity: 0;
    animation: welcomeFadeIn .6s ease .5s forwards;
}

.welcome-splash__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.5rem, 5vw, 2.4rem);
    color: #ffe9a8;
    margin: 0;
    text-shadow: 0 0 24px rgba(255, 233, 168, .5);
    opacity: 0;
    animation: welcomeFadeIn .7s ease .7s forwards;
}

.welcome-splash__line {
    width: 0;
    height: 2px;
    margin: 1.1rem auto;
    background: linear-gradient(90deg, transparent, #e8c766, transparent);
    animation: welcomeLine 1.4s ease .3s forwards;
}

@keyframes welcomeLine {
    to { width: 220px; }
}

.welcome-splash__subtitle {
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .8rem;
    letter-spacing: .1em;
    color: #b8ab7a;
    margin: 0;
    opacity: 0;
    animation: welcomeFadeIn .6s ease 1s forwards;
}

@keyframes welcomeFadeIn {
    to { opacity: 1; }
}

@keyframes welcomeFadeOut {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-splash,
    .welcome-splash__glow,
    .welcome-splash__particles span,
    .welcome-splash__content,
    .welcome-splash__logo,
    .welcome-splash__eyebrow,
    .welcome-splash__title,
    .welcome-splash__line,
    .welcome-splash__subtitle {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =========================================================
   Rediseño de inicio: hero, estadísticas, accesos rápidos,
   galería, reportes, temas, blogs, actividad en vivo, eventos
   y footer. Todo el contenido dinámico es real (viene de la
   base de datos); nada de esto simula datos falsos.
   ========================================================= */

.section-title {
    font-family: 'Courier New', ui-monospace, monospace;
    letter-spacing: .05em;
    color: var(--gold-bright);
    font-size: 1.05rem;
    margin: 0 0 .3rem;
}

.section-head {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-head p {
    color: var(--text-muted);
    font-size: .88rem;
    margin: 0 0 1.5rem;
    max-width: 620px;
}

.empty-note {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem 1rem;
    color: var(--text-muted);
    font-size: .85rem;
}

/* ---- Hero ---- */

.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 20%, #201a0c 0%, var(--bg-page) 65%);
    isolation: isolate;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero__scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, .035) 0px,
        rgba(255, 255, 255, .035) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
    animation: heroScan 9s linear infinite;
}

@keyframes heroScan {
    from { background-position: 0 0; }
    to   { background-position: 0 120px; }
}

.hero__noise {
    position: absolute;
    inset: -10%;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: heroNoise 1.1s steps(3) infinite;
}

@keyframes heroNoise {
    0%, 100% { transform: translate(0, 0); }
    33%      { transform: translate(-2%, 1%); }
    66%      { transform: translate(1%, -2%); }
}

.hero__glow {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 30% 30%, var(--gold-glow), transparent 45%),
        radial-gradient(circle at 75% 65%, rgba(180, 30, 30, .18), transparent 50%);
    animation: heroGlowPulse 8s ease-in-out infinite;
}

@keyframes heroGlowPulse {
    0%, 100% { opacity: .7; }
    50%      { opacity: 1; }
}

.hero__particles {
    position: absolute;
    inset: 0;
}

.hero__particles span {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--gold-bright);
    opacity: 0;
    box-shadow: 0 0 4px 1px var(--gold-glow);
    animation: heroDust 14s linear infinite;
}

.hero__particles span:nth-child(1)  { left: 4%;  animation-delay: 0s;    animation-duration: 16s; }
.hero__particles span:nth-child(2)  { left: 10%; animation-delay: 1.2s;  animation-duration: 13s; }
.hero__particles span:nth-child(3)  { left: 17%; animation-delay: 2.4s;  animation-duration: 17s; }
.hero__particles span:nth-child(4)  { left: 24%; animation-delay: .6s;   animation-duration: 12s; }
.hero__particles span:nth-child(5)  { left: 31%; animation-delay: 3.1s;  animation-duration: 15s; }
.hero__particles span:nth-child(6)  { left: 38%; animation-delay: 1.8s;  animation-duration: 18s; }
.hero__particles span:nth-child(7)  { left: 45%; animation-delay: 4s;    animation-duration: 14s; }
.hero__particles span:nth-child(8)  { left: 52%; animation-delay: .3s;   animation-duration: 16s; }
.hero__particles span:nth-child(9)  { left: 59%; animation-delay: 2.9s;  animation-duration: 13s; }
.hero__particles span:nth-child(10) { left: 66%; animation-delay: 1.1s;  animation-duration: 17s; }
.hero__particles span:nth-child(11) { left: 73%; animation-delay: 3.6s;  animation-duration: 15s; }
.hero__particles span:nth-child(12) { left: 80%; animation-delay: .9s;   animation-duration: 12s; }
.hero__particles span:nth-child(13) { left: 87%; animation-delay: 2.2s;  animation-duration: 18s; }
.hero__particles span:nth-child(14) { left: 93%; animation-delay: 4.4s;  animation-duration: 14s; }
.hero__particles span:nth-child(15) { left: 14%; animation-delay: 5.1s;  animation-duration: 16s; }
.hero__particles span:nth-child(16) { left: 55%; animation-delay: 5.8s;  animation-duration: 13s; }
.hero__particles span:nth-child(17) { left: 68%; animation-delay: 6.4s;  animation-duration: 15s; }
.hero__particles span:nth-child(18) { left: 90%; animation-delay: 3.9s;  animation-duration: 17s; }

@keyframes heroDust {
    0%   { opacity: 0; transform: translateY(110%) scale(.7); }
    10%  { opacity: .55; }
    90%  { opacity: .35; }
    100% { opacity: 0; transform: translateY(-15%) scale(1.2); }
}

.hero__vignette {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 140px 40px var(--bg-page);
    background: linear-gradient(to bottom, rgba(0, 0, 0, .35), transparent 30%, transparent 70%, rgba(0, 0, 0, .5));
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 760px;
    padding: 0 1.5rem;
}

.hero__eyebrow {
    display: inline-block;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .75rem;
    letter-spacing: .3em;
    color: var(--red-tag-text);
    background: var(--red-tag-bg);
    padding: .4rem 1rem;
    margin-bottom: 1.5rem;
    animation: heroFlicker 5s ease-in-out infinite;
}

@keyframes heroFlicker {
    0%, 96%, 100% { opacity: 1; }
    97%           { opacity: .55; }
    98%           { opacity: .9; }
    99%           { opacity: .4; }
}

.hero__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    letter-spacing: .04em;
    color: var(--gold-bright);
    margin: 0 0 1.2rem;
    text-shadow: 0 0 40px var(--gold-glow);
    animation: heroTitleIn 1s cubic-bezier(.16, 1, .3, 1) both;
}

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

.hero__subtitle {
    color: var(--text-cream);
    font-size: clamp(.95rem, 2vw, 1.1rem);
    line-height: 1.7;
    opacity: .85;
    margin: 0 auto 2.2rem;
    max-width: 560px;
    animation: heroTitleIn 1s cubic-bezier(.16, 1, .3, 1) .15s both;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroTitleIn 1s cubic-bezier(.16, 1, .3, 1) .3s both;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .9rem 1.7rem;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .85rem;
    letter-spacing: .04em;
    text-decoration: none;
    border: 1px solid var(--gold);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.hero-btn--primary {
    background: var(--gold);
    color: var(--nav-bg);
}

.hero-btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--gold-glow);
}

.hero-btn--ghost {
    background: rgba(0, 0, 0, .2);
    color: var(--gold-bright);
}

.hero-btn--ghost:hover {
    transform: translateY(-3px);
    border-color: var(--gold-bright);
    background: var(--hover-tint);
}

.hero__scroll {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 36px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    z-index: 1;
}

.hero__scroll span {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 3px;
    height: 7px;
    background: var(--gold);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: heroScrollDot 1.8s ease-in-out infinite;
}

@keyframes heroScrollDot {
    0%   { opacity: 1; top: 6px; }
    70%  { opacity: 0; top: 18px; }
    100% { opacity: 0; top: 6px; }
}

/* ---- Barra de estadísticas ---- */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--border-soft);
    max-width: 1180px;
    margin: -2.5rem auto 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 50px var(--shadow-color);
}

.stat-card {
    background: var(--panel-bg);
    padding: 1.3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .25rem;
}

.stat-card__icon {
    font-size: 1.2rem;
    margin-bottom: .1rem;
}

.stat-card__value {
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: 1.5rem;
    color: var(--gold-bright);
    font-weight: 700;
}

.stat-card__label {
    font-size: .68rem;
    color: var(--text-muted);
    letter-spacing: .03em;
    text-transform: uppercase;
}

/* ---- Acceso rápido ---- */

.qa-section {
    max-width: 1180px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.1rem;
    margin-top: 1.2rem;
}

.qa-card {
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    padding: 1.6rem 1.4rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 24px var(--shadow-color);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.qa-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 16px 34px var(--shadow-color), 0 0 0 1px var(--gold-glow);
}

.qa-card__icon {
    font-size: 1.9rem;
    margin-bottom: .8rem;
}

.qa-card h3 {
    margin: 0 0 .4rem;
    color: var(--gold-bright);
    font-size: 1.05rem;
}

.qa-card p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: .85rem;
    line-height: 1.5;
    flex: 1;
}

.qa-card__btn {
    color: var(--gold);
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .78rem;
    letter-spacing: .04em;
    transition: transform .2s ease;
}

.qa-card:hover .qa-card__btn {
    transform: translateX(4px);
    color: var(--gold-bright);
}

/* ---- Galería de dibujos ---- */

.gallery-section {
    max-width: 1180px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.gallery-row {
    display: flex;
    gap: 1.1rem;
    overflow-x: auto;
    padding-bottom: .6rem;
}

.gallery-card {
    position: relative;
    flex: 0 0 auto;
    width: 220px;
    height: 280px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border-soft);
    background: var(--panel-bg);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.gallery-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--gold);
    box-shadow: 0 18px 36px var(--shadow-color);
}

.gallery-card__img {
    width: 100%;
    height: 100%;
}

.gallery-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.gallery-card:hover .gallery-card__img img {
    transform: scale(1.08);
}

.gallery-card__overlay {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: 2.2rem .9rem .9rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .92) 20%, transparent 100%);
    color: #f4ead0;
    transform: translateY(0);
}

.gallery-card__title {
    font-size: .88rem;
    line-height: 1.3;
}

.gallery-card__author,
.gallery-card__meta {
    font-size: .72rem;
    opacity: .85;
}

.gallery-card__btn {
    margin-top: .5rem;
    display: inline-block;
    width: fit-content;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .7rem;
    letter-spacing: .04em;
    color: var(--gold-bright);
    border: 1px solid rgba(255, 233, 168, .4);
    padding: .3rem .7rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease;
}

.gallery-card:hover .gallery-card__btn {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Reportes destacados ---- */

.reports-section {
    max-width: 1180px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
}

.report-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--red-tag-text);
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    transition: border-color .2s ease, transform .2s ease;
}

.report-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    border-left-color: var(--red-tag-text);
}

.report-card__body {
    margin: 0;
    color: var(--text-cream);
    font-size: .88rem;
    line-height: 1.6;
    flex: 1;
}

.report-card__meta {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    color: var(--text-muted);
    font-family: 'Courier New', ui-monospace, monospace;
}

.report-card__btn {
    align-self: flex-start;
    color: var(--gold);
    text-decoration: none;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .76rem;
    letter-spacing: .03em;
}

.report-card__btn:hover {
    color: var(--gold-bright);
}

/* ---- Temas más explorados ---- */

.topics-section {
    max-width: 1180px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.1rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    padding: 1.2rem;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, border-color .2s ease;
}

.topic-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
}

.topic-card__category {
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .68rem;
    letter-spacing: .05em;
    color: var(--gold);
    text-transform: uppercase;
}

.topic-card h3 {
    margin: .5rem 0 .8rem;
    color: var(--gold-bright);
    font-size: 1rem;
    line-height: 1.4;
    flex: 1;
}

.topic-card__stats {
    display: flex;
    gap: .8rem;
    font-size: .74rem;
    color: var(--text-muted);
    margin-bottom: .7rem;
}

.topic-card__btn {
    color: var(--gold);
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .76rem;
    transition: transform .2s ease;
}

.topic-card:hover .topic-card__btn {
    transform: translateX(4px);
    color: var(--gold-bright);
}

/* ---- Blogs destacados ---- */

.blogs-section {
    max-width: 1180px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
}

.blog-card__img {
    height: 140px;
    overflow: hidden;
}

.blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.blog-card:hover .blog-card__img img {
    transform: scale(1.06);
}

.blog-card__body {
    padding: 1.1rem 1.2rem 1.3rem;
}

.blog-card__body h3 {
    margin: 0 0 .7rem;
    color: var(--gold-bright);
    font-size: 1.02rem;
    line-height: 1.4;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .72rem;
    color: var(--text-muted);
}

.blog-card__avatar {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .62rem;
    font-weight: 700;
    color: #fff;
}

.blog-card__readtime::before {
    content: '· ';
}

/* ---- Comunidad en vivo ---- */

.live-section {
    max-width: 1180px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.live-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.5rem;
}

.live-col {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    padding: 1.2rem 1.3rem 1.4rem;
}

.live-col h3 {
    margin: 0 0 .9rem;
    font-size: .85rem;
    letter-spacing: .04em;
    color: var(--gold-bright);
    font-family: 'Courier New', ui-monospace, monospace;
}

.live-users {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.live-user {
    display: flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    color: var(--text-cream);
    font-size: .78rem;
    background: var(--panel-bg-2);
    border: 1px solid var(--border-soft);
    padding: .3rem .6rem .3rem .3rem;
    transition: border-color .2s ease;
}

.live-user:hover {
    border-color: var(--gold);
    color: var(--gold-bright);
}

.live-user__avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 700;
    color: #fff;
}

.live-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.live-feed__item + .live-feed__item {
    border-top: 1px solid var(--border-soft);
}

.live-feed__item a {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .6rem 0;
    text-decoration: none;
    color: inherit;
}

.live-feed__icon {
    font-size: 1rem;
    line-height: 1.4;
}

.live-feed__text {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.live-feed__text strong {
    color: var(--text-cream);
    font-size: .84rem;
    font-weight: 400;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-feed__item a:hover .live-feed__text strong {
    color: var(--gold-bright);
}

.live-feed__by {
    font-size: .7rem;
    color: var(--text-muted);
}

/* ---- Novedades y eventos ---- */

.events-section {
    max-width: 1180px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
}

.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    padding: 1.3rem;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, border-color .2s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
}

.event-card__icon {
    font-size: 1.6rem;
    margin-bottom: .6rem;
}

.event-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--green);
    color: #0b0904;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .05em;
    padding: .15rem .45rem;
}

.event-card h3 {
    margin: 0 0 .5rem;
    color: var(--gold-bright);
    font-size: .98rem;
}

.event-card p {
    margin: 0 0 .9rem;
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.5;
    flex: 1;
}

.event-card__btn {
    color: var(--gold);
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .76rem;
}

/* ---- Footer completo ---- */

.site-footer {
    background: var(--lore-bg);
    border-top: 1px solid var(--border-soft);
    margin-top: 4rem;
    padding: 3rem 2rem 1.5rem;
}

.site-footer__grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--gold-bright);
    font-weight: 700;
    letter-spacing: .08em;
    font-family: 'Courier New', ui-monospace, monospace;
    margin-bottom: .8rem;
}

.site-footer__logo {
    height: 1.6rem;
    width: auto;
}

.site-footer__col--brand p {
    color: var(--text-muted);
    font-size: .78rem;
    line-height: 1.6;
    max-width: 280px;
}

.site-footer__col h4 {
    color: var(--gold-bright);
    font-size: .8rem;
    letter-spacing: .05em;
    margin: 0 0 .8rem;
    font-family: 'Courier New', ui-monospace, monospace;
}

.site-footer__col a {
    display: block;
    color: var(--gold);
    text-decoration: none;
    font-size: .82rem;
    margin-bottom: .55rem;
}

.site-footer__col a:hover {
    color: var(--gold-bright);
}

.site-footer__bottom {
    max-width: 1180px;
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-soft);
    text-align: center;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: .72rem;
    color: var(--text-muted);
}

/* ---- Scroll reveal ---- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

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

/* ---- Responsivo ---- */

@media (max-width: 960px) {
    .stats-bar { grid-template-columns: repeat(3, 1fr); }
    .live-grid { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .hero { min-height: 520px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); margin-top: -1.5rem; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .gallery-card { width: 170px; height: 220px; }
}

/* ---- Movimiento reducido: quitar animaciones decorativas del hero ---- */

@media (prefers-reduced-motion: reduce) {
    .hero__scanlines,
    .hero__noise,
    .hero__glow,
    .hero__particles span,
    .hero__eyebrow,
    .hero__title,
    .hero__subtitle,
    .hero__actions,
    .hero__scroll span {
        animation: none !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .qa-card:hover,
    .gallery-card:hover,
    .report-card:hover,
    .topic-card:hover,
    .blog-card:hover,
    .event-card:hover,
    .hero-btn:hover {
        transform: none !important;
    }
}
