:root {
  --accent: #2f7d76;      /* teal de la marca */
  --accent-dark: #245f59;
  --ink: #12181f;         /* texto oscuro (como su sitio) */
  --muted: #3d4a4a;       /* texto secundario más oscuro/legible */
  --line: #e2e8e6;
  --bg: #ffffff;
  --card: #ffffff;
  --mint: #eaf1ee;
  --footer: #6f918b;
  --font: "Gill Sans", "Gill Sans MT", "Lato", "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}
/* Tema azul clínico (selector de paleta) */
html.theme-blue {
  --accent: #2b6cb0;
  --accent-dark: #1f527f;
  --footer: #3b5876;
  --mint: #eaf1f8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-weight: 400; font-size: 16.5px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-weight: 400; letter-spacing: .2px; color: #12181f; }

.demobar { background: #0b1220; color: #fff; font-size: 13px; padding: 7px 16px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.demobar a { color: #9fd3cd; }
.nrl { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; font-weight: 600; }
.nrl img { width: 18px; height: 18px; display: block; border-radius: 5px; }
.nrl:hover { color: #cfe0ff; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ---- Navbar estilo Fysiokliniken ---- */
header.nav { border-bottom: 1px solid var(--line); background: #fff; }
.nav-inner { max-width: 1080px; margin: 0 auto; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 74px; width: auto; display: block; }
.nav-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.nav-contact { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.nav-contact svg { width: 14px; height: 14px; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; position: relative; }
.nav-links > a, .nav-links > .has-drop > a { text-transform: uppercase; letter-spacing: .6px; text-decoration: none; color: #2b3a3a; font-size: 13.5px; }
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer; }
.has-drop { position: relative; padding-bottom: 8px; margin-bottom: -8px; }
.has-drop > a { display: inline-flex; align-items: center; gap: 6px; }
.has-drop > a::after { content: "▼"; font-size: 9px; color: var(--accent); position: relative; top: 1px; transition: transform .15s ease; }
.has-drop:hover > a::after, .has-drop.open > a::after { transform: rotate(180deg); }
.drop { position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(15,23,42,.12); padding: 8px; min-width: 240px; display: none; z-index: 40; }
.has-drop:hover .drop, .has-drop:focus-within .drop, .has-drop.open .drop { display: block; }
.drop a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0; }
.drop a:hover { background: var(--mint); color: var(--accent-dark); }

/* ---- Slider ---- */
.slider { position: relative; overflow: hidden; background: #0b1220; }
.slides { position: relative; height: 620px; touch-action: pan-y; cursor: grab; }
.slides.dragging { cursor: grabbing; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; -webkit-user-drag: none; user-select: none; }
.slide-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(6,15,32,.55) 0%, rgba(6,15,32,.28) 45%, rgba(6,15,32,0) 100%); }
.slider-text { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; color: #fff; max-width: 1080px; margin: 0 auto; left: 0; right: 0; padding: 0 8%; pointer-events: none; }
.slider-text h1 { font-size: clamp(28px, 4vw, 46px); margin: 0 0 12px; max-width: 620px; line-height: 1.12; color: #fff; }
.slider-text p { font-size: 18px; max-width: 520px; margin: 0 0 22px; color: #fff; }
.slider-text .btn { pointer-events: auto; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 12px 22px; border-radius: 8px; font-weight: 500; width: fit-content; }
.btn:hover { background: var(--accent-dark); }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,.22); color: #fff; border: none; width: 42px; height: 42px; border-radius: 999px; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.slider-nav:hover { background: rgba(255,255,255,.4); }
.slider-nav.prev { left: 16px; } .slider-nav.next { right: 16px; }
.slider-dots { position: absolute; bottom: 16px; left: 0; right: 0; z-index: 3; display: flex; gap: 8px; justify-content: center; }
.slider-dots button { width: 10px; height: 10px; border-radius: 999px; border: none; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.slider-dots button.active { background: #fff; }

section { padding: 56px 0; }
h2 { font-size: 28px; margin: 0 0 8px; }
.lead { color: var(--muted); max-width: 680px; margin: 0 0 28px; font-size: 16.5px; line-height: 1.6; }
.grid { display: grid; gap: 20px; }

/* Servicios con miniatura */
.services { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.service-card { text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,.10); border-color: #bcd8d3; }
.service-card .thumb { width: 100%; height: 130px; object-fit: cover; display: block; background: var(--mint); }
.service-card .sc-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.service-card h3 { margin: 0; font-size: 16px; }
.service-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; }
.service-card .more { color: var(--accent); font-weight: 600; font-size: 14px; }

/* Filtro de equipo */
.team-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Equipo: columnas de ancho fijo → una sola tarjeta no se agranda */
.team { grid-template-columns: repeat(auto-fill, 208px); justify-content: center; }
.member { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; width: 208px; }
.member img { width: 100%; height: 300px; object-fit: cover; object-position: center 20%; background: var(--mint); }
.member .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.member h3 { margin: 0; font-size: 15px; }
.member .spec { color: var(--muted); font-size: 13px; flex: 1; line-height: 1.45; }
.member a.book, .member a.call { text-decoration: none; font-weight: 600; font-size: 13.5px; color: var(--accent); }
.team-empty { color: var(--muted); }

/* Galería con lightbox */
.gallery { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gallery button { border: none; padding: 0; background: none; cursor: pointer; }
.gallery img { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; display: block; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(6,15,32,.85); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .lb-close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 34px; cursor: pointer; line-height: 1; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.2); color: #fff; border: none; width: 46px; height: 46px; border-radius: 999px; font-size: 24px; cursor: pointer; }
.lightbox .lb-nav.prev { left: 18px; } .lightbox .lb-nav.next { right: 18px; }

/* Info + footer completo */
.infobar { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.infobar h4 { margin: 0 0 4px; font-size: 14px; }
.infobar p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.about { padding: 20px 0 8px; }
.about p { color: var(--muted); line-height: 1.7; max-width: 900px; }
.about h3 { margin: 22px 0 6px; color: var(--ink); font-size: 18px; }

.footcards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 8px; }
.footcard { background: var(--mint); border-radius: 12px; padding: 20px; text-align: center; }
.footcard h4 { margin: 0 0 10px; color: var(--accent-dark); font-size: 16px; }
.footcard p { margin: 4px 0; color: var(--ink); font-size: 14px; line-height: 1.5; }

footer.site { background: var(--footer); color: #fff; text-align: center; padding: 18px; font-size: 13.5px; letter-spacing: .3px; }
footer.site a { color: #eafaf6; }
.norelum-credit { text-align: center; font-size: 12px; color: var(--muted); padding: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.norelum-credit a { color: var(--muted); }
.norelum-credit .nrl img { width: 20px; height: 20px; }
.norelum-credit .nrl { color: var(--ink); }

/* Selector de paleta */
.palette { position: fixed; left: 18px; bottom: 18px; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(15,23,42,.14); padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.palette span { font-weight: 600; }
.palette .sw { width: 26px; height: 26px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.palette .sw.active { border-color: var(--ink); }
.palette .sw.teal { background: #2f7d76; }
.palette .sw.blue { background: #2b6cb0; }
@media (max-width: 520px) { .palette { left: 8px; bottom: 8px; padding: 8px 10px; } }

/* Service detail page */
.svc-hero { background: linear-gradient(120deg, #0b1220, var(--accent-dark)); color: #fff; padding: 12px 0 14px; }
.svc-hero a.back { color: rgba(255,255,255,.8); text-decoration: none; font-size: 13.5px; }
.svc-hero h1 { margin: 6px 0 4px; font-size: clamp(22px, 3.2vw, 32px); color: #fff; }
.svc-hero p { margin: 0; max-width: 640px; font-size: 15.5px; opacity: .9; color: #fff; }
.svc-photo { width: 100%; height: 560px; object-fit: cover; object-position: center; display: block; }
.svc-body { padding-top: 34px; }
.svc-body ul { padding-left: 20px; color: var(--muted); }
.svc-body li { margin: 6px 0; }

/* ---- Chat flotante ---- */
#fk-bubble { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 62px; height: 62px; border-radius: 999px; border: none; background: var(--accent); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(47,125,118,.45); animation: fk-bob 2.6s ease-in-out infinite; }
#fk-bubble.hidden { display: none; }
#fk-bubble:hover { background: var(--accent-dark); }
.fk-ping { position: absolute; inset: 0; border-radius: 999px; background: var(--accent); opacity: .5; animation: fk-ping 2s cubic-bezier(0,0,.2,1) infinite; z-index: -1; }
.fk-dot { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #ff3b30; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
@keyframes fk-ping { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes fk-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } #fk-bubble { animation: none; } .fk-ping { animation: none; opacity: 0; } .slide { transition: none; } }

#fk-panel { position: fixed; right: 22px; bottom: 22px; z-index: 51; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 90px)); background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 70px rgba(15,23,42,.32); display: none; transform: translateY(12px); opacity: 0; transition: transform .18s ease, opacity .18s ease; }
#fk-panel.open { display: block; transform: translateY(0); opacity: 1; }
#fk-frame { width: 100%; height: 100%; border: 0; display: block; }
#fk-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 30px; height: 30px; border-radius: 999px; border: none; background: rgba(255,255,255,.22); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#fk-close:hover { background: rgba(255,255,255,.38); }

@media (max-width: 480px) {
  .team { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .member { width: auto; }
}

/* ---- Team banner ---- */
.team-banner { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 22px; }
.team-banner img { width: 100%; height: 260px; object-fit: cover; object-position: center 30%; display: block; }
.team-banner-text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 26px; background: linear-gradient(0deg, rgba(6,15,32,.62) 0%, rgba(6,15,32,0) 60%); color: #fff; }
.team-banner-text h2 { margin: 0; color: #fff; }
.team-banner-text p { margin: 4px 0 0; opacity: .92; font-size: 15px; }

/* Botón "Mer om mig" en tarjeta de equipo */
.member .more-btn { background: none; border: none; padding: 0; text-align: left; color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.member img { cursor: pointer; }

/* ---- Modal fisioterapeuta ---- */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(6,15,32,.78); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-card { background: #fff; border-radius: 16px; max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 24px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.modal-head img { width: 96px; height: 120px; object-fit: cover; object-position: center top; border-radius: 12px; background: var(--mint); }
.modal-head h3 { margin: 0 0 4px; font-size: 20px; }
.modal-card h4 { margin: 16px 0 6px; font-size: 15px; }
.modal-card ul { margin: 0 0 18px; padding-left: 20px; color: var(--muted); }
.modal-card li { margin: 4px 0; }
.modal-card .spec { color: var(--muted); font-size: 14px; }
.modal-card #modal-bio { color: var(--ink); line-height: 1.6; }

/* ---- Google Map ---- */
.map { width: 100%; height: 360px; border: 0; border-radius: 14px; margin: 8px 0 24px; display: block; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .nav-inner { flex-wrap: wrap; position: relative; }
  .nav-toggle { display: block; position: absolute; right: 20px; top: 18px; }
  .nav-right { flex-basis: 100%; display: none; align-items: flex-start; margin-top: 8px; }
  .nav-right.open { display: flex; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; }
  .has-drop { padding-bottom: 0; margin-bottom: 0; }
  .drop { position: static; box-shadow: none; border: none; padding: 4px 0 4px 12px; min-width: 0; }
  .has-drop .drop { display: block; }
  .slides { height: 460px; }
  .team-banner img { height: 200px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .slides { height: 380px; }
  .slider-text { padding: 0 6%; }
  .slider-text p { font-size: 16px; }
  .svc-photo { height: 300px; }
  .modal-head { flex-direction: column; text-align: center; align-items: center; }
  .map { height: 280px; }
  .palette { left: 8px; bottom: 8px; padding: 7px 9px; font-size: 11.5px; }
  #fk-panel { right: 8px; left: 8px; width: auto; bottom: 8px; height: min(80vh, 620px); }
}
