/* ==========================================
   Physio Therapy Care — Redesign override
   Mapira --theme-* varijable (iz admina) na postojeće
   CSS varijable + dodaje nove komponente.
   ========================================== */

:root {
  /* Mapiranje admin tema → postojeći design tokens */
  --brand-100: var(--theme-brand-light, #CCFBF1);
  --brand-500: var(--theme-brand-primary, #0F766E);
  --brand-600: var(--theme-brand-primary, #0F766E);
  --brand-700: var(--theme-brand-primary, #0F766E);
  --brand-800: var(--theme-brand-dark, #134E4A);
  --brand-900: var(--theme-brand-dark, #134E4A);

  --accent-400: var(--theme-accent, #F97066);
  --accent-500: var(--theme-accent, #F97066);
  --accent-600: var(--theme-accent-dark, #E11D48);

  --bg:        var(--theme-bg, #FAF7F2);
  --bg-soft:   var(--theme-bg-soft, #F3EEE6);
  --surface:   var(--theme-surface, #FFFFFF);
  --line:      var(--theme-line, #E5E1D8);
  --ink-900:   var(--theme-ink, #1F2937);
  --ink-800:   var(--theme-ink, #1F2937);
  --ink-700:   var(--theme-ink-soft, #475569);
  --ink-600:   var(--theme-ink-soft, #475569);

  --radius:    var(--theme-radius, 14px);
  --radius-lg: var(--theme-radius-lg, 24px);

  --font-display: var(--theme-font-display, 'Plus Jakarta Sans', system-ui, sans-serif);
  --font-body:    var(--theme-font-body,    'Inter', system-ui, sans-serif);

  --shadow-sm: 0 1px 2px rgba(20, 30, 40, .06);
  --shadow:    0 4px 16px rgba(20, 30, 40, .08);
  --shadow-lg: 0 24px 60px -16px rgba(15, 118, 110, .25);
  --shadow-cta: 0 12px 28px -8px rgba(249, 112, 102, .45);
}

/* Body finalna podešavanja */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink-900);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

/* ==========================================
   CTA dugme — toplo akcent
   ========================================== */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: #fff;
  border: 0;
  box-shadow: var(--shadow-cta);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 16px 36px -8px rgba(249, 112, 102, .55);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--brand-700);
  border: 1.5px solid var(--brand-700);
  transition: background .15s, color .15s;
}
.btn-ghost:hover {
  background: var(--brand-700);
  color: #fff;
}

/* Section helpers */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-cta {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-800));
  color: #fff;
  text-align: center;
  padding: 80px 0;
}
.section-cta h2 { color: #fff; margin-bottom: 12px; }
.section-cta p { color: rgba(255,255,255,.85); margin-bottom: 24px; }

.section-head {
  text-align: center;
  margin-bottom: 40px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--brand-700);
  background: var(--brand-100);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

/* ==========================================
   Page hero (svaka unutrašnja stranica)
   ========================================== */
.page-hero {
  padding: 64px 0 48px;
  background: linear-gradient(180deg, var(--brand-100) 0%, var(--bg) 100%);
}
.page-hero .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-700);
  background: rgba(255,255,255,.7);
  padding: 8px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 16px;
  max-width: 820px;
}
.page-hero .lead {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-700);
  max-width: 720px;
  margin-bottom: 24px;
}
.location-hero {
  background: linear-gradient(135deg, var(--brand-100) 0%, var(--bg-soft) 100%);
}

/* ==========================================
   Breadcrumbs
   ========================================== */
.breadcrumbs {
  padding: 16px 0;
  font-size: 14px;
  color: var(--ink-600);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--ink-600);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--brand-700); }
.breadcrumbs span { color: var(--ink-900); font-weight: 500; }

/* ==========================================
   Locations grid
   ========================================== */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.location-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--ink-900);
  border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.location-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-500);
}
.location-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-100);
  color: var(--brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.location-card h3 { margin: 0; font-size: 1.25rem; }
.location-card p { color: var(--ink-700); font-size: 14px; line-height: 1.6; margin: 0; }
.location-card small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-600);
  font-size: 13px;
}
.location-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-700);
  font-weight: 600;
  font-size: 14px;
  margin-top: 8px;
}

.location-body {
  max-width: 760px;
  margin: 0 auto;
}

/* ==========================================
   Prose (HTML iz WYSIWYG-a)
   ========================================== */
.prose {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-800);
}
.prose h2 { font-size: 1.75rem; margin: 1.5em 0 .5em; }
.prose h3 { font-size: 1.35rem; margin: 1.25em 0 .5em; }
.prose p  { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1em 1.25em; }
.prose li { margin-bottom: .35em; }
.prose blockquote {
  border-left: 3px solid var(--brand-500);
  padding: 6px 16px;
  color: var(--ink-700);
  font-style: italic;
  margin: 1em 0;
}
.prose a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink-900); }

/* ==========================================
   Cards (services, blog, etc.)
   ========================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink-900);
  border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--ink-700); font-size: 14px; line-height: 1.5; }
.card-meta { color: var(--brand-700); font-weight: 600; font-size: 14px; margin-top: auto; padding-top: 8px; }

/* ==========================================
   FAQ
   ========================================== */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
}
.faq summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .faq-a {
  padding: 0 22px 18px;
  color: var(--ink-700);
  line-height: 1.7;
}

/* ==========================================
   Dropzone (admin)
   ========================================== */
.dropzone-wrap { margin-bottom: 24px; }
.dz-label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--ink-900); }
.dz-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
@media (max-width: 600px) { .dz-fields { grid-template-columns: 1fr; } }
.dz-fields input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}
.dz-fields input:focus { outline: 2px solid var(--brand-500); border-color: var(--brand-500); }
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  min-height: 140px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover { border-color: var(--brand-500); background: var(--brand-100); }
.dropzone .dz-message { color: var(--ink-600); font-size: 14px; }
.dz-preview-current { margin-top: 14px; }

/* ==========================================
   WYSIWYG (Quill) override
   ========================================== */
.wysiwyg-wrap .ql-toolbar.ql-snow {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  border-color: var(--line);
}
.wysiwyg-wrap .ql-container.ql-snow {
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  border-color: var(--line);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}

/* ==========================================
   Forms — uniform polish
   ========================================== */
input, select, textarea {
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand-500);
  outline-offset: 1px;
}

/* ==========================================
   Mobile: bottom CTA bar
   ========================================== */
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .page-hero { padding: 48px 0 32px; }
}

/* ==========================================
   A11y / focus
   ========================================== */
*:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth image transitions */
img {
  background-color: var(--bg-soft);
}
img[loading="lazy"] {
  transition: opacity .3s;
}

/* Skip for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px 16px;
  background: var(--brand-700);
  color: #fff;
  z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ==========================================
   Admin moduli — sadrzaj/seo/lokacije/tema
   ========================================== */
.admin-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.admin-grid:last-child { border-bottom: 0; }
.admin-grid label {
  font-weight: 600;
  color: var(--ink-700);
  font-size: 14px;
  padding-top: 8px;
}
.admin-grid input[type="text"],
.admin-grid input[type="url"],
.admin-grid input[type="email"],
.admin-grid input[type="number"],
.admin-grid input[type="color"],
.admin-grid select,
.admin-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}
.admin-grid textarea { min-height: 80px; resize: vertical; }
.admin-grid .hint { font-size: 12px; color: var(--ink-600); margin-top: 4px; }

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

.admin-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.admin-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.admin-color-row input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.admin-color-row .info { flex: 1; }
.admin-color-row label { display: block; font-weight: 600; font-size: 13px; }
.admin-color-row input[type="text"] {
  width: 110px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

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