/* ===========================================================
   ENDURO NALÓN — REDISEÑO DE PORTADA / FASE 1
   Independiente del CSS original: estilo.css y chat.css siguen.
   Imagen de fondo utilizada en el proyecto:
   imagen/img.jpg
   =========================================================== */

:root {
  --en-bg: #111714;
  --en-surface: #1c2420;
  --en-surface-2: #232e27;
  --en-text: #f5f7f2;
  --en-muted: #bac5b9;
  --en-accent: #dfff45;
  --en-border: rgba(233, 241, 228, .14);
}

html { scroll-behavior: smooth; }
body { margin: 0; }
.en-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.en-header, .en-header *, .en-hero, .en-hero *,
.en-section, .en-section *, .en-join, .en-join *,
.en-footer, .en-footer * { box-sizing: border-box; }
.en-header a, .en-hero a, .en-section a, .en-footer a { text-decoration: none; }
.en-header button, .en-join button { cursor: pointer; }

/* Cabecera */
.en-header {
  position: relative;
  z-index: 50;
  min-height: 76px;
  padding: 12px clamp(18px, 5vw, 72px);
  display: flex;
  align-items: center;
  gap: 30px;
  background: #111714;
  border-bottom: 1px solid var(--en-border);
  color: var(--en-text);
}
.en-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  color: var(--en-text);
}
.en-brand__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--en-accent);
  color: #182019;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -.5px;
}
.en-brand__name { font-weight: 850; font-size: 17px; letter-spacing: .5px; white-space: nowrap; }
.en-brand__name strong { color: var(--en-accent); }
.en-nav { display: flex; align-items: center; justify-content: center; flex: 1; gap: clamp(12px, 2.5vw, 34px); }
.en-nav a { color: #dfe8dc; font-size: 14px; font-weight: 600; }
.en-nav a:hover, .en-nav a:focus-visible { color: var(--en-accent); }

/* El contenedor de auth deja de ocupar una barra propia: ahora va en el header.
   Los botones .auth-btn y .logout-btn mantienen sus clases originales. */
.en-header #authTopbar {
  position: static;
  inset: auto;
  transform: none;
  width: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  background: transparent;
  box-shadow: none;
}
.en-header #authTopbar .user-menu { display: flex; align-items: center; gap: 8px; }
.en-header #authTopbar .auth-btn,
.en-header #authTopbar .logout-btn {
  max-width: 180px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--en-border);
  background: #26332a;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.en-header #authTopbar .auth-btn:hover { background: #354837; }
.en-header #authTopbar .logout-btn { color: var(--en-accent); background: transparent; }
.en-header #authTopbar .logout-btn:hover { background: #2c342e; }
/* El diálogo existente debe quedar por encima de la cabecera. No se cambia su display. */
#authModal { z-index: 1000; }
.en-menu-toggle { display: none; }

/* Hero original. Las reglas finales adaptan la imagen a PC y móvil. */
.en-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 76vh, 850px);
  overflow: hidden;
  padding: 90px clamp(22px, 8vw, 128px) 110px;
  background-color: #1d2c21;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .40), rgba(0, 0, 0, .08)),
    url('../imagen/img.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
}
.en-hero__content { position: relative; z-index: 1; max-width: 810px; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.en-hero__eyebrow, .en-kicker {
  margin: 0 0 21px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 2.1px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--en-accent);
}
.en-hero h1 {
  margin: 0;
  font-size: clamp(55px, 8vw, 112px);
  font-weight: 900;
  line-height: .97;
  letter-spacing: -.055em;
  color: var(--en-text);
  text-transform: uppercase;
}
.en-hero h1 span { color: var(--en-accent); }
.en-hero__subtitle {
  margin: 25px 0 10px;
  color: #fff;
  font-weight: 650;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.4;
}
.en-hero__intro { max-width: 540px; margin: 0 0 34px; color: #c9d4c9; font-size: 16px; line-height: 1.7; }
.en-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.en-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 49px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: .1px;
  cursor: pointer;
  text-align: center;
  transition: transform .18s, background-color .18s, color .18s;
}
.en-btn:hover { transform: translateY(-2px); }
.en-btn--primary { color: #111714; background: var(--en-accent); }
.en-btn--primary:hover { background: #ecff83; color: #111714; }
.en-btn--outline { color: #fff; background: rgba(0, 0, 0, .12); border-color: #d0d9cf; }
.en-btn--outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.en-hero__scroll {
  position: absolute;
  bottom: 32px;
  left: clamp(22px, 8vw, 128px);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #d6ded4;
  font-size: 20px;
  font-weight: 700;
}
.en-hero__scroll span { font-size: 11px; letter-spacing: 1.7px; }

/* Taller */
.en-section { padding: 92px clamp(20px, 6vw, 100px); background: var(--en-bg); color: var(--en-text); }
.en-section__heading { max-width: 660px; margin-bottom: 34px; }
.en-section h2, .en-join h2 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; font-weight: 850; letter-spacing: -.035em; color: #fff; }
.en-section__heading > p:last-child, .en-community__copy > p:not(.en-kicker) { color: var(--en-muted); line-height: 1.7; font-size: 16px; }
.en-tools__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.en-tool-card {
  display: flex;
  align-items: flex-start;
  gap: 19px;
  min-height: 160px;
  padding: 26px;
  border: 1px solid var(--en-border);
  border-radius: 12px;
  background: var(--en-surface);
  color: #fff;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.en-tool-card:hover, .en-tool-card:focus-visible { border-color: var(--en-accent); background: var(--en-surface-2); transform: translateY(-3px); }
.en-tool-card__symbol {
  display: grid;
  place-items: center;
  flex: 0 0 47px;
  height: 47px;
  border-radius: 9px;
  background: rgba(223, 255, 69, .13);
  color: var(--en-accent);
  font-weight: 900;
  font-size: 20px;
}
.en-tool-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; min-width: 0; }
.en-tool-card__body strong { color: #fff; font-weight: 800; font-size: 18px; }
.en-tool-card__body > span { color: var(--en-muted); font-size: 14px; line-height: 1.6; }
.en-tool-card__arrow { color: var(--en-accent); font-size: 22px; line-height: 1; }

/* Foro */
.en-community {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  background: #1b2520;
  border-top: 1px solid var(--en-border);
  border-bottom: 1px solid var(--en-border);
}
.en-community__copy { max-width: 640px; }
.en-community__copy > p:not(.en-kicker) { margin: 0 0 25px; }
.en-community__motif { color: rgba(223, 255, 69, .16); font-size: clamp(60px, 12vw, 160px); line-height: .85; font-weight: 900; letter-spacing: -.09em; user-select: none; }
.en-community__motif span { display: block; }

/* Registro y footer */
.en-join { padding: 90px 24px; text-align: center; background: #111714; color: white; }
.en-join p:not(.en-kicker) { max-width: 550px; margin: 0 auto 28px; line-height: 1.6; color: var(--en-muted); }
.en-footer { color: #cbd5ca; background: #0b100d; border-top: 1px solid var(--en-border); }
.en-footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 45px clamp(20px, 6vw, 100px) 30px;
}
.en-footer__inner strong { color: #fff; font-size: 18px; font-weight: 900; }
.en-footer__inner p { color: var(--en-muted); font-size: 14px; }
.en-footer__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 13px 20px; max-width: 610px; }
.en-footer__links a { color: #d9e4d7; font-size: 14px; }
.en-footer__links a:hover { color: var(--en-accent); }
.en-footer__bottom { margin: 0 clamp(20px, 6vw, 100px); padding: 22px 0; border-top: 1px solid var(--en-border); font-size: 13px; color: #9dac9a; }

@media (max-width: 1050px) {
  .en-header { gap: 14px; }
  .en-nav { gap: 14px; }
  .en-community__motif { display: none; }
}
@media (max-width: 800px) {
  .en-header { min-height: 66px; gap: 12px; padding: 10px 16px; }
  .en-brand__name { font-size: 14px; }
  .en-brand__icon { height: 37px; width: 37px; }
  .en-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    padding: 9px;
    width: 41px;
    height: 41px;
    border: 1px solid var(--en-border);
    border-radius: 6px;
    background: transparent;
  }
  .en-menu-toggle span { width: 100%; height: 2px; border-radius: 1px; background: #fff; }
  .en-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #17211a;
    border-bottom: 1px solid var(--en-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
  }
  .en-nav--open { display: flex; }
  .en-nav a { padding: 13px 10px; }
  .en-header #authTopbar { margin-left: 0; }
  .en-header #authTopbar .auth-btn, .en-header #authTopbar .logout-btn { max-width: 115px; padding: 9px 8px; font-size: 12px; }
  .en-hero { min-height: 590px; padding: 70px 24px 100px; background-position: 62% center; }
  .en-hero__scroll { left: 24px; }
  .en-tools__grid { grid-template-columns: 1fr; }
  .en-community { padding-top: 70px; padding-bottom: 70px; }
  .en-footer__inner { flex-direction: column; }
  .en-footer__links { justify-content: flex-start; }
}
@media (max-width: 460px) {
  .en-header { gap: 7px; padding: 10px 12px; }
  .en-brand { gap: 7px; }
  .en-brand__name { font-size: 12px; letter-spacing: -.2px; }
  .en-brand__icon { width: 31px; height: 34px; font-size: 13px; }
  .en-menu-toggle { width: 36px; height: 36px; padding: 8px; }
  .en-header #authTopbar .auth-btn, .en-header #authTopbar .logout-btn { max-width: 87px; padding: 8px 5px; font-size: 11px; }
  .en-header #authTopbar .user-menu { gap: 3px; }
  .en-hero { padding: 70px 19px 100px; }
  .en-hero h1 { font-size: clamp(44px, 12.4vw, 59px); }
  .en-hero__actions { flex-direction: column; }
  .en-hero__actions .en-btn { width: 100%; }
  .en-hero__scroll { left: 19px; }
  .en-tool-card { min-height: 136px; padding: 21px 15px; gap: 11px; }
  .en-tool-card__symbol { flex-basis: 40px; height: 40px; font-size: 17px; }
  .en-tool-card__body strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .en-btn, .en-tool-card { transition: none; }
}



/* ============================================================
   FASE 1.2 — FONDO LEGIBLE, LOGO VISIBLE EN MÓVIL
   Un único archivo CSS para añadir junto a estilo.css/chat.css.
   Imagen existente: imagen/img.jpg (sin cambiar la ruta).
   ============================================================ */

/* El CSS original puede conservar el fondo antiguo con repeat.
   Forzamos una sola imagen de fondo y quitamos la franja superior. */
html {
  background: #101411;
}
body {
  margin: 0 !important;
  padding-top: 0 !important;
  min-width: 0;
  min-height: 100vh;
  background-color: #101411 !important;
  background-image: url('../imagen/img.jpg') !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}
main#inicio { background: transparent !important; }

/* Una imagen, no una imagen sobre otra. La foto está en el body;
   el hero solo oscurece localmente la zona donde hay texto. */
.en-hero {
  background: linear-gradient(90deg,
    rgba(6, 10, 8, .22) 0%,
    rgba(6, 10, 8, .12) 55%,
    rgba(6, 10, 8, .02) 100%) !important;
}
.en-hero__content {
  max-width: 490px;
  padding: clamp(18px, 2.4vw, 28px);
  background: rgba(5, 9, 7, .43);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 15px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  text-shadow: 0 2px 7px rgba(0, 0, 0, .8);
}
@media (min-width: 801px) {
  /* No cubrir el centro del emblema en PC con un titular enorme. */
  .en-hero h1 { font-size: clamp(54px, 5.25vw, 77px); }
  .en-hero { padding-left: clamp(22px, 4.5vw, 90px); }
}
.en-hero__intro { color: #f0f4ee; }
.en-hero__subtitle { color: #fff; }

/* Texto siempre encima del fondo con contraste comprobable.
   No oscurecemos toda la fotografía para ello. */
.en-header, .en-section, .en-community, .en-join, .en-footer,
.en-tool-card { -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.en-header { background: rgba(8, 14, 11, .82); }
.en-section { background: rgba(7, 13, 10, .72); }
.en-community { background: rgba(9, 16, 12, .77); }
.en-join { background: rgba(7, 12, 9, .79); }
.en-footer { background: rgba(6, 10, 8, .88); }
.en-tool-card { background: rgba(17, 25, 19, .80); }
.en-tool-card:hover, .en-tool-card:focus-visible { background: rgba(32, 48, 34, .92); }
.en-section__heading > p:last-child,
.en-community__copy > p:not(.en-kicker),
.en-join p:not(.en-kicker),
.en-tool-card__body > span,
.en-footer__inner p,
.en-footer__bottom { color: #e1e9dd; }
.en-nav a, .en-footer__links a { color: #f1f6ee; }
.en-btn--outline { background: rgba(4, 8, 6, .62); border-color: #f0f5ee; }

.en-btn:focus-visible, .en-tool-card:focus-visible,
.en-nav a:focus-visible, .en-menu-toggle:focus-visible,
.en-header button:focus-visible {
  outline: 3px solid #dfff45;
  outline-offset: 3px;
}

/* Móviles y tabletas verticales: el banner muestra el logo completo,
   el texto se coloca DEBAJO y no tapa la ilustración del club. */
@media (max-width: 800px) {
  body {
    /* background-attachment:fixed no se comporta igual en todos
       los navegadores móviles. Evitamos el recorte y el 'salto'. */
    background-image: linear-gradient(170deg, #111713 0%, #161a15 58%, #0c110e 100%) !important;
    background-position: center top !important;
    background-size: cover !important;
    background-attachment: scroll !important;
  }
  .en-header {
    background: rgba(8, 14, 11, .96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .en-nav { background: rgba(10, 19, 13, .98); }
  .en-nav a { min-height: 44px; display: flex; align-items: center; font-size: 16px; }
  .en-hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 0;
    overflow: visible;
    padding: 0 0 28px;
    background: linear-gradient(180deg, #101411, #19201a) !important;
  }
  .en-hero::before {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 100%;
    height: clamp(240px, 74vw, 385px);
    background-color: #17100f;
    background-image: url('../imagen/img.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto 100%;
  }
  .en-hero__content {
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 650px;
    margin: -8px auto 0;
    padding: 25px clamp(16px, 4vw, 29px);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(8, 13, 10, .91);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    text-shadow: none;
  }
  .en-hero__eyebrow, .en-kicker {
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: 1.15px;
  }
  .en-hero__eyebrow { margin-bottom: 13px; }
  .en-hero h1 {
    font-size: clamp(38px, 8.6vw, 64px);
    line-height: 1.07;
    letter-spacing: -.035em;
    overflow-wrap: break-word;
  }
  .en-hero__subtitle {
    margin: 16px 0 10px;
    font-size: clamp(18px, 4vw, 21px);
    line-height: 1.45;
  }
  .en-hero__intro {
    margin-bottom: 23px;
    font-size: 15.5px;
    line-height: 1.6;
    color: #eef5ea;
  }
  .en-hero__scroll {
    position: static;
    display: inline-flex;
    align-self: center;
    margin: 22px 0 0;
    font-size: 19px;
    color: #f2f5f0;
  }
  .en-section { padding: 58px 18px; background: rgba(7, 13, 10, .92); }
  .en-community { padding-top: 58px; padding-bottom: 58px; background: rgba(11, 22, 14, .94); }
  .en-join { padding: 60px 18px; background: rgba(7, 12, 9, .94); }
  .en-footer { background: rgba(6, 10, 8, .97); }
  .en-footer__inner { padding: 35px 20px 26px; }
  .en-tool-card {
    background: rgba(25, 35, 27, .96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .en-tool-card__body > span { color: #e2ebe1; }
  .en-tool-card__body strong { line-height: 1.35; }
  .en-section h2, .en-join h2 { line-height: 1.2; }
}

@media (max-width: 460px) {
  /* Cabecera en dos filas: login y salir son legibles en móviles
     y nunca quedan estrujados entre el logo y el menú. */
  .en-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "marca menu" "acceso acceso";
    min-height: 0;
    gap: 8px 12px;
    padding: 10px 14px;
  }
  .en-brand { grid-area: marca; min-width: 0; }
  .en-brand__name { display: inline; font-size: 14px; }
  .en-menu-toggle {
    grid-area: menu;
    display: flex;
    width: 44px;
    height: 44px;
    margin-left: 0;
  }
  .en-header #authTopbar {
    grid-area: acceso;
    width: 100%;
    justify-content: flex-end;
    min-height: 44px;
  }
  .en-header #authTopbar .auth-btn,
  .en-header #authTopbar .logout-btn {
    min-height: 44px;
    max-width: min(42vw, 160px);
    padding: 10px 13px;
    font-size: 14px;
  }
  .en-header #authTopbar .user-menu { gap: 9px; }
  .en-hero__actions { flex-direction: column; }
  .en-hero__actions .en-btn { width: 100%; min-height: 48px; }
  .en-tools__grid { gap: 13px; }
  .en-tool-card { padding: 18px 14px; gap: 12px; }
  .en-tool-card__body strong { font-size: 16px; }
  .en-footer__links { gap: 12px 17px; }
}

@media (max-width: 380px) {
  .en-brand__name { font-size: 13px; }
  .en-hero h1 { font-size: clamp(36px, 11vw, 42px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .en-btn, .en-tool-card { transition: none; }
}
