/* Plantilla "doctor-01" — landing de consultorio (PymeCloud Doctor).
   Autocontenida: sin dependencias externas (sin CDN, sin framework). */

:root {
  --sw-primary: #14707d;
  --sw-primary-dark: #0d5560;
  --sw-primary-light: #e6f2f3;
  --sw-accent: #2fa4a9;
  --sw-text: #223034;
  --sw-text-muted: #5b6d71;
  --sw-bg: #ffffff;
  --sw-bg-alt: #f6faf9;
  --sw-border: #e1e8e8;
  --sw-radius: 14px;
  --sw-shadow: 0 4px 18px rgba(20, 112, 125, 0.08);
  --sw-max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--sw-text);
  background: var(--sw-bg);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

.sw-container {
  max-width: var(--sw-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------- header */

.sw-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--sw-border);
}

.sw-header .sw-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.sw-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--sw-primary-dark);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.sw-logo-img { height: 38px; width: auto; }

.sw-nav { display: flex; gap: 4px; }

.sw-nav a {
  color: var(--sw-text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.sw-nav a:hover { background: var(--sw-primary-light); color: var(--sw-primary-dark); }

.sw-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--sw-primary-dark);
  cursor: pointer;
}

/* ---------------------------------------------------------------- pauta */

.sw-pauta {
  text-align: center;
  padding: 10px;
  background: var(--sw-bg-alt);
  border-bottom: 1px solid var(--sw-border);
}

.sw-pauta-track {
  position: relative;
  height: 90px;
}

.sw-pauta-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.sw-pauta-slide--activo {
  opacity: 1;
  pointer-events: auto;
}

.sw-pauta-slide img {
  max-width: 100%;
  max-height: 90px;
  margin: 0 auto;
}

.sw-pauta-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.sw-pauta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--sw-border);
  cursor: pointer;
}

.sw-pauta-dot--activo {
  background: var(--sw-primary);
}

/* ------------------------------------------------------------------ hero */

.sw-hero {
  background-image: linear-gradient(160deg, rgba(20, 112, 125, 0.85) 0%, rgba(13, 85, 96, 0.9) 100%), url('../img/hero-centro-medico.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 88px 0 96px;
  text-align: center;
}

.sw-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sw-hero p {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  max-width: 640px;
  margin: 0 auto 32px;
  color: rgba(255, 255, 255, 0.9);
}

.sw-btn {
  display: inline-block;
  background: #fff;
  color: var(--sw-primary-dark);
  font-weight: 600;
  padding: 13px 30px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.sw-btn:hover { transform: translateY(-2px); }

/* --------------------------------------------------------------- section */

.sw-section { padding: 72px 0; }
.sw-section--alt { background: var(--sw-bg-alt); }

#especialidades {
  background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.96)), url('../img/especialidades-bg.jpg');
  background-size: cover;
  background-position: center;
}

#turno {
  background-image: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.97)), url('../img/turno-bg.jpg');
  background-size: cover;
  background-position: center;
}

.sw-section h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: -0.01em;
}

.sw-section-kicker {
  display: block;
  text-align: center;
  color: var(--sw-accent);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.sw-section-lead {
  text-align: center;
  color: var(--sw-text-muted);
  max-width: 620px;
  margin: 0 auto 40px;
}

/* ------------------------------------------------------ quienes somos */

.sw-about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.sw-about--sin-imagen { grid-template-columns: 1fr; text-align: center; }
.sw-about--sin-imagen .sw-about-texto { max-width: 720px; margin: 0 auto; }

.sw-about-texto h2 { text-align: left; }
.sw-about--sin-imagen .sw-about-texto h2 { text-align: center; }

.sw-about-texto p { color: var(--sw-text-muted); white-space: pre-line; }

.sw-about-imagen img {
  border-radius: var(--sw-radius);
  box-shadow: var(--sw-shadow);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* ------------------------------------------------------- grids (cards) */

/* auto-fit (no auto-fill) + ancho tope + centrado: con auto-fill quedaban
   columnas fantasma a la derecha, y una seccion con 2 items (tipico en
   Especialidades) se veia como dos tarjetitas perdidas contra el margen
   izquierdo. Asi el bloque queda centrado y las tarjetas mantienen un
   ancho sano tanto con 2 items como con 14. */
.sw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  gap: 20px;
  justify-content: center;
}

.sw-card {
  background: #fff;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius);
  padding: 24px;
  text-align: center;
  transition: box-shadow 0.15s, transform 0.15s;
}

.sw-card:hover { box-shadow: var(--sw-shadow); transform: translateY(-3px); }

.sw-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: var(--sw-primary-light);
  color: var(--sw-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  overflow: hidden;
}

.sw-card-icon--imagen { background: none; }
.sw-card-icon--imagen img { width: 100%; height: 100%; object-fit: cover; }

.sw-card h3 { margin: 0; font-size: 1.02rem; }

/* ----------------------------------------------------------- profesionales */

.sw-prof-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  background: var(--sw-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sw-primary);
  font-weight: 700;
  font-size: 1.6rem;
}

.sw-prof-especialidad {
  color: var(--sw-accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 4px 0 10px;
}

.sw-prof-matricula { color: var(--sw-text-muted); font-size: 0.78rem; margin: 0 0 8px; }
.sw-prof-bio { color: var(--sw-text-muted); font-size: 0.9rem; margin: 0; }
.sw-prof-horario { color: var(--sw-text-muted); font-size: 0.85rem; margin: 8px 0 0; }

/* ------------------------------------------------------------- obras sociales */

.sw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.sw-chip {
  background: var(--sw-primary-light);
  color: var(--sw-primary-dark);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: 999px;
}

/* -------------------------------------------------------------------- contacto */

.sw-contacto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.sw-contacto-info { list-style: none; margin: 0; padding: 0; }

.sw-contacto-info li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--sw-border);
}

.sw-contacto-info li:last-child { border-bottom: none; }

.sw-contacto-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sw-primary-light);
  color: var(--sw-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.sw-contacto-info a { color: var(--sw-text); text-decoration: none; }
.sw-contacto-info a:hover { color: var(--sw-primary); }
.sw-contacto-horarios-texto { white-space: pre-line; }

.sw-mapa {
  border-radius: var(--sw-radius);
  overflow: hidden;
  border: 1px solid var(--sw-border);
  height: 260px;
}

/* El iframe de OpenStreetMap trae una franja de atribucion (~22px) al pie que
   su politica de uso exige mostrar; se recorta con overflow:hidden del
   contenedor haciendo el iframe mas alto que su caja. */
.sw-mapa iframe { width: 100%; height: calc(100% + 46px); border: 0; display: block; }

.sw-redes {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.sw-red-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sw-primary-light);
  color: var(--sw-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  font-style: normal;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.sw-red-link:hover {
  background: var(--sw-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* -------------------------------------------------------------------- formulario */

.sw-form {
  background: #fff;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius);
  padding: 28px;
}

.sw-form-group { margin-bottom: 16px; }

.sw-form-trap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------- solicitar turno */

.sw-turno-box {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius);
  padding: 28px;
}

.sw-turno-paso select,
.sw-turno-paso input[type="date"] {
  width: 100%;
  font: inherit;
  color: var(--sw-text);
  border: 1px solid var(--sw-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--sw-bg-alt);
}

.sw-turno-resumen {
  margin-top: 16px;
  padding: 16px;
  background: var(--sw-primary-light);
  border-radius: 10px;
}

.sw-turno-horario-texto {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--sw-text);
  white-space: pre-line;
}

.sw-turno-primer-disponible { margin: 0 0 12px; font-size: 0.92rem; color: var(--sw-text); }

.sw-turno-slots-wrapper { margin-top: 20px; }

.sw-turno-slots-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 10px;
}

.sw-turno-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sw-turno-slot-btn {
  border: 1px solid var(--sw-primary);
  background: #fff;
  color: var(--sw-primary-dark);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sw-turno-slot-btn:hover { background: var(--sw-primary-light); }

.sw-turno-slot-btn--elegido {
  background: var(--sw-primary);
  color: #fff;
}

.sw-turno-sin-horarios { color: var(--sw-text-muted); font-size: 0.9rem; }

.sw-turno-box .sw-form { border: none; padding: 20px 0 0; margin-top: 4px; }

.sw-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  /* align-items: end alinea los inputs por su base, no por la del label: si
     una etiqueta larga (ej. la de telefono) envuelve a dos lineas, el campo
     de al lado no queda mas arriba (DOC-00032). */
  align-items: end;
}

.sw-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sw-text-muted);
  margin-bottom: 6px;
}

.sw-form input,
.sw-form select,
.sw-form textarea {
  width: 100%;
  font: inherit;
  color: var(--sw-text);
  border: 1px solid var(--sw-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--sw-bg-alt);
}

.sw-form input:focus,
.sw-form select:focus,
.sw-form textarea:focus {
  outline: none;
  border-color: var(--sw-accent);
  background: #fff;
}

.sw-form textarea { resize: vertical; }

.sw-turno-primeravez label:first-child { display: block; margin-bottom: 6px; }
.sw-turno-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; font-weight: 400; }
.sw-turno-radio input { width: auto; }

.sw-turno-terminos-aviso {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--sw-text-muted);
  text-align: center;
}

.sw-inline-link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--sw-primary);
  text-decoration: underline;
  cursor: pointer;
}

.sw-turno-toggle-consulta {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--sw-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 16px 0 0;
}

.sw-turno-consulta { margin-top: 16px; border-top: 1px solid var(--sw-border); padding-top: 20px; }

.sw-turno-consulta label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sw-text-muted);
  margin-bottom: 6px;
}

.sw-turno-consulta input,
.sw-turno-consulta select {
  width: 100%;
  font: inherit;
  color: var(--sw-text);
  border: 1px solid var(--sw-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--sw-bg-alt);
}

.sw-turno-consulta input:focus,
.sw-turno-consulta select:focus {
  outline: none;
  border-color: var(--sw-accent);
  background: #fff;
}

.sw-turno-consulta-resultados { margin-top: 16px; }

.sw-turno-consulta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--sw-border);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.sw-turno-cancelar-btn {
  border: 1px solid #c0392b;
  background: #fff;
  color: #c0392b;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  cursor: pointer;
}

.sw-turno-cancelar-btn:hover { background: #c0392b; color: #fff; }

.sw-btn--form {
  border: none;
  width: 100%;
  cursor: pointer;
  background: var(--sw-primary);
  color: #fff;
  box-shadow: none;
}

.sw-btn--form:hover { background: var(--sw-primary-dark); }
.sw-btn--form:disabled { opacity: 0.6; cursor: not-allowed; }

.sw-form-msg {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.sw-form-msg--ok { background: #e5f6ea; color: #1e6b3a; }
.sw-form-msg--error { background: #fbe7e7; color: #a3312f; }

/* ---------------------------------------------------------------- whatsapp bubble */

.sw-whatsapp-bubble {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  z-index: 30;
  transition: transform 0.15s;
}

.sw-whatsapp-bubble:hover { transform: scale(1.06); }

.sw-whatsapp-bubble svg { width: 30px; height: 30px; fill: currentColor; }

/* ----------------------------------------------------------------------- footer */

.sw-footer {
  background: var(--sw-primary-dark);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 28px 0;
  font-size: 0.85rem;
}

.sw-footer a { color: inherit; font-weight: 700; text-decoration: underline; }

.sw-terminos-link {
  display: inline-block;
  margin-left: 10px;
  padding: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.sw-terminos-link:hover { color: #fff; }

/* ------------------------------------------------------------------ modal */

.sw-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sw-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 32, 0.55);
}

.sw-modal-box {
  position: relative;
  background: var(--sw-bg);
  border-radius: var(--sw-radius);
  box-shadow: var(--sw-shadow);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
}

.sw-modal-box h3 { margin-top: 0; color: var(--sw-text); }

.sw-modal-texto {
  color: var(--sw-text-muted);
  white-space: pre-line;
  line-height: 1.6;
}

.sw-modal-cerrar {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--sw-text-muted);
  cursor: pointer;
}

.sw-modal-cerrar:hover { color: var(--sw-text); }

/* -------------------------------------------------------------- vacio / loading */

.sw-hidden { display: none !important; }

.sw-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--sw-text-muted);
  font-size: 0.95rem;
}

.sw-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  color: var(--sw-text-muted);
  padding: 24px;
}

/* --------------------------------------------------------------------- responsive */

@media (max-width: 820px) {
  .sw-about { grid-template-columns: 1fr; }
  .sw-about-texto h2 { text-align: center; }
  .sw-about-imagen { order: -1; }
  .sw-contacto { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .sw-nav { display: none; }
  .sw-nav-toggle { display: block; }
  .sw-nav.sw-nav--abierto {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--sw-border);
    padding: 12px;
  }
  .sw-hero { padding: 64px 0 72px; }
  .sw-section { padding: 52px 0; }
  .sw-form-row { grid-template-columns: 1fr; }
  .sw-whatsapp-bubble { right: 16px; bottom: 16px; width: 52px; height: 52px; font-size: 1.5rem; }
}
