/*
 * NEXO ASIA — theme overrides
 * Estilos que extienden lo definido en theme.json para componentes
 * cuyos efectos no se pueden expresar en tokens (hover, gradients,
 * shadows compuestos, animaciones).
 */

:root {
  --nexo-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   Eyebrow (label que va sobre H2 de cada sección)
   ========================================================= */
.nexo-eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wp--preset--color--brand-red);
  margin: 0 0 1rem;
}
.nexo-eyebrow.has-text-align-center,
p.has-text-align-center.nexo-eyebrow { text-align: center; }

/* =========================================================
   Header (sticky con sombra al scroll)
   ========================================================= */
.wp-site-blocks > header.wp-block-template-part,
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--wp--preset--color--surface);
  transition: box-shadow 0.25s var(--nexo-ease);
}
header.is-scrolled,
header.wp-block-template-part.is-scrolled { box-shadow: var(--wp--preset--shadow--md); }

.nexo-site-logo img {
  max-height: 64px;
  width: auto !important;
  display: block;
}
.nexo-nav .wp-block-navigation-item__content,
.nexo-nav a.wp-block-navigation-item__content,
header.wp-block-template-part .wp-block-navigation-item__content {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--text-strong) !important;
  padding: 0.5rem 0.875rem;
  position: relative;
  transition: color 0.2s var(--nexo-ease);
  text-decoration: none !important;
}
.nexo-nav .wp-block-navigation-item__content:hover,
.nexo-nav .wp-block-navigation-item__content:focus,
header.wp-block-template-part .wp-block-navigation-item__content:hover {
  text-decoration: none !important;
}
/* Footer links: también sin underline doble */
footer.wp-block-template-part a:hover { text-decoration: none !important; }
.nexo-nav .wp-block-navigation-item__content::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: -4px;
  height: 2px;
  background: var(--wp--preset--color--brand-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--nexo-ease);
}
.nexo-nav .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content::after,
.nexo-nav .wp-block-navigation-item:hover .wp-block-navigation-item__content::after { transform: scaleX(1); }
.nexo-nav .wp-block-navigation-item:hover .wp-block-navigation-item__content { color: var(--wp--preset--color--brand-red) !important; }

/* CTA del header */
.nexo-header-cta .wp-block-button__link {
  padding: 0.7rem 1.4rem !important;
  font-size: 0.8125rem !important;
}

/* =========================================================
   Mobile menu (overlay full-screen NEXO)
   ========================================================= */

/* Botón hamburguesa */
.nexo-nav .wp-block-navigation__responsive-container-open {
  color: var(--wp--preset--color--brand-navy) !important;
  padding: 0.5rem !important;
}
.nexo-nav .wp-block-navigation__responsive-container-open svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Overlay full-screen al abrir */
.nexo-nav .wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--brand-navy-900) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

/* Inner: header con logo + close */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
  margin: 0 !important;
  padding: 1.5rem !important;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: none;
}

/* Botón cerrar (X) */
.wp-block-navigation__responsive-container-close {
  position: absolute !important;
  top: 1.25rem !important;
  right: 1.25rem !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08) !important;
  border-radius: 50% !important;
  color: var(--wp--preset--color--surface) !important;
  transition: background 0.2s var(--nexo-ease);
}
.wp-block-navigation__responsive-container-close:hover {
  background: var(--wp--preset--color--brand-red) !important;
}
.wp-block-navigation__responsive-container-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Container del nav abierto */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  gap: 0.5rem !important;
  padding: 4rem 1.5rem 2rem !important;
}

/* Items del menú móvil */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  width: 100%;
  text-align: center;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  display: block !important;
  width: 100%;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: var(--wp--preset--color--surface) !important;
  padding: 1rem !important;
  text-align: center;
  letter-spacing: -0.01em;
  position: relative;
  border-radius: 0;
  outline: none !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after {
  display: none !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:hover .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content {
  color: var(--wp--preset--color--brand-gold) !important;
}

/* Logo arriba en mobile menu (inyectado por JS) */
.nexo-mobile-brand {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: none;
}
.wp-block-navigation__responsive-container.is-menu-open .nexo-mobile-brand {
  display: block;
}
.nexo-mobile-brand img {
  max-height: 56px;
  width: auto;
  filter: brightness(1.1);
}

/* Footer del mobile menu con CTA */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container::after {
  content: '';
  display: block;
  width: min(280px, 80%);
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 1rem auto;
}

.nexo-mobile-cta {
  display: none;
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 80%);
}
.wp-block-navigation__responsive-container.is-menu-open ~ .nexo-mobile-cta,
.wp-block-navigation__responsive-container.is-menu-open .nexo-mobile-cta {
  display: block;
}
.nexo-mobile-cta a {
  display: block;
  background: var(--wp--preset--color--brand-red);
  color: var(--wp--preset--color--surface) !important;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background 0.2s var(--nexo-ease);
  box-shadow: var(--wp--preset--shadow--red);
}
.nexo-mobile-cta a:hover {
  background: var(--wp--preset--color--brand-red-dark);
}

/* Hide CTA del header desktop en mobile */
@media (max-width: 781px) {
  .nexo-header-cta { display: none !important; }
}

/* =========================================================
   Hero cover (imagen + gradient navy)
   ========================================================= */
.nexo-hero {
  min-height: clamp(440px, 60vh, 640px);
  position: relative;
}
.nexo-hero .wp-block-cover__background,
.nexo-hero > span[aria-hidden="true"].wp-block-cover__background {
  background: var(--wp--preset--gradient--hero-overlay) !important;
  opacity: 1 !important;
}
.nexo-hero h1 {
  color: var(--wp--preset--color--surface);
  text-align: center;
  max-width: 920px;
  margin: 0 auto 1.25rem;
}
.nexo-hero p {
  color: rgba(255,255,255,0.88);
  text-align: center;
  font-size: 1.1875rem;
  max-width: 720px;
  margin: 0 auto 2rem;
}
.nexo-hero .wp-block-buttons { justify-content: center; }

.nexo-page-hero {
  min-height: clamp(280px, 36vh, 360px);
}

/* =========================================================
   Section paddings
   ========================================================= */
.nexo-section { padding-top: clamp(64px, 10vw, 120px); padding-bottom: clamp(64px, 10vw, 120px); }
.nexo-section-cream { background: var(--wp--preset--color--surface-cream); }
.nexo-section-navy  { background: var(--wp--preset--color--brand-navy); color: var(--wp--preset--color--surface); }
.nexo-section-navy h2, .nexo-section-navy h3 { color: var(--wp--preset--color--surface) !important; }
.nexo-section-navy p { color: rgba(255,255,255,0.85); }

/* =========================================================
   Cards
   ========================================================= */
.nexo-card {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 16px;
  padding: 2.25rem 1.75rem;
  text-align: center;
  height: 100%;
  box-shadow: var(--wp--preset--shadow--sm);
  transition: transform 0.3s var(--nexo-ease), box-shadow 0.3s var(--nexo-ease);
  position: relative;
  overflow: hidden;
}
.nexo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--wp--preset--gradient--brand-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--nexo-ease);
}
.nexo-card:hover { transform: translateY(-8px); box-shadow: var(--wp--preset--shadow--xl); border-color: transparent; }
.nexo-card:hover::before { transform: scaleX(1); }
.nexo-card .wp-block-image {
  margin: 0 0 1.25rem;
  border-radius: 12px;
  overflow: hidden;
}
.nexo-card .wp-block-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.5s var(--nexo-ease);
}
.nexo-card:hover .wp-block-image img { transform: scale(1.05); }
.nexo-card h3 {
  margin: 0 0 0.5rem;
  color: var(--wp--preset--color--brand-navy);
  font-size: 1.5rem;
}
.nexo-card p { color: var(--wp--preset--color--text-muted); margin: 0; }

/* Card "icon" variant (sin imagen, ícono SVG arriba del título) */
.nexo-card-icon { padding: 2.5rem 1.75rem; }
.nexo-card-icon-svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, rgba(200,16,46,0.08), rgba(212,162,76,0.12));
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--wp--preset--color--brand-red);
}

/* =========================================================
   Testimonials
   ========================================================= */
.nexo-testimonial {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-top: 4px solid var(--wp--preset--color--brand-gold);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--wp--preset--shadow--md);
  height: 100%;
  transition: transform 0.25s var(--nexo-ease), box-shadow 0.25s var(--nexo-ease);
}
.nexo-testimonial:hover { transform: translateY(-4px); box-shadow: var(--wp--preset--shadow--lg); }
.nexo-testimonial .nexo-stars {
  color: var(--wp--preset--color--brand-gold);
  letter-spacing: 4px;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}
.nexo-testimonial blockquote,
.nexo-testimonial .nexo-quote {
  font-style: italic;
  color: var(--wp--preset--color--text-muted);
  margin: 0 0 1rem;
  border: none;
  padding: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
}
.nexo-testimonial .nexo-author { display: flex; align-items: center; gap: 12px; }
.nexo-testimonial .nexo-author img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
}
.nexo-testimonial .nexo-author cite {
  color: var(--wp--preset--color--brand-navy);
  font-style: normal;
  font-weight: 700;
  font-size: 0.9375rem;
}

/* =========================================================
   Gallery
   ========================================================= */
.wp-block-gallery.is-cropped .wp-block-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--wp--preset--shadow--sm);
  transition: all 0.3s var(--nexo-ease);
}
.wp-block-gallery.is-cropped .wp-block-image:hover {
  transform: scale(1.02);
  box-shadow: var(--wp--preset--shadow--lg);
}
.wp-block-gallery.is-cropped .wp-block-image img { transition: transform 0.5s var(--nexo-ease); }

/* =========================================================
   Lists con check rojo (servicios)
   ========================================================= */
.nexo-checklist ul,
.entry-content .nexo-checklist {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}
.nexo-checklist li {
  padding-left: 32px;
  position: relative;
  margin-bottom: 0.75rem;
  color: var(--wp--preset--color--text-muted);
  font-size: 1.0625rem;
}
.nexo-checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 18px; height: 18px;
  background: var(--wp--preset--color--brand-red);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6L5 9L10 4' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

/* =========================================================
   Form de contacto
   ========================================================= */
.nexo-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.nexo-contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.nexo-contact-form label span {
  font-weight: 600;
  color: var(--wp--preset--color--brand-navy);
  font-size: 0.9375rem;
}
.nexo-contact-form input,
.nexo-contact-form textarea {
  border: 1.5px solid #CBD3DD;
  border-radius: 8px;
  padding: 0.95rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  background: var(--wp--preset--color--surface-gray);
  transition: border-color 0.2s var(--nexo-ease), background 0.2s var(--nexo-ease), box-shadow 0.2s var(--nexo-ease);
  color: var(--wp--preset--color--text-strong);
  width: 100%;
  box-sizing: border-box;
}
.nexo-contact-form input::placeholder,
.nexo-contact-form textarea::placeholder { color: var(--wp--preset--color--text-subtle); }
.nexo-contact-form input:hover,
.nexo-contact-form textarea:hover {
  border-color: #9AA4B2;
  background: var(--wp--preset--color--surface);
}
.nexo-contact-form input:focus,
.nexo-contact-form textarea:focus {
  border-color: var(--wp--preset--color--brand-red);
  background: var(--wp--preset--color--surface);
  outline: none;
  box-shadow: 0 0 0 4px rgba(200,16,46,0.10);
}
.nexo-contact-form .nexo-honeypot { display: none; }
.nexo-contact-form button[type="submit"] {
  padding: 1rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--wp--preset--color--brand-red);
  color: var(--wp--preset--color--surface);
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  cursor: pointer;
  align-self: flex-start;
  box-shadow: var(--wp--preset--shadow--red);
  transition: all 0.25s var(--nexo-ease);
}
.nexo-contact-form button[type="submit"]:hover {
  background: var(--wp--preset--color--brand-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(200,16,46,0.34);
}

.nexo-form-notice {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin-bottom: 2rem;
}
.nexo-form-notice.is-success { background: var(--wp--preset--color--brand-gold); color: var(--wp--preset--color--brand-navy); }
.nexo-form-notice.is-error   { background: var(--wp--preset--color--brand-red);  color: var(--wp--preset--color--surface); }

/* =========================================================
   Footer
   ========================================================= */
.wp-block-template-part footer.wp-site-blocks,
footer.wp-block-template-part {
  background: var(--wp--preset--color--brand-navy-900) !important;
  color: rgba(255,255,255,0.72);
}
footer.wp-block-template-part h3,
footer.wp-block-template-part .wp-block-heading {
  color: var(--wp--preset--color--surface) !important;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem !important;
  font-weight: 700;
}
footer.wp-block-template-part p,
footer.wp-block-template-part li { color: rgba(255,255,255,0.7); line-height: 1.7; }
footer.wp-block-template-part a {
  color: rgba(255,255,255,0.72) !important;
  text-decoration: none;
  transition: color 0.2s var(--nexo-ease);
}
footer.wp-block-template-part a:hover { color: var(--wp--preset--color--brand-gold) !important; }
footer.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content { color: inherit; }
footer.wp-block-template-part .nexo-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  margin-top: 3rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.8125rem;
  text-align: center;
}
footer.wp-block-template-part .nexo-footer-logo {
  max-width: 140px;
  margin-bottom: 1rem;
  filter: brightness(1.1);
}

/* =========================================================
   Cookie banner
   ========================================================= */
#nexo-cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--text-strong);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 12px;
  box-shadow: var(--wp--preset--shadow--xl);
  padding: 1.25rem 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s var(--nexo-ease), transform 0.3s var(--nexo-ease);
}
#nexo-cookie-banner.is-visible { opacity: 1; transform: translateY(0); }
#nexo-cookie-banner.is-dismissed { opacity: 0; transform: translateY(20px); pointer-events: none; }
.nexo-cookie-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.nexo-cookie-text { flex: 1 1 320px; min-width: 0; }
.nexo-cookie-text strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--brand-navy);
  margin-bottom: 0.25rem;
  font-weight: 700;
}
.nexo-cookie-text p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--wp--preset--color--text-muted);
}
.nexo-cookie-text a {
  color: var(--wp--preset--color--brand-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.nexo-cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.nexo-cookie-btn {
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s var(--nexo-ease);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nexo-cookie-deny {
  background: transparent;
  color: var(--wp--preset--color--text-muted);
  border: 1.5px solid var(--wp--preset--color--border);
}
.nexo-cookie-deny:hover { border-color: var(--wp--preset--color--text-muted); color: var(--wp--preset--color--text-strong); }
.nexo-cookie-accept {
  background: var(--wp--preset--color--brand-red);
  color: var(--wp--preset--color--surface);
  box-shadow: var(--wp--preset--shadow--red);
}
.nexo-cookie-accept:hover {
  background: var(--wp--preset--color--brand-red-dark);
  transform: translateY(-1px);
}
@media (max-width: 600px) {
  #nexo-cookie-banner { padding: 1rem; }
  .nexo-cookie-actions { width: 100%; }
  .nexo-cookie-actions .nexo-cookie-btn { flex: 1; }
}

/* =========================================================
   Animaciones de entrada
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .nexo-section { animation: nexoFadeUp 0.6s var(--nexo-ease) both; }
  @keyframes nexoFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 781px) {
  .nexo-card { padding: 1.75rem 1.25rem; }
  .nexo-hero p { font-size: 1.0625rem; }
}
