/*
 * GGC Enterprise — Integración WordPress.
 * Estilos que conectan WP con el sistema de diseño (theme.css) usando sus
 * mismos tokens. No altera el diseño aprobado: cubre estados dinámicos
 * (header al hacer scroll, menú móvil), el admin bar, el contenido de
 * entradas/páginas, comentarios, formularios nativos y breadcrumbs.
 */

/* ---- Admin bar: no tapar el header fijo ---- */
.admin-bar header.fixed { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar header.fixed { top: 46px; }
}

/* ---- Header: estado al desplazar (lo activa main.js) ---- */
header.fixed {
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
}
header.fixed.is-scrolled {
  background: color-mix(in oklab, var(--background) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--border, oklch(28% .018 290));
}

/* ---- Enlace de navegación activo ---- */
nav a.nav-link.is-active,
nav a.nav-link[aria-current="true"] { color: var(--foreground, #fcfcfc); }

/* ---- Menú principal cuando se asigna uno desde Apariencia → Menús ---- */
.ggc-primary-nav__list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ggc-primary-nav__list li { margin: 0; }

/* ---- Menú móvil ---- */
#ggc-mobile-menu[hidden] { display: none; }
#ggc-mobile-menu {
  position: fixed;
  inset: 4rem 0 auto 0;
  z-index: 49;
  padding: 1.25rem 1.5rem 1.75rem;
  background: color-mix(in oklab, var(--background) 94%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border, oklch(28% .018 290));
}
#ggc-mobile-menu nav { display: flex; flex-direction: column; gap: .25rem; }
#ggc-mobile-menu a {
  padding: .75rem .25rem;
  font-size: 1rem;
  color: var(--foreground, #fcfcfc);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  text-decoration: none;
}
#ggc-mobile-menu a.ggc-mobile-cta {
  margin-top: .75rem;
  border-bottom: 0;
  color: var(--brand-magenta, #e24ea0);
  font-weight: 500;
}
html.ggc-menu-open { overflow: hidden; }

/* ---- Honeypot antispam (oculto para humanos, visible para bots) ---- */
.ggc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---- Reveal on scroll (progresivo, respeta reduce-motion vía JS) ---- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---- Contenido interior (páginas, entradas, resultados) ---- */
.ggc-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 9rem 1.5rem 6rem;
}
.ggc-page--wide { max-width: 1240px; }
.ggc-page__title {
  font-family: var(--font-display, "Montserrat"), sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 1.5rem;
  color: var(--foreground, #fcfcfc);
}
.ggc-prose { color: var(--ink-secondary, oklch(74% .012 280)); line-height: 1.8; font-size: 1.05rem; }
.ggc-prose h2, .ggc-prose h3, .ggc-prose h4 {
  font-family: var(--font-display, "Montserrat"), sans-serif;
  color: var(--foreground, #fcfcfc);
  letter-spacing: -0.01em;
  margin: 2.2em 0 .7em;
}
.ggc-prose h2 { font-size: 1.75rem; }
.ggc-prose h3 { font-size: 1.35rem; }
.ggc-prose a { color: var(--brand-magenta, #e24ea0); text-underline-offset: 3px; }
.ggc-prose a:hover { text-decoration: underline; }
.ggc-prose img { max-width: 100%; height: auto; border-radius: var(--radius, .75rem); }
.ggc-prose blockquote {
  border-left: 3px solid var(--brand-magenta, #e24ea0);
  margin: 1.5em 0; padding: .25em 0 .25em 1.25em; color: var(--foreground, #fcfcfc);
}
.ggc-prose code, .ggc-prose pre {
  font-family: var(--font-mono, ui-monospace), monospace;
  background: var(--secondary, oklch(21.5% .018 290));
  border-radius: .5rem;
}
.ggc-prose pre { padding: 1rem 1.25rem; overflow: auto; }
.ggc-prose code { padding: .15em .45em; }
.ggc-prose ul, .ggc-prose ol { padding-left: 1.4em; }
.ggc-prose li { margin: .4em 0; }

/* ---- Contenido importado (legacy): que no rompa el diseño nuevo ---- */
.ggc-prose table {
  width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95em; display: block; overflow-x: auto;
}
.ggc-prose th, .ggc-prose td {
  border: 1px solid var(--border, oklch(28% .018 290)); padding: .6em .8em; text-align: left;
}
.ggc-prose th { background: var(--secondary, oklch(21.5% .018 290)); color: var(--foreground, #fcfcfc); }
.ggc-prose figure { margin: 1.5em 0; max-width: 100%; }
.ggc-prose figcaption, .ggc-prose .wp-caption-text { font-size: .85em; color: var(--ink-tertiary, oklch(60% .01 280)); margin-top: .5em; text-align: center; }
.ggc-prose iframe, .ggc-prose video, .ggc-prose embed, .ggc-prose object {
  max-width: 100%; border: 0; border-radius: var(--radius, .75rem);
}
.ggc-prose .wp-block-embed__wrapper, .ggc-prose .wp-caption { max-width: 100%; }
.ggc-prose .alignleft { float: left; margin: .25em 1.5em 1em 0; max-width: 50%; }
.ggc-prose .alignright { float: right; margin: .25em 0 1em 1.5em; max-width: 50%; }
.ggc-prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.ggc-prose .alignwide { max-width: 1100px; }
.ggc-prose .alignfull { max-width: none; }
.ggc-prose hr { border: 0; border-top: 1px solid var(--border, oklch(28% .018 290)); margin: 2em 0; }
.ggc-prose > *:first-child { margin-top: 0; }
@media (max-width: 640px) {
  .ggc-prose .alignleft, .ggc-prose .alignright { float: none; max-width: 100%; margin: 1em 0; }
}

/* ---- Grilla de archivo / blog ---- */
.ggc-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  max-width: 1240px; margin: 0 auto; padding: 9rem 1.5rem 6rem;
}
.ggc-card {
  display: flex; flex-direction: column;
  background: color-mix(in oklab, var(--background) 78%, #fff 3%);
  border: 1px solid var(--border, oklch(28% .018 290));
  border-radius: var(--radius-xl, 1rem);
  overflow: hidden; transition: border-color .25s ease, transform .25s ease;
}
.ggc-card:hover { border-color: var(--brand-magenta, #e24ea0); transform: translateY(-2px); }
.ggc-card__thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.ggc-card__body { padding: 1.25rem 1.35rem 1.5rem; }
.ggc-card__title { font-family: var(--font-display), sans-serif; font-size: 1.15rem; margin: 0 0 .5rem; color: var(--foreground, #fcfcfc); }
.ggc-card__meta { font-size: .8rem; color: var(--ink-tertiary, oklch(60% .01 280)); }
.ggc-card a { color: inherit; text-decoration: none; }

/* ---- Botón utilitario del tema ---- */
.ggc-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: var(--radius, .75rem);
  font-weight: 500; font-size: .95rem; cursor: pointer;
  background: var(--brand-magenta, #e24ea0); color: #fff; border: 0;
  text-decoration: none; transition: filter .2s ease;
}
.ggc-btn:hover { filter: brightness(1.08); }
.ggc-btn--ghost {
  background: transparent; color: var(--foreground, #fcfcfc);
  border: 1px solid var(--border, oklch(28% .018 290));
}

/* ---- Formulario de contacto (CF7 y fallback nativo) ---- */
.ggc-form { display: grid; gap: 1rem; max-width: 560px; }
.ggc-form label { display: block; font-size: .85rem; color: var(--ink-secondary); margin-bottom: .35rem; }
.ggc-form input, .ggc-form textarea, .ggc-form select,
.wpcf7 input:not([type=submit]), .wpcf7 textarea, .wpcf7 select {
  width: 100%; padding: .8rem 1rem;
  background: color-mix(in oklab, var(--background) 70%, #000 10%);
  color: var(--foreground, #fcfcfc);
  border: 1px solid var(--border, oklch(28% .018 290));
  border-radius: var(--radius, .75rem);
  font: inherit;
}
.ggc-form input:focus, .ggc-form textarea:focus,
.wpcf7 input:focus, .wpcf7 textarea:focus {
  outline: 2px solid var(--focus-color, #575ECF); outline-offset: 1px; border-color: transparent;
}
.ggc-form textarea, .wpcf7 textarea { min-height: 140px; resize: vertical; }
.wpcf7 input[type=submit], .ggc-form button[type=submit] {
  background: var(--brand-magenta, #e24ea0); color: #fff; border: 0;
  padding: .85rem 1.6rem; border-radius: var(--radius, .75rem); font-weight: 600; cursor: pointer;
}
.wpcf7-response-output { border-radius: .6rem !important; margin: .5rem 0 0 !important; }

/* ---- Breadcrumbs ---- */
.ggc-breadcrumbs { max-width: 1240px; margin: 0 auto; padding: 6.5rem 1.5rem 0; font-size: .82rem; color: var(--ink-tertiary); }
.ggc-breadcrumbs a { color: var(--ink-secondary); text-decoration: none; }
.ggc-breadcrumbs a:hover { color: var(--foreground); }
.ggc-breadcrumbs [aria-current="page"] { color: var(--foreground); }

/* ---- Paginación ---- */
.ggc-pagination { display: flex; gap: .5rem; justify-content: center; padding: 0 1.5rem 5rem; flex-wrap: wrap; }
.ggc-pagination .page-numbers {
  padding: .5rem .9rem; border-radius: .6rem; text-decoration: none;
  border: 1px solid var(--border); color: var(--ink-secondary);
}
.ggc-pagination .page-numbers.current { background: var(--brand-magenta, #e24ea0); color: #fff; border-color: transparent; }

/* ---- Comentarios ---- */
.ggc-comments { max-width: 820px; margin: 0 auto; padding: 0 1.5rem 6rem; color: var(--ink-secondary); }
.ggc-comments .comment-body { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }

/* ---- Widgets ---- */
.ggc-widget { margin-bottom: 2rem; }
.ggc-widget__title { font-family: var(--font-display), sans-serif; font-size: 1.05rem; color: var(--foreground); margin: 0 0 .8rem; }

/* ---- Screen-reader helper (por si theme.css no lo define) ---- */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}

/* ============================================================
   CAPA PREMIUM — refinamientos visuales (no altera estructura).
   Se carga DESPUÉS de theme.css y solo usa los tokens del diseño.
   ============================================================ */

/* ---- Scroll suave + anclas por debajo del header fijo ---- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
section[id] { scroll-margin-top: 88px; }

/* ---- Botones: microinteracciones elegantes ---- */
.btn-primary, .btn-ghost {
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s ease, filter .25s ease, border-color .25s ease, background-color .25s ease;
  will-change: transform;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -14px color-mix(in oklab, var(--brand-magenta, #e24ea0) 85%, transparent);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--brand-magenta, #e24ea0) 55%, var(--border, oklch(28% .018 290)));
}
.btn-arrow svg { transition: transform .25s cubic-bezier(.2,.7,.3,1); }
.btn-arrow:hover svg { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover, .btn-ghost:hover { transform: none; }
  .btn-arrow:hover svg { transform: none; }
}

/* ---- Tarjetas: leve elevación al hover (premium, sin sombras exageradas) ---- */
.card-premium {
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.card-premium:hover {
  transform: translateY(-4px);
  border-color: color-mix(in oklab, var(--brand-magenta, #e24ea0) 42%, var(--border, oklch(28% .018 290)));
  box-shadow: 0 24px 60px -30px color-mix(in oklab, var(--brand-magenta, #e24ea0) 60%, transparent);
}
@media (prefers-reduced-motion: reduce) { .card-premium:hover { transform: none; } }

/* ---- Hero: tarjetas de métricas ---- */
.ggc-metric {
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid var(--border, oklch(28% .018 290));
  border-radius: var(--radius-xl, 1rem);
  background: color-mix(in oklab, var(--background, #16151d) 74%, #fff 3%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s ease, background-color .3s ease;
}
.ggc-metric:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--brand-magenta, #e24ea0) 45%, var(--border, oklch(28% .018 290)));
  background: color-mix(in oklab, var(--background, #16151d) 66%, #fff 5%);
}
.ggc-metric__value {
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: .35rem;
  background: var(--gradient-brand, linear-gradient(92deg, #e24ea0, #a855f7));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.ggc-metric__label {
  font-size: .74rem;
  line-height: 1.25;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-tertiary, oklch(60% .01 280));
}
@media (prefers-reduced-motion: reduce) { .ggc-metric:hover { transform: none; } }

/* ---- Marquesina de marcas: premium, lenta, logos en blanco, fade ---- */
.ggc-marquee__track { opacity: 1; }
.ggc-marquee .animate-scroll-x { animation-duration: 46s !important; }
.ggc-marquee:hover .animate-scroll-x { animation-play-state: paused; }
.ggc-marquee img {
  filter: brightness(0) invert(1);
  opacity: .6;
  transition: opacity .3s ease, transform .3s ease;
}
.ggc-marquee a:hover img,
.ggc-marquee img:hover { opacity: 1; transform: translateY(-1px); }
.ggc-marquee__track .font-display {
  color: color-mix(in oklab, var(--foreground, #fcfcfc) 72%, transparent);
  transition: color .3s ease;
}
.ggc-marquee a:hover .font-display,
.ggc-marquee__track .font-display:hover {
  color: var(--foreground, #fcfcfc);
}

/* ---- Navegación superior premium (icono sobre texto) ---- */
.ggc-topnav { gap: 1.4rem; }
.ggc-topnav__item {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  font-size: .74rem; letter-spacing: .015em; line-height: 1;
  color: var(--ink-secondary, oklch(74% .012 280));
  text-decoration: none; padding: .1rem .15rem .45rem; position: relative;
  transition: color .2s ease;
}
.ggc-topnav__item:hover { color: var(--foreground, #fcfcfc); }
.ggc-topnav__item.is-active { color: var(--foreground, #fcfcfc); }
.ggc-topnav__ico { width: 20px; height: 20px; display: grid; place-items: center; opacity: .92; }
.ggc-topnav__ico svg { width: 20px; height: 20px; display: block; }
.ggc-topnav__label { display: inline-flex; align-items: center; gap: .28rem; white-space: nowrap; }
.ggc-topnav__caret { opacity: .55; }
.ggc-topnav__item.is-active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -1px; width: 22px; height: 2px; border-radius: 2px;
  background: var(--brand-magenta, #e24ea0);
}
.ggc-topnav__login {
  font-size: .9rem; white-space: nowrap; text-decoration: none;
  color: color-mix(in oklab, var(--brand-magenta, #e24ea0) 42%, var(--foreground, #fcfcfc));
  transition: color .2s ease;
}
.ggc-topnav__login:hover { color: var(--foreground, #fcfcfc); }
.ggc-cta-pill {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: .62rem 1.15rem; border-radius: .7rem;
  font-size: .9rem; font-weight: 600; color: #fff;
  background: var(--brand-magenta, #e24ea0); text-decoration: none;
  box-shadow: 0 12px 28px -14px color-mix(in oklab, var(--brand-magenta, #e24ea0) 85%, transparent);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), filter .25s ease, box-shadow .25s ease;
}
.ggc-cta-pill:hover { transform: translateY(-2px); filter: brightness(1.06); }
@media (prefers-reduced-motion: reduce) { .ggc-cta-pill:hover { transform: none; } }

/* ---- Servicios: tarjetas premium con imagen ---- */
.ggc-svc-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 300px; border-radius: var(--radius-xl, 1rem); overflow: hidden; isolation: isolate;
  border: 1px solid var(--border, oklch(28% .018 290)); text-decoration: none;
  background: linear-gradient(160deg, color-mix(in oklab, var(--background, #16151d) 55%, #000 10%), color-mix(in oklab, var(--brand-magenta, #e24ea0) 16%, var(--background, #16151d)));
  transition: transform .35s cubic-bezier(.2,.7,.3,1), border-color .35s ease, box-shadow .35s ease;
}
.ggc-svc-card__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .5s ease;
}
.ggc-svc-card__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12,10,16,0) 22%, rgba(12,10,16,.5) 58%, rgba(12,10,16,.92) 100%);
}
.ggc-svc-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in oklab, var(--brand-magenta, #e24ea0) 48%, var(--border, oklch(28% .018 290)));
  box-shadow: 0 30px 70px -32px color-mix(in oklab, var(--brand-magenta, #e24ea0) 60%, transparent);
}
.ggc-svc-card:hover .ggc-svc-card__img { transform: scale(1.06); }
.ggc-svc-card__icon {
  position: absolute; top: 1rem; left: 1rem; width: 42px; height: 42px; border-radius: .7rem;
  display: grid; place-items: center; z-index: 1;
  background: color-mix(in oklab, var(--background, #16151d) 52%, transparent);
  border: 1px solid color-mix(in oklab, #fff 14%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--brand-magenta-glow, #f472b6);
}
.ggc-svc-card__icon svg { width: 22px; height: 22px; }
.ggc-svc-card__body { position: relative; padding: 1.3rem 1.3rem 1.4rem; }
.ggc-svc-card__sub { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-magenta-glow, #f472b6); margin-bottom: .4rem; }
.ggc-svc-card__title { display: block; font-family: var(--font-display), sans-serif; font-weight: 700; font-size: 1.3rem; line-height: 1.1; letter-spacing: -.01em; color: #fff; margin-bottom: .5rem; }
.ggc-svc-card__desc { display: block; font-size: .84rem; line-height: 1.5; color: color-mix(in oklab, #fff 80%, transparent); }
@media (max-width: 767px) { .ggc-svc-card { min-height: 240px; } .ggc-svc-card__title { font-size: 1.1rem; } }
/* Tarjeta-imagen completa (la imagen ya trae su texto) */
.ggc-svc-card--full { min-height: 0; display: block; padding: 0; }
.ggc-svc-card--full .ggc-svc-card__full { display: block; width: 100%; height: auto; transition: transform .5s ease; }
.ggc-svc-card--full:hover .ggc-svc-card__full { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .ggc-svc-card--full:hover .ggc-svc-card__full { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ggc-svc-card:hover { transform: none; } .ggc-svc-card:hover .ggc-svc-card__img { transform: none; }
}

/* ---- Sobre nosotros: composición visual ---- */
.ggc-about-visual {
  position: relative; border-radius: var(--radius-xl, 1rem); overflow: hidden;
  border: 1px solid var(--border, oklch(28% .018 290)); aspect-ratio: 4 / 3;
  box-shadow: 0 40px 90px -50px color-mix(in oklab, var(--brand-magenta, #e24ea0) 70%, transparent);
}
.ggc-about-visual__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ggc-about-visual__ph {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 15% 10%, color-mix(in oklab, var(--brand-violet-glow, #8b7cf6) 35%, transparent), transparent 60%),
    radial-gradient(120% 90% at 85% 90%, color-mix(in oklab, var(--brand-magenta, #e24ea0) 35%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in oklab, var(--background, #16151d) 60%, #000 8%), var(--background, #16151d));
}
.ggc-about-visual__ph::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(color-mix(in oklab, #fff 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklab, #fff 6%, transparent) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(80% 80% at 50% 50%, #000 30%, transparent 100%);
}
