/* === RESET Y VARIABLES === */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-title-weight: 600;
}

/* === BASE (html, body) === */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: #F74500;
  color: #000000;
  min-height: 100vh;
}

body.cursor-over-hero {
  cursor: none;
}

/* === NAVBAR === */

.navbar {
  position: relative;
  z-index: 100;
  width: 95%;
  max-width: 95%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 0;
  background: #F74500;
}

.nav-hamburger {
  display: flex;
  grid-column: 3;
  justify-self: end;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #000000;
}

.nav-menu-inline {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 13px;
  text-transform: uppercase;
  color: #000000;
  list-style: none;
}

.nav-menu-inline a {
  color: #000000;
  text-decoration: none;
}

.nav-menu-inline a:hover {
  opacity: 0.85;
}

.nav-menu-inline .nav-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #000000;
  margin: 0 0.35rem;
  vertical-align: middle;
}

.above-the-fold .nav-hamburger {
  display: none;
}

body.past-hero .navbar .nav-menu-inline {
  display: none;
}


/* Header fijo: aparece solo al scrollear hacia arriba, fuera del hero */
.mobile-sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #F74500;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.1rem 2.5%;
  box-sizing: border-box;
  transform: translateY(-100%);
  transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-sticky-header .nav-left {
  grid-column: 1;
}

.mobile-sticky-header .nav-hamburger {
  grid-column: 3;
  justify-self: end;
}

.mobile-sticky-header.header-show {
  transform: translateY(0);
}

.navbar-logo {
  display: none;
  align-items: center;
  height: 100%;
}

.navbar-logo img {
  height: 100%;
  max-height: 28px;
  width: auto;
  display: block;
}

body.past-hero .navbar-logo {
  display: flex;
}

.nav-links {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 18px;
  text-transform: uppercase;
  color: #000000;
  background: #F74500;
}

.nav-links.open {
  display: flex;
}

.nav-links a {
  color: #000000;
  text-decoration: none;
}

.nav-links a:hover {
  opacity: 0.85;
}

.nav-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: #000000;
}

/* === HERO (above-the-fold) === */

.above-the-fold {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

main {
  position: relative;
  z-index: 2;
  margin-top: 100vh;
  margin-top: 100svh;
}

.above-the-fold .navbar {
  flex-shrink: 0;
}

.above-the-fold .hero {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.hero {
  position: relative;
  z-index: 1;
  width: 95%;
  max-width: 95%;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 6rem 0 2rem;
  gap: 2rem;
  overflow: visible;
}

.hero-title-wrap {
  flex-shrink: 0;
  margin-left: 0;
  margin-top: auto;
  overflow: visible;
  opacity: 1;
  transition: opacity 0.35s ease;
}


.hero-title-logo {
  display: block;
  width: 50vw;
  max-width: none;
  height: auto;
}

.hero-desc-wrap {
  display: flex;
  align-items: flex-start;
}

.hero-desc {
  font-size: clamp(28px, 3.6vw, 44px);
  color: #000000;
  line-height: 1.4;
  max-width: 25vw;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === CURSOR === */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 120px;
  height: 120px;
  margin-left: -60px;
  margin-top: -60px;
  border-radius: 50%;
  background: #000000;
  color: #D6D6D6;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 999;
}

.cursor.in-hero {
  display: flex;
}

@media (max-width: 768px) {
  .cursor {
    display: none !important;
  }

  body.cursor-over-hero {
    cursor: auto;
  }
}

/* === FOOTER === */

.footer {
  position: relative;
  z-index: 2;
  background: #000000;
  color: #D6D6D6;
  width: 100%;
  margin: 0;
  padding: 4rem 0 2rem;
}

.footer * {
  color: #D6D6D6;
}

.footer .footer-col h3 {
  color: #D6D6D6;
}

.footer-inner {
  width: 95%;
  max-width: 95%;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  gap: 3rem 2rem;
  align-items: start;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-col h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.footer-col p,
.footer-col a {
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
  display: block;
  line-height: 1.8;
}

.footer-col a:hover {
  opacity: 0.85;
}

.footer-col .footer-sub {
  opacity: 0.9;
  margin-top: 0.25rem;
}

.footer-nav-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
  margin-top: 0.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

.footer-social a {
  display: block;
  line-height: 0;
}

/* === SECCIÓN CAROUSEL (Trabajos) === */

.section-carousel {
  background: #F74500;
  position: relative;
  /* height set dynamically by JS: 100vh + carousel overflow */
}

.section-carousel-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section-carousel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 95%;
  max-width: 95%;
  margin: 0 auto;
  padding: 1.5rem 0 0.75rem;
  flex-shrink: 0;
}

.section-carousel-heading {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  color: #000000;
  text-transform: uppercase;
  margin: 0;
}

.section-carousel-subtitle {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  color: #000000;
}

.carousel-viewport {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.carousel-track {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  width: max-content;
  will-change: transform;
  user-select: none;
}

.carousel-cell {
  flex-shrink: 0;
  height: 50vh;
  aspect-ratio: 3 / 4.3;
  position: relative;
  overflow: hidden;
}

.carousel-cell-link {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.carousel-cell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Ocultar barras de desplazamiento en el contenedor del embed */
.carousel-cell {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.carousel-cell::-webkit-scrollbar {
  display: none;
}

.carousel-gradient-left,
.carousel-gradient-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}

.carousel-gradient-left {
  left: 0;
  background: linear-gradient(to right, #F74500, transparent);
}

.carousel-gradient-right {
  right: 0;
  background: linear-gradient(to left, #F74500, transparent);
}

.carousel-controls .campaign-progress-dot {
  background: #D6D6D6;
}


/* === SECCIÓN CAMPAÑAS === */

.section-campanas {
  background: #D6D6D6;
  position: relative;
  /* height set dynamically by JS: 100vh + campaign track overflow */
}

.section-campanas-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.section-campanas-title {
  position: absolute;
  top: 0;
  left: 2.5%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 95%;
  max-width: 95%;
  padding: 1.5rem 0 0.75rem;
}

.section-campanas-heading {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  color: #000000;
  text-transform: uppercase;
  margin: 0;
}

.section-campanas-subtitle {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  color: #000000;
}

.campaign-slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.campaign-track {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.campaign-slide {
  flex-shrink: 0;
  position: relative;
  padding: 0;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.campaign-slide.active {
  pointer-events: auto;
  opacity: 1;
}

.campaign-gradient-left,
.campaign-gradient-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  max-width: 120px;
  pointer-events: none;
  z-index: 2;
}

.campaign-gradient-left {
  left: 0;
  background: linear-gradient(to right, #D6D6D6 0%, transparent 100%);
}

.campaign-gradient-right {
  right: 0;
  background: linear-gradient(to left, #D6D6D6 0%, transparent 100%);
}

.campaign-header {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0 0 0.5rem;
}

.campaign-title,
.campaign-client {
  font-size: 12px;
  text-transform: uppercase;
  color: #000000;
}

.campaign-client {
  text-align: right;
}

.campaign-title {
  max-width: 60%;
}

.campaign-video-wrap {
  height: 40vh;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #000000;
  transition: height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.campaign-slide.active .campaign-video-wrap {
  height: 60vh;
}

.campaign-video-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.campaign-video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.campaign-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 14px;
  pointer-events: none;
}

.campaign-play-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #ffffff;
}

.campaign-controls {
  position: absolute;
  bottom: 2rem;
  left: 2.5%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 95%;
  max-width: 95%;
  padding: 0;
  font-size: 12px;
  text-transform: uppercase;
  color: #000000;
}

.campaign-progress-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.campaign-progress-visual {
  display: flex;
  align-items: center;
  gap: 0;
}

.campaign-progress-cap {
  width: 2px;
  height: 10px;
  background: #000000;
  flex-shrink: 0;
}

.campaign-progress-bar {
  position: relative;
  width: 120px;
  height: 2px;
  flex-shrink: 0;
}

.campaign-progress-track {
  position: absolute;
  inset: 0;
  height: 2px;
  background: #000000;
  opacity: 0.35;
}

.campaign-progress-fill {
  position: relative;
  height: 100%;
  width: 33.33%;
  transition: width 0.2s ease;
}

.campaign-progress-dot {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #F74500;
  border: 1px solid #000000;
  box-sizing: border-box;
}

.campaign-mas-info {
  border: none;
  padding: 0;
  background: transparent;
  color: #000000;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
}

.campaign-mas-info:hover {
  opacity: 0.85;
}

.campaign-pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.campaign-arrows {
  display: flex;
  gap: 0.5rem;
}

.campaign-arrows button {
  width: 40px;
  height: 40px;
  border: 2px solid #000000;
  background: transparent;
  color: #000000;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.campaign-arrows button:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* === SECCIÓN SANAR (Nosotros) === */

.section-sanar {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #000000;
  color: #D6D6D6;
}

.section-sanar-linea {
  position: absolute;
  left: 50%;
  top: 20%;
  transform: translate(-50%, -50%);
  width: 95%;
  height: 1px;
  background: #ffffff;
  z-index: 2;
  pointer-events: none;
}

.section-sanar-imagen-wrap {
  position: absolute;
  inset: 0;
  background: url('../public/images/nosotros.webp') no-repeat top center;
  background-size: cover;
}

.section-sanar-textos {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 95%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  z-index: 2;
  padding-top: 0.75rem;
}

.section-sanar-text-left {
  font-size: 12px;
  line-height: 1.6;
  text-transform: uppercase;
  color: #D6D6D6;
  letter-spacing: 0.02em;
  max-width: 38ch;
  text-align: left;
}

.section-sanar-text-right {
  font-size: 12px;
  line-height: 1.6;
  text-transform: uppercase;
  color: #D6D6D6;
  letter-spacing: 0.02em;
  max-width: 38ch;
  text-align: right;
  justify-self: end;
}

.section-sanar-heading-wrap {
  position: absolute;
  left: 2.5%;
  right: 2.5%;
  bottom: 2rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.section-sanar-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  color: #D6D6D6;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  align-self: flex-start;
  text-align: left;
  width: 100%;
}

.section-sanar-title {
  font-weight: var(--font-title-weight);
  font-size: 16.6vw;
  color: #D6D6D6;
  line-height: 1;
  white-space: nowrap;
  width: 100%;
  text-align: left;
}

/* === SECCIÓN CLIENTES === */

.section-clientes {
  background: #D6D6D6;
  padding: 60px 0;
  overflow: hidden;
}

.section-clientes-title {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  text-transform: uppercase;
  color: #000000;
  line-height: 1;
  letter-spacing: 0;
  margin: 0 0 2.5rem;
  padding-left: 2.5%;
  text-align: left;
}

.clientes-marquee {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.clientes-marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  padding: 2rem 0;
  animation: marquee-scroll 45s linear infinite;
}

.clientes-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.clientes-logo-group {
  display: flex;
  gap: clamp(3rem, 5vw, 6rem);
  align-items: center;
  padding-right: clamp(3rem, 5vw, 6rem);
  flex-shrink: 0;
}

.clientes-imagen {
  height: 45px;
  width: auto;
  max-width: none;
  object-fit: contain;
  display: block;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(0) scale(1);
  cursor: pointer;
}

.clientes-imagen:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-8px) scale(1.08);
  filter: grayscale(0%) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.15));
}

/* === SECCIÓN SERVICIOS === */

.section-servicios {
  background: #000000;
  color: #D6D6D6;
  padding: 0 0 4rem;
  position: relative;
}


.section-servicios-inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 2rem;
}

.servicio-item {
  width: 100%;
  height: 200px;
  min-height: 200px;
  padding: 0 2.5%;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(214, 214, 214, 0.2);
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 0 2rem;
  align-items: center;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.3s ease;
  box-sizing: border-box;
}

.servicio-item:last-child {
  border-bottom: none;
}

.servicio-item:hover {
  background: linear-gradient(180deg, #000000 0%, #F74500 100%);
}

.servicio-item:hover,
.servicio-item:hover .servicio-title,
.servicio-item:hover .servicio-desc,
.servicio-item:hover .servicio-btn {
  color: #D6D6D6;
}

.servicio-item:hover .servicio-btn {
  border-color: #D6D6D6;
}

.servicio-header {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 40% 60%;
  align-items: center;
  gap: 0 2rem;
}

.servicio-title {
  grid-column: 1;
  font-weight: var(--font-title-weight);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: rgba(214, 214, 214, 0.4);
  transition: color 0.25s ease;
  margin: 0;
}

.servicio-btn {
  grid-column: 2;
  justify-self: start;
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(214, 214, 214, 0.4);
  background: transparent;
  border: 1px solid rgba(214, 214, 214, 0.4);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.servicio-desc {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  font-size: 14px;
  line-height: 1.65;
  max-width: 100%;
  margin: 0;
  padding-top: 20px;
  color: rgba(214, 214, 214, 0.4);
  transition: color 0.25s ease;
}


/* === SECCIÓN CONTACTO === */

.section-contacto {
  position: relative;
  background: linear-gradient(180deg, #000000 0%, #000000 30%, #1a0a00 55%, #8b2a00 80%, #F74500 100%);
  color: #D6D6D6;
  padding: 4rem 0 5rem;
}

.section-contacto-inner {
  width: 100%;
  max-width: 100%;
  padding: 0 2.5%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 3rem 2rem;
  align-items: start;
  box-sizing: border-box;
}

.contacto-title {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  color: #D6D6D6;
  margin-bottom: 1.5rem;
  text-align: left;
}

.contacto-info {
  font-size: 12px;
  text-transform: uppercase;
  color: #D6D6D6;
  line-height: 2;
}

.contacto-info dt {
  margin-top: 0.75rem;
  opacity: 0.85;
}

.contacto-info dt:first-child {
  margin-top: 0;
}

.contacto-info dd {
  margin-left: 0;
}

.contacto-info dd a {
  color: inherit;
  text-decoration: none;
}

.contacto-info dd a:hover {
  text-decoration: underline;
}

.contacto-siguenos {
  margin-top: 2rem;
  font-size: 11px;
  text-transform: uppercase;
  color: #D6D6D6;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.contacto-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.contacto-social a {
  display: block;
  line-height: 0;
}

.contacto-social .social-icon,
.footer-social .social-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contacto-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contacto-field label {
  font-size: 11px;
  text-transform: uppercase;
  color: #D6D6D6;
  letter-spacing: 0.05em;
}

.contacto-field input,
.contacto-field textarea {
  font-size: 16px;
  color: #D6D6D6;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(214, 214, 214, 0.5);
  padding: 0.5rem 0;
  resize: vertical;
  min-height: 2.5rem;
}

.contacto-field input:focus,
.contacto-field textarea:focus {
  outline: none;
  border-bottom-color: #D6D6D6;
  box-shadow: 0 2px 0 0 rgba(214, 214, 214, 0.8); /* Focus visible: WCAG 2.1 AA */
}

.contacto-field textarea {
  min-height: 100px;
}

.contacto-submit {
  font-size: 12px;
  text-transform: uppercase;
  color: #F74500;
  background: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 0.5rem;
}

.contacto-submit:hover {
  background: #f0f0f0;
}

.footer-legal {
  font-size: 10px;
  text-transform: uppercase;
  color: #D6D6D6;
  opacity: 0.9;
  line-height: 1.6;
}

.footer-logo-wrap {
  padding-top: 2rem;
  width: 95%;
  max-width: 95%;
  margin: 0 auto;
}

.footer-logo-wrap picture {
  display: block;
  width: 100%;
}

.footer-logo-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

/* === MEDIA QUERIES === */

/* --- Tablet: mismo diseño, escala reducida --- */
@media (max-width: 1024px) {
  html {
    font-size: 14px;
  }

  /* --- Navbar --- */
  .navbar {
    padding: 0.75rem 0;
    width: 95%;
    max-width: 95%;
  }

  /* --- Hero --- */
  .above-the-fold .hero {
    padding: 3.5rem 0 1.25rem;
    gap: 1rem;
  }

  .hero-title-logo {
    width: 48vw;
  }

  .hero-desc {
    font-size: clamp(20px, 3vw, 32px);
    max-width: 30vw;
  }

  /* --- Sección RRSS (carousel) --- */
  .section-carousel-title {
    padding: 1.25rem 0 0.5rem;
  }

  .section-carousel-heading {
    font-size: clamp(36px, 5vw, 56px);
  }

  .section-carousel-subtitle {
    font-size: 12px;
  }

  .carousel-cell {
    height: 45vh;
  }

  .carousel-gradient-left,
  .carousel-gradient-right {
    width: 12%;
    max-width: 80px;
  }

  /* --- Sección Campañas --- */
  .section-campanas-heading {
    font-size: clamp(36px, 5vw, 56px);
  }

  .section-campanas-subtitle {
    font-size: 12px;
  }

  .section-campanas-title {
    padding: 1.25rem 0 0.5rem;
  }

  .campaign-video-wrap {
    height: 35vh;
  }

  .campaign-slide.active .campaign-video-wrap {
    height: 55vh;
  }

  .campaign-play-btn {
    width: 56px;
    height: 40px;
    border-radius: 10px;
  }

  .campaign-play-btn::after {
    border-width: 8px 0 8px 14px;
  }

  .campaign-controls {
    padding: 0.6rem 0;
    bottom: 1.5rem;
  }

  .campaign-progress-bar {
    width: 90px;
  }

  .campaign-arrows button {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .campaign-title,
  .campaign-client {
    font-size: 11px;
  }

  .campaign-mas-info {
    font-size: 11px;
  }

  /* --- Sección Sanar --- */
  .section-sanar-linea {
    top: 18%;
  }

  .section-sanar-textos {
    top: 20%;
    gap: 1rem;
    padding-top: 0.5rem;
  }

  .section-sanar-text-left,
  .section-sanar-text-right {
    font-size: 11px;
    max-width: 34ch;
  }

  .section-sanar-heading-wrap {
    bottom: 1.25rem;
    gap: 0.3rem;
  }

  .section-sanar-subtitle {
    font-size: 10px;
  }

  /* --- Sección Clientes --- */
  .section-clientes {
    padding: 32px 0;
  }

  .section-clientes-title {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: 1.5rem;
  }

  .clientes-marquee-track {
    padding: 1.5rem 0;
  }

  .clientes-logo-group {
    gap: clamp(2rem, 4vw, 4rem);
    padding-right: clamp(2rem, 4vw, 4rem);
  }

  .clientes-imagen {
    height: 36px;
  }

  .clientes-imagen:hover {
    transform: translateY(-6px) scale(1.06);
  }

  /* --- Sección Servicios --- */
  .section-servicios {
    padding: 0 0 2.5rem;
  }

  .section-servicios-inner {
    padding-top: 1.25rem;
  }

  .servicio-item {
    height: 150px;
    min-height: 150px;
    padding: 0 2.5%;
    gap: 0 1.25rem;
  }

  .servicio-item,
  .servicio-header {
    grid-template-columns: 38% 62%;
    gap: 0 1.25rem;
  }

  .servicio-title {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
  }

  .servicio-btn {
    font-size: 10px;
    padding: 0.3rem 0.8rem;
  }

  .servicio-desc {
    font-size: 11px;
    padding-top: 10px;
    line-height: 1.5;
  }

  /* --- Sección Contacto --- */
  .section-contacto {
    padding: 2.5rem 0 3.5rem;
  }

  .section-contacto-inner {
    grid-template-columns: 38% 1fr;
    gap: 1.5rem 2rem;
    padding: 0 2.5%;
  }

  .contacto-title {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: 1rem;
  }

  .contacto-info {
    font-size: 11px;
    line-height: 1.8;
  }

  .contacto-info dt {
    margin-top: 0.5rem;
  }

  .contacto-siguenos {
    font-size: 10px;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .contacto-social .social-icon,
  .footer-social .social-icon {
    width: 24px;
    height: 24px;
  }

  .contacto-form {
    gap: 1.1rem;
  }

  .contacto-field label {
    font-size: 10px;
  }

  .contacto-field input,
  .contacto-field textarea {
    font-size: 14px;
    padding: 0.35rem 0;
    min-height: 1.8rem;
  }

  .contacto-field textarea {
    min-height: 70px;
  }

  .contacto-submit {
    font-size: 11px;
    padding: 0.55rem 1.2rem;
  }

  /* --- Footer --- */
  .footer {
    padding: 2.5rem 0 1.25rem;
  }

  .footer-inner {
    width: 95%;
    max-width: 95%;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
  }

  .footer-col h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .footer-col p,
  .footer-col a {
    font-size: 11px;
  }

  .footer-legal {
    font-size: 9px;
  }

  .footer-logo-wrap {
    padding-top: 1.5rem;
  }

}

/* Textos descriptivos: ocultos en desktop, visibles solo en móvil */
.section-carousel-desc,
.section-campanas-desc {
  display: none;
}

/* --- Teléfono: optimización armónica --- */
@media (max-width: 768px) {

  html {
    font-size: 15px;
  }

  .navbar {
    padding: 0.75rem 0;
    width: var(--mobile-content-w);
    max-width: var(--mobile-content-w);
  }

  .nav-hamburger {
    width: 24px;
    height: 24px;
  }

  .mobile-sticky-header {
    padding: 0.75rem 5%;
  }

  /* Ancho de contenido en móvil: 90% (en escritorio se usa 95%) */
  :root {
    --mobile-content-w: 90%;
    --mobile-header-h: 52px;
  }

  main > section {
    padding-top: 0;
  }

  /* Sección 2: todo el alto de la pantalla, elementos al centro, texto bajo embeds */
  .section-carousel {
    /* height set dynamically by JS, same as desktop */
  }

  .section-carousel-desc {
    display: none !important;
  }

  /* Sección 3: height set by JS for scroll-driven slides */
  .section-campanas {
    min-height: auto;
    padding-bottom: 0;
  }

  .section-campanas-desc {
    display: none;
  }

  /* Sección 1: toda la altura de la pantalla */
  .above-the-fold {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  /* Sección 1: logo y texto centrados, menú reemplazado por hamburguesa */
  .above-the-fold .navbar .nav-menu-inline {
    display: none;
  }

  .above-the-fold .nav-hamburger {
    display: flex;
  }

  .above-the-fold .hero {
    padding: 0;
    padding-bottom: 50vh;
    gap: 1rem;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 0;
  }

  .hero-desc-wrap {
    order: -1;
    margin-bottom: 0;
  }

  .hero-title-wrap {
    margin-top: 0;
    order: 0;
  }

  .hero-title-logo {
    width: 70vw;
    max-width: 280px;
  }

  .hero-desc {
    font-size: clamp(18px, 5vw, 24px);
    max-width: 100%;
    -webkit-line-clamp: 4;
    text-align: center;
  }

  /* Sección 4 (Nosotros): todo el alto de la pantalla (100vh), fondo nosotros-mobile, texto al final */
  .section-sanar {
    min-height: 100vh;
    height: 100vh;
    padding: 50vh 0 1rem;
    background: #000000 url('../public/images/nosotros-mobile.webp') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    box-sizing: border-box;
  }

.section-sanar-linea {
    display: none;
  }

  .section-sanar-imagen-wrap {
    flex: 0 0 auto;
    padding: 0;
    background: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .section-sanar-textos {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    width: var(--mobile-content-w);
    max-width: var(--mobile-content-w);
    margin: 0 auto;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .section-sanar-text-right {
    justify-self: start;
    text-align: left;
  }

  .section-sanar-heading-wrap {
    position: relative;
    left: 0;
    bottom: 0;
    transform: none;
    width: var(--mobile-content-w);
    max-width: var(--mobile-content-w);
    margin: 0 auto;
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
    gap: 0.25rem;
  }

  .section-sanar-subtitle {
    text-align: left;
  }

  .section-sanar-title {
    font-size: clamp(1.75rem, 10vw, 3rem);
    white-space: normal;
    text-align: left;
  }

  /* Sección 5 (Clientes) mobile */
  .section-clientes {
    height: auto;
    padding: 2rem 5%;
    background: #D6D6D6;
    box-sizing: border-box;
  }

  .section-clientes-title {
    font-size: clamp(28px, 8vw, 42px);
    text-align: left;
    margin: 0 0 1.5rem;
    padding-left: 0;
    color: #000000;
  }

  .clientes-marquee {
    mask-image: none;
    -webkit-mask-image: none;
    overflow: visible;
  }

  .clientes-marquee-track {
    animation: none !important;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 0;
    justify-content: center;
  }

  .clientes-logo-group:last-child {
    display: none;
  }

  .clientes-logo-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
    width: 100%;
    padding: 0;
  }

  .clientes-imagen {
    height: 32px;
    margin: 0 auto;
    opacity: 0.7;
    filter: grayscale(100%);
    transform: none;
  }

  .clientes-imagen:hover {
    transform: none;
    filter: grayscale(100%);
    opacity: 0.7;
  }

  /* Servicios (sección 6) vuelve a altura automática */
  .section-servicios-inner {
    padding-top: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .servicio-item {
    height: auto;
    min-height: 0;
    padding: 1.25rem 5%;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.75rem 0;
  }

  .servicio-header {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: 1fr;
    gap: 0.5rem 0;
  }

  .servicio-title {
    grid-column: 1;
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }

  .servicio-btn {
    grid-column: 1;
    justify-self: start;
  }

  .servicio-desc {
    grid-column: 1;
    grid-row: auto;
    padding-top: 12px;
    font-size: 13px;
  }

  .servicio-item:active,
  .servicio-item.touch-active {
    background: linear-gradient(180deg, #000000 0%, #F74500 100%);
  }

  .servicio-item:active,
  .servicio-item:active .servicio-title,
  .servicio-item:active .servicio-desc,
  .servicio-item:active .servicio-btn,
  .servicio-item.touch-active,
  .servicio-item.touch-active .servicio-title,
  .servicio-item.touch-active .servicio-desc,
  .servicio-item.touch-active .servicio-btn {
    color: #D6D6D6;
  }

  .servicio-item:active .servicio-btn,
  .servicio-item.touch-active .servicio-btn {
    border-color: #D6D6D6;
  }

  /* Sección 7 (Contacto): alto de toda la pantalla; header encima, nunca cubre */
  .section-contacto {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
  }

  .section-contacto-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: var(--mobile-content-w);
    max-width: var(--mobile-content-w);
  }

  .contacto-title {
    font-size: clamp(28px, 8vw, 42px);
  }

  .contacto-form {
    gap: 1.25rem;
  }

  .contacto-submit {
    width: 100%;
    max-width: 280px;
    align-self: center;
  }

  /* Footer */
  .footer-inner {
    width: 90%;
    max-width: 90%;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer-logo-wrap {
    width: 90%;
    max-width: 90%;
  }

  .footer-nav-cols {
    grid-template-columns: 1fr;
  }

  .footer-left {
    gap: 1.5rem;
  }

  /* Sección 2 mobile: fila única auto-scroll */
  .carousel-track {
    gap: 0.5rem;
  }
  .carousel-cell {
    height: 45vh;
  }

  /* Sección 3 (Campañas) mobile: embed 16:9, solo flechas debajo, textos arriba centrados; altura pantalla ya definida arriba */
.section-campanas .campaign-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
  }

  .section-campanas .campaign-title {
    max-width: 100%;
  }

  .section-campanas .campaign-client {
    text-align: center;
  }

  .section-campanas .campaign-slides {
    min-height: 0;
    padding-top: 0.25rem;
  }

  .section-campanas .campaign-video-wrap {
    background: #1a1a1a;
    height: auto;
    width: 95vw;
    max-width: 95vw;
    aspect-ratio: 16 / 9;
  }

  .section-campanas .campaign-slide.active .campaign-video-wrap {
    height: auto;
    width: 95vw;
    max-width: 95vw;
  }

  .section-campanas .campaign-controls {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 2.5%;
    width: 100%;
    max-width: 100%;
  }

  .section-campanas .campaign-progress-wrap {
    display: flex;
  }

  .section-campanas .campaign-pagination {
    display: none;
  }

  .section-campanas .campaign-arrows {
    display: none;
  }

  /* Campañas */
  .campaign-controls {
    flex-wrap: wrap;
    gap: 0.75rem;
    width: var(--mobile-content-w);
    max-width: var(--mobile-content-w);
  }

  .campaign-progress-wrap {
    order: 1;
    width: 100%;
  }

  .campaign-arrows {
    margin-left: auto;
  }

  /* Textos descriptivos: ocultos en móvil */
  .section-carousel-desc,
  .section-campanas-desc {
    display: none;
  }
}


/* === ACCESIBILIDAD: visually hidden === */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === FOCUS RING GLOBAL (WCAG 2.1 AA) === */

/* #000000 sobre #F74500 = 7.5:1 ✓ */
:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 3px;
}

/* Secciones oscuras: fondo negro/gradiente — usar luz */
/* #D6D6D6 sobre #000000 = 10.5:1 ✓ */
.section-sanar :focus-visible,
.section-servicios :focus-visible,
.section-contacto :focus-visible,
.footer :focus-visible {
  outline-color: #D6D6D6;
}

/* === ALTURAS SVH: evita overflow en móviles con barra de URL === */

@supports (height: 100svh) {
  .section-carousel {
    min-height: 100svh;
  }
  .section-campanas {
    min-height: 100svh;
  }
}

/* === PREFERS-REDUCED-MOTION === */

@media (prefers-reduced-motion: reduce) {
  *:not(.clientes-marquee-track), *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .clientes-marquee-track {
    animation-duration: 90s !important;
  }
  .carousel-track {
    animation-name: none !important;
  }
}