/* Neodentis — header, footer, base overrides */

:root {
  --nd-black: #0E0E0E;
  --nd-white: #FFFFFF;
  --nd-gray: #E7ECEF;
  --nd-text: #2B2B2D;
  --nd-accent: #7BC5C0;
  --nd-accent-hover: #8FD3CE;
  --nd-accent-dark: #5EA9A4;
  --nd-muted: rgba(255, 255, 255, 0.6);
  --nd-font-display: "Playfair Display", serif;
  --nd-font-ui: Poppins, sans-serif;
  --nd-max: 1400px;
  --nd-header-bp: 1100px;
}

/* Pack SVG icons (mask + currentColor → brand accent) */
.nd-icon {
  display: inline-block;
  width: var(--nd-icon-size, 30px);
  height: var(--nd-icon-size, 30px);
  flex-shrink: 0;
  background-color: currentColor;
  color: var(--nd-accent);
  -webkit-mask: var(--nd-icon) center / contain no-repeat;
  mask: var(--nd-icon) center / contain no-repeat;
  vertical-align: middle;
}

.nd-feature-head .nd-icon {
  color: var(--nd-accent);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--nd-font-ui);
  color: var(--nd-black);
  -webkit-font-smoothing: antialiased;
}

body.neodentis-theme #page,
body.neodentis-theme .site-content,
body.neodentis-theme #content {
  margin: 0;
  padding: 0;
}

/* Elementor landings must not sit inside Astra's boxed .ast-container */
body.neodentis-theme.elementor-page .site-content > .ast-container,
body.neodentis-theme.page-template-elementor_header_footer .site-content > .ast-container,
body.neodentis-theme.ast-page-builder-template .site-content > .ast-container {
  max-width: 100%;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

::selection {
  background: var(--nd-accent);
  color: var(--nd-black);
}

/* ---------- Header ---------- */

.nd-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(14, 14, 14, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 16px clamp(20px, 4vw, 64px);
}

.nd-header__inner {
  max-width: var(--nd-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nd-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--nd-white);
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(var(--nd-logo-width, 180px), 48vw);
}

.nd-logo:hover {
  color: var(--nd-white);
}

.nd-logo__img {
  display: block;
  width: var(--nd-logo-width, 180px) !important;
  height: auto !important;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}

.nd-logo__text {
  font-weight: 300;
  font-size: clamp(19px, 1.8vw, 24px);
  letter-spacing: 0.02em;
  color: var(--nd-white);
  line-height: 1.1;
}

.nd-logo__tagline {
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--nd-muted);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nd-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  flex-shrink: 0;
}

.nd-menu {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nd-menu > li {
  position: relative;
  margin: 0;
  padding: 0;
}

/* Keep hover active while moving from label into the dropdown */
.nd-menu > .menu-item-has-children {
  padding-bottom: 14px;
  margin-bottom: -14px;
}

.nd-menu > li > a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.nd-menu > li > a:hover,
.nd-menu > li.current-menu-item > a,
.nd-menu > li.current-menu-ancestor > a {
  color: var(--nd-accent);
}

.nd-menu .menu-item-has-children > a::after {
  content: "\25BE";
  font-size: 9px;
  color: var(--nd-accent);
}

/* Astra injects its own toggle arrow into custom menus — hide it. */
.nd-header .dropdown-menu-toggle,
.nd-header .ast-header-navigation-arrow,
.nd-drawer .dropdown-menu-toggle,
.nd-drawer .ast-header-navigation-arrow {
  display: none !important;
}

.nd-header .nd-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  min-width: 260px;
  width: max-content;
  max-width: min(320px, 90vw);
  background: #0E0E0E;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 10px 0;
  list-style: none;
  margin: 0;
  margin-top: 6px;
  z-index: 100;
  pointer-events: auto;
}

/* Invisible bridge so the 6px visual gap does not break :hover */
.nd-header .nd-menu .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.nd-header .nd-menu > li:hover > .sub-menu,
.nd-header .nd-menu > li:focus-within > .sub-menu,
.nd-header .nd-menu > li.is-open > .sub-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.nd-header .nd-menu .sub-menu > li {
  display: block;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.nd-header .nd-menu .sub-menu a,
.nd-header .nd-menu .sub-menu .menu-link {
  display: block !important;
  float: none;
  width: 100% !important;
  max-width: none;
  box-sizing: border-box;
  padding: 12px 22px !important;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: color 0.2s ease, background 0.2s ease;
}

.nd-header .nd-menu .sub-menu a:hover,
.nd-header .nd-menu .sub-menu a:focus-visible,
.nd-header .nd-menu .sub-menu .current-menu-item > a {
  color: var(--nd-accent);
  background: rgba(123, 197, 192, 0.14);
}

.nd-header__contact {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nd-header__contact:hover,
.nd-header__contact:focus-visible {
  color: var(--nd-accent);
}

.nd-header__phone-cta {
  letter-spacing: 0.08em;
  text-transform: none;
}

.nd-btn-cta {
  background: var(--nd-accent);
  color: var(--nd-black);
  padding: 11px 22px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.3s ease;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nd-btn-cta:hover {
  background: var(--nd-accent-hover);
  color: var(--nd-black);
}

body.page-pedir-cita .nd-header__contact,
body.page-template-pedir-cita .nd-header__contact {
  color: var(--nd-accent);
}

.nd-menu-toggle {
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  align-items: flex-start;
  flex-shrink: 0;
}

.nd-menu-toggle span {
  display: block;
  height: 1px;
  background: var(--nd-white);
}

.nd-menu-toggle span:nth-child(1) { width: 20px; }
.nd-menu-toggle span:nth-child(2) { width: 20px; }
.nd-menu-toggle span:nth-child(3) { width: 13px; }

/* ---------- Drawer ---------- */

.nd-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nd-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 96;
  width: min(86vw, 360px);
  background: var(--nd-black);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.nd-drawer-open {
  overflow: hidden;
}

body.nd-drawer-open .nd-drawer-overlay {
  opacity: 1;
  visibility: visible;
}

body.nd-drawer-open .nd-drawer {
  transform: translateX(0);
}

.nd-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nd-drawer__brand {
  font-weight: 300;
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--nd-white);
}

.nd-drawer__close {
  background: none;
  border: 0;
  color: var(--nd-white);
  font-size: 26px;
  font-weight: 200;
  cursor: pointer;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
}

.nd-drawer__menu {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.nd-drawer__menu a {
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.88);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.nd-drawer__menu a:hover,
.nd-drawer__menu .current-menu-item > a {
  color: var(--nd-accent);
  background: rgba(255, 255, 255, 0.04);
}

.nd-drawer__menu > .menu-item-has-children > a {
  justify-content: space-between;
}

.nd-drawer__menu > .menu-item-has-children > a::after {
  content: "+";
  font-size: 16px;
  font-weight: 200;
  color: var(--nd-accent);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  line-height: 1;
}

.nd-drawer__menu > .menu-item-has-children.is-open > a::after {
  content: "\2212";
  transform: none;
}

.nd-drawer__menu .sub-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.nd-drawer__menu > .menu-item-has-children.is-open > .sub-menu {
  display: block;
}

.nd-drawer__menu .sub-menu > li {
  display: block;
  width: 100%;
  margin: 0;
}

.nd-drawer__menu .sub-menu a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 24px 13px 36px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
}

.nd-drawer__contact {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nd-drawer__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.nd-drawer__contact p,
.nd-drawer__contact a {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  text-decoration: none;
}

.nd-drawer__contact a:hover {
  color: var(--nd-accent);
}

.nd-drawer__actions {
  margin-top: auto;
  padding: 22px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nd-btn-outline {
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--nd-white);
  padding: 16px 20px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.nd-btn-outline:hover {
  border-color: var(--nd-accent);
  color: var(--nd-accent);
}

/* ---------- Footer ---------- */

.nd-footer {
  background: var(--nd-black);
  color: var(--nd-white);
  padding: clamp(50px, 6vw, 80px) clamp(24px, 5vw, 80px) 0;
}

.nd-footer__grid {
  max-width: var(--nd-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(28px, 3vw, 48px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.nd-footer__brand-name {
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  color: var(--nd-white);
}

.nd-footer__logo {
  display: block;
  margin: 0 0 14px;
  line-height: 0;
}

.nd-footer__logo-img {
  display: block;
  width: var(--nd-logo-width, 180px) !important;
  height: auto !important;
  max-width: 100%;
  object-fit: contain;
}

.nd-footer__brand-tag {
  font-weight: 300;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.nd-footer__title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nd-accent);
  margin: 0 0 16px;
}

.nd-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nd-footer__links a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 300;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nd-footer__links a:hover {
  color: var(--nd-accent);
}

.nd-footer__contact p,
.nd-footer__contact a {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 8px;
  text-decoration: none;
  display: block;
}

.nd-footer__contact-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
}

.nd-footer__contact-row i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--nd-accent);
}

.nd-footer__contact-row span {
  min-width: 0;
  word-break: break-word;
}

.nd-footer__contact a.nd-footer__contact-row {
  align-items: center;
  min-height: 28px;
}

.nd-footer__contact a:hover {
  color: var(--nd-accent);
}

.nd-footer__claim {
  font-family: var(--nd-font-display);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.35;
  color: var(--nd-white);
  margin: 0 0 20px;
}

.nd-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: var(--nd-max);
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
}

.nd-footer__bottom .nd-footer__copyright a,
.nd-footer__bottom .nd-footer__copyright a:link,
.nd-footer__bottom .nd-footer__copyright a:visited {
  color: var(--nd-accent) !important;
  text-decoration: none;
}

.nd-footer__bottom .nd-footer__copyright a:hover,
.nd-footer__bottom .nd-footer__copyright a:focus {
  color: var(--nd-accent-hover) !important;
  text-decoration: underline;
}

.nd-footer__copyright .emoji {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.1em;
  margin: 0 0.15em;
}

.nd-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.nd-footer__legal a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.nd-footer__legal a:hover {
  color: var(--nd-accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .nd-menu,
  .nd-header__contact,
  .nd-header__phone,
  .nd-header__phone-cta,
  .nd-header__cta {
    display: none;
  }

  .nd-menu-toggle {
    display: flex;
  }

  .nd-header {
    padding: 14px 16px;
  }

  .nd-header__inner {
    gap: 12px;
  }

  /* Tagline is too long for narrow viewports and steals space from the toggle. */
  .nd-logo__tagline {
    display: none;
  }

  .nd-logo {
    max-width: min(var(--nd-logo-width-tablet, var(--nd-logo-width, 180px)), calc(100% - 52px));
  }

  .nd-logo__img {
    width: min(var(--nd-logo-width-tablet, var(--nd-logo-width, 180px)), calc(100vw - 72px)) !important;
  }

  .nd-footer__logo-img {
    width: var(--nd-logo-width-tablet, var(--nd-logo-width, 180px)) !important;
  }
}

@media (max-width: 544px) {
  .nd-logo {
    max-width: min(var(--nd-logo-width-mobile, var(--nd-logo-width, 140px)), calc(100% - 52px));
  }

  .nd-logo__img {
    width: min(var(--nd-logo-width-mobile, var(--nd-logo-width, 140px)), calc(100vw - 72px)) !important;
  }

  .nd-footer__logo-img {
    width: var(--nd-logo-width-mobile, var(--nd-logo-width, 140px)) !important;
  }
}

@media (max-width: 900px) {
  .nd-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .nd-footer__grid {
    grid-template-columns: 1fr;
  }

  .nd-footer__bottom {
    flex-direction: column;
  }
}

/* Hero image carousel */
.nd-hero-carousel {
  position: relative;
  min-height: min(100vh, 720px);
  overflow: hidden;
  background: #171717;
}

.nd-hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  animation: ndHeroFade 10s ease-in-out infinite;
}

.nd-hero-carousel__slide:nth-child(1) {
  animation-delay: 0s;
}

.nd-hero-carousel__slide:nth-child(2) {
  animation-delay: 5s;
}

.nd-hero-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: ndHeroKen 10s ease-out infinite;
}

.nd-hero-carousel__slide:nth-child(1) img {
  object-position: center 32%;
}

.nd-hero-carousel__slide:nth-child(2) img {
  object-position: center 42%;
  animation-delay: 5s;
}

.nd-hero-carousel__dots {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nd-hero-carousel__dot {
  width: 8px;
  height: 8px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  min-height: 8px;
  transition: width 0.4s ease, background 0.4s ease, border-radius 0.4s ease;
}

.nd-hero-carousel__dot:nth-child(1) {
  animation: ndHeroDot 10s infinite;
}

.nd-hero-carousel__dot:nth-child(2) {
  animation: ndHeroDot 10s infinite 5s;
}

@keyframes ndHeroFade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  50% { opacity: 1; }
  60% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes ndHeroKen {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes ndHeroDot {
  0%, 49% { width: 22px; border-radius: 8px; background: #7bc5c0; }
  50%, 100% { width: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.38); }
}

.nd-hero-carousel.is-js .nd-hero-carousel__slide {
  animation: none;
  opacity: 0;
  transition: none;
}

.nd-hero-carousel.is-js .nd-hero-carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.nd-hero-carousel.is-js .nd-hero-carousel__slide img {
  animation: none;
  transform: scale(1.06);
  transition: none;
}

.nd-hero-carousel.is-js .nd-hero-carousel__dot {
  animation: none;
}

.nd-hero-carousel.is-js .nd-hero-carousel__dot.is-active {
  background: #7bc5c0;
  width: 22px;
  border-radius: 8px;
}

@media (max-width: 900px) {
  #nd-home-hero {
    min-height: 0;
  }

  .nd-hero-carousel {
    min-height: 0;
    aspect-ratio: 3 / 4;
    max-height: 70vh;
  }
}

/* ---------- Media frames (home + landings) ---------- */
.nd-media {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: #171717;
}

.nd-media--light {
  background: #e7ecef;
}

.nd-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.nd-media--4x3 {
  aspect-ratio: 4 / 3;
}

.nd-media--16x10 {
  aspect-ratio: 16 / 10;
}

.nd-media--1x1 {
  aspect-ratio: 1;
}

.nd-media--svc-hero {
  aspect-ratio: 4 / 3;
  width: 100%;
  max-height: min(520px, 58vw);
}

.nd-media--svc-list {
  aspect-ratio: 16 / 10;
  width: 100%;
  max-height: min(360px, 52vw);
}

.nd-media--svc-lab {
  aspect-ratio: 4 / 3;
  width: 100%;
  max-height: min(420px, 56vw);
}

/* Home tratamientos: image panel matches accordion height */
#nd-home-tratamientos .nd-tratamientos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(28px, 3.5vw, 56px);
  align-items: stretch;
}

#nd-home-tratamientos .nd-acc {
  border: 1px solid #e7ecef;
  height: 100%;
}

#nd-home-tratamientos .nd-tratamientos-media {
  position: relative;
  align-self: stretch;
  min-height: 100%;
  height: auto;
  background: #171717;
}

#nd-home-tratamientos .nd-media--panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  aspect-ratio: auto;
  border: 1px solid #e7ecef;
  background: #171717;
}

#nd-home-tratamientos .nd-media--panel > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center 20% !important;
  display: block !important;
  opacity: 0;
  transition: opacity 1s ease-in-out !important;
  z-index: 0;
  pointer-events: none;
}

#nd-home-tratamientos .nd-media--panel > img.is-active {
  opacity: 1;
  z-index: 1;
}

#nd-home-tratamientos .nd-media--panel > img.is-leaving {
  opacity: 0;
  z-index: 2;
}

#nd-home-tecnologia .nd-media--1x1 {
  max-width: min(100%, 560px);
  width: 100%;
  justify-self: stretch;
}

#wrap-nd-home-equipo,
#nd-home-equipo {
  display: none !important;
}

#nd-home-laboratorio .nd-lab-photos {
  margin-top: clamp(30px, 4vw, 60px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#nd-home-laboratorio .nd-lab-photos .nd-media {
  aspect-ratio: 4 / 3;
  grid-column: auto;
  grid-row: auto;
}

@media (max-width: 980px) {
  #nd-home-tratamientos .nd-tratamientos-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  #nd-home-tratamientos .nd-tratamientos-media {
    order: -1;
    min-height: 0;
    height: auto;
    max-height: 360px;
    aspect-ratio: 16 / 10;
  }

  #nd-home-tratamientos .nd-media--panel {
    position: absolute;
    inset: 0;
    max-height: none;
    width: 100%;
    height: 100%;
  }

  #nd-home-tratamientos .nd-media--panel > img {
    object-position: center 18% !important;
  }

  #nd-home-laboratorio .nd-lab-photos {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #nd-home-laboratorio .nd-lab-photos .nd-media {
    max-height: 280px;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .nd-media--svc-hero {
    aspect-ratio: 16 / 11;
    max-height: 280px;
  }

  .nd-media--svc-list {
    aspect-ratio: 16 / 10;
    max-height: 220px;
  }

  .nd-media--svc-lab {
    aspect-ratio: 16 / 10;
    max-height: 240px;
  }

  #nd-home-tratamientos .nd-tratamientos-media {
    max-height: 240px;
  }

  #nd-home-tecnologia .nd-media--1x1 {
    aspect-ratio: 16 / 11;
    max-height: 280px;
    max-width: none;
  }
}

/* ---------- Home: pedir cita + fondo ---------- */
#nd-home-cita.nd-cita-bg {
  position: relative;
  isolation: isolate;
  padding: clamp(80px, 10vw, 150px) clamp(24px, 5vw, 80px);
  background-color: #0e0e0e;
  background-image: url("https://clinicadentalneodentis.com/wp-content/uploads/2026/08/fondo-5.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

#nd-home-cita.nd-cita-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(14, 14, 14, 0.92) 0%,
    rgba(14, 14, 14, 0.78) 34%,
    rgba(14, 14, 14, 0.28) 62%,
    rgba(14, 14, 14, 0.08) 100%
  );
}

#nd-home-cita .nd-cita-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

#nd-home-cita .nd-cita-eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #7bc5c0;
}

#nd-home-cita .nd-cita-title {
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(32px, 3.8vw, 58px);
  line-height: 1.08;
  margin: 22px 0 26px;
  color: #ffffff;
}

#nd-home-cita .nd-cita-lead {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.72);
  max-width: 440px;
  margin: 0 0 40px;
}

#nd-home-cita .nd-cita-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 30px;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

#nd-home-cita .nd-cita-contact__row {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  min-height: 44px;
}

#nd-home-cita a.nd-cita-contact__row {
  align-items: center;
  word-break: break-all;
}

#nd-home-cita .nd-cita-contact__row i {
  font-size: 18px;
  color: #7bc5c0;
  line-height: 1.5;
  flex-shrink: 0;
}

#nd-home-cita .nd-cita-contact__note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

#nd-home-cita .nd-cita-form {
  background: #ffffff;
  padding: clamp(22px, 2.4vw, 36px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

@media (max-width: 900px) {
  #nd-home-cita.nd-cita-bg {
    background-position: 72% center;
  }

  #nd-home-cita.nd-cita-bg::before {
    background: linear-gradient(
      180deg,
      rgba(14, 14, 14, 0.88) 0%,
      rgba(14, 14, 14, 0.72) 42%,
      rgba(14, 14, 14, 0.55) 100%
    );
  }

  #nd-home-cita .nd-cita-inner {
    gap: 28px;
  }
}

@media (max-width: 640px) {
  #nd-home-cita.nd-cita-bg {
    padding: clamp(64px, 12vw, 90px) clamp(18px, 4vw, 24px);
    background-position: 78% center;
  }

  #nd-home-cita .nd-cita-form {
    padding: clamp(20px, 4vw, 28px);
  }
}

/* ---------- Capillaris landing: contacto (hero split vive en el HTML del bloque) ---------- */
#nd-svc-contacto.nd-cap-contacto {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #0e0e0e;
  background-image: url("https://clinicadentalneodentis.com/wp-content/uploads/2026/08/fondo-capillaris.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

#nd-svc-contacto.nd-cap-contacto::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(14, 14, 14, 0.22) 0%,
    rgba(14, 14, 14, 0.08) 36%,
    transparent 58%
  );
}

#nd-svc-contacto.nd-cap-contacto > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  #nd-svc-contacto.nd-cap-contacto {
    background-position: 83% center;
  }

  #nd-svc-contacto.nd-cap-contacto::before {
    background: linear-gradient(
      180deg,
      rgba(14, 14, 14, 0.78) 0%,
      rgba(14, 14, 14, 0.42) 48%,
      rgba(14, 14, 14, 0.22) 100%
    );
  }
}

/* ---------- WPForms compact (site-wide) ---------- */
.wpforms-container .wpforms-field {
  margin-bottom: 14px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.wpforms-container textarea,
#nd-form-cita textarea,
#nd-form-corto textarea,
#nd-form-cita-page textarea {
  min-height: 0 !important;
  height: 68px !important;
  max-height: 88px !important;
  resize: vertical !important;
  line-height: 1.4 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

#nd-home-cita #nd-form-cita .wpforms-field {
  margin: 0 0 12px !important;
}

#nd-home-cita #nd-form-cita .wpforms-field-label {
  margin: 0 0 6px !important;
}

#nd-home-cita #nd-form-cita .wpforms-submit {
  padding: 14px 24px !important;
}

#nd-form-corto,
#nd-form-cita-page {
  padding: clamp(22px, 2.8vw, 40px) !important;
}

#nd-form-corto .wpforms-field,
#nd-form-cita-page .wpforms-field {
  margin: 0 0 14px !important;
}

/* ---------- Tratamientos listing (2-col visual cards) ---------- */
#nd-serv-grid {
  background: #e7ecef;
  padding: clamp(48px, 7vw, 100px) clamp(24px, 5vw, 80px);
}

#nd-serv-grid .nd-trat-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

#nd-serv-grid .nd-trat-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: inherit;
  overflow: hidden;
  min-height: 0;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#nd-serv-grid .nd-trat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(14, 14, 14, 0.1);
}

#nd-serv-grid .nd-trat-card__media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dce3e7;
}

#nd-serv-grid .nd-trat-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.6s ease;
}

#nd-serv-grid .nd-trat-card:hover .nd-trat-card__media img {
  transform: scale(1.04);
}

#nd-serv-grid .nd-trat-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 2.4vw, 32px);
  flex: 1;
}

#nd-serv-grid .nd-trat-card__title {
  font-family: "Playfair Display", serif;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  color: #0e0e0e;
}

#nd-serv-grid .nd-trat-card__text {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: #2b2b2d;
}

#nd-serv-grid .nd-trat-card__cta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7bc5c0;
}

@media (max-width: 780px) {
  #nd-serv-grid {
    padding: clamp(40px, 8vw, 64px) clamp(18px, 4vw, 24px);
  }

  #nd-serv-grid .nd-trat-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #nd-serv-grid .nd-trat-card__media {
    aspect-ratio: 16 / 10;
  }
}

@media (hover: none) {
  #nd-serv-grid .nd-trat-card:hover {
    transform: none;
    box-shadow: none;
  }

  #nd-serv-grid .nd-trat-card:hover .nd-trat-card__media img {
    transform: none;
  }
}

/* WhatsApp floating launcher */
.nd-wa {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10050;
  font-family: var(--nd-font-ui);
  pointer-events: none;
}

.nd-wa * {
  pointer-events: auto;
}

.nd-wa__fab {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(18, 140, 126, 0.38);
}

.nd-wa__icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background-color: #fff;
  -webkit-mask: url("/wp-content/themes/astra-child/assets/icons/whatsapp.svg") center / contain no-repeat;
  mask: url("/wp-content/themes/astra-child/assets/icons/whatsapp.svg") center / contain no-repeat;
}

.nd-wa__icon--sm {
  width: 18px;
  height: 18px;
}

.nd-wa__fab:hover {
  background: #1ebe5d;
}

.nd-wa.is-open .nd-wa__fab {
  background: #128c7e;
}

.nd-wa__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(340px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(14, 14, 14, 0.28);
  transform-origin: bottom right;
}

.nd-wa__panel[hidden] {
  display: none !important;
}

.nd-wa__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #0e0e0e;
  color: #fff;
}

.nd-wa__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #7bc5c0;
  color: #0e0e0e;
  font-family: var(--nd-font-display);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nd-wa__name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.nd-wa__status {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 300;
  color: #7bc5c0;
}

.nd-wa__close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.nd-wa__body {
  min-height: 160px;
  padding: 18px 16px 8px;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.06) 1px, transparent 1.4px) 0 0 / 16px 16px,
    #ece5dd;
}

.nd-wa__bubble {
  max-width: 86%;
  background: #fff;
  border-radius: 4px 12px 12px 12px;
  padding: 10px 12px 8px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.nd-wa__bubble-from {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: #5ea9a4;
}

.nd-wa__bubble p {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: #2b2b2d;
}

.nd-wa__bubble time {
  display: block;
  margin-top: 6px;
  text-align: right;
  font-size: 10px;
  color: rgba(43, 43, 45, 0.45);
}

.nd-wa__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 14px 14px;
  padding: 13px 16px;
  border-radius: 24px;
  background: #25d366;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nd-wa__cta:hover {
  background: #1ebe5d;
  color: #fff;
}

#ast-scroll-top {
  right: 92px !important;
  bottom: 30px !important;
  left: auto !important;
}

@media (max-width: 600px) {
  .nd-wa {
    right: 16px;
    bottom: 16px;
  }

  #ast-scroll-top {
    right: 84px !important;
    bottom: 24px !important;
  }
}

@media print {
  .nd-wa,
  #ast-scroll-top {
    display: none !important;
  }
}

/* Complianz cookie banner — site fonts and colors */
.cmplz-cookiebanner,
.cmplz-cookiebanner p,
.cmplz-cookiebanner .cmplz-message,
.cmplz-cookiebanner .cmplz-category,
.cmplz-cookiebanner .cmplz-category-title,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn,
.cmplz-cookiebanner .cmplz-btn,
#cmplz-manage-consent,
#cmplz-manage-consent .cmplz-manage-consent,
#cmplz-manage-consent button {
  font-family: Poppins, sans-serif !important;
}

.cmplz-cookiebanner .cmplz-title,
.cmplz-cookiebanner .cmplz-header h2 {
  font-family: "Playfair Display", serif !important;
  font-weight: 400 !important;
  color: #0e0e0e !important;
}

.cmplz-cookiebanner .cmplz-message,
.cmplz-cookiebanner .cmplz-message p {
  font-weight: 300 !important;
  color: #2b2b2d !important;
}

.cmplz-cookiebanner a,
.cmplz-cookiebanner .cmplz-links a,
.cmplz-cookiebanner .cmplz-documents a {
  color: #5ea9a4 !important;
}

.cmplz-btn.cmplz-accept,
.cmplz-buttons .cmplz-accept {
  background: #7bc5c0 !important;
  border-color: #7bc5c0 !important;
  color: #0e0e0e !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
}

.cmplz-btn.cmplz-deny,
.cmplz-btn.cmplz-view-preferences,
.cmplz-btn.cmplz-save-preferences,
.cmplz-buttons .cmplz-deny,
.cmplz-buttons .cmplz-view-preferences,
.cmplz-buttons .cmplz-save-preferences {
  font-family: Poppins, sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
}

/* Legal pages: long URLs / tables must not stretch the viewport */
#nd-legal,
#nd-legal a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 768px) {
  #nd-legal table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/*
 * Complianz 7.5 generated CSS keeps left:50% / translate(-50%) (centered modal)
 * while mobile also sets width:100%. That shifts the banner off-canvas and
 * creates horizontal scroll — especially visible on legal pages opened from
 * the banner document links.
 */
.cmplz-cookiebanner {
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
  white-space: normal !important;
}

@media (min-width: 769px) {
  .cmplz-cookiebanner.cmplz-bottom-left {
    left: 24px !important;
    right: auto !important;
    top: auto !important;
    bottom: 24px !important;
    width: min(420px, calc(100% - 48px)) !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
  .cmplz-cookiebanner,
  .cmplz-cookiebanner.cmplz-bottom-left,
  .cmplz-cookiebanner.cmplz-show {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    margin: 0 !important;
  }

  .cmplz-cookiebanner .cmplz-body {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .cmplz-cookiebanner .cmplz-divider {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .cmplz-cookiebanner .cmplz-links ul,
  .cmplz-cookiebanner .cmplz-documents ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 0;
    margin: 0;
  }

  #cmplz-manage-consent .cmplz-manage-consent {
    left: auto !important;
    right: 16px !important;
    max-width: calc(100% - 32px);
  }
}


