/* ============================================================
   Clínica Violeta — Página Pública (Landing)
   ============================================================ */

:root {
  --primary:      #7B2D8B;
  --primary-dark: #5a1f68;
  --primary-light:#C084D4;
  --accent:       #F3E8FF;
  --accent2:      #E9D5FF;
  --text-dark:    #2D1B33;
  --text-muted:   #6B5A75;
  --white:        #FFFFFF;
  --radius:       12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text-dark);
  background: var(--white);
}

/* ── Header ──────────────────────────────────────────────── */
.header {
  background: transparent;
  padding: 20px 0;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}
.header.fixed {
  position: fixed;
  background: var(--primary-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.contenedor {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.contenido-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { text-decoration: none; }
.logo h1 {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .5px;
}
.logo h1 span { color: var(--primary-light); }

.navegacion-principal { display: flex; align-items: center; gap: 28px; }
.navegacion-principal a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  transition: color .2s;
}
.navegacion-principal a:hover,
.navegacion-principal a.active { color: var(--primary-light); }
.nav-login-btn {
  background: var(--primary-light);
  color: var(--primary-dark) !important;
  padding: 7px 18px;
  border-radius: 20px;
  font-weight: 700 !important;
}
.nav-login-btn:hover { background: var(--white); }

/* ── Hero ────────────────────────────────────────────────── */
/*.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, #9d4fb3 60%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,.05)' stroke-width='1'/%3E%3C/svg%3E") repeat;
  opacity: .4;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }*/
.hero-content h2 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(90,31,104,.75) 0%, rgba(123,45,139,.65) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.hero-content h2 span { color: var(--accent2); }
.hero-content p {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--white);
  color: var(--primary-dark);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.btn-hero-outline {
  border: 2px solid rgba(255,255,255,.7);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.15); border-color: var(--white); }

/* ── Sección: Quiénes somos ──────────────────────────────── */
.somos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.somos .imagen img {
  width: 100%;
  border-radius: 20px;
  object-fit: cover;
  height: 420px;
  box-shadow: 0 12px 40px rgba(123,45,139,.2);
}
.somos .contenido-somos h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.somos .lugar {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 16px;
}
.somos p { color: var(--text-muted); line-height: 1.8; font-size: .97rem; }

/* ── Sección: Servicios ──────────────────────────────────── */
.servicios {
  background: var(--accent);
  padding: 80px 24px;
  text-align: center;
}
.servicios h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 48px;
}
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.servicio {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(123,45,139,.1);
  transition: transform .2s, box-shadow .2s;
}
.servicio:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(123,45,139,.18); }
.servicio img { width: 100%; height: 180px; object-fit: cover; }
.servicio-box { padding: 20px; text-align: left; }
.servicio-box h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.servicio-box p { color: var(--text-muted); font-size: .88rem; line-height: 1.6; margin-bottom: 14px; }
.servicio-link {
  color: var(--primary);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  transition: color .2s;
}
.servicio-link:hover { color: var(--primary-dark); }

/* ── Sección: Doctoras ───────────────────────────────────── */
.doctoras-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.doctoras-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 48px;
}
.doctoras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.doctora-card {
  background: var(--white);
  border: 2px solid var(--accent2);
  border-radius: var(--radius);
  padding: 32px 20px 24px;
  text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.doctora-card:hover { border-color: var(--primary-light); box-shadow: 0 8px 24px rgba(123,45,139,.12); }
.doctora-avatar {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.doctora-card h4 { font-size: 1rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
.doctora-card span { font-size: .83rem; color: var(--text-muted); }

/* ── Sección: Contacto ───────────────────────────────────── */
.contacto {
  background: var(--primary-dark);
  padding: 80px 24px;
}
.contacto__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}
.contacto__info h2 { color: var(--white); font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; }
.contacto__direccion { color: rgba(255,255,255,.75); margin-bottom: 24px; line-height: 1.7; }
.contacto__redes { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.red {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .93rem;
  transition: color .2s;
}
.red:hover { color: var(--primary-light); }
.red i { font-size: 1.1rem; width: 20px; text-align: center; }
.contacto__btn {
  display: inline-block;
  background: #25D366;
  color: var(--white);
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  font-size: .95rem;
  transition: opacity .2s;
}
.contacto__btn:hover { opacity: .88; }
.contacto__mapa { border-radius: var(--radius); overflow: hidden; height: 280px; }
.contacto__mapa iframe { width: 100%; height: 100%; border: none; }

/* ── Sección: Formulario de cita ─────────────────────────── */
.cita-hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 80px 24px;
  position: relative;
}
.cita-container { max-width: 820px; margin: 0 auto; }
.cita-header { text-align: center; margin-bottom: 40px; }
.cita-header h1 { color: var(--white); font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; }
.cita-header p  { color: rgba(255,255,255,.8); font-size: 1rem; }
.cita-header-btns { display: flex; gap: 14px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

.cita-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.cita-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dark);
}
.field h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  border-bottom: 2px solid var(--accent2);
  padding-bottom: 8px;
  margin-top: 8px;
}
.field input,
.field select,
.field textarea {
  padding: 10px 14px;
  border: 1.5px solid #d8b4fe;
  border-radius: 8px;
  font-size: .93rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(123,45,139,.15);
}
.hint { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }
.cita-actions { margin-top: 28px; text-align: center; }
.btn-primary {
  background: var(--primary);
  color: var(--white);
  padding: 13px 36px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,.15);
  color: var(--white);
  padding: 13px 28px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 30px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,.25); }

/* ── Modal ───────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 560px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-card h3 { font-size: 1.3rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 20px; }
.modal-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-close:hover { color: var(--primary-dark); }
.modal-body label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.modal-body input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d8b4fe;
  border-radius: 8px;
  font-size: .93rem;
  margin-bottom: 16px;
  font-family: inherit;
}
.modal-body input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(123,45,139,.15); }
.btn-buscar {
  background: var(--primary);
  color: var(--white);
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  font-size: .93rem;
  width: 100%;
  transition: background .2s;
}
.btn-buscar:hover { background: var(--primary-dark); }
.mis-citas-msg { margin-top: 20px; font-size: .9rem; color: var(--text-muted); }
.mis-citas-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 8px; }
.table th { background: var(--accent); color: var(--primary-dark); padding: 9px 12px; text-align: left; font-size: .78rem; text-transform: uppercase; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--accent2); }
.table tr:hover td { background: var(--accent); }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 20px;
  color: rgba(255,255,255,.6);
  font-size: .85rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media(max-width: 768px) {
  .somos { grid-template-columns: 1fr; }
  .somos .imagen img { height: 260px; }
  .contacto__grid { grid-template-columns: 1fr; }
  .cita-grid { grid-template-columns: 1fr; }
  .cita-card { padding: 24px; }
  .navegacion-principal { gap: 14px; }
  .navegacion-principal a { font-size: .82rem; }
}
@media(max-width: 480px) {
  .navegacion-principal .nav-label { display: none; }
}

/* ── RESPONSIVE MEJORADO ─────────────────────────────────── */

/* Hamburger button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  /* NAV */
  .nav-toggle { display: flex; }

  .navegacion-principal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 150;
  }
  .navegacion-principal.open { display: flex; }
  .navegacion-principal a { font-size: 1.2rem; font-weight: 600; }

  /* HEADER */
  .contenido-header { position: relative; z-index: 200; }

  /* HERO */
  .cita-header h1 { font-size: 1.6rem; }
  .cita-card { padding: 24px 16px; }

  /* FORM GRID — todo en 1 columna */
  .cita-grid { grid-template-columns: 1fr; gap: 16px; }
  .field-full { grid-column: 1; }

  /* SOMOS */
  .somos { grid-template-columns: 1fr; }
  .somos .imagen img { height: 220px; }

  /* SERVICIOS */
  .servicios-grid { grid-template-columns: 1fr 1fr; }

  /* CONTACTO */
  .contacto__grid { grid-template-columns: 1fr; }

  /* DOCTORAS */
  .doctoras-grid { grid-template-columns: 1fr 1fr; }

  /* MODAL */
  .modal-card { padding: 24px 18px; margin: 12px; }
}

@media (max-width: 480px) {
  /* Form card */
  .cita-card { padding: 20px 14px; border-radius: 14px; }
  .cita-header h1 { font-size: 1.35rem; }
  .cita-container { padding: 0 8px; }

  /* Grids en 1 columna */
  .servicios-grid { grid-template-columns: 1fr; }
  .doctoras-grid { grid-template-columns: 1fr; }

  /* Inputs más cómodos en móvil */
  .field input,
  .field select,
  .field textarea {
    padding: 12px 14px;
    font-size: 1rem;
  }

  /* Botones full width */
  .cita-actions .btn-primary { width: 100%; text-align: center; }
  .cita-header-btns { flex-direction: column; align-items: stretch; }
  .cita-header-btns .btn-primary,
  .cita-header-btns .btn-secondary { text-align: center; }

  /* Logo más pequeño */
  .logo h1 { font-size: 1.2rem; }

  /* Modal */
  .modal { padding: 12px; }
  .modal-card { max-height: 92vh; }
}

/* ── Formulario de cita: ajuste responsive (móvil) ──────────
   Los <select> con textos largos (ej. "Dra. María López — Ginecología")
   empujaban la columna del grid y los campos se salían de la tarjeta.
   minmax(0,1fr) + min-width:0 obliga a respetar el ancho de la tarjeta. */
.cita-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { min-width: 0; }
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
}
.field select {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
/* Los input date en Android/iOS se encogían al ancho del texto */
.field input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.2;
  text-align: left;
}
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }

@media (max-width: 768px) {
  .cita-hero { padding: 56px 16px; }
  .cita-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cita-card { padding: 28px 20px; border-radius: 16px; }
  .field h4 { margin-top: 12px; }
}

@media (max-width: 480px) {
  .cita-hero { padding: 40px 12px; }
  .cita-container { padding: 0; }
  .cita-card { padding: 24px 16px; border-radius: 14px; }
  .field input,
  .field select,
  .field textarea {
    min-height: 50px;
    font-size: 16px; /* evita el zoom automático de iOS al enfocar */
  }
}