/* =====================================================================
   styles.css  ·  Plantilla Brote.HN
   El color de acento viene de config.js (colorAcento) y se guarda en
   la variable --accent. No hace falta editar este archivo.
   Si quieres ajustar algo de diseño, cambia las variables de abajo.
   ===================================================================== */

:root {
  /* Color de acento (app.js lo reemplaza con el de config.js) */
  --accent: #b4466a;
  --accent-contrast: #ffffff;   /* texto encima del acento */
  --accent-ink: #9a3b5a;        /* acento como color de texto */
  --accent-soft: #f7ecf0;
  --accent-softer: #fbf6f8;

  --wa: #128c4a;                /* verde WhatsApp con buen contraste */

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f7f8;
  --text: #1d1d1f;
  --muted: #55565c;
  --border: #e3e3e8;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .06);
  --header-h: 64px;
  color-scheme: light;
}

/* ----- Estilo por tipo de negocio ----- */
.tipo-salon {
  --bg: #fffaf7;
  --surface-alt: #f8efea;
  --border: #ecdfd8;
  --text: #2a1f1d;
  --muted: #5e504c;
  --font-heading: ui-serif, Georgia, "Times New Roman", serif;
  --radius: 20px;
  --radius-sm: 999px;           /* botones tipo píldora */
}

.tipo-clinica {
  --bg: #ffffff;
  --surface-alt: #f2f6f8;
  --border: #dce4e9;
  --text: #16232b;
  --muted: #4b5a63;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: none;
}
.tipo-clinica .card,
.tipo-clinica .testimonial,
.tipo-clinica .address-card { border: 1px solid var(--border); }
.tipo-clinica h1,
.tipo-clinica h2 { letter-spacing: -0.02em; }

/* ----- Base ----- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.75rem, 5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); }
ul { list-style: none; margin: 0; padding: 0; }
address { font-style: normal; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.icon { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.icon svg { width: 100%; height: 100%; }

/* ----- Botones (mínimo 44px de alto para dedos) ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.25em;
  border: 2px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background-color .15s ease;
}
.btn:hover { filter: brightness(.94); }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 44px; padding: 0 1em; font-size: .95rem; }
.btn-large { min-height: 56px; padding: 0 1.6em; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: var(--accent-contrast); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-alt); filter: none; }
.btn-outline { background: transparent; color: var(--accent-ink); border-color: currentColor; }
.btn-outline:hover { background: var(--accent-soft); filter: none; }

/* ----- 1. Encabezado ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto;
  color: var(--text); text-decoration: none;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem;
}
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; }
.main-nav { display: none; gap: 4px; }
.main-nav a {
  color: var(--muted); text-decoration: none; font-weight: 500;
  padding: 10px 12px; border-radius: 8px;
}
.main-nav a:hover { color: var(--text); background: var(--surface-alt); }
@media (min-width: 860px) { .main-nav { display: flex; } }

/* ----- 2. Portada ----- */
.hero { padding: 40px 0 56px; background: linear-gradient(180deg, var(--accent-softer), var(--bg)); }
.hero-inner { display: grid; gap: 32px; align-items: center; }
.hero-kicker {
  display: inline-block; margin-bottom: 12px; padding: 4px 12px;
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 999px; font-size: .9rem; font-weight: 600;
}
.hero h1 { font-size: clamp(2.25rem, 9vw, 3.75rem); margin-bottom: .3em; }
.hero-tagline { font-size: clamp(1.1rem, 3.5vw, 1.3rem); color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 16px; }
.hero-status { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: .95rem; }
.media-hero { aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: var(--shadow); }

@media (min-width: 520px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 860px) {
  .hero { padding: 72px 0 88px; }
  .hero-inner { grid-template-columns: 1.1fr 1fr; gap: 56px; }
  .hero-solo .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-solo .hero-tagline { margin-inline: auto; }
  .hero-solo .hero-actions, .hero-solo .hero-status { justify-content: center; }
}

/* Indicador abierto / cerrado */
.dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.is-open { color: #146c3a; }
.is-closed { color: #9b2c2c; }

/* ----- Imágenes y respaldo cuando faltan ----- */
.media { position: relative; overflow: hidden; background: var(--surface-alt); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media-square { aspect-ratio: 1 / 1; border-radius: var(--radius); }
.media-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: repeating-linear-gradient(45deg, var(--accent-softer) 0 12px, var(--accent-soft) 12px 24px);
  color: var(--accent-ink); font-size: .9rem; font-weight: 600;
}
.media-placeholder .icon { width: 32px; height: 32px; }

/* ----- Secciones ----- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface-alt); }
.section-accent { background: var(--accent-soft); }
.section-head { max-width: 40em; margin-bottom: 32px; }
.section-head p { color: var(--muted); margin: 0; }
@media (min-width: 860px) { .section { padding: 88px 0; } }

/* ----- 3. Servicios ----- */
.cards { display: grid; gap: 16px; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px;
}
.card-title { margin-bottom: .35em; }
.card-text { color: var(--muted); font-size: .98rem; }
.card-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.price { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--accent-ink); }
.duration { margin: 0; display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; }
.duration .icon { width: 1em; height: 1em; }
.payments {
  margin: 28px 0 0; padding: 16px 20px;
  background: var(--surface); border-left: 4px solid var(--accent); border-radius: 8px;
}

/* ----- 4. Nosotros ----- */
.about { display: grid; gap: 32px; }
.about-text p { color: var(--muted); font-size: 1.1rem; }
.features { display: grid; gap: 16px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature h3 { margin-bottom: .2em; font-family: var(--font-body); font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; padding: 9px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
}
@media (min-width: 860px) { .about { grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; } }

/* ----- 5. Galería ----- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

/* ----- 6. Testimonios ----- */
.testimonials { display: grid; gap: 16px; }
@media (min-width: 720px) { .testimonials { grid-template-columns: repeat(3, 1fr); } }
.testimonial { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.testimonial blockquote { margin: 0 0 12px; font-size: 1.05rem; }
.testimonial-name { margin: 0; font-weight: 600; color: var(--muted); }
.stars { display: flex; gap: 2px; margin-bottom: 10px; }
.stars span { width: 18px; height: 18px; }
.stars svg { width: 100%; height: 100%; }
.stars .on { color: #b7791f; }
.stars .off { color: #d5d5da; }

/* ----- 7. Formulario ----- */
.booking { max-width: 640px; }
.form {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 20px;
}
.field { margin-bottom: 18px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 440px) { .field-row { grid-template-columns: 1fr 1fr; } .form { padding: 32px; } }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 16px; /* 16px evita el zoom automático en iPhone */
  color: var(--text); background: #fff;
  border: 1.5px solid #b9bac2; border-radius: 10px;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-ink); outline: 3px solid var(--accent-soft); outline-offset: 0; }
[aria-invalid="true"] { border-color: #b42318; }
.field-error { margin: 6px 0 0; color: #b42318; font-size: .92rem; font-weight: 500; }
.field-error:empty { display: none; }
.form-hint { margin: 12px 0 0; color: var(--muted); font-size: .9rem; text-align: center; }

/* ----- 8. Horario y ubicación ----- */
.location { display: grid; gap: 32px; }
@media (min-width: 860px) { .location { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }
.status-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 16px; }
.hours li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.hours li.is-today { font-weight: 700; background: var(--accent-softer); padding-inline: 12px; border-radius: 8px; }
.hours-day { display: flex; align-items: center; gap: 8px; }
.hours-time { text-align: right; }
.hours-time.is-closed { color: var(--muted); }
.today-tag {
  font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--accent); color: var(--accent-contrast);
}
.address-card { background: var(--surface-alt); border-radius: var(--radius); padding: 24px; }
.address-card address { margin-bottom: 20px; font-size: 1.05rem; }
.address-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.address-actions .btn { flex: 1 1 180px; }

/* ----- 9. Pie de página ----- */
.site-footer { background: #17171a; color: #e8e8ec; padding: 40px 0 104px; text-align: center; }
.footer-name { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }
.social { display: flex; justify-content: center; gap: 12px; margin-bottom: 20px; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 12px; border-radius: 50%;
  background: #2a2a30; color: #fff;
}
.social a:hover { background: #3a3a42; }
.social svg { width: 100%; height: 100%; }
.footer-small { font-size: .85rem; color: #b4b4bc; margin: 0 0 6px; }
.footer-small a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }

/* ----- Botón flotante de WhatsApp ----- */
.wa-float {
  position: fixed; z-index: 60;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
.wa-float .icon { width: 32px; height: 32px; }
.wa-float:hover { transform: scale(1.06); }
.wa-float:focus-visible { outline-color: var(--text); border-radius: 50%; }

.noscript { padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
