:root {
  --apes-bg: #0a0a0f;
  --apes-card: #13141c;
  --apes-card-2: #171926;
  --apes-text: #e2e8f0;
  --apes-muted: #94a3b8;
  --apes-cyan: #00f0ff;
  --apes-magenta: #ff003c;
  --apes-purple: #7a04eb;
  --apes-border: rgba(255,255,255,0.08);
  --apes-border-strong: rgba(0,240,255,0.3);
  --apes-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 18px 48px rgba(0,0,0,0.35);
  --apes-shell: min(1320px, calc(100% - 2rem));
}

@keyframes apesPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .75; }
}

body.apes-front,
body.apes-front .site,
body.apes-front #page {
  background-color: var(--apes-bg);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.03), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(255, 0, 60, 0.03), transparent 25%);
  color: var(--apes-text);
}

body.apes-front,
body.apes-front p,
body.apes-front h1,
body.apes-front h2,
body.apes-front h3,
body.apes-front h4,
body.apes-front h5,
body.apes-front h6,
body.apes-front li,
body.apes-front a,
body.apes-front input,
body.apes-front textarea,
body.apes-front button {
  font-family: "Inter", sans-serif;
}

body.apes-front .site-main.apes-home,
body.apes-front .container,
body.apes-front #content-wrapper,
body.apes-front .entry-content,
body.apes-front .site-content,
body.apes-front .content-area,
body.apes-front .post-content,
body.apes-front .page-content,
body.apes-front .content,
body.apes-front .main-content,
body.apes-front .entry-wrapper {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

.apes-shell {
  width: var(--apes-shell);
  margin: 0 auto;
}

.apes-home a { text-decoration: none; }

.glass-nav,
.apes-topbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.apes-topbar__inner {
  min-height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

body.apes-front .apes-topbar .custom-logo-link,
body.apes-front .apes-topbar .custom-logo-link img,
body.apes-front .apes-topbar img.custom-logo {
  display: block !important;
  max-width: 220px !important;
  width: auto !important;
  height: auto !important;
  max-height: 76px !important;
  object-fit: contain !important;
}

body.apes-front .apes-brand {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 220px !important;
  overflow: hidden !important;
}

.apes-brand__text,
.apes-footer__logo {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: #fff;
}

.apes-brand__hyphen,
.apes-footer__logo span {
  color: var(--apes-cyan);
}

.apes-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.apes-nav a {
  color: var(--apes-text);
  font-weight: 600;
  transition: color .25s ease;
}

.apes-nav a:hover { color: var(--apes-cyan); }
.apes-nav a:nth-child(3):hover { color: var(--apes-magenta); }
.apes-nav a:nth-child(4):hover { color: var(--apes-purple); }

.apes-topbar__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.apes-search-button {
  color: var(--apes-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  transition: color .25s ease;
}
.apes-search-button:hover { color: #fff; }
.apes-search-button svg { width: 24px; height: 24px; }

.clip-button {
  clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
}

.apes-button,
.apes-builder .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .85rem 1.6rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  text-align: center;
  transition: all .3s ease;
}

.apes-button:hover,
.apes-builder .wp-block-button__link:hover {
  transform: translateY(-1px);
}

.apes-button--join {
  background: var(--apes-cyan);
  color: var(--apes-bg);
}
.apes-button--join:hover {
  background: #fff;
  color: var(--apes-bg);
}

.apes-button--primary,
.apes-builder .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--apes-magenta);
  color: #fff;
  box-shadow: 0 12px 30px rgba(255,0,60,.24);
}

.apes-button--primary:hover,
.apes-builder .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background: var(--apes-cyan);
  color: var(--apes-bg);
  box-shadow: 0 16px 40px rgba(0,240,255,.22);
}

.apes-button--secondary,
.apes-button--ghost,
.apes-builder .is-style-outline .wp-block-button__link,
.apes-builder .wp-block-button.is-style-outline .wp-block-button__link {
  background: var(--apes-card);
  color: #fff;
  border-color: rgba(255,255,255,.18);
}

.apes-button--secondary:hover,
.apes-button--ghost:hover,
.apes-builder .is-style-outline .wp-block-button__link:hover,
.apes-builder .wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--apes-cyan);
  color: #fff;
}

.apes-builder {
  padding: 0 0 5rem;
}

.apes-section {
  padding: 4rem 0;
}

.apes-section--hero {
  padding-top: 5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.apes-hero-proto {
  display: grid;
  grid-template-columns: 1fr .95fr;
  gap: 3rem;
  align-items: center;
}

.apes-kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--apes-card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: .45rem .95rem;
  margin-bottom: 1.5rem;
  color: var(--apes-muted);
  font-family: "Roboto Mono", monospace;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.apes-kicker__dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--apes-magenta);
  animation: apesPulse 1.8s infinite;
}

.apes-hero-title,
.apes-builder h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(3rem, 7vw, 5.9rem);
  line-height: .95;
  letter-spacing: -0.06em;
  font-weight: 900;
  color: #fff;
}

.apes-hero-title span,
.apes-builder h1 span {
  background: linear-gradient(90deg, var(--apes-cyan), var(--apes-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.apes-subtitle {
  max-width: 34rem;
  margin: 0 0 2rem;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--apes-muted);
}

.apes-cta-row,
.apes-builder .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.neon-border-cyan {
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
  transition: all 0.3s ease;
}
.neon-border-cyan:hover {
  border-color: rgba(0, 240, 255, 0.8);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.neon-text-magenta {
  color: var(--apes-magenta);
  text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

.apes-hero-proto__visual {
  position: relative;
  min-height: 384px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--apes-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.apes-hero-proto__visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(122,4,235,.2), rgba(0,240,255,.2));
}

.apes-hero-proto__visual span {
  position: relative;
  z-index: 1;
  color: rgba(0,240,255,.5);
  font-family: "Roboto Mono", monospace;
  letter-spacing: .18em;
  font-size: .85rem;
}

.apes-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.apes-section-title {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  padding-left: 1rem;
  border-left: 4px solid var(--apes-cyan);
}

.apes-section-link,
.apes-section-link a,
.apes-section-caption {
  color: var(--apes-muted);
  font-size: .95rem;
}

.apes-section-link a {
  color: var(--apes-cyan);
  font-family: "Roboto Mono", monospace;
}
.apes-section-link a:hover { color: #fff; }

.apes-builder .wp-block-query {
  margin-top: 0;
}

.apes-builder .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.apes-post-card,
.apes-builder .wp-block-post {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--apes-card);
  border: 1px solid rgba(255,255,255,.05);
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.apes-post-card:hover,
.apes-builder .wp-block-post:hover {
  transform: translateY(-2px);
}

.apes-builder .wp-block-post-featured-image {
  margin: 0;
  aspect-ratio: 16 / 9;
  background: #1f2937;
  position: relative;
}

.apes-builder .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.apes-post-card__body,
.apes-builder .wp-block-post > .wp-block-group,
.apes-builder .wp-block-post .apes-post-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  flex: 1;
}

.apes-post-card__terms,
.apes-builder .wp-block-post-terms {
  margin: 0;
  font-family: "Roboto Mono", monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.apes-builder .wp-block-post-terms a {
  display: inline-flex;
  background: rgba(10,10,15,.85);
  color: #fff;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
}

.apes-post-card__title,
.apes-builder .wp-block-post-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.35;
}

.apes-post-card__title a,
.apes-builder .wp-block-post-title a {
  color: #fff;
  transition: color .25s ease;
}

.apes-post-card__title a:hover,
.apes-builder .wp-block-post-title a:hover {
  color: var(--apes-cyan);
}

.apes-post-card__excerpt,
.apes-builder .wp-block-post-excerpt,
.apes-builder .wp-block-post-excerpt p {
  margin: 0;
  color: var(--apes-muted);
  font-size: .95rem;
  line-height: 1.65;
}

.apes-post-card__meta,
.apes-builder .wp-block-group.apes-post-card__meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  color: var(--apes-muted);
  font-size: .75rem;
  font-family: "Roboto Mono", monospace;
}

.apes-newsletter-proto {
  position: relative;
  overflow: hidden;
  background: var(--apes-card);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 5rem 2rem;
  text-align: center;
}

.apes-newsletter-proto::before {
  content: "";
  position: absolute;
  top: -5rem;
  right: -5rem;
  width: 16rem;
  height: 16rem;
  border-radius: 999px;
  background: rgba(255,0,60,.1);
  filter: blur(48px);
}

.apes-newsletter-proto::after {
  content: "";
  position: absolute;
  bottom: -5rem;
  left: -5rem;
  width: 16rem;
  height: 16rem;
  border-radius: 999px;
  background: rgba(0,240,255,.1);
  filter: blur(48px);
}

.apes-newsletter-proto > * {
  position: relative;
  z-index: 1;
}

.apes-newsletter-proto__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem,4vw,2.8rem);
}

.apes-newsletter-proto__text {
  color: var(--apes-muted);
  max-width: 44rem;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

.apes-newsletter-proto__form {
  display: flex;
  gap: .65rem;
  max-width: 42rem;
  margin: 0 auto;
}

.apes-newsletter-proto__form input {
  flex: 1;
  background: var(--apes-bg);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  padding: .95rem 1rem;
  font-family: "Roboto Mono", monospace;
}

.apes-newsletter-proto__form input:focus {
  outline: none;
  border-color: var(--apes-magenta);
}

.apes-reviews-grid {
  gap: 1.5rem;
}

.apes-review-card {
  background: var(--apes-bg);
  border: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem;
  text-align: center;
  transition: border-color .25s ease;
}

.apes-review-card:hover {
  border-color: var(--apes-cyan);
}

.apes-review-card__image {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: #1f2937;
}

.apes-review-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apes-review-card__title {
  margin: 0 0 .35rem;
  font-size: 1rem;
}

.apes-review-card__subtitle {
  margin: 0 0 1rem;
  color: var(--apes-muted);
  font-size: .78rem;
}

.apes-review-card__button .wp-block-button__link {
  width: 100%;
  background: transparent;
  color: var(--apes-cyan);
  border: 1px solid var(--apes-cyan);
  font-family: "Roboto Mono", monospace;
  font-size: .82rem;
  box-shadow: none;
}

.apes-review-card__button .wp-block-button__link:hover {
  background: var(--apes-cyan);
  color: var(--apes-bg);
}

.apes-footer {
  background: var(--apes-bg);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 4rem 0 2rem;
}

.apes-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.apes-footer__brand p,
.apes-footer li a,
.apes-footer__bottom p,
.apes-footer__social a {
  color: var(--apes-muted);
  font-size: .9rem;
}

.apes-footer h4 {
  margin: 0 0 1rem;
  color: #fff;
  font-family: "Roboto Mono", monospace;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.apes-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .7rem;
}

.apes-footer a:hover,
.apes-footer__social a:hover {
  color: #fff;
}

.apes-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 2rem;
}

.apes-footer__social {
  display: flex;
  gap: 1rem;
}

@media (max-width: 1100px) {
  .apes-builder .wp-block-post-template,
  .apes-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .apes-nav { display: none; }

  .apes-topbar__inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 1rem 0;
  }

  .apes-hero-proto,
  .apes-newsletter-proto__form,
  .apes-footer__bottom,
  .apes-footer__grid,
  .apes-builder .wp-block-post-template,
  .apes-reviews-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .apes-newsletter-proto__form {
    gap: 1rem;
  }

  .apes-topbar__actions,
  .apes-section-head,
  .apes-footer__bottom {
    width: 100%;
    justify-content: space-between;
  }
}


/* =========================================================
   APE-S V4 PATCH
   Navbar global + alturas uniformes + acentos por sección
   ========================================================= */

/* Navbar global del tema */
.apes-site-header.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.apes-site-header .container.apes-navbar-shell {
  width: var(--apes-shell);
  max-width: none;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

.apes-navbar-inner {
  min-height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.apes-site-logo,
.apes-site-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
}

.apes-site-header .custom-logo,
.apes-site-header .custom-logo-link img {
  max-width: 220px !important;
  max-height: 76px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

.apes-header-navigation-wrapper {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.apes-primary-menu-wrapper {
  display: flex;
  align-items: center;
}

.apes-primary-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.apes-primary-menu > li {
  position: relative;
}

.apes-primary-menu > li > a {
  color: var(--apes-text);
  font-weight: 600;
  transition: color .25s ease;
}

.apes-primary-menu > li:nth-child(1) > a:hover,
.apes-primary-menu > li:nth-child(2) > a:hover { color: var(--apes-cyan); }
.apes-primary-menu > li:nth-child(3) > a:hover { color: var(--apes-magenta); }
.apes-primary-menu > li:nth-child(4) > a:hover { color: var(--apes-purple); }

.apes-navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.apes-site-header .mobile-nav-toggle {
  display: none;
}

/* Acentos por sección */
.apes-accent-cyan { --apes-accent: var(--apes-cyan); --apes-accent-rgb: 0,240,255; }
.apes-accent-magenta { --apes-accent: var(--apes-magenta); --apes-accent-rgb: 255,0,60; }
.apes-accent-purple { --apes-accent: var(--apes-purple); --apes-accent-rgb: 122,4,235; }

.apes-section-block .wp-block-heading:first-child,
.apes-section-block > .wp-block-group__inner-container > h2,
.apes-section-block > h2 {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 1.35rem;
}

.apes-section-block .wp-block-heading:first-child::before,
.apes-section-block > .wp-block-group__inner-container > h2::before,
.apes-section-block > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  background: var(--apes-accent, var(--apes-cyan));
  box-shadow: 0 0 12px rgba(var(--apes-accent-rgb,0,240,255),.45);
  border-radius: 999px;
}

/* Query Loop uniforme */
.apes-query-grid .wp-block-post-template,
.apes-builder .apes-query-grid .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  align-items: stretch;
}

.apes-query-grid .wp-block-post-template > li,
.apes-builder .apes-query-grid .wp-block-post-template > li {
  height: 100%;
}

.apes-query-equal .wp-block-post,
.apes-builder .apes-query-equal .wp-block-post {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.apes-accent-cyan .wp-block-post:hover,
.apes-accent-magenta .wp-block-post:hover,
.apes-accent-purple .wp-block-post:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--apes-accent-rgb), .62);
  box-shadow: 0 0 0 1px rgba(var(--apes-accent-rgb), .16), 0 0 24px rgba(var(--apes-accent-rgb), .15), 0 18px 48px rgba(0,0,0,.38);
}

.apes-query-equal .wp-block-post-title,
.apes-builder .apes-query-equal .wp-block-post-title {
  min-height: 3.4em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.18;
}

.apes-query-equal .wp-block-post-excerpt,
.apes-builder .apes-query-equal .wp-block-post-excerpt {
  min-height: 4.95em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apes-query-equal .wp-block-read-more,
.apes-builder .apes-query-equal .wp-block-read-more {
  margin-top: auto;
}

.apes-accent-cyan .wp-block-post-title a:hover,
.apes-accent-magenta .wp-block-post-title a:hover,
.apes-accent-purple .wp-block-post-title a:hover,
.apes-accent-cyan .wp-block-read-more:hover,
.apes-accent-magenta .wp-block-read-more:hover,
.apes-accent-purple .wp-block-read-more:hover {
  color: var(--apes-accent);
}

/* Botones cuadrados y recortados */
.apes-cut-button .wp-block-button__link,
.apes-builder .apes-cut-button .wp-block-button__link,
.apes-button,
.apes-builder .wp-block-button__link {
  border-radius: 0 !important;
  clip-path: polygon(10% 0, 100% 0, 100% 72%, 90% 100%, 0 100%, 0 28%);
  min-height: 50px;
  padding: .95rem 1.4rem;
}

.apes-cut-button.is-style-fill .wp-block-button__link,
.apes-builder .wp-block-button.is-style-fill.apes-cut-button .wp-block-button__link,
.apes-builder .wp-block-buttons .wp-block-button.is-style-fill .wp-block-button__link {
  background: var(--apes-magenta);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 12px 30px rgba(255,0,60,.24);
}

.apes-cut-button.is-style-fill .wp-block-button__link:hover,
.apes-builder .wp-block-button.is-style-fill.apes-cut-button .wp-block-button__link:hover,
.apes-builder .wp-block-buttons .wp-block-button.is-style-fill .wp-block-button__link:hover {
  background: var(--apes-cyan);
  color: var(--apes-bg);
  box-shadow: 0 16px 36px rgba(0,240,255,.24);
}

.apes-cut-button.is-style-outline .wp-block-button__link,
.apes-builder .wp-block-button.is-style-outline.apes-cut-button .wp-block-button__link,
.apes-builder .wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link {
  background: var(--apes-card);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
}

.apes-cut-button.is-style-outline .wp-block-button__link:hover,
.apes-builder .wp-block-button.is-style-outline.apes-cut-button .wp-block-button__link:hover,
.apes-builder .wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--apes-cyan);
  color: #fff;
  box-shadow: 0 0 20px rgba(0,240,255,.16);
}

@media (max-width: 1100px) {
  .apes-query-grid .wp-block-post-template,
  .apes-builder .apes-query-grid .wp-block-post-template { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 980px) {
  .apes-site-header .mobile-nav-toggle { display: inline-flex; }
  .apes-header-navigation-wrapper,
  .apes-navbar-actions { display: none; }
  .apes-navbar-inner { min-height: 72px; }
}

@media (max-width: 860px) {
  .apes-query-grid .wp-block-post-template,
  .apes-builder .apes-query-grid .wp-block-post-template { grid-template-columns: 1fr; }
  .apes-query-equal .wp-block-post-title,
  .apes-builder .apes-query-equal .wp-block-post-title,
  .apes-query-equal .wp-block-post-excerpt,
  .apes-builder .apes-query-equal .wp-block-post-excerpt { min-height: auto; }
}


/* =========================================================
   APE-S PATCH V4.1
   Igualar cards aunque falten imágenes + hover por tarjeta
   ========================================================= */

/* 1) El li del post template debe estirar la card completa */
.apes-query--trending .wp-block-post-template > li,
.apes-builder .apes-query--trending .wp-block-post-template > li,
.apes-query .wp-block-post-template > li,
.apes-builder .apes-query .wp-block-post-template > li {
  display: flex;
  height: 100%;
}

.apes-query--trending .wp-block-post,
.apes-builder .apes-query--trending .wp-block-post,
.apes-query .wp-block-post,
.apes-builder .apes-query .wp-block-post {
  width: 100%;
  height: 100%;
}

/* 2) Si un post no tiene imagen destacada, generamos un bloque placeholder
   para que las tres cards arranquen al mismo nivel visual */
.apes-query--trending .wp-block-post:not(:has(.wp-block-post-featured-image))::before,
.apes-builder .apes-query--trending .wp-block-post:not(:has(.wp-block-post-featured-image))::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)), #1f2937;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

/* 3) Acento por tarjeta dentro de Trending para replicar el mockup
   1ª magenta, 2ª purple, 3ª cyan, y se repite */
.apes-query--trending .wp-block-post-template > li:nth-child(3n+1) .wp-block-post,
.apes-builder .apes-query--trending .wp-block-post-template > li:nth-child(3n+1) .wp-block-post {
  --apes-card-accent: var(--apes-magenta);
  --apes-card-accent-rgb: 255, 0, 60;
}

.apes-query--trending .wp-block-post-template > li:nth-child(3n+2) .wp-block-post,
.apes-builder .apes-query--trending .wp-block-post-template > li:nth-child(3n+2) .wp-block-post {
  --apes-card-accent: var(--apes-purple);
  --apes-card-accent-rgb: 122, 4, 235;
}

.apes-query--trending .wp-block-post-template > li:nth-child(3n+3) .wp-block-post,
.apes-builder .apes-query--trending .wp-block-post-template > li:nth-child(3n+3) .wp-block-post {
  --apes-card-accent: var(--apes-cyan);
  --apes-card-accent-rgb: 0, 240, 255;
}

.apes-query--trending .wp-block-post,
.apes-builder .apes-query--trending .wp-block-post {
  border-color: rgba(var(--apes-card-accent-rgb, 0, 240, 255), .14);
  box-shadow:
    0 0 0 1px rgba(var(--apes-card-accent-rgb, 0, 240, 255), .05),
    0 18px 48px rgba(0,0,0,.35);
}

.apes-query--trending .wp-block-post:hover,
.apes-builder .apes-query--trending .wp-block-post:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--apes-card-accent-rgb, 0, 240, 255), .68);
  box-shadow:
    0 0 0 1px rgba(var(--apes-card-accent-rgb, 0, 240, 255), .16),
    0 0 24px rgba(var(--apes-card-accent-rgb, 0, 240, 255), .16),
    0 18px 48px rgba(0,0,0,.38);
}

.apes-query--trending .wp-block-post-title,
.apes-builder .apes-query--trending .wp-block-post-title {
  min-height: 3.6em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apes-query--trending .wp-block-post-excerpt,
.apes-builder .apes-query--trending .wp-block-post-excerpt,
.apes-query--trending .wp-block-post-excerpt p,
.apes-builder .apes-query--trending .wp-block-post-excerpt p {
  min-height: 4.95em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apes-query--trending .wp-block-post-title a:hover,
.apes-builder .apes-query--trending .wp-block-post-title a:hover,
.apes-query--trending .wp-block-read-more:hover,
.apes-builder .apes-query--trending .wp-block-read-more:hover {
  color: var(--apes-card-accent, var(--apes-cyan));
}

.apes-query--trending .wp-block-post-terms a,
.apes-builder .apes-query--trending .wp-block-post-terms a {
  border-color: rgba(var(--apes-card-accent-rgb, 0, 240, 255), .18);
}

.apes-query--trending .wp-block-post-featured-image,
.apes-builder .apes-query--trending .wp-block-post-featured-image {
  min-height: 220px;
}

.apes-query--trending .wp-block-post .apes-post-card__body,
.apes-builder .apes-query--trending .wp-block-post .apes-post-card__body,
.apes-query--trending .wp-block-post > .wp-block-group,
.apes-builder .apes-query--trending .wp-block-post > .wp-block-group {
  flex: 1;
}

@media (max-width: 860px) {
  .apes-query--trending .wp-block-post-title,
  .apes-builder .apes-query--trending .wp-block-post-title,
  .apes-query--trending .wp-block-post-excerpt,
  .apes-builder .apes-query--trending .wp-block-post-excerpt,
  .apes-query--trending .wp-block-post-excerpt p,
  .apes-builder .apes-query--trending .wp-block-post-excerpt p {
    min-height: auto;
  }
}

/* =========================================================
   APE-S PATCH V4.2
   Navbar centrado + dock móvil + footer editable + trending colores
   ========================================================= */

/* Distinción desktop / mobile actions */
.apes-navbar-inner {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr minmax(120px, 220px);
  align-items: center;
  gap: 1.25rem;
}

.apes-site-logo {
  justify-self: start;
}

.apes-header-navigation-wrapper {
  justify-self: center;
  width: 100%;
  display: flex;
  justify-content: center;
}

.apes-primary-menu-wrapper,
.apes-primary-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  width: auto;
}

.apes-primary-menu > li {
  display: flex;
  align-items: center;
}

.apes-primary-menu > li > a {
  color: var(--apes-text);
  font-weight: 700;
  font-size: 0.96rem;
  transition: color .25s ease;
}

.apes-primary-menu > li > a:hover,
.apes-primary-menu > li.current-menu-item > a,
.apes-primary-menu > li.current-menu-ancestor > a {
  color: var(--apes-cyan);
}

.apes-primary-menu > li:nth-child(3) > a:hover,
.apes-primary-menu > li:nth-child(3).current-menu-item > a,
.apes-primary-menu > li:nth-child(3).current-menu-ancestor > a {
  color: var(--apes-magenta);
}

.apes-primary-menu > li:nth-child(4) > a:hover,
.apes-primary-menu > li:nth-child(4).current-menu-item > a,
.apes-primary-menu > li:nth-child(4).current-menu-ancestor > a {
  color: var(--apes-purple);
}

.apes-navbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: .8rem;
}

.apes-mobile-toggle-top {
  display: none;
}

/* Dock móvil inferior */
.apes-mobile-dock {
  display: none;
}

.apes-mobile-dock__item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--apes-text);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  text-decoration: none;
  min-height: 56px;
  padding: .55rem .9rem;
  font-family: "Inter", sans-serif;
}

.apes-mobile-dock__item--cta {
  color: var(--apes-cyan);
}

.apes-mobile-dock__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.apes-mobile-dock__label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Toolbar/admin bar: cuando estás logueado, que no rompa el sticky */
body.admin-bar .glass-nav,
body.admin-bar .apes-topbar {
  top: 32px;
}

/* Trending con alturas más consistentes y color por tarjeta */
.apes-query--trending .wp-block-post-template {
  align-items: stretch;
}

.apes-query--trending .wp-block-post-template > li {
  height: 100%;
}

.apes-query--trending .wp-block-post {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.apes-query--trending .wp-block-post-title {
  min-height: 3.6em;
}

.apes-query--trending .wp-block-post-excerpt {
  min-height: 5.2em;
}

.apes-query--trending .wp-block-read-more,
.apes-query--trending .wp-block-post-date,
.apes-query--trending .wp-block-post-author {
  margin-top: auto;
}

.apes-query--trending .apes-featured-placeholder,
.apes-query--trending .wp-block-post-featured-image {
  aspect-ratio: 16 / 10;
  min-height: 220px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
}

.apes-featured-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(226,232,240,.45);
  font-family: "Roboto Mono", monospace;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0;
}

/* Hover/acentos por tarjeta en Trending */
.apes-query--trending .wp-block-post:nth-child(3n+1):hover {
  border-color: rgba(255, 0, 60, .62);
  box-shadow: 0 0 0 1px rgba(255,0,60,.16), 0 0 24px rgba(255,0,60,.15), 0 18px 48px rgba(0,0,0,.38);
}
.apes-query--trending .wp-block-post:nth-child(3n+2):hover {
  border-color: rgba(122, 4, 235, .62);
  box-shadow: 0 0 0 1px rgba(122,4,235,.16), 0 0 24px rgba(122,4,235,.15), 0 18px 48px rgba(0,0,0,.38);
}
.apes-query--trending .wp-block-post:nth-child(3n+3):hover {
  border-color: rgba(0, 240, 255, .62);
  box-shadow: 0 0 0 1px rgba(0,240,255,.16), 0 0 24px rgba(0,240,255,.15), 0 18px 48px rgba(0,0,0,.38);
}

.apes-query--trending .wp-block-post:nth-child(3n+1) .wp-block-post-title a:hover,
.apes-query--trending .wp-block-post:nth-child(3n+1) .wp-block-read-more:hover { color: var(--apes-magenta); }
.apes-query--trending .wp-block-post:nth-child(3n+2) .wp-block-post-title a:hover,
.apes-query--trending .wp-block-post:nth-child(3n+2) .wp-block-read-more:hover { color: var(--apes-purple); }
.apes-query--trending .wp-block-post:nth-child(3n+3) .wp-block-post-title a:hover,
.apes-query--trending .wp-block-post:nth-child(3n+3) .wp-block-read-more:hover { color: var(--apes-cyan); }

/* Footer global editable */
.apes-footer-global {
  background: var(--apes-bg);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 4rem 0 2rem;
}

.apes-footer-shell {
  width: var(--apes-shell);
  margin: 0 auto;
}

.apes-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.apes-footer__brand p,
.apes-footer-widget,
.apes-footer-menu a,
.apes-footer__bottom p,
.apes-footer-social-menu a {
  color: var(--apes-muted);
}

.apes-footer__column h4,
.apes-footer-widget .widget-title,
.apes-footer__brand .widget-title {
  margin: 0 0 1rem;
  color: #fff;
  font-family: "Roboto Mono", monospace;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.apes-footer-menu,
.apes-footer-social-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.apes-footer-menu li + li,
.apes-footer-social-menu li + li {
  margin-top: .6rem;
}

.apes-footer-menu a:hover,
.apes-footer-social-menu a:hover {
  color: #fff;
}

.apes-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.apes-footer-social-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .apes-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  body.admin-bar .glass-nav,
  body.admin-bar .apes-topbar {
    top: 46px;
  }

  .apes-navbar-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 76px;
  }

  .apes-header-navigation-wrapper,
  .apes-search-button--desktop,
  .apes-button--desktop,
  .apes-mobile-toggle-top {
    display: none !important;
  }

  .apes-navbar-actions {
    display: none;
  }

  .apes-mobile-dock {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + .75rem);
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    padding: .4rem;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(10,10,15,.92);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(0,0,0,.38);
  }

  body.apes-theme-active {
    padding-bottom: 6rem;
  }

  .apes-footer__grid {
    grid-template-columns: 1fr;
  }

  .apes-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* =========================================================
   APE-S PATCH V4.4
   Header móvil compacto + dock inferior corregido + trending iPhone
   ========================================================= */

@media (max-width: 860px) {
  /* Header superior en móvil: compacto, con logo pequeño a la izquierda */
  .apes-site-header,
  .glass-nav,
  .apes-topbar {
    display: block !important;
  }

  body.admin-bar .apes-site-header,
  body.admin-bar .glass-nav,
  body.admin-bar .apes-topbar {
    top: 46px !important;
  }

  .apes-site-header .container.apes-navbar-shell {
    width: min(1320px, calc(100% - 1rem));
    padding-left: 0;
    padding-right: 0;
  }

  .apes-navbar-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 60px;
    gap: .75rem;
  }

  .apes-header-navigation-wrapper,
  .apes-search-button--desktop,
  .apes-button--desktop,
  .apes-mobile-toggle-top,
  .apes-navbar-actions {
    display: none !important;
  }

  .apes-site-logo,
  .apes-site-logo a,
  .apes-site-logo .custom-logo-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    max-width: 112px !important;
    margin: 0 !important;
  }

  .apes-site-logo img,
  .apes-site-logo .custom-logo {
    display: block !important;
    max-width: 96px !important;
    max-height: 42px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Dock móvil inferior: buscar / unirse / menú */
  .apes-mobile-dock {
    left: .5rem;
    right: .5rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + .5rem);
    gap: .35rem;
    padding: .35rem;
    border-radius: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .apes-mobile-dock__item {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: .45rem .2rem;
    overflow: hidden;
    text-align: center;
    line-height: 1.08;
    border-radius: 12px;
  }

  .apes-mobile-dock__item .toggle-inner,
  .apes-mobile-dock__item {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .28rem;
  }

  .apes-mobile-dock__item--cta {
    color: var(--apes-cyan);
  }

  .apes-mobile-dock__icon,
  .apes-mobile-dock__item .toggle-inner .apes-mobile-dock__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    font-size: 1rem;
    line-height: 1;
    flex: 0 0 auto;
  }

  .apes-mobile-dock__label,
  .apes-mobile-dock__item .toggle-inner .apes-mobile-dock__label,
  .apes-mobile-dock__item .toggle-text {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: .69rem;
    font-weight: 700;
    line-height: 1.02;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
  }

  .apes-mobile-dock__item:last-child,
  .apes-mobile-dock__item .toggle-inner {
    overflow: hidden;
  }

  /* Trending en Safari/iPhone: quitamos alturas forzadas para evitar tarjetas gigantes */
  .apes-query--trending .wp-block-post-template,
  .apes-builder .apes-query--trending .wp-block-post-template {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .apes-query--trending .wp-block-post-template > li,
  .apes-builder .apes-query--trending .wp-block-post-template > li {
    display: block;
    height: auto !important;
    min-height: 0 !important;
    align-self: start;
  }

  .apes-query--trending .wp-block-post,
  .apes-builder .apes-query--trending .wp-block-post {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
  }

  .apes-query--trending .wp-block-post > .wp-block-group,
  .apes-builder .apes-query--trending .wp-block-post > .wp-block-group,
  .apes-query--trending .wp-block-post .apes-post-card__body,
  .apes-builder .apes-query--trending .wp-block-post .apes-post-card__body {
    flex: 0 0 auto;
  }

  .apes-query--trending .wp-block-post-title,
  .apes-builder .apes-query--trending .wp-block-post-title {
    min-height: 0 !important;
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  .apes-query--trending .wp-block-post-excerpt,
  .apes-builder .apes-query--trending .wp-block-post-excerpt,
  .apes-query--trending .wp-block-post-excerpt p,
  .apes-builder .apes-query--trending .wp-block-post-excerpt p {
    min-height: 0 !important;
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  .apes-query--trending .wp-block-post-featured-image,
  .apes-builder .apes-query--trending .wp-block-post-featured-image,
  .apes-query--trending .apes-featured-placeholder {
    aspect-ratio: 16 / 9;
    min-height: 0 !important;
    max-height: 220px;
  }

  .apes-query--trending .wp-block-read-more,
  .apes-builder .apes-query--trending .wp-block-read-more,
  .apes-query--trending .wp-block-post-date,
  .apes-builder .apes-query--trending .wp-block-post-date,
  .apes-query--trending .wp-block-post-author,
  .apes-builder .apes-query--trending .wp-block-post-author {
    margin-top: 0;
  }
}

/* =========================================================
   APE-S PATCH V4.5
   Dock móvil: logo izquierda + unirse centro + menú derecha
   ========================================================= */
@media (max-width: 860px) {
  /* Ocultar cabecera propia en móvil: dejamos solo el dock */
  .apes-site-header,
  .glass-nav,
  .apes-topbar {
    display: none !important;
  }

  body.admin-bar .apes-site-header,
  body.admin-bar .glass-nav,
  body.admin-bar .apes-topbar {
    top: 46px !important;
  }

  .apes-mobile-dock {
    left: .5rem;
    right: .5rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + .5rem);
    gap: .35rem;
    padding: .35rem;
    border-radius: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .apes-mobile-dock__item,
  .apes-mobile-dock__item .toggle-inner {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: .45rem .25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    overflow: hidden;
    text-align: center;
    border-radius: 12px;
    box-sizing: border-box;
  }

  .apes-mobile-dock__item--logo {
    justify-content: center;
  }

  .apes-mobile-dock__item--logo .custom-logo-link,
  .apes-mobile-dock__item--logo img.custom-logo {
    display: block !important;
    width: auto !important;
    max-width: 72px !important;
    max-height: 34px !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }

  .apes-mobile-dock__logo-text {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.04em;
  }

  .apes-mobile-dock__logo-text span {
    color: var(--apes-cyan);
  }

  .apes-mobile-dock__item--cta {
    color: var(--apes-cyan);
  }

  .apes-mobile-dock__item--menu {
    justify-content: center;
  }

  .apes-mobile-dock__item .toggle-inner {
    pointer-events: none;
  }

  .apes-mobile-dock__icon,
  .apes-mobile-dock__item .toggle-inner .apes-mobile-dock__icon {
    width: 1.1rem;
    height: 1.1rem;
    font-size: 1rem;
    line-height: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .apes-mobile-dock__label,
  .apes-mobile-dock__item .toggle-inner .apes-mobile-dock__label,
  .apes-mobile-dock__item .toggle-text {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: .69rem;
    font-weight: 700;
    line-height: 1.02;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
  }

  /* Safari/iPhone: tarjetas sin alturas rígidas en móvil */
  .apes-query--trending .wp-block-post-template,
  .apes-builder .apes-query--trending .wp-block-post-template {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .apes-query--trending .wp-block-post-template > li,
  .apes-builder .apes-query--trending .wp-block-post-template > li {
    display: block;
    height: auto !important;
    min-height: 0 !important;
    align-self: start;
  }

  .apes-query--trending .wp-block-post,
  .apes-builder .apes-query--trending .wp-block-post {
    height: auto !important;
    min-height: 0 !important;
  }

  .apes-query--trending .wp-block-post-title,
  .apes-builder .apes-query--trending .wp-block-post-title,
  .apes-query--trending .wp-block-post-excerpt,
  .apes-builder .apes-query--trending .wp-block-post-excerpt,
  .apes-query--trending .wp-block-post-excerpt p,
  .apes-builder .apes-query--trending .wp-block-post-excerpt p {
    min-height: 0 !important;
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  .apes-query--trending .wp-block-post-featured-image,
  .apes-builder .apes-query--trending .wp-block-post-featured-image,
  .apes-query--trending .apes-featured-placeholder {
    min-height: 0 !important;
    max-height: 220px;
  }
}


/* =========================================================
   APE-S PATCH V4.6
   Dock móvil final: logo izquierda + unirse centro + menú derecha
   ========================================================= */
@media (max-width: 860px) {
  .apes-mobile-dock {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .apes-mobile-dock__item--logo {
    grid-column: 1;
    order: 1;
    justify-content: center;
    align-items: center;
  }

  .apes-mobile-dock__item--cta {
    grid-column: 2;
    order: 2;
    justify-content: center;
    align-items: center;
    color: var(--apes-cyan);
  }

  .apes-mobile-dock__item--menu {
    grid-column: 3;
    order: 3;
    justify-content: center;
    align-items: center;
  }

  .apes-mobile-dock__item--logo .custom-logo-link,
  .apes-mobile-dock__item--logo img.custom-logo {
    max-width: 58px !important;
    max-height: 27px !important;
  }

  .apes-mobile-dock__item,
  .apes-mobile-dock__item .toggle-inner {
    min-height: 56px;
    padding: .4rem .2rem;
    gap: .22rem;
  }

  .apes-mobile-dock__label,
  .apes-mobile-dock__item .toggle-inner .apes-mobile-dock__label,
  .apes-mobile-dock__item .toggle-text {
    font-size: .64rem;
    line-height: 1;
  }

  .apes-mobile-dock__icon,
  .apes-mobile-dock__item .toggle-inner .apes-mobile-dock__icon {
    width: 1rem;
    height: 1rem;
    font-size: .95rem;
  }

  .apes-mobile-dock__item--menu .toggle-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .22rem;
    width: 100%;
  }

  .apes-mobile-dock__item--logo .custom-logo-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
}

/* =========================================================
   APE-S PATCH V4.7
   Dock móvil sin logo + menú tipo bottom sheet
   ========================================================= */
@media (max-width: 860px) {
  .apes-mobile-dock {
    left: .5rem;
    right: .5rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + .5rem);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    padding: .35rem;
    border-radius: 16px;
    align-items: stretch;
  }

  .apes-mobile-dock__item,
  .apes-mobile-dock__item .toggle-inner {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: .45rem .35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    overflow: hidden;
    text-align: center;
    border-radius: 12px;
    box-sizing: border-box;
  }

  .apes-mobile-dock__item--search {
    grid-column: 1;
    order: 1;
    color: var(--apes-text);
  }

  .apes-mobile-dock__item--cta {
    grid-column: 2;
    order: 2;
    color: var(--apes-cyan);
  }

  .apes-mobile-dock__item--menu {
    grid-column: 3;
    order: 3;
    color: var(--apes-text);
  }

  .apes-mobile-dock__item .toggle-inner {
    pointer-events: none;
  }

  .apes-mobile-dock__icon,
  .apes-mobile-dock__item .toggle-inner .apes-mobile-dock__icon {
    width: 1rem;
    height: 1rem;
    font-size: .95rem;
    line-height: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .apes-mobile-dock__icon svg {
    width: 1rem;
    height: 1rem;
    display: block;
  }

  .apes-mobile-dock__label,
  .apes-mobile-dock__item .toggle-inner .apes-mobile-dock__label,
  .apes-mobile-dock__item .toggle-text {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: .64rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
  }

  /* Asegurar que no quede rastro del logo dentro del dock */
  .apes-mobile-dock__item--logo {
    display: none !important;
  }

  /* Menú móvil tipo bottom sheet, más cómodo para pulgar */
  .menu-modal {
    top: auto !important;
    left: .5rem !important;
    right: .5rem !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 4.9rem) !important;
    height: auto !important;
    max-height: min(68vh, 560px) !important;
    overflow: hidden !important;
    background: transparent !important;
    display: block !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease !important;
    transform: translateY(12px);
    z-index: 10000;
  }

  .menu-modal.active,
  .menu-modal.show-modal {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .admin-bar .menu-modal {
    top: auto !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 4.9rem) !important;
  }

  .menu-modal-inner {
    width: 100% !important;
    max-height: inherit !important;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(10, 10, 15, 0.98) !important;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
  }

  .menu-wrapper {
    width: 100%;
    max-height: inherit;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .menu-modal .menu-top {
    padding: 0;
  }

  button.close-nav-toggle {
    padding: 1rem 1rem .8rem;
    justify-content: flex-end;
    color: #fff;
  }

  button.close-nav-toggle .toggle-text {
    margin-right: .8rem;
    font-size: .9rem;
  }

  .modal-menu {
    position: relative;
    left: auto;
    width: 100%;
  }

  .modal-menu li {
    border-color: rgba(255,255,255,.08);
  }

  .modal-menu > li > .ancestor-wrapper > a,
  .modal-menu > li > a {
    font-size: 1rem;
    font-weight: 700;
  }

  .modal-menu a {
    color: #fff;
    padding: 1rem 1rem;
  }

  .modal-menu a:focus,
  .modal-menu a:hover,
  .modal-menu li.current-menu-item > .ancestor-wrapper > a,
  .modal-menu li.current_page_ancestor > .ancestor-wrapper > a {
    text-decoration: none;
    color: var(--apes-cyan);
  }

  button.sub-menu-toggle {
    border-left-color: rgba(255,255,255,.08);
    color: #fff;
    margin: .7rem 0;
  }
}

/* =========================================================
   APE-S PACK 6 CSS PATCH
   Snapshot / Media Split / Picks del editor
   ========================================================= */

.apes-snapshot-grid {
  gap: 1rem;
}

.apes-snapshot-card {
  height: 100%;
  min-height: 100%;
  border-radius: 22px;
}

.apes-snapshot-card__title {
  margin: .75rem 0 .45rem;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1.2;
}

.apes-snapshot-card__text {
  margin: 0;
  color: var(--apes-muted);
  line-height: 1.65;
}

.apes-media-split {
  gap: 1.25rem;
  align-items: center;
}

.apes-media-split__media {
  position: relative;
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  display: flex;
  align-items: center;
  justify-content: center;
}

.apes-media-split__media span {
  position: absolute;
  z-index: 2;
  font-family: "Roboto Mono", monospace;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(0,240,255,.72);
}

.apes-media-split__image,
.apes-media-split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.apes-media-split__copy {
  padding: 1.65rem;
}

.apes-media-split__list {
  margin: 1rem 0 0;
  color: var(--apes-text);
}

.apes-media-split__list li + li {
  margin-top: .45rem;
}

.apes-ranking-list {
  display: grid;
  gap: 1rem;
}

.apes-ranking-item {
  border-radius: 22px;
}

.apes-ranking-item__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,0,60,.16), rgba(122,4,235,.16));
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  font-family: "Roboto Mono", monospace;
  font-size: .95rem;
  font-weight: 700;
}

.apes-ranking-item__image,
.apes-ranking-item__image img {
  width: 100%;
  height: auto;
  display: block;
}

.apes-ranking-item__image img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
}

.apes-ranking-item__title {
  margin: .75rem 0 .45rem;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.2;
}

.apes-ranking-item__text {
  margin: 0;
  color: var(--apes-muted);
  line-height: 1.65;
}

@media (max-width: 860px) {
  .apes-media-split__media {
    min-height: 300px;
  }

  .apes-ranking-item .wp-block-columns {
    gap: .9rem;
  }

  .apes-ranking-item .wp-block-column[style*="64px"],
  .apes-ranking-item .wp-block-column[style*="120px"],
  .apes-ranking-item .wp-block-column[style*="180px"] {
    flex-basis: 100% !important;
  }
}
