/* Shared overrides: atomized fixes for all preview pages */

/* Hero "Llámanos" button: blue */
.nx-hero .nx-btn {
  background: #27a8e0;
}

/* "Pedir cita" nav button: hover blue */
.nx-nav-cta:hover {
  background: #27a8e0 !important;
  border-color: #27a8e0 !important;
}

/* ── Mobile call float (phone icon, only on mobile) ─────────────── */
.nx-call-float {
  display: none;
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #27a8e0;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(39, 168, 224, 0.35);
  z-index: 12000;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-size: 22px;
}
.nx-call-float:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 34px rgba(39, 168, 224, 0.45);
}
@media (max-width: 767px) {
  .nx-call-float {
    display: inline-flex;
    left: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
    font-size: 20px;
  }
}

/* Robust dropdown hover bridge to avoid cursor gap breaks */
.nx-nav li.has-dropdown {
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.nx-nav .nx-dropdown {
  top: calc(100% - 2px);
}

.nx-nav .nx-dropdown::before {
  top: -14px;
  height: 14px;
}

/* Persistent WhatsApp floating CTA */
.nx-wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35);
  z-index: 12000;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nx-wa-float:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.45);
}

.nx-wa-float:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.3);
  outline-offset: 2px;
}

.nx-wa-float svg {
  width: 30px;
  height: 30px;
  display: block;
}

@media (max-width: 600px) {
  .nx-wa-float {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }

  .nx-wa-float svg {
    width: 28px;
    height: 28px;
  }
}

/* ── CTA section "Empieza ya tu recuperación" ────────────────────── */

/* Make template take full width within the flex section-inner */
.nx-section-inner > .nx-widget.nx-template {
  width: 100%;
}

/* "Empieza ya tu recuperación" heading: smaller, light weight, centered */
.nx-template .nx-heading {
  width: 100%;
}
.nx-template .nx-heading h2.section-title {
  font-size: 1.2rem;
  font-weight: 400;
  text-align: center;
  margin: 0;
}

/* Section with template: compact padding */
.nx-section--light:has(.nx-template) {
  padding: 24px 40px;
}

/* CTA block inside section: no extra padding stacking */
.nx-section-inner .nx-template {
  padding: 0;
  max-width: none;
  margin: 0;
}
.nx-template .nx-section {
  padding: 8px 0;
}

/* Consecutive light sections: avoid double padding */
.nx-section--light + .nx-section--light {
  padding-top: 0;
}

/* CTA block: horizontal layout, text left — buttons right */
.nx-cta-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 28px 36px;
  background: var(--nx-cta);
  border-radius: 16px;
}
/* "Quiero pedir cita" title: white, left-aligned, no margin */
.nx-cta-block .nx-heading h2.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  text-align: left;
  flex: 1 1 200px;
}
.nx-cta-block .nx-heading {
  flex: 1 1 200px;
}
.nx-cta-block .nx-btn-wrap,
.nx-cta-block .nx-btn {
  flex-shrink: 0;
}

.nx-footer-cop img {
  max-width: 160px;
}

/* ── Profile page (quienes-somos): jerarquía visual correcta ─────────
   En Elementor original:
     .section-title = 18px muted (label intro, "Hola Soy Melani...")
     .sub-title     = 37px purple bold (título del rol, "Psicóloga")
   El diseño actual invierte eso — lo corregimos con el selector .nx-col-profile
   que ya está en el HTML, sin afectar otras páginas.
   ──────────────────────────────────────────────────────────────────── */

/* Profile photo: full size, not icon */
.nx-col-profile .section__icon img {
  max-width: 220px;
  width: 100%;
}

/* "Hola Soy Melani..." → label intro — original: 18px/600/muted */
.nx-col-profile h2.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nx-text-muted);
  text-transform: none;
  letter-spacing: normal;
  margin: 0 0 8px;
}

/* "Psicóloga" → título principal — original: 37px/700/purple */
.nx-col-profile h1.sub-title,
.nx-col-profile h1.section__sub-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--nx-primary);
  margin: 0 0 16px;
  line-height: 1.2;
}

/* ── Page-specific fidelity fixes: quienes-somos ─────────────────── */
.nx-page--profile .nx-hero {
  background-color: #8e59fd;
  background-image:
    linear-gradient(140deg, #b08afe 0%, #8e59fd 54%, #6a39d5 100%),
    url("https://centroopenmind.com/wp-content/uploads/2023/11/The-therapist-helps-clear-the-patients-mind-1024x1024.png");
  background-position: center center, right center;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, 25% auto;
}

.nx-page--profile .nx-hero .nx-section-inner {
  justify-content: center;
}

.nx-page--profile .nx-hero-title {
  font-size: 35px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  max-width: 74%;
  margin: 0 auto;
}

.nx-page--profile .nx-col-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

.nx-page--profile .nx-col-profile .section__icon img {
  width: 260px;
  height: 340px;
  max-width: none;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem;
}

.nx-page--profile .nx-col-profile h2.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--nx-text-muted);
  margin: 0.4rem 0 0;
  line-height: 1.4;
  text-align: center;
}

.nx-page--profile .nx-col-profile h1.sub-title,
.nx-page--profile .nx-col-profile h1.section__sub-title,
.nx-page--profile .nx-col-profile h2.sub-title,
.nx-page--profile .nx-col-profile h2.section__sub-title {
  font-size: 37px;
  font-weight: 700;
  color: var(--nx-primary);
  margin: 0.4rem 0 0.5rem;
  line-height: 1.2;
  text-align: center;
}

.nx-page--profile .nx-col-profile .nx-btn-wrap {
  margin-top: 0.75rem;
}

.nx-page--profile .nx-col-profile .elementor-icon-wrapper {
  margin-top: 0.75rem;
  width: 100%;
  text-align: center;
}

.nx-page--profile .nx-col-profile .elementor-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--nx-primary);
  text-decoration: none;
}

.nx-page--profile .nx-col-profile .elementor-icon:hover {
  color: var(--nx-cta);
}

.nx-page--profile .nx-col + .nx-col .nx-widget p {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--nx-text-muted);
}

.nx-page--profile .nx-col + .nx-col .nx-widget p:first-child {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--nx-primary);
  letter-spacing: 0.02em;
}

@media (max-width: 767px) {
  .nx-page--profile .nx-hero {
    background-position: center center, 279px -141px;
    background-size: cover, 55% auto;
  }

  .nx-page--profile .nx-hero-title {
    font-size: 24px;
    max-width: 432px;
  }

  .nx-page--profile .nx-col-profile .section__icon img {
    width: min(78vw, 260px);
    height: auto;
    aspect-ratio: 260 / 340;
  }
}

/* ── Contacto page ────────────────────────────────────────────────── */

/* Header: beige background, all content centered */
.nx-contact-header {
  background: #F9F6F5;
  padding: 50px 40px 40px;
}
.nx-contact-header .nx-section-inner {
  justify-content: center;
}
.nx-contact-header .nx-col-100 {
  text-align: center;
}
/* "Contacta con nosotros" label */
.nx-contact-header h2.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nx-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 0 0 12px;
}
/* "Es el momento de tomar las riendas de tu vida" */
.nx-contact-header h1.sub-title,
.nx-contact-header h1.section__sub-title {
  font-size: 22px;
  font-weight: 400;
  color: var(--nx-text-muted);
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

/* Layout section: beige background */
.nx-contact-layout {
  background: #F9F6F5;
  padding-top: 0;
  padding-bottom: 50px;
}

/* Info column section titles: 24px/600/purple, no uppercase */
.nx-contact-info-col h2.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--nx-primary);
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
  margin: 0 0 6px;
}
/* Info subtitles: 15px/400/muted */
.nx-contact-info-col span.sub-title,
.nx-contact-info-col span.section__sub-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--nx-text-muted);
  display: block;
  margin: 0 0 24px;
  line-height: 1.6;
}

/* Map iframe: full height */
.nx-contact-layout .elementor-custom-embed iframe,
.nx-contact-layout iframe {
  height: 600px;
  width: 100%;
  border: none;
  border-radius: 8px;
  display: block;
}

/* Form column: white card with shadow */
.nx-contact-layout .nx-col-50:last-child {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px -5px rgba(0,0,0,0.15);
  padding: 24px;
}
/* Form heading "Mándanos un mensaje" */
.nx-contact-layout .nx-col-50:last-child h2.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--nx-primary);
  text-transform: none;
  letter-spacing: normal;
  text-align: center;
  margin: 0 0 20px;
}

/* ── Nexus form styles ────────────────────────────────────────────── */
.nexus-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
.nexus-form-field label {
  font-family: var(--nx-font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nx-text);
}
.nexus-form-field input[type="text"],
.nexus-form-field input[type="email"],
.nexus-form-field input[type="tel"],
.nexus-form-field textarea {
  font-family: var(--nx-font);
  font-size: 0.9rem;
  color: var(--nx-text);
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}
.nexus-form-field input:focus,
.nexus-form-field textarea:focus {
  border-color: var(--nx-primary);
  background: #fff;
}
.nexus-form-field textarea { resize: vertical; min-height: 110px; }

/* Acceptance / checkbox */
.nexus-form-field--acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--nx-text-muted);
  cursor: pointer;
  line-height: 1.5;
}
.nexus-form-field--acceptance input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--nx-primary);
}
.nexus-form-field--acceptance a { color: var(--nx-primary); }

/* Legal text */
.nexus-form-field--html p {
  font-size: 0.75rem;
  color: #999;
  line-height: 1.5;
  margin: 0;
}
.nexus-form-field--html a { color: var(--nx-primary); }

/* Submit button */
.nexus-form-submit {
  margin-top: 8px;
}
.nexus-form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: var(--nx-primary);
  color: #fff;
  font-family: var(--nx-font);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--nx-radius-btn);
  border: none;
  cursor: pointer;
  transition: opacity 0.18s;
  width: 100%;
}
.nexus-form-btn:hover { opacity: 0.85; }

/* Error messages */
.nexus-field-error {
  font-size: 0.78rem;
  color: #e53e3e;
  min-height: 1em;
}

/* Success/error message area */
.nexus-form-messages {
  font-size: 0.88rem;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 6px;
}

@media (max-width: 900px) {
  .nx-contact-layout .nx-col-50:last-child {
    padding: 20px 16px;
  }
  .nx-contact-layout .elementor-custom-embed iframe,
  .nx-contact-layout iframe {
    height: 300px;
  }
}

/* ================================================================
   Blog post layout — nx-blog-*
   Misma base de design system, mismo header/footer.
   ================================================================ */

/* ── Breadcrumb ───────────────────────────────────────────────── */
.nx-blog-breadcrumb {
  background: var(--nx-bg-light);
  padding: 10px 0;
  font-size: 0.8rem;
  color: var(--nx-text-muted);
  font-family: var(--nx-font);
}
.nx-blog-breadcrumb-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nx-blog-breadcrumb a {
  color: var(--nx-primary);
  text-decoration: none;
  font-weight: 500;
}
.nx-blog-breadcrumb a:hover { text-decoration: underline; }
.nx-blog-breadcrumb-sep { opacity: 0.5; }
.nx-blog-breadcrumb-current { color: var(--nx-text-muted); }

/* ── Post hero ────────────────────────────────────────────────── */
.nx-blog-hero {
  background: linear-gradient(135deg, #f5f0fb 0%, #ede5ff 100%);
  padding: 56px 24px 48px;
  text-align: center;
}
.nx-blog-hero-inner {
  max-width: 780px;
  margin: 0 auto;
}
.nx-blog-category-pill {
  display: inline-block;
  background: var(--nx-primary);
  color: #fff;
  font-family: var(--nx-font);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  text-decoration: none;
}
.nx-blog-title {
  font-family: var(--nx-font);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--nx-text);
  line-height: 1.2;
  margin: 0 0 18px;
}
.nx-blog-meta {
  font-family: var(--nx-font);
  font-size: 0.82rem;
  color: var(--nx-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.nx-blog-meta i { margin-right: 4px; color: var(--nx-primary); }
.nx-blog-excerpt {
  font-family: var(--nx-font);
  font-size: 1.05rem;
  color: var(--nx-text-muted);
  line-height: 1.7;
  margin: 20px 0 0;
  font-style: italic;
}

/* ── Featured image ───────────────────────────────────────────── */
.nx-blog-featured-img {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}
.nx-blog-featured-img img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin: -24px auto 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* ── Article content ──────────────────────────────────────────── */
.nx-blog-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 40px;
}
.nx-blog-content {
  font-family: var(--nx-font);
  font-size: 1rem;
  color: var(--nx-text);
  line-height: 1.8;
}
.nx-blog-content p {
  margin: 0 0 1.4em;
}
.nx-blog-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--nx-primary);
  margin: 2em 0 0.6em;
  line-height: 1.3;
}
.nx-blog-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nx-text);
  margin: 1.6em 0 0.5em;
}
.nx-blog-content ul,
.nx-blog-content ol {
  padding-left: 1.4em;
  margin: 0 0 1.4em;
}
.nx-blog-content li { margin-bottom: 0.4em; }
.nx-blog-content strong { font-weight: 700; }
.nx-blog-content em { font-style: italic; }
.nx-blog-content blockquote {
  border-left: 4px solid var(--nx-primary);
  margin: 1.6em 0;
  padding: 12px 20px;
  background: var(--nx-bg-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--nx-text-muted);
}
.nx-blog-content a {
  color: var(--nx-primary);
  text-decoration: underline;
}
.nx-blog-content a:hover { opacity: 0.8; }
.nx-blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 1.4em auto;
}

/* ── Tags ─────────────────────────────────────────────────────── */
.nx-blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #ede5ff;
}
.nx-blog-tag {
  display: inline-block;
  background: var(--nx-bg-light);
  color: var(--nx-primary);
  font-family: var(--nx-font);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid #ddd1f9;
  transition: background 0.15s, color 0.15s;
}
.nx-blog-tag:hover {
  background: var(--nx-primary);
  color: #fff;
  border-color: var(--nx-primary);
}

/* ── Blog CTA strip ───────────────────────────────────────────── */
.nx-blog-cta-strip {
  background: linear-gradient(135deg, var(--nx-primary) 0%, #7340e0 100%);
  padding: 48px 24px;
  text-align: center;
}
.nx-blog-cta-strip h2 {
  font-family: var(--nx-font);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.nx-blog-cta-strip p {
  font-family: var(--nx-font);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  margin: 0 0 24px;
}
.nx-blog-cta-strip .nx-btn {
  background: #fff;
  color: var(--nx-primary);
  font-weight: 700;
}
.nx-blog-cta-strip .nx-btn:hover {
  background: rgba(255,255,255,0.9);
  opacity: 1;
}

/* ── Related posts ────────────────────────────────────────────── */
.nx-blog-related {
  background: var(--nx-bg-light);
  padding: 56px 24px;
}
.nx-blog-related-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.nx-blog-related-title {
  font-family: var(--nx-font);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--nx-primary);
  margin: 0 0 28px;
  text-align: center;
}
.nx-blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.nx-blog-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(143,90,253,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none;
}
.nx-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(143,90,253,0.16);
}
.nx-blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #ede5ff 0%, #d6c5ff 100%);
}
.nx-blog-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #f0eaff 0%, #ddd1f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nx-primary);
  font-size: 2.5rem;
  opacity: 0.5;
}
.nx-blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nx-blog-card-cat {
  font-family: var(--nx-font);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--nx-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
.nx-blog-card-title {
  font-family: var(--nx-font);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--nx-text);
  line-height: 1.4;
  margin: 0 0 10px;
  flex: 1;
}
.nx-blog-card-excerpt {
  font-family: var(--nx-font);
  font-size: 0.82rem;
  color: var(--nx-text-muted);
  line-height: 1.55;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nx-blog-card-link {
  font-family: var(--nx-font);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--nx-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.nx-blog-card-link:hover { text-decoration: underline; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nx-blog-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nx-blog-hero { padding: 40px 16px 32px; }
  .nx-blog-body { padding: 32px 16px 28px; }
  .nx-blog-related-grid { grid-template-columns: 1fr; }
  .nx-blog-breadcrumb-inner { padding: 0 16px; }
  .nx-blog-featured-img { padding: 0 16px; }
}
