/* ==========================================================
   KDM Care Limited — Main Stylesheet
   Palette: Maroon / Pink / Orange / White
   ========================================================== */
:root {
  --maroon: #0B2A5B;
  --maroon-dark: #081F45;
  --maroon-deep: #06173A;
  --pink: #38A8E0;
  --pink-soft: #A8DBF5;
  --pink-tint: #EEF7FD;
  --orange: #1C8ED8;
  --orange-dark: #1476B8;
  --white: #FFFFFF;
  --cream: #F7FBFF;
  --ink: #14213D;
  --muted: #55657F;
  --line: #DCE8F3;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px -18px rgba(11, 42, 91, .35);
  --shadow-sm: 0 6px 18px -8px rgba(11, 42, 91, .25);
  --grad: linear-gradient(135deg, var(--maroon) 0%, #1B4F8F 55%, var(--orange) 100%);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--maroon); text-decoration: none; transition: color .2s; }
a:hover { color: var(--pink); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--maroon-deep); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.bg-tint { background: var(--pink-tint); }
.bg-cream { background: var(--cream); }
.bg-maroon { background: var(--maroon-deep); color: #E6F0FA; }
.bg-maroon h2, .bg-maroon h3 { color: var(--white); }
.text-center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 14px;
}
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 2px; background: var(--pink); vertical-align: middle; margin-right: 10px; }
.lead { font-size: 1.15rem; color: var(--muted); }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head .eyebrow::after { content: ""; display: inline-block; width: 28px; height: 2px; background: var(--pink); vertical-align: middle; margin-left: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 30px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; border: 2px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s; font-family: var(--font-body);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 10px 24px -10px rgba(28,142,216,.8); }
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }
.btn-pink { background: var(--pink); color: var(--white); }
.btn-pink:hover { background: #2A93C9; color: var(--white); }
.btn-maroon { background: var(--maroon); color: var(--white); }
.btn-maroon:hover { background: var(--maroon-dark); color: var(--white); }
.btn-outline { border-color: rgba(255,255,255,.8); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--maroon); }
.btn-outline-dark { border-color: var(--maroon); color: var(--maroon); }
.btn-outline-dark:hover { background: var(--maroon); color: var(--white); }

/* ---------- Top bar ---------- */
.topbar { background: var(--maroon-deep); color: #D6E6F7; font-size: .86rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 42px; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #D6E6F7; }
.topbar a:hover { color: var(--orange); }
.topbar .tb-left, .topbar .tb-right { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.topbar svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; fill: var(--pink-soft); }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); box-shadow: 0 2px 20px -10px rgba(11,42,91,.3); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 86px; }
.logo img { height: 60px; width: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.nav a { display: block; padding: 10px 16px; font-weight: 600; font-size: .96rem; color: var(--ink); border-radius: 999px; }
.nav a:hover { color: var(--maroon); background: var(--pink-tint); }
.nav a.active { color: var(--maroon); background: var(--pink-tint); }
.nav .nav-cta a { background: var(--maroon); color: var(--white); margin-left: 8px; }
.nav .nav-cta a:hover { background: var(--pink); color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--maroon); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- Hero (home video) ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; color: var(--white); background: var(--maroon-deep) url('../images/placeholder.svg') center/cover; }
.hero video, .hero .hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero .overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(105deg, rgba(6,23,58,.92) 0%, rgba(11,42,91,.78) 45%, rgba(56,168,224,.35) 100%); }
.hero .container { position: relative; z-index: 2; padding-top: 60px; padding-bottom: 60px; }
.hero-content { max-width: 720px; }
.hero h1 { color: var(--white); text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.hero h1 em { font-style: italic; color: var(--pink-soft); }
.hero p { font-size: 1.2rem; color: #E8F3FC; max-width: 600px; }
.hero .eyebrow { color: var(--orange); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-badges { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 46px; }
.hero-badges div { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; }
.hero-badges i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.15); font-style: normal; }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.7); border-radius: 20px; }
.scroll-hint::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--white); border-radius: 2px; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Page banners (inner pages) ---------- */
.page-banner { position: relative; min-height: 440px; display: flex; align-items: center; color: var(--white); overflow: hidden; background: var(--maroon-deep); }
.page-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: slowZoom 18s ease-in-out infinite alternate; }
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.page-banner .overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(6,23,58,.92) 0%, rgba(11,42,91,.72) 50%, rgba(28,142,216,.35) 100%); }
.page-banner .container { position: relative; z-index: 2; padding-top: 50px; padding-bottom: 50px; }
.page-banner h1 { color: var(--white); margin-bottom: .3em; }
.page-banner p { font-size: 1.15rem; max-width: 640px; color: #E8F3FC; }
.breadcrumb { font-size: .9rem; color: var(--pink-soft); margin-bottom: 14px; }
.breadcrumb a { color: var(--white); }
.breadcrumb a:hover { color: var(--orange); }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }

/* ---------- Image collage ---------- */
.collage { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 220px 220px; gap: 16px; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.collage img:first-child { grid-row: span 2; }
.collage .badge-float { position: absolute; left: -22px; bottom: 30px; background: var(--white); border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; max-width: 250px; }
.badge-float strong { font-family: var(--font-head); font-size: 2rem; color: var(--maroon); line-height: 1; }
.badge-float span { font-size: .85rem; color: var(--muted); line-height: 1.35; }
.img-rounded { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; }
.img-frame { position: relative; }
.img-frame::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 3px solid var(--pink-soft); border-radius: var(--radius); z-index: -1; }
.img-frame img { height: 460px; }

/* ---------- Cards ---------- */
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s; display: flex; flex-direction: column; border: 1px solid var(--line); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-img { height: 220px; overflow: hidden; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-img img { transform: scale(1.07); }
.card-tag { position: absolute; top: 14px; left: 14px; background: var(--orange); color: var(--white); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.card-body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.card-body p { color: var(--muted); font-size: .97rem; }
.card-body .more { margin-top: auto; font-weight: 600; color: var(--pink); }
.card-body .more:hover { color: var(--maroon); }

.icon-card { background: var(--white); border-radius: var(--radius); padding: 34px 28px; border: 1px solid var(--line); transition: .3s; position: relative; overflow: hidden; }
.icon-card::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--grad); transition: width .4s; }
.icon-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.icon-card:hover::after { width: 100%; }
.icon-card p { color: var(--muted); font-size: .97rem; margin: 0; }
.icon { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; background: var(--pink-tint); margin-bottom: 20px; }
.icon svg { width: 30px; height: 30px; stroke: var(--maroon); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.orange { background: #E3F2FC; }
.icon.orange svg { stroke: var(--orange-dark); }

/* ---------- Check list ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 28px; }
.checklist li { position: relative; padding-left: 36px; margin-bottom: 14px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--pink); color: var(--white); font-size: .8rem; font-weight: 700; display: grid; place-items: center; }

/* ---------- Stats strip ---------- */
.stats { background: var(--grad); color: var(--white); padding: 60px 0; }
.stats .grid { text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.stat span { font-size: .95rem; opacity: .92; }

/* ---------- Locations ---------- */
.loc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.loc-country { background: var(--white); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-sm); border-top: 5px solid var(--pink); }
.loc-country.scot { border-top-color: var(--orange); }
.loc-country h3 { display: flex; align-items: center; gap: 12px; }
.loc-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.loc-list span { display: inline-flex; align-items: center; gap: 8px; background: var(--pink-tint); color: var(--maroon); font-weight: 600; padding: 10px 18px; border-radius: 999px; font-size: .95rem; }
.loc-list span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }
.loc-country.scot .loc-list span { background: #E3F2FC; }
.loc-country.scot .loc-list span::before { background: var(--orange); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; }
.gallery figure { margin: 0; overflow: hidden; border-radius: var(--radius-sm); position: relative; }
.gallery figure.tall { grid-row: span 2; }
.gallery figure.wide { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.08); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; color: var(--white); font-size: .88rem; font-weight: 600; background: linear-gradient(transparent, rgba(6,23,58,.85)); opacity: 0; transition: opacity .3s; }
.gallery figure:hover figcaption { opacity: 1; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding: 30px 26px 26px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-head); font-size: 2.6rem; color: var(--pink-soft); font-weight: 700; display: block; line-height: 1; margin-bottom: 12px; }
.step p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---------- Testimonial / quote ---------- */
.quote-block { position: relative; background: var(--white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-sm); }
.quote-block::before { content: "“"; position: absolute; top: -10px; left: 26px; font-family: var(--font-head); font-size: 6rem; color: var(--pink); line-height: 1; }
.quote-block p { font-family: var(--font-head); font-size: 1.25rem; font-style: italic; color: var(--maroon-deep); padding-top: 20px; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; color: var(--white); padding: 90px 0; background: var(--maroon-deep); }
.cta-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.cta-band .container { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin-bottom: .3em; }
.cta-band p { color: #DCEAF8; margin: 0; max-width: 620px; }

/* ---------- Jobs ---------- */
.job { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); padding: 30px; display: flex; flex-direction: column; transition: .3s; }
.job:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--pink-soft); }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.job-meta span { font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--pink-tint); color: var(--maroon); }
.job-meta span.o { background: #E3F2FC; color: var(--orange-dark); }
.job ul { padding-left: 20px; color: var(--muted); font-size: .95rem; margin: 0 0 22px; }
.job .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border-radius: var(--radius); padding: 44px; box-shadow: var(--shadow); border-top: 6px solid var(--pink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--maroon-deep); }
.field label .req { color: var(--pink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: #FCFEFF; transition: border .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(56,168,224,.15); }
.field textarea { min-height: 140px; resize: vertical; }
.field small { color: var(--muted); font-size: .82rem; }
.form-legend { font-family: var(--font-head); font-size: 1.2rem; color: var(--maroon); grid-column: 1 / -1; margin-top: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--maroon); flex-shrink: 0; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 24px; font-weight: 600; display: none; }
.alert.show { display: block; }
.alert-success { background: #E8F7EE; color: #1F6B3B; border: 1px solid #BFE5CD; }
.alert-error { background: #FDECEC; color: #9B1C1C; border: 1px solid #F5C2C2; }

/* ---------- Contact ---------- */
.contact-info { display: grid; gap: 18px; }
.contact-item { display: flex; gap: 18px; align-items: flex-start; background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); transition: .3s; }
.contact-item:hover { box-shadow: var(--shadow-sm); border-color: var(--pink-soft); }
.contact-item .icon { margin: 0; flex-shrink: 0; }
.contact-item h4 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 4px; }
.contact-item p { margin: 0; font-size: 1.05rem; font-weight: 500; }
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); height: 420px; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--maroon-deep); color: #CFE0F2; padding-top: 80px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 44px; padding-bottom: 56px; }
.site-footer img { height: 58px; width: auto; margin-bottom: 18px; }
.site-footer h4 { font-family: var(--font-body); color: var(--white); font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 20px; }
.site-footer h4::after { content: ""; display: block; width: 32px; height: 3px; background: var(--orange); margin-top: 10px; border-radius: 2px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #CFE0F2; }
.site-footer a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; font-size: .85rem; color: #A9BED8; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%; background: var(--pink); color: var(--white); border: 0; cursor: pointer; font-size: 1.3rem; box-shadow: var(--shadow-sm); opacity: 0; pointer-events: none; transition: .3s; z-index: 90; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--maroon); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .page-banner > img { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; top: 0; right: 0; transform: translateX(100%); visibility: hidden; width: 300px; max-width: 85vw; height: 100vh; background: var(--white); box-shadow: -10px 0 40px rgba(0,0,0,.15); padding: 100px 26px 30px; transition: transform .35s, visibility .35s; z-index: 101; }
  .nav.open { transform: none; visibility: visible; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav .nav-cta a { margin: 10px 0 0; text-align: center; }
  .nav-toggle { position: relative; z-index: 102; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .split, .loc-wrap { grid-template-columns: 1fr; gap: 44px; }
  .split.reverse > :first-child { order: 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .topbar .tb-right { display: none; }
  .collage .badge-float { left: 12px; }
}
@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .grid-2, .grid-3, .grid-4, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery figure.wide { grid-column: span 2; }
  .form-card { padding: 28px 20px; }
  .collage { grid-template-rows: 170px 170px; }
  .img-frame img { height: 320px; }
  .img-frame::before { display: none; }
  .logo img { height: 50px; }
  .site-header .container { height: 74px; }
  .topbar .tb-left a:nth-child(2) { display: none; }
  .hero { min-height: 88vh; }
  .page-banner { min-height: 360px; }
  .stat strong { font-size: 2.4rem; }
}
