:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1a1d29;
  --muted: #000000;
  --brand: #3bd2e6;
  --border: #e5e8f0;
  --footer: #01626e;
  --ring: rgba(27, 99, 211, 0.35);
  --radius: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
  color: #000000;
  background-image: url(/imagenes/Fondo-page.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }

.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* ==== Header ==== */
.site-header {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}

.brand-logo img { display: block; }

.site-nav { margin-left: auto; }

.nav-list {
  display: flex;
  gap: 22px;
  list-style: none;
}

.nav-list a {
  position: relative;
  color: var(--text);
  font-weight: 600;
  text-decoration: none !important; 
  padding-bottom: 2px;  
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--brand); 
  transition: width 0.25s ease;
}

.nav-list a:hover::after {
  width: 100%;
}

.only-mobile { display: none; }

.header-cta {
  display: flex;
  gap: 10px;
  margin-left: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  border: 1px solid transparent;
}

.btn-lg { height: 48px; padding: 0 20px; border-radius: 12px;}


.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px -6px var(--ring);
}
.btn-primary:hover { filter: brightness(.98); }

.btn-outline { border: 1px solid var(--border); background: #fff; color: var(--text); }
.btn-outline:hover { border-color: #d4d8e3; }

.btn-ghost { background: transparent; color: #fff; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.nav-toggle:focus-visible { outline: 3px solid var(--ring); }

.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  display: block;
  background: var(--text);
  height: 2px;
  border-radius: 2px;
  transition: .2s;
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before { position: absolute; top: -8px; width: 24px; }
.nav-toggle .bars::after  { position: absolute; top:  8px; width: 24px; }

.hero { position: relative; overflow: hidden; }

.hero-inner {
  padding: 64px 0 72px;
  text-align: center;
  min-height: calc(100vh - 64px - 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 10px; }

.hero p {
  margin: 0 auto 22px;
  max-width: 56ch;
  color: rgb(255, 255, 255);
  font-size: 1.05rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 300px at 20% -10%, rgba(20,184,166,.12), transparent 60%),
    radial-gradient(900px 300px at 80% 110%, rgba(27,99,211,.14), transparent 60%);
}

/* ==== Footer ==== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--footer);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 0;
  color: var(--surface);
}

.footer-copy {
  padding: 14px 0;
  border-top: 1px dashed var(--border);
  color: var(--surface);
  text-align: center;
  flex-basis: 100%;
}

.link { color: var(--surface); opacity: .9; }
.link:hover { opacity: 1; }

.logos {
  width: 35px;
  height: 35px;
  margin: 10px;
  display: inline;
}

/* =========================================================
                        PÁGINA SERVICIOS
   ========================================================= */

.page-servicios {
  background: var(--bg) !important;
  background-image: none !important;
}

.hero-servicios {
  background-image: url(/imagenes/Fondo-page.jpg);
  background-size: cover;          
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--bg);       
  min-height: clamp(320px, 70vh, 760px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px 0;
}
.hero-servicios h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-shadow: 0 4px 10px rgba(0,0,0,.45);
}

.contenido-servicios {
  background: var(--surface);
  padding: 40px 0;
}

.grid-servicios {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card-servicio {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.15);
  transition: transform .2s, box-shadow .2s;
}
.card-servicio:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -12px rgba(0,0,0,.25);
}
.card-servicio .card-icon { font-size: 28px; margin-bottom: 10px; }
.card-servicio h3 { margin: 8px 0; font-size: 1.1rem; color: var(--text); }
.card-servicio p  { margin: 0; color: var(--muted); font-size: .95rem; }

/*=========================================================
              === Página Sucursales ==== 
=========================================================*/

.page-sucursales {
  background: var(--bg);
}

.hero-sucursales {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url(/imagenes/imagensucursal.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  text-shadow: 0 4px 12px rgba(0,0,0,.45);
}

.hero-sucursales h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 12px;
}

.hero-sucursales p {
  font-size: 1.3rem;
  opacity: .9;
}

.contenido-sucursales {
  position: relative;
  padding: 40px 0;
  background-image:
    linear-gradient(rgba(59,210,230,0.35), rgba(59,210,230,0.35)),
    url(/imagenes/fondosucursales2.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.grid-sucursales {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card-sucursal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.2);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-sucursal:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px -12px rgba(0,0,0,.3);
}

.card-sucursal h3 { margin-bottom: 8px; color: var(--text); }
.card-sucursal .direccion { font-size: .95rem; margin: 6px 0; }
.card-sucursal .horario { font-size: .9rem; margin: 6px 0; color: var(--text); }
.card-sucursal .telefono { font-weight: 600; margin: 8px 0; }
.card-sucursal .btn { align-self: start; margin-top: auto; }

/*=========================================================
              === Página Agenda ==== 
=========================================================*/

.page-agenda { background: var(--bg); }

.hero-agenda {
  background-image: url(/imagenes/fondosucursales2.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  text-shadow: 0 4px 12px rgba(0,0,0,.45);
}

.hero-agenda h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 8px;
}

.contenido-agenda {
  padding: 40px 0;
  background: var(--surface);
}

.form-agenda {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.15);
}

.form-agenda h3 { margin-bottom: 16px; text-align: center; }
.form-agenda label { display: block; margin-bottom: 6px; font-weight: 600; }
.form-agenda input,
.form-agenda select {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}
.form-agenda button { display: inline-block; width: 100%; margin-top: 12px; }

.page-agenda .citas-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px -18px rgba(0,0,0,.25);
}
.page-agenda .citas-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.page-agenda .citas-head h3 { margin: 0; font-size: 1.1rem; }
.page-agenda .citas-count { font-size: .9rem; color: var(--muted); }
.page-agenda .citas-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.page-agenda .cita-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.page-agenda .cita-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -20px rgba(0,0,0,.35);
  border-color: #e0e5ef;
}
.page-agenda .cita-left { display: flex; align-items: center; gap: 12px; }
.page-agenda .cita-date {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 2px solid var(--brand);
  display: grid;
  place-items: center;
  line-height: 1;
  padding-top: 2px;
}
.page-agenda .cita-day { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.page-agenda .cita-month {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand);
}
.page-agenda .cita-info h4.cita-servicio { margin: 0; font-size: 1rem; color: var(--text); }
.page-agenda .cita-meta {
  margin: 4px 0 0;
  font-size: .92rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-agenda .cita-bullet { position: relative; padding-left: 12px; }
.page-agenda .cita-bullet::before {
  content: "";
  position: absolute;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--brand);
}
.page-agenda .cita-right { display: flex; align-items: center; gap: 8px; }
.page-agenda .cita-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: .82rem;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid;
}
.page-agenda .badge-pendiente {
  color: #b88700;
  background: #fff8e6;
  border-color: #ffe8a3;
}
.page-agenda .badge-confirmada {
  color: #0a7d52;
  background: #eafff6;
  border-color: #b6f1da;
}
.page-agenda .badge-cancelada {
  color: #8b1a1a;
  background: #ffecec;
  border-color: #ffc6c6;
}

@media (max-width: 720px) {
  .page-agenda .cita-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    padding: 16px 18px;
  }

  .page-agenda .cita-left {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .page-agenda .cita-date {
    width: 54px;
    height: 54px;
    border-radius: 12px;
  }

  .page-agenda .cita-info h4.cita-servicio {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .page-agenda .cita-meta {
    font-size: 0.85rem;
  }

  .page-agenda .cita-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
  }

  .page-agenda .cita-badge {
    font-size: 0.8rem;
    padding: 6px 10px;
    text-align: center;
  }

  .page-agenda .btn-cancelar {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 8px 0;
    border-radius: 8px;
  }

  .page-agenda .citas-list {
    gap: 18px;
  }
}

/* === PROFESIONALES === */
.page-profesionales {
  background: var(--bg);
}

/* === HERO === */
.hero-profesionales {
  position: relative;
  background: url(/imagenes/fondoprofesionales.jpg) center/cover no-repeat;
  background-attachment: fixed;
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
.hero-profesionales::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.55));
  z-index: 0;
}
.hero-profesionales-inner {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 4px 12px rgba(0,0,0,.45);
  padding: 0 20px;
}
.hero-profesionales h1 {
  font-size: clamp(2.4rem, 5vw, 3rem);
  margin-bottom: 10px;
}
.hero-profesionales p {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  max-width: 60ch;
  margin: 0 auto;
  opacity: 0.95;
}
@media (max-width: 1024px) {
  .hero-profesionales { background-attachment: scroll; }
}

/* === GRID PROFESIONALES === */
.contenido-profesionales {
  background: var(--surface);
  padding: 5vh 5vw;
}
.grid-profesionales {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  scroll-snap-type: y mandatory;
}

/* === CARD PROFESIONAL === */
.card-profesional {
  scroll-snap-align: start;
  background: linear-gradient(145deg, #e0f7ff, #bdf2ff);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 30px -15px rgba(0,0,0,.2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all .25s ease;
  overflow: hidden;
  position: relative;
}
.card-profesional::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,0.05));
  opacity: 0;
  transition: opacity .3s ease;
}
.card-profesional:hover::after { opacity: 1; }
.card-profesional:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 50px -20px rgba(0,0,0,.25);
  border-color: #dfe3ea;
}

/* === IMAGEN Y TEXTO === */
.card-profesional img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  object-position: center;
  margin-bottom: 18px;
  transition: transform .4s ease;
}
.card-profesional:hover img {
  transform: scale(1.05);
}
.card-profesional h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  color: var(--text);
  margin-bottom: 8px;
}
.card-profesional p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: #4b5563;
  text-align: center;
  max-width: 42ch;
}

/* === RESPONSIVE === */
@media (max-width: 860px) {
  .grid-profesionales {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
  }
}
@media (max-width: 520px) {
  .contenido-profesionales {
    padding: 3vh 16px;
  }
  .card-profesional {
    padding: 16px;
    border-radius: 14px;
  }
  .card-profesional img {
    max-width: 90%;
  }
}


/* === CONTACTO === */
.hero-contacto {
  background: url(/imagenes/fondoprofesionales.jpg) center/cover no-repeat;
  text-align: center;
  padding: 80px 20px;
  color: #fff;
  text-shadow: 0 3px 8px rgba(0,0,0,.45);
}

.nav-usuario {
  font-weight: 700;
  color: var(--brand);
  position: relative;
  padding-left: 26px;
  list-style: none;
}
.nav-usuario::before {
  position: absolute;
  left: 0;
  top: 35%;
  transform: translateY(-50%);
  font-size: 0.95em;
  opacity: 0.8;
}
.nav-usuario > a {
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-usuario > a::after {
  content: "▼";
  font-size: 0.7em;
  margin-left: 4px;
  opacity: 0.7;
  transition: transform 0.2s;
}
.nav-usuario.open > a::after { transform: rotate(180deg); }
.submenu-usuario {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 18px -12px rgba(0,0,0,0.2);
  min-width: 160px;
  z-index: 1000;
}
.submenu-usuario a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.submenu-usuario a:hover {
  background: var(--bg);
  color: var(--brand);
}
.nav-usuario.open .submenu-usuario { display: block; }
@media (max-width: 720px) {
  .submenu-usuario {
    position: static;
    box-shadow: none;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    width: 100%;
  }
}

/* ===== Menú mobile ===== */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .site-nav { position: static; }
  .nav-list {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    /*gap: 12px;*/
    padding: 16px 20px;
    transform: translateY(-120%);
    transition: transform .25s ease;
    /*box-shadow: 0 16px 30px -20px rgba(0,0,0,.25);*/
    z-index: 999;
  }
  .site-nav.open .nav-list { transform: translateY(0); }
  .only-mobile { display: list-item; }
  .hide-mobile { display: none; }
  .header-cta { margin-left: 0; }
  body.menu-open { overflow: hidden; }
}

/* ==== Responsive general ==== */
@media (max-width: 920px) {
  .hero-inner { padding: 40px 20px; }
  .grid-servicios { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hero-inner { min-height: auto; padding: 40px 20px; }
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .social { margin-top: 10px; }
  .hero-servicios { height: auto; min-height: clamp(260px, 55vh, 520px); }
  .grid-servicios { grid-template-columns: 1fr; }
}

table th a { 
  color: inherit; 
  text-decoration: none; 
  border-bottom: 1px dashed transparent;
}
table th a:hover { border-bottom-color: var(--brand); }

/* ==== Admin layout ==== */
.admin-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}
.admin-main { flex: 1; padding: 20px 0; }
.admin-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 14px 0;
  color: var(--muted);
}



/*Arreglos*/



/* ===========================
   MOBILE FIX PACK (<= 720px)
   Pegar al final del CSS
=========================== */
@media (max-width: 720px) {
  /* --- Base & Layout --- */
  :root {
    --radius: 12px;
  }
  html, body { overflow-x: hidden; }
  body { 
    line-height: 1.55;
    background-size: cover;
    background-attachment: scroll;   /* evita jank */
    padding-bottom: env(safe-area-inset-bottom);
  }
  .container { padding: 0 16px; max-width: 100%; }

  /* --- Header & Nav --- */
  .site-header { 
    position: sticky; top: 0; 
    backdrop-filter: saturate(1.4) blur(6px);
    background: color-mix(in oklab, var(--surface) 92%, transparent);
  }
  .header-inner { min-height: 60px; gap: 12px; }
  .brand { gap: 8px; font-size: 0.95rem; }
  .brand-logo img { height: 28px; width: auto; }

  .nav-toggle { display: flex; }
  .site-nav { position: static; }

  .nav-list {
    position: fixed;
    inset: 60px 0 auto 0;
    max-height: calc(100svh - 60px);
    overflow-y: auto;
    padding: 14px 16px 20px;
    gap: 8px;
    transform: translateY(-120%);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 28px -22px rgba(0,0,0,.28);
  }
  .site-nav.open .nav-list { transform: translateY(0); }
  body.menu-open { overflow: hidden; } /* ya lo tenías, lo reforzamos */

  .nav-list a {
    display: block;
    padding: 12px 2px;
    font-size: 0.98rem;
  }
  .nav-list a::after { height: 2px; }

  .header-cta { width: 100%; margin: 8px 0 0; }
  .header-cta .btn { 
    flex: 1 1 auto; 
    height: 44px; 
    border-radius: 10px; 
  }

  /* --- Hero genérico --- */
  .hero-inner {
    min-height: calc(100svh - 60px - 72px);
    padding: 36px 16px;
  }
  .hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .hero p  { font-size: 1rem; max-width: 48ch; }

  /* --- Servicios --- */
  .hero-servicios {
    min-height: clamp(240px, 52svh, 440px);
    background-attachment: scroll;
    padding: 18px 0;
  }
  .grid-servicios { grid-template-columns: 1fr; gap: 14px; }
  .card-servicio { padding: 16px; border-radius: 14px; }
  .card-servicio h3 { font-size: 1.05rem; }
  .card-servicio p  { font-size: .95rem; }

  /* --- Sucursales --- */
  .hero-sucursales {
    min-height: 92svh;
    padding: 0 16px;
    background-attachment: scroll;
    text-wrap: balance;
  }
  .hero-sucursales h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .hero-sucursales p  { font-size: 1rem; }

  .contenido-sucursales {
    padding: 26px 0;
    background-attachment: scroll;
    background-image:
      linear-gradient(rgba(59,210,230,0.25), rgba(59,210,230,0.25)),
      url(/imagenes/fondosucursales2.jpg);
  }
  .grid-sucursales { grid-template-columns: 1fr; gap: 16px; }
  .card-sucursal { padding: 16px; border-radius: 14px; }

  /* --- Agenda --- */
  .hero-agenda { min-height: 36svh; padding: 16px; }
  .contenido-agenda { padding: 24px 0; }
  .form-agenda { padding: 18px; border-radius: 14px; }
  .form-agenda input, .form-agenda select { height: 44px; }

  /* Tarjetas de cita ya apilan; afinamos toques */
  .page-agenda .cita-card { padding: 14px 16px; border-radius: 12px; }
  .page-agenda .cita-date { width: 52px; height: 52px; border-radius: 12px; }
  .page-agenda .cita-meta { font-size: .85rem; }
  .page-agenda .cita-right .btn { height: 40px; }

  /* --- Profesionales --- */
  .hero-profesionales {
    min-height: 48svh;
    background-attachment: scroll; /* iOS fix */
  }
  .contenido-profesionales { padding: 24px 16px; }
  /* 2 por fila cuando entra, 1 en pantallas muy chicas */
  .grid-profesionales {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
    scroll-snap-type: none; /* más natural en móvil */
  }
  @media (max-width: 420px) {
    .grid-profesionales { grid-template-columns: 1fr; }
  }

  .card-profesional {
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 10px 24px -18px rgba(0,0,0,.16);
    background: linear-gradient(145deg, #ecfbff, #d7f7ff);
  }
  .card-profesional img {
    max-width: 86%;
    margin-bottom: 12px;
    border-radius: 12px;
  }
  .card-profesional h3 {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
    margin-bottom: 6px;
    text-wrap: balance;
  }
  .card-profesional p {
    font-size: .95rem;
    max-width: 50ch;
  }

  /* --- Contacto --- */
  .hero-contacto { padding: 48px 16px; }

  /* --- Footer --- */
  .footer-inner {
    padding: 18px 0;
    gap: 12px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-copy { padding: 12px 0; }

  /* --- Tablas & Contenido ancho --- */
  table { width: 100%; border-collapse: collapse; }
  .table-wrapper, .overflow-x {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrapper::-webkit-scrollbar { height: 8px; }

  /* --- Imágenes genéricas --- */
  img { height: auto; border-radius: 10px; }

  /* --- Links y botones --- */
  .btn-lg { height: 46px; padding: 0 16px; border-radius: 12px; }
  .btn { min-width: 44px; min-height: 44px; }

  /* --- Menú usuario (dropdown) --- */
  .submenu-usuario {
    position: static !important;
    min-width: 100%;
    border: 0;
    border-top: 1px solid var(--border);
    box-shadow: none;
    border-radius: 0;
  }

  /* --- Pequeñas mejoras tipográficas --- */
  h1, h2, h3 { letter-spacing: .2px; }
}

/* ===========================
   TINY PHONES (<= 380px)
=========================== */
@media (max-width: 380px) {
  .brand { font-size: 0.9rem; }
  .brand-logo img { height: 24px; }
  .nav-list a { padding: 10px 2px; }
  .grid-profesionales { grid-template-columns: 1fr; }
  .card-profesional img { max-width: 92%; }
  .card-servicio, .card-sucursal { padding: 14px; }
  .form-agenda { padding: 16px; }
}


