/* ==========================================================================
   Kinestique - Main stylesheet
   Design system: minimal, premium medical clinic.
   White background, soft blue primary, teal accent, rounded cards, subtle shadows.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--k-font-body, 'Inter', system-ui, sans-serif);
  color: var(--k-text, #0f172a);
  background: var(--k-bg, #ffffff);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--k-primary, #3b82f6); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--k-accent, #0d9488); outline-offset: 3px; border-radius: 6px; }

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--k-font-heading, 'Fraunces', Georgia, serif);
  color: #0b1220;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; color: #334155; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Layout */
.k-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.k-section { padding: clamp(3rem, 6vw, 6rem) 0; }
.k-page { padding: clamp(2rem, 5vw, 4rem) 0; }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--k-accent, #0d9488);
  margin: 0 0 0.75rem;
}
.section-title { margin: 0 0 0.75rem; }
.section-lead, .page-lead { color: #475569; font-size: 1.125rem; }

/* Buttons */
.k-btn {
  --btn-bg: var(--k-primary, #3b82f6);
  --btn-fg: #ffffff;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 44px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
.k-btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: 0 10px 30px -12px rgba(15, 118, 110, .35); }
.k-btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }
.k-btn-primary { --btn-bg: var(--k-primary, #3b82f6); }
.k-btn-outline { --btn-bg: transparent; --btn-fg: var(--k-text); border-color: #e2e8f0; }
.k-btn-outline:hover { --btn-bg: #f8fafc; }
.k-btn-ghost { --btn-bg: transparent; --btn-fg: var(--k-text); border-color: transparent; }
.k-btn-ghost:hover { --btn-bg: #f1f5f9; }

.k-link { color: var(--k-accent, #0d9488); font-weight: 600; }
.k-link:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.header-inner {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 1.25rem;
  min-height: 72px;
}
.site-branding .site-title { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--k-font-heading); font-size: 1.25rem; color: var(--k-text); font-weight: 700; text-decoration: none; }
.k-logo-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--k-primary), var(--k-accent)); color:#fff; font-weight: 700; font-family: var(--k-font-heading); }
.custom-logo-link img, .custom-logo { max-height: 48px; width: auto; }

.main-navigation ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.5rem; justify-content: center; }
.main-navigation a { color: #334155; font-weight: 500; padding: 0.5rem 0; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--k-text); text-decoration: none; }

.header-cta { display: flex; align-items: center; gap: 0.75rem; }
.k-phone { color: var(--k-text); font-weight: 600; }
.k-phone:hover { text-decoration: none; color: var(--k-accent); }

.menu-toggle {
  display: none;
  background: transparent; border: 1px solid #e2e8f0; border-radius: 10px;
  width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
}
.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after { content:''; display:block; width: 18px; height: 2px; background: var(--k-text); border-radius: 2px; position: relative; }
.menu-toggle-bar::before { position:absolute; top:-6px; left:0; width:18px; }
.menu-toggle-bar::after  { position:absolute; top: 6px; left:0; width:18px; }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .menu-toggle { display: inline-flex; }
  .main-navigation { position: relative; justify-self: end; }
  .main-navigation ul {
    display: none;
    position: absolute; right: 0; top: calc(100% + 12px);
    background: #fff; padding: 1rem; border-radius: 14px;
    box-shadow: 0 20px 45px -18px rgba(2, 6, 23, 0.25);
    flex-direction: column; gap: 0.25rem; min-width: 220px;
  }
  .main-navigation.is-open ul { display: flex; }
  .header-cta .k-phone { display: none; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 6rem); }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 90% 0%, rgba(13,148,136,0.10), transparent 60%),
    radial-gradient(50% 55% at 0% 100%, rgba(59,130,246,0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  z-index: -1;
}
.hero-inner { max-width: 860px; }
.hero-title { font-size: clamp(2.4rem, 4.5vw + 1rem, 4.25rem); line-height: 1.05; margin-bottom: 1rem; }
.hero-sub { font-size: clamp(1.05rem, 0.4vw + 1rem, 1.25rem); color: #475569; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-trust { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 1.25rem; color: #475569; }
.hero-trust li { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.hero-trust span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: rgba(13,148,136,0.12); color: var(--k-accent); font-size: 12px; }

/* Cards / Grids */
.k-grid { display: grid; gap: 1.25rem; }
.k-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.k-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .k-grid-3, .k-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .k-grid-3, .k-grid-4 { grid-template-columns: 1fr; } }

.k-card {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 20px 40px -30px rgba(15,23,42,0.15);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.k-card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(15,23,42,0.06), 0 30px 60px -30px rgba(15,23,42,0.25); border-color: rgba(13,148,136,0.15); }

.feature-icon, .service-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(13,148,136,.15));
  margin-bottom: 1rem;
}
.feature-title, .service-title { font-size: 1.15rem; margin: 0 0 0.4rem; }
.feature-text, .service-text { color: #475569; margin: 0 0 1rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
@media (max-width: 960px) { .about-grid { grid-template-columns: 1fr; gap: 2rem; } }
.k-checklist { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; display: grid; gap: 0.6rem; }
.k-checklist li { position: relative; padding-left: 1.75rem; color: #334155; }
.k-checklist li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: rgba(13,148,136,0.12); color: var(--k-accent); font-size: 12px; font-weight: 700; }
.about-media { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-media-card { background: linear-gradient(180deg, #f8fafc, #ffffff); border: 1px solid #eef2f7; border-radius: 20px; padding: 1.5rem; display: grid; gap: 0.25rem; }
.about-media-card.wide { grid-column: span 2; }
.about-stat-num { font-family: var(--k-font-heading); font-size: 2rem; font-weight: 700; color: var(--k-text); }
.about-stat-label { color: #64748b; font-size: 0.95rem; }

/* Team */
.team-avatar { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; background: linear-gradient(135deg, var(--k-primary), var(--k-accent)); color: #fff; font-weight: 700; font-family: var(--k-font-heading); font-size: 1.5rem; margin-bottom: 1rem; }
.team-name { margin: 0; }
.team-role { color: var(--k-accent); font-weight: 600; margin: 0.25rem 0 0.5rem; }
.team-bio { color: #475569; }

/* Testimonials */
.testimonial-card { display: grid; gap: 1rem; margin: 0; }
.testimonial-quote { margin: 0; font-family: var(--k-font-heading); font-size: 1.15rem; color: #0b1220; line-height: 1.5; }
.testimonial-author { display: grid; gap: 0.15rem; color: #475569; font-size: 0.95rem; }

/* Process */
.process-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; }
@media (max-width: 960px) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .process-steps { grid-template-columns: 1fr; } }
.process-steps > li { background: #fff; border: 1px solid #eef2f7; border-radius: 18px; padding: 1.5rem; }
.process-num { display: inline-block; font-family: var(--k-font-heading); font-weight: 700; color: var(--k-accent); font-size: 0.9rem; letter-spacing: 0.1em; }
.process-steps h3 { margin: 0.5rem 0 0.35rem; font-size: 1.1rem; }
.process-steps p { margin: 0; color: #475569; }

/* Posts grid */
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.5rem; }
@media (max-width: 960px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .posts-grid { grid-template-columns: 1fr; } }
.post-card { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.post-card-media img { width: 100%; height: 220px; object-fit: cover; }
.post-card-body { padding: 1.5rem; display: grid; gap: 0.6rem; align-content: start; }
.post-card-title { margin: 0; font-size: 1.15rem; }
.post-card-title a { color: var(--k-text); text-decoration: none; }
.post-card-title a:hover { color: var(--k-accent); }
.post-meta, .entry-meta { color: #64748b; font-size: 0.9rem; }
.post-card-excerpt { color: #475569; margin: 0; }

/* CTA */
.section-cta { padding-top: 0; }
.cta-card {
  border-radius: 28px;
  padding: clamp(2rem, 4vw, 3rem);
  color: #fff;
  background:
    radial-gradient(60% 100% at 100% 0%, rgba(255,255,255,.15), transparent 60%),
    linear-gradient(135deg, var(--k-primary), var(--k-accent));
  display: grid; gap: 1.5rem; grid-template-columns: 1.4fr 1fr; align-items: center;
}
@media (max-width: 860px) { .cta-card { grid-template-columns: 1fr; } }
.cta-title { color: #fff; margin: 0 0 0.5rem; }
.cta-text { color: rgba(255,255,255,.9); margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }
.cta-card .k-btn-primary { background: #ffffff; color: var(--k-text); }
.cta-card .k-btn-ghost { color: #ffffff; border-color: rgba(255,255,255,.4); }
.cta-card .k-btn-ghost:hover { background: rgba(255,255,255,.12); }
@media (max-width: 860px) { .cta-actions { justify-content: flex-start; } }

/* Map */
.map-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 2rem; align-items: center; }
@media (max-width: 960px) { .map-grid { grid-template-columns: 1fr; } }
.map-embed { border-radius: 20px; overflow: hidden; border: 1px solid #eef2f7; aspect-ratio: 16/10; box-shadow: 0 20px 40px -30px rgba(15,23,42,0.25); }
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.contact-info { font-style: normal; color: #334155; line-height: 1.8; }
.hours { color: #475569; }

/* Service hero */
.service-hero { background: linear-gradient(180deg, #f8fafc, #ffffff); padding: clamp(3rem,6vw,5rem) 0 clamp(2rem,4vw,3rem); border-bottom: 1px solid #eef2f7; }

/* FAQ */
.faq-list { display: grid; gap: 0.75rem; }
.faq-item { background: #fff; border: 1px solid #eef2f7; border-radius: 16px; padding: 1rem 1.25rem; }
.faq-item[open] { border-color: rgba(13,148,136,0.25); box-shadow: 0 10px 30px -20px rgba(13,148,136,0.35); }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--k-text); list-style: none; padding-right: 2rem; position: relative; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--k-accent); font-weight: 700; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 0.75rem 0 0; color: #475569; }

/* Contact / Forms */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1.5rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.k-form { display: grid; gap: 1rem; }
.k-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .k-form-row { grid-template-columns: 1fr; } }
.k-form label { display: grid; gap: 0.4rem; font-weight: 500; color: var(--k-text); }
.k-form input, .k-form select, .k-form textarea, .search-field {
  width: 100%; padding: 0.75rem 0.9rem;
  border: 1px solid #e2e8f0; border-radius: 12px;
  background: #fff; color: var(--k-text); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.k-form input:focus, .k-form select:focus, .k-form textarea:focus, .search-field:focus {
  border-color: var(--k-accent); box-shadow: 0 0 0 4px rgba(13,148,136,0.12); outline: none;
}
.k-big-phone { font-family: var(--k-font-heading); font-size: 1.5rem; }
.k-muted { color: #94a3b8; font-size: 0.9rem; }

/* Search form (default) */
.search-form { display: flex; gap: 0.5rem; max-width: 500px; }
.search-form .search-field { flex: 1; }

/* Prose (page/post content) */
.prose { max-width: 780px; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose img, .prose figure { border-radius: 14px; overflow: hidden; margin: 1.5rem 0; }
.prose blockquote { border-left: 3px solid var(--k-accent); padding: 0.25rem 0 0.25rem 1rem; color: #334155; font-family: var(--k-font-heading); font-size: 1.15rem; margin: 1.5rem 0; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose a { color: var(--k-accent); text-decoration: underline; text-underline-offset: 3px; }

/* Pagination */
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 0.75rem; border-radius: 999px; border: 1px solid #e2e8f0; color: var(--k-text); font-weight: 600; text-decoration: none; }
.pagination .current { background: var(--k-text); color: #fff; border-color: var(--k-text); }

/* Footer */
.site-footer { background: #0b1220; color: #cbd5e1; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding: 4rem 0 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { display: inline-flex; align-items: center; gap: 0.6rem; color: #fff; font-family: var(--k-font-heading); font-size: 1.25rem; font-weight: 700; text-decoration: none; margin-bottom: 1rem; }
.footer-tagline { color: #94a3b8; max-width: 340px; }
.footer-col .widget-title, .footer-col h4 { color: #fff; font-family: var(--k-font-body); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-links a { color: #cbd5e1; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-address { font-style: normal; color: #cbd5e1; line-height: 1.85; }
.footer-address a { color: #cbd5e1; }
.footer-address a:hover { color: #fff; }
.footer-hours { color: #94a3b8; margin-top: 1rem; }
.k-social { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.k-social a { display: inline-grid; place-items: center; padding: 0.4rem 0.8rem; border-radius: 999px; background: rgba(255,255,255,.06); color: #e2e8f0; text-decoration: none; font-size: 0.85rem; }
.k-social a:hover { background: rgba(255,255,255,.12); color: #fff; }
.site-info { border-top: 1px solid rgba(255,255,255,.08); }
.site-info-inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding: 1.5rem 0; color: #94a3b8; font-size: 0.9rem; }
.site-info a { color: #cbd5e1; text-decoration: none; }
.site-info a:hover { color: #fff; }
.legal-links span { margin: 0 0.5rem; color: #475569; }

/* 404 */
.k-404 { text-align: center; padding: 6rem 0; }
.k-404 .eyebrow { font-size: 3rem; letter-spacing: 0.05em; }
.k-404-actions { display: flex; gap: 0.75rem; justify-content: center; margin: 1.5rem 0; flex-wrap: wrap; }
.k-404-search { max-width: 480px; margin: 2rem auto 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
