@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #F7F5F0;
  --bg-alt: #EFEBE2;
  --ink: #26302C;
  --ink-soft: #5B655F;
  --accent: #4F7A6E;
  --accent-dark: #3A5D53;
  --accent-soft: #E4EDE8;
  --border: #DED8CA;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(38, 48, 44, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--accent-dark); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--accent-dark); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover { background: var(--accent-soft); }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.btn-whatsapp:hover { background: #1ebc59; }

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* --- Hero --- */
.hero {
  padding: 72px 0 88px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.hero h1 { font-size: clamp(2.1rem, 4vw, 3rem); }

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Sections --- */
section { padding: 64px 0; }

.section-head {
  max-width: 620px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head .eyebrow {
  display: block;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* --- Servicios --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.service-card .precio {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  color: var(--accent-dark);
  margin: 4px 0;
}

.service-card .precio small {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.service-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.service-card li { margin-bottom: 6px; }

/* --- Sobre el psicólogo --- */
.about {
  background: var(--bg-alt);
}

.about .container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.about-portrait {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  overflow: hidden;
}

.about-portrait img { width: 100%; height: 100%; object-fit: cover; }

/* --- Visítanos --- */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.visit-info {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.visit-info dl { margin: 0; }
.visit-info dt { font-weight: 600; color: var(--ink); margin-top: 16px; }
.visit-info dt:first-child { margin-top: 0; }
.visit-info dd { margin: 4px 0 0; color: var(--ink-soft); }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 320px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
}

/* --- CTA final --- */
.cta {
  text-align: center;
  background: var(--accent-dark);
  color: #fff;
  border-radius: var(--radius);
  margin: 0 24px 64px;
  padding: 56px 24px;
}

.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,0.8); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* --- Página de agendar cita --- */
.booking-page { padding: 48px 0 80px; }

.booking-shell {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow);
}

.booking-shell h1 { font-size: 1.6rem; margin-bottom: 6px; }
.booking-shell > p { margin-bottom: 32px; }

.booking-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.booking-steps span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.25s ease;
}

.booking-steps span.active { background: var(--accent); }

.form-group { margin-bottom: 26px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.service-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.option-card {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.option-card:hover { border-color: var(--accent); }

.option-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  line-height: 18px;
  text-align: center;
}

.option-card input { display: none; }

.option-card .nombre { font-weight: 600; display: block; margin-bottom: 6px; }
.option-card .precio { color: var(--accent-dark); font-weight: 600; }

/* --- Calendario de citas --- */
.calendar-container {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  background: #fff;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cal-mes-label {
  font-weight: 600;
  text-transform: capitalize;
}

.cal-nav-btn {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink);
}

.cal-nav-btn:hover:not(:disabled) { border-color: var(--accent); }
.cal-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day-empty { background: transparent; }

.cal-day-gray {
  background: var(--bg-alt);
  color: var(--ink-soft);
  opacity: 0.6;
}

.cal-day-green {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  cursor: pointer;
}

.cal-day-green:hover { background: var(--accent); color: #fff; }

.cal-day-selected {
  background: var(--accent) !important;
  color: #fff !important;
}

.calendar-legend {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}

.legend-green { background: var(--accent); }
.legend-gray { background: var(--ink-soft); opacity: 0.6; }

.slots-container-day { margin-top: 18px; }

.slot-btn-ocupado {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
}

.slots-day {
  margin-bottom: 18px;
}

.slots-day h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 10px;
  text-transform: capitalize;
}

.slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.slot-btn {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  min-width: 92px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.slot-btn:hover { border-color: var(--accent); }
.slot-btn:active { transform: translateY(1px); }

.slot-btn.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.form-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 22px;
}

.form-msg::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.form-msg.error { background: #FBEAEA; color: #A23B3B; }
.form-msg.info { background: var(--accent-soft); color: var(--accent-dark); }

.trust-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-align: center;
  justify-content: center;
}

.trust-note svg { flex-shrink: 0; color: var(--accent-dark); }

.confirmation {
  text-align: center;
  padding: 12px 0;
}

.confirmation .check-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.confirmation .folio {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  color: var(--accent-dark);
  margin: 10px 0 20px;
  letter-spacing: 0.02em;
}

.confirmation .summary {
  text-align: left;
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 24px;
}

.confirmation .summary dt { font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); margin-top: 12px; }
.confirmation .summary dt:first-child { margin-top: 0; }
.confirmation .summary dd { margin: 3px 0 0; font-size: 1rem; }

/* --- Responsive --- */
@media (max-width: 860px) {
  .hero .container,
  .about .container,
  .visit-grid {
    grid-template-columns: 1fr;
  }
  .services-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .booking-shell { padding: 28px; }
  section { padding: 48px 0; }
  .cta { margin: 0 16px 48px; padding: 40px 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: 1.8rem; }
  .booking-shell { padding: 22px; border-radius: 10px; }
  .booking-shell h1 { font-size: 1.35rem; }
  .service-card { padding: 24px 20px; }
  .visit-info { padding: 24px; }
  .btn { padding: 12px 20px; }
  .slot-btn { min-width: 78px; padding: 9px 12px; }
}
