:root {
    --sc-black: #000000;
    --sc-green-dark: #04140d;
    --sc-green-mid: #0c2c1d;
    --sc-green: #0f4a30;
    --sc-accent: #33cc7a;
    --sc-accent-hover: #2ab369;
    --sc-white: #ffffff;
    --sc-cream: #fdfdfb;
    --sc-text-soft: #c9d6cf;
    --sc-text-dark: #4a4a4a;
    --sc-text-heading: #1a1a1a;
}

/* Tipografía: AvenirNext (marca del proyecto) con Poppins como fallback web,
   ya que AvenirNext no está disponible vía Google Fonts (fuente de pago,
   viene preinstalada en macOS/iOS). Si en algún momento se dispone de los
   ficheros .woff2 con licencia, añadir aquí @font-face y este stack los
   recogerá automáticamente sin tocar el resto del CSS. */
:root {
    --font-base: 'Avenir Next', 'Avenir Next LT Pro', 'AvenirNext', 'Poppins', Arial, sans-serif;
}

/* Todo el tipo de letra del sitio está en rem, así que este único valor
   escala el conjunto: 16px * 1.75 = 28px. */
html {
    font-size: 14px;
}

html, body {
    width: 100%;
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-base);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--sc-text-dark);
    background: var(--sc-green-dark);
}

h1, h2, h3 {
    font-family: var(--font-base);
    font-weight: 300;
    margin: 0;
}

strong, b {
    font-weight: 600;
}

a {
    color: var(--sc-accent);
    text-decoration: none;
}

/* El recuadro negro que se ve un instante al hacer click (antes de navegar)
   es el outline de foco de Bootstrap (a:focus { outline: 5px auto ...}),
   que por especificidad gana a un simple "a { outline: none }". Igualamos
   la especificidad (a:focus) para poder ganar por orden de carga: quitamos
   el outline en click de ratón, pero lo mantenemos (con el verde de marca)
   para navegación por teclado, que sí lo necesita por accesibilidad. */
a:focus, button:focus {
    outline: none;
}

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--sc-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--sc-white);
    position: relative;
    z-index: 20;
}
.subheading{
    color:white;
}
.header-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    height: 65px;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 34px;
    font-size: 0.92rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-nav a {
    color: #3a3a3a;
    text-decoration: none;
}

.main-nav a:hover {
    color: var(--sc-accent);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 20px;
    margin-left: 6px;
    border-left: 1px solid rgba(58, 58, 58, 0.2);
}

.lang-switch a {
    color: #9aa39d;
    font-weight: 600;
}

.lang-switch a.is-active {
    color: var(--sc-text-heading);
}

.lang-switch a:hover {
    color: var(--sc-accent);
}

.lang-sep {
    color: rgba(58, 58, 58, 0.3);
}

/* Botón hamburguesa: oculto en escritorio, solo visible en móvil. */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 20;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--sc-text-heading);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Fondo con foto + retícula (compartido por las 3 cabeceras) ---------- */
.page-banner {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    background: var(--sc-green-dark) center / cover no-repeat;
    padding: 70px 30px 60px;
}

.page-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 20, 13, 0.35) 0%, rgba(4, 20, 13, 0.65) 55%, rgba(4, 20, 13, 0.95) 100%);
    z-index: 0;
}

.page-banner-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Inicio: el hero y la sección "Manifiesto" comparten un único fondo
   continuo (hero-bg-inicio.jpg, 1920x2520 para tener recorrido de sobra)
   — no hay una sección aparte con color plano debajo, todo es la misma
   imagen hasta que empieza el bloque negro de "Los tres pilares". */
.banner-inicio {
    background-image: url(../images/hero-bg-inicio.jpg);
    background-position: center top;
    padding-top: 90px;
    padding-bottom: 80px;
}

/* La propia foto ya trae una banda oscura a la izquierda; reforzamos ese
   lado (donde se apoya el titular) en vez de oscurecer también el verde
   vivo de la derecha con el degradado vertical genérico. Se limita a la
   altura del titular: el resto de la imagen (detrás del Manifiesto) se ve
   sin oscurecer. */
.banner-inicio::before {
    top: 0;
    bottom: auto;
    height: 620px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 32%, rgba(0, 0, 0, 0.12) 55%, transparent 72%);
}

/* Funde el final de la foto con el negro de "Los tres pilares" que viene
   justo después, para que no haya un corte brusco entre secciones. */
.banner-inicio::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 320px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 55%, #000000 100%);
    z-index: 0;
    pointer-events: none;
}

/* Noticias y Portal reutilizan la misma foto que Inicio, para que las 3
   páginas compartan un único fondo consistente en todo el sitio. */
/* El título y el listado de noticias van dentro del mismo .page-banner
   (ver Noticias.cshtml): un único fondo continuo para toda la página, sin
   corte entre la cabecera y el cuerpo — igual que Inicio con el Manifiesto. */
.banner-noticias {
    background-image: url(../images/hero-bg-inicio.jpg);
    background-position: center top;
    padding-bottom: 70px;
}

.banner-portal {
    background-image: url(../images/hero-bg-inicio.jpg);
    background-position: center top;
    min-height: 1000px;
}

/* Overlay de nodos: SVG inline (recreación de red-ia-global.png), anclado a
   la franja del titular (no a toda la sección, que ahora es mucho más alta
   por incluir también el Manifiesto). */
.node-overlay {
    position: absolute;
    top: 20px;
    right: 0;
    width: 40%;
    height: auto;
    max-height: 440px;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.node-lines line {
    stroke: rgba(255, 255, 255, 0.32);
    stroke-width: 1;
}

.node-ring {
    fill: none;
    stroke: #ffffff;
    stroke-width: 3;
}

.node-core {
    fill: #ffffff;
}

.node-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: node-pulse 3.2s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}

@keyframes node-pulse {
    0%, 100% { opacity: 0.6; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .node-dot {
        animation: none;
    }
}

/* ---------- Hero de Inicio: titular ---------- */
.hero-inner {
    max-width: 620px;
    margin-bottom: 120px;
}

.hero-inner h1 {
    color: var(--sc-white);
    font-size: 3.4rem;
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 22px;
}

.hero-inner p {
    color: #dfe9e4;
    font-weight: 300;
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0;
}

/* ---------- Cabeceras de página (Noticias / Portal) ---------- */
.page-banner-title h1 {
    color: var(--sc-white);
    font-size: 3rem;
    font-weight: 300;
}

/* ---------- Sección Manifiesto (Inicio) ---------- */
/* Ya vive dentro de .page-banner-inner (mismo fondo continuo que el hero),
   así que aquí solo se define la rejilla, sin max-width/fondo propios. Las
   dos columnas van desalineadas verticalmente, como en la maqueta: la de
   la izquierda empieza arriba del todo, la de la ciudad más abajo. */
.manifiesto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-bottom: 50px;
}

.manifiesto-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.manifiesto-photo {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
}

.manifiesto-card {
    background: var(--sc-cream);
    padding: 34px 38px 38px;
    border-radius: 0 0 4px 4px;
}

.manifiesto-label {
    display: block;
    color: var(--sc-accent-hover);
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.manifiesto-card h3 {
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--sc-text-heading);
    margin-bottom: 18px;
}

.manifiesto-card p {
    font-size: 1rem;
    color: #55524d;
    margin: 0 0 16px;
}

.manifiesto-card p:last-child {
    margin-bottom: 0;
}

.eficiencia-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    min-height: 610px;
    margin-top: 150px;
}

.eficiencia-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eficiencia-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 26px 30px;
    background: linear-gradient(0deg, rgba(4, 20, 13, 0.85) 30%, transparent 100%);
}

.eficiencia-badge {
    flex: none;
    width: 65px;
    height: 65px;
    display: block;
    object-fit: contain;
}

.eficiencia-overlay ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eficiencia-overlay li {
    color: var(--sc-accent);
    font-weight: 600;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

/* ---------- Los tres pilares (fondo negro) ---------- */
.pilares {
    background: var(--sc-black);
    padding: 70px 30px 90px;
}

.pilares-title {
    text-align: center;
    color: var(--sc-white);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 60px;
}

.pilares-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.pilar {
    text-align: center;
}

.pilar-num {
    display: block;
    width: 65px;
    height: 65px;
    margin: 0 auto 22px;
    object-fit: contain;
}

.pilar h3 {
    color: var(--sc-white);
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.pilar p {
    color: #cfd8d3;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
}

/* ---------- Noticias y Análisis ---------- */
/* Ya vive dentro de .page-banner-inner (mismo fondo que el título), así
   que aquí solo queda el espaciado respecto a la cabecera. */
.noticias-body {
    padding-top: 50px;
}

.noticias-intro {
    color: var(--sc-white);
    font-family: var(--font-base);
    font-weight: 300;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.noticia-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(51, 204, 122, 0.35);
    border-radius: 6px;
    padding: 34px 40px;
    margin-bottom: 26px;
}

.noticia-cat {
    display: block;
    color: var(--sc-accent);
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.noticia-card h3 {
    color: var(--sc-white);
    font-weight: 500;
    font-size: 1.35rem;
    margin-bottom: 18px;
}

.noticia-card p {
    color: var(--sc-text-soft);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0 0 6px;
}

.noticia-source {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 0.9rem;
    font-weight: 500;
}

.noticia-source .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sc-accent);
}

.noticia-source svg {
    color: var(--sc-accent);
}

/* ---------- Portal de Coordinación ---------- */
.portal-panel {
    max-width: 1030px;
    margin: 40px auto 0;
    background: rgba(4, 20, 13, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 50px 60px 60px;
    text-align: center;
}

.portal-shield {
    color: var(--sc-accent);
    margin-bottom: 18px;
}

.portal-panel h2 {
    color: var(--sc-white);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.portal-panel .portal-subtitle {
    color: var(--sc-white);
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 1.2rem;
    max-width: 620px;
    margin: 0 auto;
}

.portal-form-card {
    background: var(--sc-white);
    border-radius: 10px;
    max-width: 640px;
    margin: 34px auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-form-card input {
    width: 100%;
    box-sizing: border-box;
    height: 60px;
    border: none;
    border-radius: 6px;
    background: var(--sc-green);
    color: var(--sc-white);
    text-align: center;
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0 16px;
}

.portal-form-card input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.portal-submit {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 6px;
    background: var(--sc-black);
    color: var(--sc-white);
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.portal-submit:hover {
    background: #1a1a1a;
}

.portal-denied {
    display: none;
    color: #ff8a80;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: -18px auto 24px;
}

.portal-denied.is-visible {
    display: block;
}

.portal-notice h3 {
    color: var(--sc-white);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 10px;
}

.portal-notice p {
    color: var(--sc-text-soft);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--sc-black);
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 26px 30px;
    text-align: center;
}

.footer-copy {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
    font-style: italic;
    color: #cfd8d3;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .manifiesto {
        grid-template-columns: 1fr;
    }

    .pilares-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .banner-inicio {
        min-height: 460px;
    }

    .hero-inner h1 {
        font-size: 2.4rem;
    }

    .node-overlay {
        display: none;
    }

    .portal-panel {
        padding: 40px 24px 46px;
    }
}

@media (max-width: 600px) {
    .eficiencia-card {
        margin-top:0px;
    }
    .header-inner {
        position: relative;
    }

    .menu-toggle {
        display: flex;
    }

    .lang-switch {
        padding-left: 0;
        margin-left: 0;
        border-left: none;
        padding-top: 14px;
        border-top: 1px solid rgba(58, 58, 58, 0.15);
        width: 100%;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        margin: 0;
        padding: 22px 30px 28px;
        background: var(--sc-white);
        box-shadow: 0 18px 30px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }

    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .noticia-card {
        padding: 26px 22px;
    }
}

/* ---------- Artículo largo (p. ej. Ecosistemas Corporativos Resilientes) ---------- */
.articulo-body {
    padding-top: 50px;
    padding-bottom: 20px;
}

.articulo-intro {
    color: var(--sc-text-soft);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 900px;
    margin: 0 0 40px;
}

.articulo-quote {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--sc-accent);
    border-radius: 4px;
    padding: 30px 40px;
    margin: 0 0 46px;
}

.articulo-quote p {
    color: var(--sc-white);
    font-family: var(--font-base);
    font-weight: 300;
    font-size: 1.4rem;
    line-height: 1.5;
    font-style: italic;
    margin: 0 0 14px;
}

.articulo-quote cite {
    display: block;
    color: var(--sc-accent);
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.articulo-section {
    max-width: 900px;
    margin: 0 0 46px;
}

.articulo-section h2 {
    color: var(--sc-white);
    font-weight: 500;
    font-size: 1.7rem;
    margin-bottom: 20px;
}

.articulo-section p {
    color: var(--sc-text-soft);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 18px;
}

.articulo-list {
    list-style: none;
    counter-reset: articulo-list;
    margin: 26px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.articulo-list li {
    counter-increment: articulo-list;
    position: relative;
    padding-left: 46px;
    color: var(--sc-text-soft);
    font-size: 1rem;
    line-height: 1.6;
}

.articulo-list li::before {
    content: counter(articulo-list);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--sc-accent);
    color: var(--sc-accent);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.articulo-list strong {
    color: var(--sc-white);
}

/* ---------- /hack: minijuego de cámaras de seguridad ---------- */
.hack-body {
    background: radial-gradient(ellipse at top, #0f3d27 0%, var(--sc-green-dark) 55%, var(--sc-black) 100%);
}

.hack-page {
    padding: 70px 20px 90px;
}

.hack-container {
    max-width: 760px;
    margin: 0 auto;
    background: rgba(4, 20, 13, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 40px 36px 46px;
    text-align: center;
}

.hack-shield {
    color: var(--sc-accent);
    margin-bottom: 10px;
}

.hack-title {
    color: var(--sc-white);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 1.2rem;
    margin: 0 0 26px;
}

/* Monitor: el feed panorámico es el elemento dominante de la pantalla, por
   eso ocupa la columna ancha (la lateral con la foto estática + el panel de
   sala se estira para igualar su altura, no al revés) y se muestra con su
   propio aspect ratio, sin recortar ni forzar barras negras. */
.hack-monitor-card {
    background: var(--sc-white);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
}

.hack-monitor-side {
    flex: 0 0 190px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hack-feed {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #000000;
}

.hack-feed img {
    width: 100%;
    height: auto;
    display: block;
}

.hack-feed-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    pointer-events: none;
}

.hack-feed::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0px, rgba(0, 0, 0, 0.18) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
}

.hack-feed-signal {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(51, 204, 122, 0.35);
    border: 2px solid var(--sc-accent);
    animation: hack-signal-pulse 1.8s ease-in-out infinite;
    z-index: 1;
}

.hack-feed-signal.is-hidden {
    display: none;
}

@keyframes hack-signal-pulse {
    0%, 100% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
}

.hack-camera-photo {
    flex: 1;
    background: #eef1ef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.hack-camera-photo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hack-room-info {
    flex: 1;
    background: #f5f6f5;
    border-radius: 6px;
    padding: 12px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hack-room-label {
    display: block;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--sc-text-heading);
    font-size: 0.95rem;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.hack-room-status {
    display: block;
    color: #7a7a7a;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hack-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.hack-toggle img {
    height: 26px;
    width: auto;
}

.hack-alert {
    display: none;
    margin: 14px 0 0;
    color: #ff8a80;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-align: center;
}

.hack-alert.is-visible {
    display: block;
}

/* Mapa: una única imagen de fondo (floorplan.svg) con los "hotspots"
   clicables posicionados encima en las coordenadas exactas de cada sala —
   igual técnica que circuito.png + <area> del juego original, pero con
   botones posicionados (mejor soporte de :hover que un <area> de verdad). */
.hack-floorplan-wrap {
    position: relative;
    margin-top: 22px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    overflow: hidden;
    line-height: 0;
}

.hack-floorplan-bg {
    display: block;
    width: 100%;
    height: auto;
}

.hack-hotspot {
    position: absolute;
    background: transparent;
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.hack-hotspot:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hack-hotspot.is-goal {
    background: rgba(245, 179, 1, 0.22);
}

.hack-hotspot.is-goal:hover {
    background: rgba(245, 179, 1, 0.32);
}

.hack-goal-flag {
    position: absolute;
    top: 2px;
    right: 3px;
    color: #f5b301;
    font-size: 0.7rem;
    line-height: 1;
}

.hack-hotspot.is-selected {
    border-color: #e6362b;
    border-style: solid;
    z-index: 1;
}

.hack-room-icon {
    position: relative;
}

.hack-room-dot {
    position: absolute;
    top: -6px;
    left: -8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.hack-room-dot.is-active {
    background: var(--sc-accent);
}

.hack-room-dot.is-inactive {
    background: #e6362b;
}

.hack-notice {
    margin-top: 22px;
}

.hack-notice-title {
    color: var(--sc-white);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin: 0 0 6px;
}

.hack-notice-text {
    color: var(--sc-text-soft);
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
}

.hack-verify {
    margin-top: 24px;
    border: none;
    border-radius: 6px;
    background: var(--sc-accent);
    color: var(--sc-black);
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 34px;
    cursor: pointer;
}

.hack-verify:hover {
    background: var(--sc-accent-hover);
}

/* ---------- Pasos: login -> juego -> pantalla final ---------- */
.hack-step {
    display: none;
}

.hack-step.is-active {
    display: block;
}

.hack-login-card,
.hack-final-card {
    max-width: 380px;
    margin: 0 auto;
    background: rgba(4, 20, 13, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 40px 36px 46px;
    text-align: center;
}

.hack-login-subtitle {
    color: var(--sc-text-soft);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0 0 28px;
}

.hack-login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.hack-login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hack-login-field span {
    color: var(--sc-white);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hack-login-field input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 12px 14px;
    color: var(--sc-white);
    font-family: var(--font-base);
    font-size: 0.95rem;
}

.hack-login-field input:focus {
    outline: none;
    border-color: var(--sc-accent);
}

.hack-login-error {
    display: none;
    color: #ff8a80;
    font-weight: 600;
    font-size: 0.78rem;
    margin: 0;
}

.hack-login-error.is-visible {
    display: block;
}

.hack-login-form .hack-verify {
    align-self: center;
}

.hack-final-card {
    max-width: 460px;
    border-color: rgba(51, 204, 122, 0.4);
}

.hack-final-check {
    color: var(--sc-accent);
}

.hack-final-text {
    color: var(--sc-text-soft);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 600px) {
    .hack-container {
        padding: 30px 18px 38px;
    }

    .hack-monitor-card {
        flex-direction: column;
    }

    .hack-monitor-side {
        flex: 0 0 auto;
        width: 100%;
        flex-direction: row;
    }
}
