/* 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);
}

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */
body.theme-ai .menu-toggle {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--lyra-menu-color, #fff);
  font-size: 1.4rem;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 767px) {
  body.theme-ai .menu-toggle {
    display: inline-block;
  }

  body.theme-ai .main-navigation {
    position: relative;
    flex: 0 0 auto;
  }

  body.theme-ai .main-navigation > .menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: rgba(10,14,28,0.97);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;
    padding: 10px;
    z-index: 9999;
    box-shadow: var(--ai-shadow);
  }

  body.theme-ai .main-navigation.toggled > .menu {
    display: flex;
  }

  body.theme-ai .main-navigation > .menu > li {
    width: 100%;
  }

  body.theme-ai .main-navigation > .menu > li > a {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  body.theme-ai .main-navigation .sub-menu {
    position: static;
    display: none;
    min-width: 100%;
    margin-top: 4px;
    border-radius: 12px;
    box-shadow: none;
  }

  body.theme-ai .main-navigation .menu-item-has-children.submenu-open > .sub-menu {
    display: block;
  }

  /* En mobile, hover no aplica — solo click via JS */
  body.theme-ai .main-navigation li:hover > .sub-menu {
    display: none;
  }
  body.theme-ai .main-navigation .menu-item-has-children.submenu-open > .sub-menu {
    display: block;
  }
}

/* =========================================================
   FRONT PAGE HERO
   ========================================================= */
body.theme-ai .front-futuristic {
  padding: 0;
}

body.theme-ai .lyra-hero {
  width: 100%;
  padding: 100px 20px 80px;
  box-sizing: border-box;
  text-align: center;
}

body.theme-ai .lyra-hero__inner {
  max-width: 760px;
  margin: 0 auto;
}

body.theme-ai .lyra-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ai-accent);
  margin: 0 0 16px;
}

body.theme-ai .lyra-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 20px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.theme-ai .lyra-subtitle {
  font-size: 1.15rem;
  color: var(--ai-muted);
  line-height: 1.6;
  margin: 0 0 36px;
}

body.theme-ai .lyra-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

body.theme-ai .button {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

body.theme-ai .button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

body.theme-ai .button-primary {
  background: var(--ai-accent);
  color: #07090f;
  border: 1px solid var(--ai-accent);
}

body.theme-ai .button-ghost {
  background: transparent;
  color: var(--ai-fg);
  border: 1px solid rgba(255,255,255,0.22);
}

/* =========================================================
   FRONT PAGE LATEST POSTS
   ========================================================= */
body.theme-ai .lyra-latest {
  padding: 60px 20px;
  box-sizing: border-box;
}

body.theme-ai .lyra-latest__inner {
  max-width: 1200px;
  margin: 0 auto;
}

body.theme-ai .lyra-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 32px;
}

body.theme-ai .lyra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

body.theme-ai .lyra-card {
  background: var(--ai-panel);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

body.theme-ai .lyra-card:hover {
  border-color: rgba(0,255,128,0.28);
  transform: translateY(-2px);
}

body.theme-ai .lyra-card__link {
  display: block;
  padding: 24px;
  text-decoration: none;
  color: var(--ai-fg);
}

body.theme-ai .lyra-card__link:hover {
  text-decoration: none;
}

body.theme-ai .lyra-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.3;
}

body.theme-ai .lyra-card__excerpt {
  font-size: 0.9rem;
  color: var(--ai-muted);
  line-height: 1.6;
}

/* =========================================================
   FRONT PAGE STATIC CONTENT
   ========================================================= */
body.theme-ai .lyra-front-page {
  padding: 60px 20px;
  box-sizing: border-box;
}

body.theme-ai .lyra-front-page__inner {
  max-width: 860px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  body.theme-ai .lyra-title { font-size: 2rem; }
  body.theme-ai .lyra-hero  { padding: 70px 20px 60px; }
}

/* =========================================================
   SINGLE / PAGE CONTENT
   ========================================================= */
body.theme-ai .lyra-content-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
}

body.theme-ai .lyra-article .entry-header {
  margin-bottom: 32px;
}

body.theme-ai .lyra-article .entry-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--ai-muted);
  margin-top: 10px;
}

body.theme-ai .lyra-article .post-thumbnail {
  margin: 0 0 36px;
  border-radius: var(--ai-radius);
  overflow: hidden;
}

body.theme-ai .lyra-article .post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

body.theme-ai .lyra-article .entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

body.theme-ai .lyra-article .entry-content h2,
body.theme-ai .lyra-article .entry-content h3,
body.theme-ai .lyra-article .entry-content h4 {
  margin: 1.8em 0 0.6em;
  line-height: 1.2;
}

body.theme-ai .lyra-article .entry-content p {
  margin: 0 0 1.4em;
}

body.theme-ai .lyra-article .entry-content ul,
body.theme-ai .lyra-article .entry-content ol {
  padding-left: 1.4em;
  margin: 0 0 1.4em;
}

body.theme-ai .lyra-article .entry-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--ai-border);
}

body.theme-ai .lyra-article .post-tags {
  font-size: 0.9rem;
  color: var(--ai-muted);
  margin: 0 0 24px;
}

body.theme-ai .lyra-article .post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

body.theme-ai .page-links {
  margin: 24px 0;
  font-size: 0.9rem;
}

body.theme-ai .page-links .page-number {
  display: inline-block;
  margin: 0 4px;
  padding: 4px 10px;
  border: 1px solid var(--ai-border);
  border-radius: 6px;
}

/* =========================================================
   ARCHIVE / BLOG INDEX
   ========================================================= */
body.theme-ai .lyra-archive-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
}

body.theme-ai .lyra-archive-header {
  margin-bottom: 40px;
}

body.theme-ai .lyra-archive-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

body.theme-ai .lyra-card__thumb {
  display: block;
  overflow: hidden;
  border-radius: var(--ai-radius) var(--ai-radius) 0 0;
}

body.theme-ai .lyra-card__thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

body.theme-ai .lyra-card:hover .lyra-card__thumb img {
  transform: scale(1.03);
}

body.theme-ai .lyra-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.theme-ai .lyra-card__meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--ai-muted);
  margin-top: 6px;
}

body.theme-ai .lyra-card__excerpt {
  font-size: 0.9rem;
  color: var(--ai-muted);
  line-height: 1.6;
}

body.theme-ai .lyra-card__readmore {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ai-accent);
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}

body.theme-ai .lyra-card__readmore:hover {
  text-decoration: underline;
}

body.theme-ai .lyra-no-results {
  text-align: center;
  padding: 80px 20px;
}

body.theme-ai .nav-links {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--ai-border);
  font-size: 0.9rem;
}