/*
Theme Name: SparkleHome
Theme URI: https://example.com/sparklehome
Author: SparkleHome
Author URI: https://example.com
Description: A clean, conversion-focused WordPress theme for domestic cleaning agencies and house cleaning franchises. Includes a postcode lookup hero, service cards, review section, custom logo support, widget areas and full block-editor styling.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sparklehome
Tags: blog, business, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ---------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------- */
:root {
  --sh-teal-900: #073b3a;
  --sh-teal-700: #0f6e63;
  --sh-teal-500: #17a398;
  --sh-teal-100: #dff4f1;
  --sh-sun: #ffc94a;
  --sh-ink: #10312f;
  --sh-body: #46615e;
  --sh-line: #e2ece9;
  --sh-surface: #ffffff;
  --sh-bg: #f6fbfa;
  --sh-radius: 14px;
  --sh-shadow: 0 10px 30px rgba(7, 59, 58, 0.08);
  --sh-shadow-lg: 0 24px 60px rgba(7, 59, 58, 0.14);
  --sh-max: 1160px;
  --sh-font: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  --sh-font-head: "Poppins", "Nunito Sans", Arial, sans-serif;
}

/* ---------------------------------------------------------------
   2. Base
   --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sh-bg);
  color: var(--sh-body);
  font-family: var(--sh-font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sh-font-head);
  color: var(--sh-ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

a { color: var(--sh-teal-700); text-decoration: none; }
a:hover,
a:focus { color: var(--sh-teal-900); text-decoration: underline; }

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

:focus-visible {
  outline: 3px solid var(--sh-teal-500);
  outline-offset: 2px;
}

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

.skip-link:focus {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 999;
  clip: auto; width: auto; height: auto;
  padding: 10px 16px;
  background: var(--sh-teal-900);
  color: #fff;
  border-radius: 8px;
}

/* ---------------------------------------------------------------
   3. Layout helpers
   --------------------------------------------------------------- */
.sh-container {
  width: 100%;
  max-width: var(--sh-max);
  margin: 0 auto;
  padding: 0 20px;
}

.sh-section { padding: 72px 0; }
.sh-section--tint { background: var(--sh-surface); }
.sh-section--deep { background: var(--sh-teal-900); color: #d8ece9; }
.sh-section--deep h2,
.sh-section--deep h3 { color: #fff; }

.sh-grid { display: grid; gap: 24px; }
.sh-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.sh-grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.sh-grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.sh-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sh-teal-700);
  margin-bottom: 12px;
}

.sh-lead { font-size: 1.08rem; max-width: 62ch; }

/* ---------------------------------------------------------------
   4. Buttons
   --------------------------------------------------------------- */
.sh-btn,
button, input[type="submit"] {
  font-family: var(--sh-font-head);
  font-weight: 700;
  cursor: pointer;
}

.sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--sh-teal-700);
  color: #fff;
  font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.sh-btn:hover,
.sh-btn:focus { background: var(--sh-teal-900); color: #fff; text-decoration: none; transform: translateY(-1px); }
.sh-btn--sun { background: var(--sh-sun); color: var(--sh-teal-900); }
.sh-btn--sun:hover, .sh-btn--sun:focus { background: #ffb81f; color: var(--sh-teal-900); }
.sh-btn--ghost { background: transparent; border-color: var(--sh-line); color: var(--sh-ink); }
.sh-btn--ghost:hover, .sh-btn--ghost:focus { background: var(--sh-teal-100); color: var(--sh-teal-900); }

/* ---------------------------------------------------------------
   5. Header
   --------------------------------------------------------------- */
.sh-topbar {
  background: var(--sh-teal-900);
  color: #cfe8e4;
  font-size: 0.86rem;
}
.sh-topbar .sh-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.sh-topbar a { color: #fff; font-weight: 700; }

.sh-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--sh-line);
}
.sh-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  max-width: var(--sh-max);
  margin: 0 auto;
}
.sh-brand { display: flex; align-items: center; gap: 10px; }
.sh-brand__name {
  font-family: var(--sh-font-head);
  font-weight: 800;
  font-size: 1.28rem;
  color: var(--sh-ink);
  line-height: 1.1;
}
.sh-brand__tag { display: block; font-size: 0.72rem; font-weight: 600; color: var(--sh-teal-700); letter-spacing: 0.06em; text-transform: uppercase; }
.sh-brand a:hover { text-decoration: none; }
.custom-logo { max-height: 52px; width: auto; }

.sh-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
}
.sh-nav a {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--sh-ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.sh-nav a:hover,
.sh-nav .current-menu-item > a {
  color: var(--sh-teal-700);
  border-bottom-color: var(--sh-teal-500);
  text-decoration: none;
}
.sh-nav .sub-menu {
  position: absolute;
  display: none;
  flex-direction: column;
  gap: 0;
  min-width: 210px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: 12px;
  box-shadow: var(--sh-shadow);
}
.sh-nav li { position: relative; }
.sh-nav li:hover > .sub-menu,
.sh-nav li:focus-within > .sub-menu { display: flex; }
.sh-nav .sub-menu a { display: block; padding: 8px 16px; border: 0; }

.sh-header__actions { display: flex; align-items: center; gap: 12px; }

.sh-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--sh-teal-100);
  color: var(--sh-teal-900);
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .sh-menu-toggle { display: inline-flex; }
  .sh-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--sh-line);
    box-shadow: var(--sh-shadow);
    display: none;
  }
  .sh-nav.is-open { display: block; }
  .sh-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px; }
  .sh-nav li { border-bottom: 1px solid var(--sh-line); }
  .sh-nav .sub-menu { position: static; display: flex; border: 0; box-shadow: none; padding: 0 0 8px 12px; }
  .sh-header__actions .sh-btn { display: none; }
}

/* ---------------------------------------------------------------
   6. Hero + postcode form
   --------------------------------------------------------------- */
.sh-hero {
  position: relative;
  background:
    linear-gradient(115deg, rgba(7, 59, 58, 0.92) 0%, rgba(15, 110, 99, 0.78) 55%, rgba(23, 163, 152, 0.55) 100%),
    var(--sh-teal-900);
  background-size: cover;
  background-position: center;
  color: #eaf7f5;
}
.sh-hero__inner {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  padding: 84px 20px 92px;
  max-width: var(--sh-max);
  margin: 0 auto;
}
.sh-hero h1 { color: #fff; }
.sh-hero p { color: #d5ecea; font-size: 1.1rem; max-width: 52ch; }
.sh-hero__badges { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 22px; list-style: none; padding: 0; }
.sh-hero__badges li { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; font-size: 0.94rem; }
.sh-hero__badges li::before { content: "✓"; color: var(--sh-sun); font-weight: 900; }

.sh-card-form {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--sh-shadow-lg);
  color: var(--sh-body);
}
.sh-card-form h2 { font-size: 1.4rem; margin-bottom: 6px; }
.sh-card-form p.sh-small { font-size: 0.92rem; margin-bottom: 18px; }
.sh-field { margin-bottom: 14px; }
.sh-field label { display: block; font-weight: 700; font-size: 0.88rem; color: var(--sh-ink); margin-bottom: 6px; }
.sh-field input,
.sh-field select,
.sh-field textarea,
.search-field {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--sh-line);
  border-radius: 10px;
  font: inherit;
  color: var(--sh-ink);
  background: #fbfefd;
}
.sh-field input:focus,
.sh-field select:focus,
.sh-field textarea:focus { border-color: var(--sh-teal-500); outline: none; }
.sh-form-note { font-size: 0.8rem; margin: 12px 0 0; }
.sh-form-error { color: #b3261e; font-size: 0.85rem; font-weight: 700; margin: 8px 0 0; }

@media (max-width: 860px) {
  .sh-hero__inner { grid-template-columns: 1fr; padding: 58px 20px 66px; }
}

/* ---------------------------------------------------------------
   7. Cards, steps, stats, reviews
   --------------------------------------------------------------- */
.sh-card {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  padding: 26px;
  box-shadow: var(--sh-shadow);
  height: 100%;
}
.sh-card h3 { margin-bottom: 8px; }
.sh-card p:last-child { margin-bottom: 0; }
.sh-card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--sh-teal-100);
  color: var(--sh-teal-700);
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.sh-step { counter-increment: shstep; position: relative; padding-left: 58px; }
.sh-steps { counter-reset: shstep; }
.sh-step::before {
  content: counter(shstep);
  position: absolute;
  left: 0; top: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sh-sun);
  color: var(--sh-teal-900);
  font-family: var(--sh-font-head);
  font-weight: 800;
}

.sh-stat { text-align: center; }
.sh-stat__num {
  display: block;
  font-family: var(--sh-font-head);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  color: #fff;
}
.sh-section--deep .sh-stat__num { color: var(--sh-sun); }
.sh-stat__label { font-size: 0.92rem; }

.sh-review {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  padding: 24px;
  box-shadow: var(--sh-shadow);
}
.sh-review__stars { color: #f5a623; letter-spacing: 2px; margin-bottom: 10px; }
.sh-review blockquote { margin: 0 0 14px; font-size: 1.02rem; color: var(--sh-ink); }
.sh-review cite { font-style: normal; font-weight: 700; font-size: 0.9rem; color: var(--sh-teal-700); }

.sh-cta {
  background: linear-gradient(120deg, var(--sh-teal-700), var(--sh-teal-500));
  color: #fff;
  border-radius: 22px;
  padding: 44px;
  text-align: center;
  box-shadow: var(--sh-shadow-lg);
}
.sh-cta h2 { color: #fff; }
.sh-cta p { color: #e6faf7; max-width: 58ch; margin-inline: auto; }
.sh-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }

.sh-faq details {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.sh-faq summary {
  cursor: pointer;
  font-family: var(--sh-font-head);
  font-weight: 700;
  color: var(--sh-ink);
}
.sh-faq details[open] summary { color: var(--sh-teal-700); }

/* ---------------------------------------------------------------
   8. Content, archive, comments
   --------------------------------------------------------------- */
.sh-page-header {
  background: var(--sh-teal-100);
  border-bottom: 1px solid var(--sh-line);
  padding: 54px 0;
}
.sh-page-header p { margin: 0; }

.sh-layout {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) 320px;
  padding: 60px 20px;
  max-width: var(--sh-max);
  margin: 0 auto;
}
.sh-layout--full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .sh-layout { grid-template-columns: 1fr; } }

.sh-entry {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  padding: 32px;
  box-shadow: var(--sh-shadow);
  margin-bottom: 28px;
}
.sh-entry__meta { font-size: 0.86rem; color: var(--sh-body); margin-bottom: 14px; }
.sh-entry__thumb { border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.sh-entry blockquote {
  border-left: 4px solid var(--sh-teal-500);
  margin: 0 0 1.2em;
  padding: 4px 0 4px 18px;
  color: var(--sh-ink);
}
.sh-entry ul, .sh-entry ol { padding-left: 22px; }
.sh-entry table { width: 100%; border-collapse: collapse; }
.sh-entry th, .sh-entry td { border: 1px solid var(--sh-line); padding: 10px; text-align: left; }
.sh-entry pre {
  background: var(--sh-teal-900);
  color: #dff4f1;
  padding: 16px;
  border-radius: 10px;
  overflow: auto;
}
.sh-entry code { background: var(--sh-teal-100); padding: 2px 6px; border-radius: 5px; }

.wp-caption { margin: 0 0 1.2em; }
.wp-caption-text, .wp-block-image figcaption { font-size: 0.85rem; text-align: center; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin-inline: auto; }
.alignwide { width: min(100%, 1080px); margin-inline: auto; }
.alignfull { width: 100%; }
.sticky .sh-entry { border-color: var(--sh-teal-500); }

.sh-pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sh-pagination .page-numbers {
  padding: 9px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--sh-line);
  font-weight: 700;
}
.sh-pagination .page-numbers.current,
.sh-pagination .page-numbers:hover { background: var(--sh-teal-700); color: #fff; text-decoration: none; }

.sh-sidebar .widget {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: var(--sh-shadow);
}
.sh-sidebar .widget-title { font-size: 1.05rem; }
.sh-sidebar ul { list-style: none; margin: 0; padding: 0; }
.sh-sidebar li + li { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--sh-line); }

.sh-comments { background: #fff; border: 1px solid var(--sh-line); border-radius: var(--sh-radius); padding: 30px; box-shadow: var(--sh-shadow); }
.sh-comments ol { list-style: none; margin: 0 0 24px; padding: 0; }
.sh-comments .children { list-style: none; padding-left: 24px; }
.sh-comments .comment-body { border-bottom: 1px solid var(--sh-line); padding: 16px 0; }
.sh-comments .comment-author img { border-radius: 50%; float: left; margin-right: 12px; }

.sh-search-form { display: flex; gap: 8px; }
.sh-search-form .search-field { flex: 1; }

/* ---------------------------------------------------------------
   9. Footer
   --------------------------------------------------------------- */
.sh-footer { background: var(--sh-teal-900); color: #b9d9d5; padding: 64px 0 0; }
.sh-footer h2, .sh-footer h3, .sh-footer .widget-title { color: #fff; font-size: 1.05rem; }
.sh-footer a { color: #e6faf7; }
.sh-footer ul { list-style: none; margin: 0; padding: 0; }
.sh-footer li + li { margin-top: 8px; }
.sh-footer__cols { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-bottom: 44px; }
.sh-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0;
  font-size: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
}

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

/* ---------------------------------------------------------------
   12. Brand logo + Elementor compatibility
   --------------------------------------------------------------- */
.sh-brand__link { display: inline-flex; align-items: center; }
.sh-brand__logo,
.sh-brand .custom-logo {
  display: block;
  width: auto;
  height: 62px;
  max-width: 240px;
  object-fit: contain;
}
.sh-footer__logo {
  display: block;
  width: auto;
  height: 76px;
  max-width: 240px;
  margin-bottom: 14px;
  object-fit: contain;
  background: #fff;
  padding: 8px 12px;
  border-radius: 14px;
}
@media (max-width: 600px) {
  .sh-brand__logo,
  .sh-brand .custom-logo { height: 44px; max-width: 170px; }
}

/* Elementor-built pages render edge to edge under the theme header. */
.sh-elementor-canvas { width: 100%; }
.sh-elementor-canvas > .elementor { width: 100%; }
.sh-elementor-page .sh-main { padding: 0; }

/* Native SparkleHome Elementor widgets reuse the theme card look. */
.sh-service-card {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  padding: 26px;
  box-shadow: var(--sh-shadow);
  height: 100%;
}
.sh-service-card h3 { margin-bottom: 8px; }
.sh-service-card p:last-child { margin-bottom: 0; }
.sh-service-card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--sh-teal-100);
  color: var(--sh-teal-700);
  font-size: 1.35rem;
  margin-bottom: 14px;
}

/* -------------------------------------------------- *
 * Inner page layouts (services, pricing, contact…)
 * -------------------------------------------------- */
.sh-narrow { max-width: 640px; }
.sh-prose { max-width: 72ch; }
.sh-prose h2 { margin-top: 28px; }

.sh-iconstrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.sh-iconstrip li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sh-iconstrip span { font-size: 2rem; line-height: 1; }
.sh-iconstrip strong { font-size: 0.95rem; color: var(--sh-teal-900); }

.sh-price-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: 18px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
}
.sh-price-card.is-featured {
  border-color: var(--sh-teal-500);
  box-shadow: 0 18px 40px rgba(7, 59, 58, 0.12);
}
.sh-price-card__flag {
  position: absolute;
  top: -13px;
  left: 26px;
  background: var(--sh-sun);
  color: var(--sh-teal-900);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.sh-price-card__price { margin: 6px 0 14px; }
.sh-price-card__price strong { font-family: "Poppins", sans-serif; font-size: 2.2rem; color: var(--sh-teal-900); }
.sh-price-card__price span { font-size: 0.9rem; color: var(--sh-teal-700); margin-left: 6px; }
.sh-price-card .sh-btn { margin-top: auto; }

.sh-ticks { list-style: none; margin: 0 0 22px; padding: 0; }
.sh-ticks li { position: relative; padding-left: 26px; margin-bottom: 10px; font-size: 0.95rem; }
.sh-ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sh-teal-500);
  font-weight: 900;
}

.sh-split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
@media (max-width: 860px) {
  .sh-split { grid-template-columns: 1fr; }
}

.sh-contact-list { list-style: none; margin: 24px 0 0; padding: 0; }
.sh-contact-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sh-line);
}
.sh-contact-list strong {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sh-teal-700);
}
.sh-contact-list a, .sh-contact-list span { font-size: 1.1rem; font-weight: 700; color: var(--sh-teal-900); }
