/* Reset suave + utilidades */
:root {
  --ai-bg: #07090f;
  --ai-bg-2: #0b1020;
  --ai-fg: rgba(255,255,255,0.92);

  /* Matrix green */
  --ai-accent: #00ff80;
  --ai-accent-2: rgba(0,255,128,0.18);
  --ai-muted: rgba(255,255,255,0.68);

  --ai-radius: 14px;
  --ai-radius-lg: 24px;

  --ai-border: rgba(255,255,255,0.14);
  --ai-panel: rgba(255,255,255,0.05);
  --ai-panel-2: rgba(255,255,255,0.08);

  --ai-shadow: 0 20px 50px rgba(0,0,0,0.55);
  --ai-shadow-soft: 0 14px 28px rgba(0,0,0,0.35);

  /* Variables del header (Customizer vía inline-style) */
  --lyra-menu-bg: #000000;
  --lyra-menu-color: #ffffff;
  --lyra-menu-height: 70px;
}

/* =========================================================
   BASE GLOBAL (theme-ai está en BODY)
   ========================================================= */
html {
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html, body { overflow-x: hidden; }

body.theme-ai {
  padding: 0;
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;

  /* Futuristic background */
  background:
    radial-gradient(1200px 600px at 18% 0%, rgba(0,255,128,0.12), transparent 60%),
    radial-gradient(900px 450px at 85% 10%, rgba(0,255,128,0.10), transparent 55%),
    linear-gradient(180deg, var(--ai-bg), var(--ai-bg-2));
  color: var(--ai-fg);
  letter-spacing: 0.2px;
}

/* Quitar todo borde o relleno exterior */
body.theme-ai #page,
body.theme-ai #content,
body.theme-ai .site {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Images */
body.theme-ai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   LINKS (WordPress reviewers: content links must be underlined)
   ========================================================= */
body.theme-ai a {
  color: var(--ai-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
body.theme-ai a:hover {
  opacity: 0.92;
  text-decoration: underline;
}

/* =========================================================
   HEADER
   (mantengo estructura; cambio estilo visual)
   ========================================================= */
body.theme-ai .site-header {
  background: var(--lyra-menu-bg, #000);
  color: var(--lyra-menu-color, #fff);
  margin: 0;
  padding: 0;
  border: none;
  width: 100%;

  border-bottom: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}

body.theme-ai .site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* logo izq / nav der */
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--lyra-menu-height, 70px);
}

/* Branding a la izquierda (logo / título) */
body.theme-ai .site-branding {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Si hay custom logo */
body.theme-ai .custom-logo-link {
  display: inline-flex;
  align-items: center;
}
body.theme-ai .custom-logo-link img {
  max-height: calc(var(--lyra-menu-height, 70px) - 20px);
  width: auto;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0,255,128,0.15));
}

/* Si NO hay logo: el título */
body.theme-ai .site-title {
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--lyra-menu-color, #fff);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.4px;
}

/* Navegación a la derecha */
body.theme-ai .main-navigation {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

/* Menú principal horizontal (SOLO primer nivel) */
body.theme-ai .main-navigation > .menu {
  display: flex;
  align-items: center;
  gap: 10px; /* más compacto */
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Items del primer nivel */
body.theme-ai .main-navigation > .menu > li {
  margin: 0;
  padding: 0;
  position: relative; /* necesario para dropdown */
}

/* Links (pills futuristas) */
body.theme-ai .main-navigation a {
  color: var(--lyra-menu-color, #fff);
  text-decoration: none; /* nav links no obligatoriamente subrayados */
  line-height: 1;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.2s ease;
}

body.theme-ai .main-navigation a:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(0,255,128,0.22);
}

/* =========================================================
   DROPDOWN (sub-menu) — visible + estilo panel
   ========================================================= */
body.theme-ai .main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 9999;
  min-width: 240px;
  list-style: none;
  margin: 0;
  padding: 10px;
  background: rgba(10,14,28,0.94);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  box-shadow: var(--ai-shadow);
}

body.theme-ai .main-navigation .sub-menu li {
  margin: 0;
  padding: 0;
}

body.theme-ai .main-navigation .sub-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--lyra-menu-color, #fff);
  text-decoration: none;
  white-space: normal;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

body.theme-ai .main-navigation .sub-menu a:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(0,255,128,0.22);
}

/* Mostrar dropdown al hover / foco */
body.theme-ai .main-navigation li:hover > .sub-menu,
body.theme-ai .main-navigation li:focus-within > .sub-menu {
  display: block;
}

/* Último item: dropdown hacia adentro */
body.theme-ai .main-navigation > .menu > li:last-child > .sub-menu {
  left: auto;
  right: 0;
}

/* =========================================================
   CONTENIDO
   ========================================================= */
body.theme-ai .entry-content {
  line-height: 1.7;
  margin: 0;
  padding: 0;
}

body.theme-ai .entry-content > *:first-child { margin-top: 0; }
body.theme-ai .entry-content > *:last-child  { margin-bottom: 0; }

/* ====== Landings generadas por AI Builder ====== */
.aibp-landing {
  background: transparent;
  color: var(--ai-fg);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;

  border-radius: var(--ai-radius-lg);
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(900px 450px at 18% 10%, rgba(0,255,128,0.10), transparent 60%),
    rgba(255,255,255,0.04);
  box-shadow: var(--ai-shadow-soft);
}

.aibp-landing .btn,
.aibp-landing .cta-button,
.aibp-landing button {
  background: var(--ai-accent);
  color: #0b0f12;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 800;
  display: inline-block;
  box-shadow: 0 10px 30px rgba(0, 255, 128, 0.18);
  border: 1px solid rgba(0,255,128,0.22);
}

@media (min-width: 1024px) {
  .aibp-landing { padding: 40px 48px; }
}

/* Compatibilidad WordPress */
body.theme-ai .wp-caption {
  max-width: 100%;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: 6px;
}

body.theme-ai .wp-caption-text,
body.theme-ai .gallery-caption {
  font-size: 0.9em;
  color: rgba(255,255,255,0.70);
  margin-top: 4px;
}

body.theme-ai .alignleft  { float: left;  margin: 0.5em 1em 0.5em 0; }
body.theme-ai .alignright { float: right; margin: 0.5em 0 0.5em 1em; }
body.theme-ai .aligncenter{ display: block; margin-left: auto; margin-right: auto; text-align: center; }

/* =========================================================
   ACCESSIBILITY: Skip to content (CSS ya lo tienes; esto lo deja más usable)
   ========================================================= */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: absolute;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  clip: auto;
  text-decoration: none;
  background: rgba(0,0,0,0.92);
  color: #fff;
  z-index: 999999;
  font-weight: 700;
  border-radius: 10px;
  display: inline-block;
  border: 1px solid rgba(0,255,128,0.20);
}

/* Sticky posts */
.sticky {
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

/* Comments by post author */
.bypostauthor {
  border-left: 3px solid var(--ai-accent);
  padding-left: 0.75rem;
}

/* ======================================
   HERO HOME – split (Matrix futurista)
   ====================================== */
.lyra-hero-split {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 20px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.lyra-hero-kicker {
  font-size: 0.9rem;
  color: var(--ai-muted);
  margin: 0 0 12px 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.lyra-hero-title {
  font-size: 3rem;
  margin: 0;
  line-height: 1.05;
  overflow-wrap: anywhere; /* evita overflow */
}

.lyra-hero-right {
  display: flex;
  justify-content: center;
}

.lyra-hero-right img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 16px 36px rgba(0,255,128,0.18));
}

@media (max-width: 900px) {
  .lyra-hero-split {
    grid-template-columns: 1fr;
    padding: 80px 20px;
    gap: 32px;
  }
  .lyra-hero-title { font-size: 2.2rem; }
  .lyra-hero-right img { max-width: 360px; }
}

/* ======================================
   FIX: títulos largos (archive + single)
   ====================================== */
body.theme-ai .site-main{
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
  flex: 1 0 auto;
}

body.theme-ai .entry-header,
body.theme-ai .entry-title,
body.theme-ai .page-title,
body.theme-ai .archive-title{
  max-width: 100%;
  overflow: hidden;
}

body.theme-ai .entry-title,
body.theme-ai .page-title,
body.theme-ai .archive-title{
  margin: 0 0 12px;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Footer layout container (prevents glued-to-left footer) */
body.theme-ai .site-footer .footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
  box-sizing: border-box;
}

body.theme-ai .site-footer .footer-bottom{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}