/* =========================================
   AsiDoc Stylesheet
   Brand-driven, sectioned for easy editing
   ========================================= */

/* ---------- Root & Base ---------- */

:root {
  --gris-fondo: #E6E6E6;
  --azul-teal:  #3C8A8A;
  --cielo:      #68C3D4;
  --lima:       #7AA13D;
  --texto:      #555555;
  --blanco:     #FFFFFF;

  --radio: 18px;
  --sombra: 0 6px 24px rgba(0,0,0,.08);
  --ancho: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--texto);
  background: #fff;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu,
        "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* Skip link (accessibility) */
.skip {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: .5rem .75rem;
  border: 2px solid var(--azul-teal);
  border-radius: 8px;
}

/* =========================================
   LAYOUT HELPER
   ========================================= */

.contenedor {
  max-width: var(--ancho);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
/* =========================================
   HEADER & NAV
   ========================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f2f6f4;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.marca img {
  height: 40px;
  display: block;
}

#nav-toggle {
  display: none;
}

.menu-btn {
  width: 36px;
  height: 36px;
  display: none;
  position: relative;
  cursor: pointer;
}

.menu-btn::before,
.menu-btn::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  background: #333;
  transition: .25s;
}

.menu-btn::before {
  top: 12px;
  box-shadow: 0 8px 0 #333;
}

.menu-btn::after {
  top: 24px;
}

/* City page nav class (matches your HTML) */
.nav-header {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-header a {
  text-decoration: none;
  color: #2e2e2e;
  padding: .5rem .75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-header a:hover {
  background: var(--azul-teal);
  color: #fff;
}

/* Mobile dropdown (scoped to the wrapper to reduce fragility) */
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav-header { display: none; }

  .header-nav #nav-toggle:checked ~ .nav-header {
    display: flex;
    position: absolute;
    inset: 64px 0 auto 0;
    background: #fff;
    padding: .75rem;
    flex-direction: column;
    border-bottom: 1px solid rgba(0,0,0,.06);
  }
}

/* =========================================
   HERO
   ========================================= */

.hero{
  position: relative;
  z-index: 0;
  overflow: hidden;

  background-image: url("../img/hero/consultorio.png"); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #fff;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index: 0;
  background: rgba(255,255,255,.78);
  pointer-events:none;
}

.hero-inner{
  position: relative;
  z-index: 1;
  padding: 64px 0 48px;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1{
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: .5rem;
  font-weight: 800;
  color: var(--texto);
  max-width: 900px;
}

.txt-enfasis{ color: var(--azul-teal); }

.sub{
  margin-bottom: 1rem;
  color: #666;
  max-width: 900px;
}
/* =========================================
   DIVISOR CON IMAGEN (Index)
   ========================================= */

.divisor-img{
  min-height: 260px;
  background-image: url("../img/asistencia_sin_rostros.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Only do parallax “fixed” on larger screens */
@media (min-width: 1024px){
  .divisor-img{
    background-attachment: fixed;
  }
}

.divisor-img .overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.25),
    rgba(255,255,255,0.45)
  );
}

/* Variante pequeña */
.divisor-img-small{
  min-height: 140px;
}

/* =========================================
   HERO – City Pages
   ========================================= */

.hero-ciudad{
  position: relative;
  height: 85vh;
  min-height: 520px;
  color: #fff;
  overflow: hidden;
}

.hero-ciudad .hero-fondo{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-ciudad .hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(0,0,0,0.0),
    rgba(0,0,0,0.12)
  );
  z-index: 2;
}

.hero-ciudad .hero-contenido{
  position: relative;
  z-index: 3;
  max-width: 700px;
  padding-top: 6rem;
}

.hero-ciudad h1{
  font-size: 2.6rem;
  margin-bottom: 0.5rem;
}

.hero-ciudad p{
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

/* =========================================
   GENERIC SECTION STYLES
   ========================================= */

.seccion {
  padding: 64px 0;
  scroll-margin-top: 84px;
}

.seccion-acentada {
  background: var(--gris-fondo);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, minmax(0,1fr));
}

/* =========================================
   SERVICIOS
   ========================================= */

.cards > * { grid-column: span 4; }
@media (max-width:1024px){ .cards > *{grid-column:span 6;} }
@media (max-width:700px){ .cards > *{grid-column:span 12;} }

.card {
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:var(--radio);
  box-shadow:var(--sombra);
  padding:1rem;
}

/* =========================
   Servicios – City Pages
   ========================= */

.servicios-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:2rem;
  margin-top:2rem;
}

@media (max-width: 768px){
  .servicios-grid{ grid-template-columns:1fr; }
}

.servicio-item{ background:#fff; }

.servicio-media{ position:relative; }

.servicio-media img{
  width:100%;
  aspect-ratio:3 / 2;
  object-fit:cover;
  display:block;
  filter:brightness(.75);
  border-radius:6px;
}

.servicio-media h3{
  position:absolute;
  bottom:1rem;
  left:1rem;
  margin:0;
  color:#fff;
  font-size:1.3rem;
  font-weight:600;
  text-shadow:0 2px 8px rgba(0,0,0,.6);
  letter-spacing:.02em;
  pointer-events:none;
}

.servicio-item p{
  margin-top:.75rem;
  font-size:.95rem;
  line-height:1.5;
  color:#444;
}

/* =========================================
   FLOATING SOCIAL LINKS (SINGLE SOURCE)
   ========================================= */

.floating-social {
  position: fixed;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  z-index: 999;
}

.floating-social .social-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}

.floating-social .social-btn img {
  width: 22px;
  height: 22px;
}

.floating-social .social-btn:hover {
  transform: translateX(4px);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

.social-btn.whatsapp { background:#c9a63b; }
.social-btn.facebook { background:#2f4f6f; }
.social-btn.instagram{ background:#b24a4a; }
.social-btn.facebook img{ filter:invert(1); }

/* =========================================
   ACERCA DE ASIDOC
   ========================================= */

.acerca-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1fr 1.2fr;
}

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

.logo-amplio {
  max-width: 360px;
  margin: 0 auto;
}

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

/* =========================================
   TESTIMONIOS
   ========================================= */

#testimonios .seccion-tit {
  margin-bottom: 2.5rem;
}

.testi-grid > * {
  grid-column: span 4;
}
@media (max-width: 1024px) {
  .testi-grid > * { grid-column: span 6; }
}
@media (max-width: 700px) {
  .testi-grid > * { grid-column: span 12; }
}

.testi {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 1.75rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.logo-badge {
  position: relative;
  z-index: 2;
  width: 140px;
  height: 140px;
  margin-top: -55px;
  border-radius: 999px;
  background: #fff;
  border: 4px solid var(--gris-fondo);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  display: grid;
  place-items: center;
  align-self: center;
  padding: 18px;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.testi-nombre {
  margin-top: .35rem;
  margin-bottom: .35rem;
  text-align: left;
  align-self: flex-start;
  font-weight: 600;
  font-size: clamp(18px, 2.1vw, 22px);
  color: var(--azul-teal);
}

blockquote {
  margin: 0;
}

.btn-cliente {
  margin-top: .75rem;
  align-self: flex-start;
  display: inline-block;
  padding: .5rem .9rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: var(--azul-teal);
  transition: background .2s ease, transform .08s ease, box-shadow .2s ease;
}

.btn-cliente:hover {
  background: var(--lima);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

.logo-badge.is-photo {
  padding: 3px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-badge.is-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 999px;
}
.testi blockquote{
  margin: 0;
}

.testi-texto{
  max-height: 320px;     /* tweak if you want */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: .5rem;
}

/* =========================================
   FOOTER (SINGLE SOURCE)
   ========================================= */

/* Force footer links onto their own lines */
.footer-contacto a,
.footer-legal a {
  display: block;
  margin-bottom: .45rem;
}
.footer-contacto a:last-child,
.footer-legal a:last-child {
  margin-bottom: 0;
}

.site-footer {
  background:#0f1f1c;
  color:#e6ecea;
  margin-top:4rem;
  padding-inline:clamp(1.25rem,4vw,3rem);
}

.footer-inner {
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:3rem;
  padding:2rem 0 1.25rem;
}

.footer-brand img {
  max-width:140px;
  background:#f7f8f6;
  padding:.6rem .9rem;
  border-radius:10px;
}

.site-footer a {
  color:#e6ecea;
  text-decoration:none;
  opacity:.85;
}

.site-footer a:hover {
  opacity:1;
}

.footer-bottom {
  border-top:1px solid rgba(255,255,255,.08);
  text-align:center;
  padding:.35rem 0;
  font-size:.8rem;
  opacity:.7;
}

@media (max-width:860px){
  .footer-inner{
    grid-template-columns:1fr;
    gap:1.75rem;
  }
}

/* =========================================
   SERVICIOS – City Pages (image crop fix)
   ========================================= */

.servicios-grid .servicio-media{
  overflow: hidden;
  border-radius: 6px;
}

.servicios-grid .servicio-media img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

/* =========================================
   COMO FUNCIONA (Index) — LOCKED GRID
   ========================================= */

#como{
  background: #f2f6f4;
}

#como .como-grid{
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 2rem;
  align-items: start;
  grid-auto-flow: row;
}

/* Force exact placement (no auto-placement surprises) */
#como .como-pasos{
  grid-column: 1;
  grid-row: 1;
}

#como .como-beneficios{
  grid-column: 2;
  grid-row: 1;
  align-self: start !important;
  margin: 0 !important;
  height: auto !important;
}

/* Mobile: stack cleanly */
@media (max-width: 900px){
  #como .como-grid{ grid-template-columns: 1fr; }

  #como .como-pasos{ grid-column: 1; grid-row: 1; }
  #como .como-beneficios{ grid-column: 1; grid-row: 2; }
}

/* Right column back as a card (scoped) */
#como .como-beneficios{
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 1.25rem;
}

/* =========================================
   HABLEMOS (Contact section)
   ========================================= */

#contacto.seccion{
  padding: 40px 0;
}

#contacto .seccion-tit{
  margin-bottom: 1.25rem;
}

#contacto .contacto-intro{
  margin-bottom: 0;
}

#contacto .contacto-intro p:last-child{
  margin-bottom: 0;
}

/* =========================================
   TESTIMONIOS – small cleanups
   ========================================= */

.testi .btn-cliente{
  margin-top: auto;
}

.testi blockquote{
  margin:0;
}