/* Hospitalito Roppe — hoja de estilos
   Paleta tomada del propio edificio: paredes blancas y franja turquesa. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("/assets/fonts/karla-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --wall: #F4F8F8;        /* paredes */
  --surface: #FFFFFF;
  --ink: #12302F;
  --muted: #4E6260;
  --teal-deep: #0A6466;   /* botones y enlaces: 6.9:1 sobre blanco */
  --teal-deeper: #07494B;
  --teal: #2AA7A3;        /* franja, solo decorativa */
  --amber: #F2B705;       /* alas del logo */
  --line: #D6E3E2;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Karla", "Segoe UI", Tahoma, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 9vw, 112px);
  --radius: 10px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

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

a { color: var(--teal-deep); text-underline-offset: 3px; }
a:hover { color: var(--teal-deeper); }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
}
h1 { font-size: clamp(2.35rem, 5.2vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.4rem; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* La franja: el mismo recurso que recorre fachada y pasillos */
.stripe {
  height: 8px;
  background: var(--teal);
}

/* ---------- Botones ---------- */
.btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}
.btn-solid { background: var(--teal-deep); color: #fff; }
.btn-solid:hover { background: var(--teal-deeper); color: #fff; }
.btn-line { border: 2px solid var(--teal-deep); color: var(--teal-deep); }
.btn-line:hover { background: var(--teal-deep); color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.brand-place { font-size: 0.875rem; color: var(--muted); }

.nav { display: flex; gap: 26px; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 0;
}
.nav a:hover { color: var(--teal-deep); text-decoration: underline; }

.menu-toggle { display: none; }

@media (max-width: 900px) {
  .header-inner { gap: 10px; min-height: 68px; }
  .brand img { width: 44px; height: 44px; }
  .brand-name { font-size: 1.12rem; }
  .brand-place { display: none; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: 600 0.95rem var(--sans);
    cursor: pointer;
  }
  .header-call { min-height: 44px; padding: 0 14px; font-size: 0.95rem; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:last-child { border-bottom: 0; }
}
@media (max-width: 420px) {
  .menu-toggle span { display: none; }
  .menu-toggle { padding: 0 10px; }
  .header-call { padding: 0 12px; gap: 6px; }
}

/* ---------- Portada ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-text { display: flex; flex-direction: column; gap: 22px; }
.badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: #E1F1F0;
  color: var(--teal-deeper);
  font-weight: 700;
  font-size: 0.95rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-photo { margin: 0; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line);
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .hero-photo img { aspect-ratio: 16 / 10; }
}

/* ---------- Datos rápidos ---------- */
.facts-list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 0.9fr 0.7fr 1.5fr;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
}
.facts-list > div { padding: 22px 24px; border-left: 1px solid var(--line); }
.facts-list > div:first-child { border-left: 0; }
.facts-list dt { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.facts-list dd { margin: 4px 0 0; font-weight: 600; line-height: 1.45; }
.facts-list dd a { text-decoration: none; }
.facts-list dd a:hover { text-decoration: underline; }

@media (max-width: 960px) {
  .facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-list > div:nth-child(3) { border-left: 0; }
  .facts-list > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .facts-list { grid-template-columns: 1fr; }
  .facts-list > div { border-left: 0; }
  .facts-list > div + div { border-top: 1px solid var(--line); }
}

/* ---------- Secciones ---------- */
.section { padding: var(--section) 0; }
.section-white { background: var(--surface); }
.section-intro { margin-top: 12px; color: var(--muted); font-size: 1.1rem; max-width: 40em; }

/* ---------- Servicios por horario ---------- */
.schedule {
  margin-top: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.shift { border-radius: var(--radius); padding: clamp(24px, 3.5vw, 36px); }
.shift-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shift-head h3 { font-size: 1.75rem; }
.shift-head p { font-weight: 600; }

.shift-night { background: var(--teal-deep); color: #fff; }
.shift-night .shift-head p { color: #BFE5E3; }
.shift-night .shift-list > div { border-top: 1px solid rgba(255,255,255,0.22); }
.shift-night dd { color: #D8EFEE; }

.shift-day { background: var(--surface); box-shadow: 0 0 0 1px var(--line); border-top: 8px solid var(--amber); }
.shift-day .shift-simple li { border-top: 1px solid var(--line); }

.shift-list { margin: 22px 0 0; padding: 0; list-style: none; }
.shift-list > div, .shift-simple li { padding: 16px 0; }
.shift-list dt, .shift-simple li { font-family: var(--serif); font-size: 1.3rem; font-weight: 650; }
.shift-list dd { margin: 4px 0 0; max-width: 38em; }
.shift-note { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.98rem; }

@media (max-width: 900px) { .schedule { grid-template-columns: 1fr; } }

/* ---------- Quiénes somos ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about-text { display: flex; flex-direction: column; gap: 18px; }
.about-text p { font-size: 1.1rem; line-height: 1.7; max-width: 38em; }
.about-side { display: flex; flex-direction: column; gap: 28px; }
.seal { width: 100%; max-width: 360px; align-self: center; }
.mission { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.mission > div { padding-left: 18px; border-left: 4px solid var(--teal); }
.mission dt { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.mission dd { margin: 4px 0 0; }

.values-title { margin-top: clamp(48px, 7vw, 80px); font-size: 1.6rem; }
.values {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.values > div { padding-top: 16px; border-top: 4px solid var(--teal); }
.values dt { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.values dd { margin: 6px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

.about-gallery {
  margin-top: clamp(48px, 7vw, 80px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.about-gallery figure { margin: 0; }
.about-gallery img {
  width: 100%;
  aspect-ratio: 768 / 494;
  object-fit: cover;
  border-radius: 8px;
  background: #E5EEEE;
}
.about-gallery figcaption {
  margin-top: 8px;
  font-size: 1rem;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--teal-deep);
}
@media (max-width: 600px) { .about-gallery { grid-template-columns: 1fr; } }

/* ---------- Lema ---------- */
.quote { background: var(--teal-deep); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.quote blockquote { margin: 0; }
.quote p {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.25;
  max-width: 22em;
}

/* ---------- Instalaciones ---------- */
.gallery {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  background: #E5EEEE;
}
.gallery figcaption { margin-top: 8px; font-size: 0.95rem; color: var(--muted); }

@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: stretch;
}
.contact-text { display: flex; flex-direction: column; gap: 8px; }
.contact-list { margin: 20px 0 24px; display: grid; gap: 18px; }
.contact-list dt { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.contact-list dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; }

.map { min-height: 380px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: #E5EEEE; }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
  .contact .btn { flex: 1 1 auto; }
}

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #C9D8D6; }
.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 36px;
  padding-bottom: 36px;
  font-size: 0.95rem;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { background: #fff; border-radius: 50%; }
.footer-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: #fff; }
.site-footer a { color: #fff; }

/* ---------- 404 ---------- */
.notfound { padding: var(--section) 0; min-height: 50vh; }
.notfound .actions { margin-top: 28px; }
