@import url("/assets/css/sitemap-page.css");

/* Optimización sin cambios visuales en condiciones normales. */
html.scroll-locked {
  overflow: hidden;
}
video[data-video-ready="false"] source {
  display: none;
}

.seo-service-link {
  color: inherit;
  text-decoration: none;
}

.team_founders_intro {
  max-width: 72rem;
  margin: 0 auto 3rem;
  padding-inline: 1rem;
  line-height: 1.45;
}

.seo-project-copy h2 {
  margin-top: 1.75em;
  margin-bottom: 0.55em;
  font-size: clamp(1.55rem, 2.7vw, 2.4rem);
  line-height: 1.05;
}

.seo-project-copy p {
  margin-bottom: 1em;
}

.seo-project-copy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Lectura ordenada para textos extensos. Los títulos, botones y etiquetas
   conservan su alineación original para no afectar la jerarquía visual. */
p,
.w-richtext li {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* El quinto acceso del menú se adapta sin desbordar pantallas móviles. */
@media screen and (max-width: 767px) {
  .nav {
    width: calc(100vw - 16px);
    max-width: 390px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .nav_link {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }

  .nav_link_tag_title {
    font-size: 0.4em;
  }
}

@media (max-width: 767px) {
  .team_founders_intro {
    margin-bottom: 2rem;
    font-size: 1.15rem;
  }
}

/* Solo se aplica cuando el usuario solicita menos movimiento. */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Capa de enfoque para la interfaz de WhatsApp. */
.ch-wa-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgb(23 20 18 / 62%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: default;
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

body.ch-wa-interface-open .ch-wa-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ch-whatsapp-widget {
  z-index: 9999;
}

/* Panel de servicios: disponible solo en dispositivos con mouse. */
.ch-services-flyout {
  display: none;
}

@media screen and (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .ch-services-flyout {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: calc(100% + 0.75rem);
    display: block;
    width: min(720px, calc(100vw - 7.5rem));
    padding: 1.25rem;
    border: 1px solid rgb(23 20 18 / 7%);
    border-radius: 1.5rem;
    background: rgb(0 0 0 / 5%);
    box-shadow: 0 24px 64px rgb(23 20 18 / 10%);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(12px, -50%) scale(0.98);
    transform-origin: left center;
    transition:
      opacity 180ms ease,
      visibility 180ms ease,
      transform 180ms ease;
  }

  .ch-services-flyout::before {
    content: "";
    position: absolute;
    top: 0;
    right: 100%;
    width: 1rem;
    height: 100%;
  }

  .nav_link-services:hover + .ch-services-flyout,
  .nav_link-services:focus-visible + .ch-services-flyout,
  .ch-services-flyout:hover,
  .ch-services-flyout:focus-within {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, -50%) scale(1);
  }

  .nav_link-services:hover .nav_link_tag,
  .nav_link-services:focus-visible .nav_link_tag {
    opacity: 0 !important;
    visibility: hidden;
  }

  .ch-services-flyout-title {
    margin: 0 0 1.15rem;
    color: var(--base, #171412);
    text-align: center;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
  }

  .ch-services-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .ch-services-card {
    position: relative;
    display: flex;
    min-height: 220px;
    padding: 1.2rem;
    border-radius: 1.05rem;
    color: var(--card-color, #171412);
    background: var(--card-bg, #ff7722);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition:
      transform 180ms ease,
      box-shadow 180ms ease;
  }

  .ch-services-card:hover,
  .ch-services-card:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 18px 34px rgb(23 20 18 / 20%);
    outline: none;
  }

  .ch-services-card-label {
    display: flex;
    align-items: flex-end;
    width: 100%;
    text-align: left;
    font-size: clamp(0.82rem, 1.1vw, 1rem);
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
  }

  .ch-services-card-arrow {
    margin-left: auto;
    padding-left: 0.4rem;
    font-size: 1.15rem;
  }
}

@media screen and (min-width: 768px) and (max-width: 1050px) and (hover: hover) and (pointer: fine) {
  .ch-services-flyout {
    width: min(560px, calc(100vw - 7.5rem));
  }

  .ch-services-card {
    min-height: 170px;
  }
}

/* Los paneles siguen el cambio de color de los accesos sobre fondos oscuros. */
@media screen and (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .nav_link-services.is-dark + .ch-services-flyout {
    border-color: rgb(255 255 255 / 7%);
    background: rgb(255 255 255 / 5%);
  }

  .nav_link-services.is-dark + .ch-services-flyout .ch-services-flyout-title {
    color: var(--bg, #fbf9ef);
  }
}

/* Panel de proyectos: misma envolvente que Servicios y miniaturas cuadradas. */
.ch-projects-flyout {
  display: none;
}

@media screen and (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .ch-projects-flyout {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: calc(100% + 0.75rem);
    display: block;
    width: min(720px, calc(100vw - 7.5rem));
    max-height: calc(100vh - 2rem);
    padding: 1.25rem;
    border: 1px solid rgb(23 20 18 / 7%);
    border-radius: 1.5rem;
    background: rgb(0 0 0 / 5%);
    box-shadow: 0 24px 64px rgb(23 20 18 / 10%);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: auto;
    overscroll-behavior: contain;
    transform: translate(12px, -50%) scale(0.98);
    transform-origin: left center;
    transition:
      opacity 180ms ease,
      visibility 180ms ease,
      transform 180ms ease;
    scrollbar-width: thin;
  }

  .ch-projects-flyout::before {
    content: "";
    position: absolute;
    top: 0;
    right: 100%;
    width: 1rem;
    height: 100%;
  }

  .nav_link-projects:hover + .ch-projects-flyout,
  .nav_link-projects:focus-visible + .ch-projects-flyout,
  .ch-projects-flyout:hover,
  .ch-projects-flyout:focus-within {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, -50%) scale(1);
  }

  .nav_link-projects:hover .nav_link_tag,
  .nav_link-projects:focus-visible .nav_link_tag {
    opacity: 0 !important;
    visibility: hidden;
  }

  .ch-projects-flyout-title {
    margin: 0 0 1.15rem;
    color: var(--base, #171412);
    text-align: center;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
  }

  .ch-projects-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .ch-projects-card {
    position: relative;
    display: block;
    aspect-ratio: 1;
    border-radius: 0.85rem;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    background: #171412;
    isolation: isolate;
    transition:
      transform 180ms ease,
      box-shadow 180ms ease;
  }

  .ch-projects-card:hover,
  .ch-projects-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgb(23 20 18 / 24%);
    outline: none;
  }

  .ch-projects-card::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgb(0 0 0 / 78%) 100%);
    pointer-events: none;
  }

  .ch-projects-card-image {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
    transition: transform 300ms ease;
  }

  .ch-projects-card:hover .ch-projects-card-image,
  .ch-projects-card:focus-visible .ch-projects-card-image {
    transform: scale(1.04);
  }

  .ch-projects-card-title {
    position: absolute;
    z-index: 2;
    right: 0.7rem;
    bottom: 0.7rem;
    left: 0.7rem;
    color: #fff;
    text-align: left;
    font-size: clamp(0.64rem, 0.8vw, 0.82rem);
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgb(0 0 0 / 55%);
  }

  .nav_link-projects.is-dark + .ch-projects-flyout {
    border-color: rgb(255 255 255 / 7%);
    background: rgb(255 255 255 / 5%);
  }

  .nav_link-projects.is-dark + .ch-projects-flyout .ch-projects-flyout-title {
    color: var(--bg, #fbf9ef);
  }
}

@media screen and (min-width: 768px) and (max-width: 1050px) and (hover: hover) and (pointer: fine) {
  .ch-projects-flyout {
    width: min(560px, calc(100vw - 7.5rem));
  }
}

/* Contraste de los títulos según el estado real del fondo de la página. */
@media screen and (min-width: 768px) and (hover: hover) and (pointer: fine) {
  body:not(.--dark) .ch-services-flyout-title,
  body:not(.--dark) .ch-projects-flyout-title {
    color: var(--base, #171412) !important;
    mix-blend-mode: normal;
  }

  body.--dark .ch-services-flyout,
  body.--dark .ch-projects-flyout {
    border-color: rgb(255 255 255 / 7%);
    background: rgb(255 255 255 / 5%);
  }

  body.--dark .ch-services-flyout-title,
  body.--dark .ch-projects-flyout-title {
    color: var(--white, #fff) !important;
    mix-blend-mode: normal;
  }

  body.ch-nav-flyout-locked .ch-services-flyout,
  body.ch-nav-flyout-locked .ch-projects-flyout {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate(12px, -50%) scale(0.98) !important;
  }
}

/* Footer editorial de Chahinos Agency. */
.ch-site-footer {
  position: relative;
  width: 100%;
  padding: clamp(5rem, 8vw, 9rem) clamp(1.25rem, 4vw, 5rem) 0;
  color: var(--white, #fff) !important;
  background: var(--base, #171412);
  overflow: hidden;
  isolation: isolate;
}

html body .ch-site-footer[data-color] {
  background: var(--base, #171412) !important;
}

.ch-site-footer-inner {
  width: 100%;
  max-width: 82rem;
  margin: 0 auto;
}

.ch-site-footer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.25rem, 2vw, 2.5rem);
}

.ch-site-footer-column {
  min-width: 0;
}

.ch-site-footer-heading {
  margin: 0 0 1.6rem;
  color: rgb(255 255 255 / 48%) !important;
  font-family: inherit;
  font-size: clamp(0.82rem, 0.9vw, 1rem);
  font-weight: 400;
  line-height: 1.15;
  text-transform: none;
}

.ch-site-footer-list {
  display: grid;
  gap: 0.62rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ch-site-footer-link,
.ch-site-footer-text {
  display: inline-block;
  color: var(--white, #fff) !important;
  font-family: Youth, Arial, sans-serif;
  font-size: clamp(0.72rem, 0.84vw, 0.94rem);
  font-weight: 900;
  line-height: 1.08;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  text-wrap: balance;
}

.ch-site-footer-text.is-muted {
  color: rgb(255 255 255 / 43%) !important;
}

.ch-site-footer-link {
  transition:
    color 180ms ease,
    opacity 180ms ease;
}

.ch-site-footer-link:hover,
.ch-site-footer-link:focus-visible {
  color: var(--orange, #ff7622) !important;
}

.ch-site-footer-socials {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: clamp(4rem, 6vw, 7rem);
}

.ch-site-footer .socials {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  gap: 0.65rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.ch-site-footer .socials_item {
  margin: 0 !important;
  padding: 0 !important;
}

.ch-site-footer .social-link {
  display: grid !important;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0 !important;
  padding: 0 !important;
  color: rgb(255 255 255 / 55%) !important;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 0.7rem;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.ch-site-footer .social-link:hover,
.ch-site-footer .social-link:focus-visible {
  color: var(--white, #fff) !important;
  border-color: rgb(255 255 255 / 42%);
  transform: translateY(-2px);
}

.ch-site-footer .social-logo {
  width: 1rem !important;
  height: 1rem !important;
}

.ch-site-footer-copyright {
  margin: 1.55rem 0 clamp(3rem, 5vw, 5rem);
  color: rgb(255 255 255 / 52%) !important;
  font-size: clamp(0.78rem, 0.9vw, 1rem);
  line-height: 1.2;
  text-align: center !important;
}

.ch-site-footer-brand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 0.35vw 0.12em;
  overflow: hidden;
}

.ch-site-footer-brand-word {
  display: block;
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  margin: 0;
  color: rgb(255 255 255 / 10%) !important;
  white-space: nowrap;
  text-align: center;
  font-size: clamp(4.75rem, 11.3vw, 14.25rem);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.025em;
  transform: translateY(-0.015em) scaleX(var(--ch-brand-scale, 1));
  transform-origin: center bottom;
  user-select: none;
}

.nav {
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.header_mobile .lang {
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 220ms ease;
}

body.ch-footer-in-view .nav {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.ch-footer-in-view .header_mobile .chahinos_logo,
body.ch-footer-in-view .header_mobile .lang {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(10px) !important;
}

@media screen and (max-width: 767px) {
  .ch-site-footer {
    padding: 3.75rem 1.25rem 0;
  }

  .ch-site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.25rem 1.35rem;
  }

  .ch-site-footer-heading {
    margin-bottom: 1.15rem;
    font-size: 0.78rem;
  }

  .ch-site-footer-list {
    gap: 0.56rem;
  }

  .ch-site-footer-link,
  .ch-site-footer-text {
    font-size: clamp(0.68rem, 3vw, 0.86rem);
  }

  .ch-site-footer-column:nth-child(5) {
    grid-column: 1;
  }

  .ch-site-footer-socials {
    margin-top: 3.5rem;
  }

  .ch-site-footer .socials {
    gap: 0.45rem;
  }

  .ch-site-footer .social-link {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.62rem;
  }

  .ch-site-footer-copyright {
    margin: 1.4rem 0 2.6rem;
    font-size: 0.78rem;
  }

  .ch-site-footer-brand {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-inline: 0.2rem;
  }

  .ch-site-footer-brand-word {
    font-size: clamp(2.9rem, 11.55vw, 5.65rem);
    line-height: 0.82;
    letter-spacing: -0.018em;
  }
}

@media screen and (max-width: 991px) {
  body.ch-footer-in-view .ch-whatsapp-widget,
  body.ch-footer-in-view .ch-whatsapp-widget--original {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ch-site-footer-link,
  .ch-site-footer .social-link {
    transition: none;
  }
}
/* Oculta la barra nativa sin desactivar el desplazamiento. */
html,
body,
c-scroll,
.app {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
c-scroll::-webkit-scrollbar,
.app::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
