/* =============================================
   Clínica Lostalo — Estilos
   ============================================= */

:root {
  --primary:   #1a3a5c;
  --teal:      #0b7d70;
  --teal-lt:   #e6f4f2;
  --teal-dk:   #085f55;
  --orange:    #e8852a;
  --text:      #1a2e3b;
  --muted:     #5f7481;
  --light:     #f7f9fa;
  --border:    #e4eaed;
  --white:     #ffffff;
  --radius:    12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow:    0 6px 28px rgba(0,0,0,.10);
  --tr:        .22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; overflow-x: hidden; }
body  { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; color: var(--text); line-height: 1.6; background: var(--white); overflow-x: hidden; max-width: 100%; }
img   { max-width: 100%; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ===================================================
   NAVBAR
   =================================================== */
#navbar {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 72px;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 42px; height: 42px;
  background: var(--teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 900;
}
.logo-text      { font-weight: 800; font-size: 1.1rem; color: var(--primary); line-height: 1.1; }
.logo-text span { font-weight: 400; font-size: .72rem; color: var(--muted); display: block; letter-spacing: .02em; }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  padding: 6px 14px;
  border-radius: 6px;
  transition: var(--tr);
}
.nav-links a:hover { color: var(--teal); background: var(--teal-lt); }

/* Nav actions (right) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-icon-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  font-size: .95rem;
  transition: var(--tr);
  cursor: pointer;
  background: none;
}
.nav-icon-btn:hover { border-color: var(--teal); color: var(--teal); }

.nav-whatsapp {
  width: 36px; height: 36px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  transition: var(--tr);
}
.nav-whatsapp:hover { background: #1dba57; transform: scale(1.05); }

.btn-cita {
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 22px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
}
.btn-cita:hover { background: var(--teal-dk); transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--tr);
}

/* ===================================================
   HERO — foto real full-width + layout 2 columnas
   =================================================== */
#hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: var(--primary);
  display: flex;
  align-items: center;
}

/* Foto de fondo */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  z-index: 0;
}

/* Overlay degradado teal sobre la foto */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(11, 57, 84, 0.82) 0%,
    rgba(11, 125, 112, 0.68) 55%,
    rgba(7, 50, 45, 0.50) 100%
  );
  z-index: 1;
}

/* Layout 2 columnas sobre el overlay */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: center;
  width: 100%;
}

/* Columna izquierda */
.hero-left { max-width: 600px; }

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero-desc {
  color: rgba(255,255,255,.80);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-hero-primary {
  background: var(--white);
  color: var(--teal-dk);
  font-weight: 700;
  font-size: .92rem;
  padding: 13px 26px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--tr);
}
.btn-hero-primary:hover { background: #f0faf9; box-shadow: 0 4px 16px rgba(0,0,0,.15); transform: translateY(-1px); }

.btn-hero-ghost {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.35);
  color: var(--white);
  font-weight: 600;
  font-size: .92rem;
  padding: 13px 26px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--tr);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.22); }

/* Columna derecha — card acceso rapido */
.hero-right { display: flex; justify-content: flex-end; }

.quick-card {
  background: var(--white);
  border-radius: 18px;
  padding: 28px 28px 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  width: 100%;
  max-width: 360px;
}
.quick-card-tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.quick-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}
.quick-card-sub {
  font-size: .87rem;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.5;
}
.quick-card-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 22px;
}
.quick-card-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
}
.quick-card-list li i {
  color: var(--teal);
  font-size: .8rem;
  flex-shrink: 0;
}
.quick-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: .88rem;
  padding: 11px 22px;
  border-radius: 40px;
  width: 100%;
  justify-content: center;
  transition: var(--tr);
}
.quick-card-btn:hover { background: var(--teal-dk); transform: translateY(-1px); }

/* ===================================================
   QUICK BAR
   =================================================== */
#quick-bar {
  background: var(--primary);
  padding: 14px 0;
}
.quick-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.quick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.75);
  font-size: .87rem;
  transition: var(--tr);
}
.quick-item:hover { color: var(--white); }
.quick-item i { color: #7eeadd; font-size: 1rem; }
.quick-item strong { color: var(--white); display: block; font-size: .92rem; }

/* ===================================================
   SERVICIOS (macro)
   =================================================== */
#servicios {
  padding: 80px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-tag {
  display: inline-block;
  color: var(--teal);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 10px;
}
.section-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
}

/* Grid de servicios */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--tr);
  cursor: pointer;
}
.service-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-5px);
  border-color: transparent;
}
.service-card:hover .service-link { color: var(--teal-dk); }

/* Área de imagen con foto real */
.service-img {
  height: 200px;
  overflow: hidden;
  background: var(--light);
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .5s ease;
}
.service-card:hover .service-img img { transform: scale(1.06); }

.service-body { padding: 20px 22px 24px; }
.service-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.service-body p {
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.service-link {
  font-size: .87rem;
  font-weight: 700;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--tr);
}
.service-link:hover { gap: 8px; }

/* ===================================================
   CARRUSEL ASEGURADORAS
   =================================================== */
#seguros {
  background: var(--white);
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
#seguros .section-header { margin-bottom: 36px; }
#seguros .section-title { font-size: 1.3rem; font-weight: 600; color: var(--muted); }

.carousel-track-wrap {
  position: relative;
  overflow: hidden;
  /* fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.carousel-track {
  display: flex;
  gap: 0;
  animation: scroll-left 28s linear infinite;
  width: max-content;
}
.carousel-track:hover { animation-play-state: paused; }

@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.insurer-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  height: 64px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  opacity: .55;
  transition: opacity var(--tr);
  white-space: nowrap;
  letter-spacing: -.01em;
  border-right: 1px solid var(--border);
  user-select: none;
}
.insurer-item:hover { opacity: 1; }

/* Controles carrusel */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.carousel-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  cursor: pointer;
  transition: var(--tr);
  font-size: .9rem;
}
.carousel-btn:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-lt); }

/* ===================================================
   NOSOTROS (simplificado)
   =================================================== */
#nosotros {
  padding: 80px 0;
  background: var(--light);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-img {
  height: 400px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0b7d70 0%, #1a3a5c 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 5rem;
  color: rgba(255,255,255,.5);
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.about-img p { font-size: 1rem; color: rgba(255,255,255,.6); font-weight: 500; }
/* SEGURIDAD: clase que reemplaza el inline style eliminado del HTML */
.about-img-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.about-img-badge {
  position: absolute;
  bottom: 24px; right: 24px;
  background: var(--white);
  border-radius: 14px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.about-img-badge .num { font-size: 1.8rem; font-weight: 900; color: var(--primary); line-height: 1; }
.about-img-badge .lbl { font-size: .75rem; color: var(--muted); margin-top: 2px; }

.about-text .section-tag { text-align: left; }
.about-text .section-title { text-align: left; }
.about-text p { color: var(--muted); font-size: .97rem; margin-bottom: 12px; }
.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.about-stat-num { font-size: 1.8rem; font-weight: 900; color: var(--teal); line-height: 1; }
.about-stat-lbl { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ===================================================
   CTA BANNER
   =================================================== */
#cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  padding: 72px 0;
  text-align: center;
  color: var(--white);
}
#cta-banner h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 10px; }
#cta-banner p  { opacity: .8; margin-bottom: 28px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-white {
  background: var(--white);
  color: var(--teal-dk);
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--tr);
}
.btn-white:hover { box-shadow: 0 4px 20px rgba(0,0,0,.2); transform: translateY(-2px); }
.btn-ghost-white {
  border: 2px solid rgba(255,255,255,.4);
  color: var(--white);
  font-weight: 600;
  padding: 11px 28px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--tr);
}
.btn-ghost-white:hover { border-color: var(--white); background: rgba(255,255,255,.1); }

/* ===================================================
   CONTACTO
   =================================================== */
#contacto { padding: 80px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-items { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-icon {
  width: 42px; height: 42px;
  background: var(--teal-lt);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-item h4 { font-weight: 700; font-size: .9rem; color: var(--primary); margin-bottom: 2px; }
.contact-item p  { font-size: .87rem; color: var(--muted); }
.contact-item a  { color: var(--teal); }

.map-box {
  height: 380px;
  background: linear-gradient(135deg, #e0f2fe, var(--teal-lt));
  border-radius: 16px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  font-size: 3rem;
  color: var(--teal);
  gap: 12px;
}
.map-box p { font-size: 1rem; color: var(--muted); font-weight: 500; }

/* ===================================================
   FOOTER
   =================================================== */
footer {
  background: var(--primary);
  color: rgba(255,255,255,.7);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo-text { color: var(--white); }
.footer-brand .logo-text span { color: rgba(255,255,255,.5); }
.footer-brand p { font-size: .87rem; margin-top: 12px; opacity: .65; max-width: 260px; line-height: 1.7; }
.social-links { display: flex; gap: 8px; margin-top: 18px; }
.social-link {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: .88rem;
  transition: var(--tr);
}
.social-link:hover { background: var(--teal); }
.footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-col li { margin-bottom: 7px; }
.footer-col a { font-size: .87rem; opacity: .65; transition: var(--tr); }
.footer-col a:hover { opacity: 1; color: var(--white); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-size: .8rem;
  opacity: .45;
}

/* Clases que reemplazan los inline styles eliminados del HTML */
.lang-label       { font-size: .7rem; margin-left: 2px; }
.contact-title    { margin-bottom: 8px; }
.contact-sub      { margin-bottom: 48px; }
.footer-address   { opacity: .5; font-size: .82rem; cursor: default; }

/* ===================================================
   RESPONSIVE
   =================================================== */

/* Tablet landscape (≤ 1024px) */
@media (max-width: 1024px) {
  /* Hero: ocultar quick-card, texto ocupa todo el ancho */
  .hero-content {
    grid-template-columns: 1fr;
    padding: 100px 0 64px;
  }
  .hero-right   { display: none; }
  .hero-title   { font-size: clamp(1.8rem, 4vw, 2.6rem); }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .about-grid    { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid  { grid-template-columns: 1fr; gap: 36px; }
}

/* Tablet portrait / móvil grande (≤ 768px) */
@media (max-width: 768px) {
  /* Navbar */
  .nav-links   { display: none; }
  .hamburger   { display: flex; }
  .btn-cita    { display: none; }
  .nav-inner   { gap: 8px; }              /* Reducir gap para que el hamburger no se corte */
  .nav-actions { gap: 4px; }
  .logo-text   { font-size: 1rem; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 72px; left: 0; right: 0;
    background: var(--white); padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    z-index: 999; gap: 2px;
  }
  .nav-links.open a { color: var(--text); padding: 10px 14px; border-radius: 8px; }

  /* Hero */
  #hero         { min-height: auto; }
  .hero-content { padding: 88px 0 48px; }
  .hero-title   { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .hero-actions { flex-direction: column; gap: 10px; }
  .btn-hero-primary,
  .btn-hero-ghost { width: 100%; justify-content: center; }

  /* Quick bar: scroll horizontal */
  .quick-bar-inner {
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .quick-item {
    min-width: 200px;
    scroll-snap-align: start;
    border-right: 1px solid rgba(255,255,255,.12);
    border-bottom: none;
    padding: 14px 18px;
  }

  /* Grids */
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

/* Móvil pequeño (≤ 480px) */
@media (max-width: 480px) {
  .container    { width: 94%; }
  .section      { padding: 52px 0; }
  .hero-title   { font-size: 1.65rem; }
  .section-title { font-size: 1.5rem; }

  /* Quick card oculto en móvil (ya se ocultó arriba, refuerzo) */
  .hero-right   { display: none; }

  /* About stats en columna */
  .about-stats  { flex-direction: column; gap: 16px; }

  /* Footer */
  .footer-grid  { grid-template-columns: 1fr; }
  .social-links { justify-content: center; }
}
