/* ==========================================================================
   TREE SURGERY GALWAY — components added for the WordPress site
   (style.css is the landing-page design system; this file adds inner pages,
   blog, contact, text logo, and WordPress-specific pieces using the same
   tokens.)
   ========================================================================== */

/* ---------- Accessibility helpers ---------- */
.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 {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--color-forest); color: #fff; padding: 10px 18px;
  border-radius: var(--radius-sm); font-family: var(--font-heading); font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ---------- Text logo (placeholder until a logo image is uploaded) ---------- */
.tsg-text-logo { display: inline-flex; align-items: center; gap: 12px; }
.tsg-text-logo .logo-icon { width: 42px; height: 42px; }
.tsg-text-logo .logo-elm { font-size: 1.3rem; white-space: nowrap; }
.tsg-text-logo .logo-elm em { font-style: normal; color: var(--color-accent); }
.tsg-text-logo .logo-landscaping { font-size: 0.68rem; color: rgba(255, 255, 255, 0.72); margin-top: 3px; }
.site-header.scrolled .tsg-text-logo .logo-landscaping { color: var(--color-muted); }
.footer-logo .tsg-text-logo .logo-elm,
.mobile-menu-header .tsg-text-logo .logo-elm { color: #fff; }
.mobile-menu-header .tsg-text-logo .logo-landscaping { display: none; }
.bm-logo.tsg-text-logo .logo-icon { width: 32px; height: 32px; }
.bm-logo.tsg-text-logo .logo-elm { font-size: 1rem; color: #fff; }
.bm-logo.tsg-text-logo { height: auto; }

/* ---------- Header on pages without a hero ---------- */
body.tsg-solid-header main { padding-top: var(--header-height); }
body.tsg-solid-header .site-header::before {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 24px rgba(var(--color-forest-rgb), 0.1);
}
body.tsg-solid-header .site-header .nav-link,
body.tsg-solid-header .site-header .nav-dropdown-trigger,
body.tsg-solid-header .site-header .header-phone,
body.tsg-solid-header .site-header .logo-elm { color: var(--color-forest); }
body.tsg-solid-header .site-header .hamburger-bar { background: var(--color-forest); }
body.tsg-solid-header .site-header .logo-landscaping { color: var(--color-muted); }

/* Mega menu: "view all" link + featured title (was an h4 in the static design) */
.mega-all-link {
  display: inline-block; margin: -4px 0 14px;
  font-family: var(--font-heading); font-size: 0.82rem; font-weight: 600;
  color: var(--color-accent); text-decoration: none;
}
.mega-all-link:hover { text-decoration: underline; }
.mega-featured-title {
  font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700;
  color: var(--color-forest); margin-bottom: 6px;
}
.nav-link.is-active::after { opacity: 1; transform: scaleX(1); }
.mobile-nav-link.is-active { color: var(--color-accent); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  background: var(--color-forest); color: #fff;
  display: flex; align-items: flex-end;
  min-height: 440px;
  padding: calc(var(--header-height) + 48px) 0 64px;
}
.page-hero--compact { min-height: 340px; padding-bottom: 48px; }
.page-hero--tall { min-height: 600px; padding-bottom: 96px; }
.page-hero-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(var(--color-forest-deep-rgb), 0.78) 0%, rgba(var(--color-forest-deep-rgb), 0.45) 45%, rgba(var(--color-forest-deep-rgb), 0.88) 100%),
    linear-gradient(90deg, rgba(var(--color-forest-deep-rgb), 0.75) 0%, rgba(var(--color-forest-deep-rgb), 0.1) 75%);
}
.page-hero .container { position: relative; z-index: 2; width: 100%; }
.page-hero-content { max-width: 760px; }
.page-hero-title {
  font-family: var(--font-heading); font-weight: 800; color: #fff;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.025em;
  margin: 6px 0 0;
}
.page-hero-title em { font-style: normal; color: var(--color-accent); }
.page-hero-sub {
  margin-top: 18px; max-width: 620px;
  font-size: 1.12rem; line-height: 1.65; color: rgba(255, 255, 255, 0.86);
}
.page-hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.page-hero .section-tag { margin-bottom: 10px; }

.breadcrumbs { margin-bottom: 18px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font-size: 0.82rem; font-family: var(--font-heading); }
.breadcrumbs li { color: rgba(255, 255, 255, 0.75); display: flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: '/'; color: rgba(255, 255, 255, 0.4); }
.breadcrumbs a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs [aria-current] { color: var(--color-accent); }

/* ---------- Section helpers ---------- */
.section-header--left { text-align: left; margin-left: 0; max-width: 760px; }
.section-title em { font-style: normal; color: var(--color-accent); }
.tsg-center-cta { text-align: center; margin-top: 48px; }
.hero-layout--single { grid-template-columns: 1fr; max-width: 760px; }
.about-grid--reverse .about-images { order: 2; }
/* The design system sets a muted colour on every <p>; wrappers that hold
   editor paragraphs pass their own colour down instead. */
.about-lead p, .split-lead p, .tsg-prose p, .tsg-prose li, .sidebar-card p { color: inherit; font-size: inherit; line-height: inherit; }
.about-lead p + p, .split-lead p + p { margin-top: 1em; }
.faq-intro-btn { margin-top: 32px; }
.faq-grid--stacked { grid-template-columns: 1fr; max-width: 860px; margin: 0 auto; }
.faq-grid--stacked .faq-intro { text-align: center; position: static; }
.faq-answer p + p { margin-top: 0.8em; }
.service-card-img { display: block; }
.service-card-title a { color: inherit; text-decoration: none; }
.service-card-title a:hover { color: var(--color-accent); }
.google-rating { text-decoration: none; }
a.google-rating:hover { box-shadow: var(--shadow-card); }

/* ---------- Text Section (core blocks inside) ---------- */
.tsg-content--narrow .tsg-prose,
.tsg-content--narrow .section-header--left { max-width: 800px; }
.tsg-content--narrow .section-header:not(.section-header--left) + .tsg-prose { margin: 0 auto; }
.tsg-content .section-header { margin-bottom: 32px; }
.tsg-content .section-header .section-title { margin-top: 0; }

.tsg-prose { color: var(--color-text); font-size: 1.05rem; line-height: 1.75; }
.tsg-prose > * + * { margin-top: 1.1em; }
.tsg-prose h2, .tsg-prose h3, .tsg-prose h4 {
  font-family: var(--font-heading); color: var(--color-forest);
  line-height: 1.25; letter-spacing: -0.015em; margin-top: 1.8em;
}
.tsg-prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; }
.tsg-prose h3 { font-size: 1.3rem; font-weight: 700; }
.tsg-prose h4 { font-size: 1.1rem; font-weight: 700; }
.tsg-prose > :first-child { margin-top: 0; }
.tsg-prose a { color: var(--color-accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.tsg-prose a:hover { color: var(--color-forest); }
.tsg-prose strong { color: var(--color-forest); }
.tsg-prose ul, .tsg-prose ol { padding-left: 0; list-style: none; }
.tsg-prose ul li, .tsg-prose ol li { position: relative; padding-left: 32px; margin-top: 0.55em; }
.tsg-prose ul li::before {
  content: ''; position: absolute; left: 0; top: 0.35em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2L6.6 11.2L12.5 5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
}
.tsg-prose ol { counter-reset: tsg; }
.tsg-prose ol li { counter-increment: tsg; }
.tsg-prose ol li::before {
  content: counter(tsg); position: absolute; left: 0; top: 0.2em;
  width: 22px; height: 22px; border-radius: 50%; background: var(--color-forest); color: #fff;
  font: 700 0.72rem/22px var(--font-heading); text-align: center;
}
.tsg-prose blockquote {
  border-left: 4px solid var(--color-accent); background: var(--color-offwhite);
  padding: 20px 24px; border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.1rem; color: var(--color-forest);
}
.tsg-prose blockquote cite { display: block; margin-top: 8px; font-size: 0.85rem; color: var(--color-muted); font-style: normal; }
.tsg-prose img { border-radius: var(--radius-md); }
.tsg-prose figure { margin-left: 0; margin-right: 0; }
.tsg-prose figcaption { font-size: 0.85rem; color: var(--color-muted); margin-top: 8px; text-align: center; }
.tsg-prose .wp-block-columns { display: flex; gap: 32px; flex-wrap: wrap; }
.tsg-prose .wp-block-column { flex: 1 1 260px; min-width: 0; }
.tsg-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.tsg-prose .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px;
  background: var(--color-accent); color: #fff; text-decoration: none;
  border-radius: var(--radius-btn); font-family: var(--font-heading); font-weight: 600;
}
.tsg-prose .wp-block-button__link:hover { background: var(--color-accent-dark); color: #fff; }
.tsg-prose .is-style-outline .wp-block-button__link { background: transparent; color: var(--color-forest); border: 2px solid var(--color-forest); }
.tsg-prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tsg-prose th, .tsg-prose td { border-bottom: 1px solid var(--color-border); padding: 12px; text-align: left; }
.tsg-prose th { font-family: var(--font-heading); color: var(--color-forest); }
.tsg-prose .has-text-align-center { text-align: center; }
.tsg-prose--light { color: rgba(255, 255, 255, 0.85); }
.tsg-prose--light h2, .tsg-prose--light h3, .tsg-prose--light h4, .tsg-prose--light strong { color: #fff; }
.tsg-prose--light a { color: var(--color-accent); }

/* Callout box (core group block with this class, or used directly) */
.tsg-prose .tsg-callout, .tsg-prose .is-style-tsg-callout {
  background: var(--color-sage); border-radius: var(--radius-md); padding: 24px 28px;
}

/* ---------- Areas ---------- */
.area-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.area-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-card);
  overflow: hidden; text-decoration: none; box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.area-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.area-card-img { display: block; aspect-ratio: 16/10; overflow: hidden; }
.area-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-img); }
.area-card:hover .area-card-img img { transform: scale(1.05); }
.area-card-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px; flex: 1; }
.area-card-tag { display: inline-flex; align-items: center; gap: 6px; font: 600 0.72rem var(--font-heading); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); }
.area-card-tag svg { width: 14px; height: 14px; }
.area-card-title { font: 800 1.2rem/1.2 var(--font-heading); color: var(--color-forest); }
.area-card-text { font-size: 0.9rem; color: var(--color-muted); line-height: 1.55; flex: 1; }
.area-card .card-link { margin-top: 6px; }
.area-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; }
.area-pills a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
  border-radius: var(--radius-pill); background: #fff; border: 1px solid var(--color-border);
  color: var(--color-forest); font: 600 0.9rem var(--font-heading); text-decoration: none;
  transition: all var(--transition-base);
}
.area-pills a svg { color: var(--color-accent); width: 15px; height: 15px; }
.area-pills a:hover { border-color: var(--color-accent); background: var(--color-sage); }
.section-forest .area-pills a, .section-dark .area-pills a { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.15); color: #fff; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-card);
  overflow: hidden; box-shadow: var(--shadow-card); border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.post-card-img { display: block; aspect-ratio: 3/2; overflow: hidden; background: var(--color-sage); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-img); }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--color-moss), var(--color-forest)); }
.post-card-body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-meta { display: flex; gap: 12px; align-items: center; font-size: 0.78rem; color: var(--color-muted); font-family: var(--font-heading); }
.post-card-cat { background: rgba(var(--color-accent-rgb), 0.12); color: var(--color-accent-dark); padding: 3px 10px; border-radius: var(--radius-pill); font-weight: 600; }
.post-card-title { font: 700 1.18rem/1.3 var(--font-heading); color: var(--color-forest); }
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { color: var(--color-accent); }
.post-card-excerpt { font-size: 0.92rem; color: var(--color-muted); line-height: 1.6; flex: 1; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; }
.post-main { max-width: 760px; }
.post-meta { display: flex; gap: 10px; color: var(--color-muted); font-size: 0.88rem; font-family: var(--font-heading); margin-bottom: 28px; }
.post-sidebar { position: sticky; top: calc(var(--header-height) + 24px); display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--color-forest); color: rgba(255, 255, 255, 0.8); border-radius: var(--radius-card); padding: 28px; font-size: 0.92rem; line-height: 1.6; }
.sidebar-card p + p, .sidebar-card p + .btn { margin-top: 14px; }
.sidebar-card .btn { margin-top: 18px; }
.sidebar-card .sidebar-card-title { font: 800 1.2rem var(--font-heading); color: #fff; }
.sidebar-phone { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; color: #fff; font: 700 1.05rem var(--font-heading); text-decoration: none; }
.sidebar-card--plain { background: var(--color-offwhite); color: var(--color-text); border: 1px solid var(--color-border); }
.sidebar-card--plain .sidebar-card-title, .sidebar-card.sidebar-card--plain .sidebar-card-title { color: var(--color-forest); margin-bottom: 10px; }
.sidebar-links { list-style: none; }
.sidebar-links li + li { border-top: 1px solid var(--color-border); }
.sidebar-links a { display: block; padding: 10px 0; color: var(--color-forest); text-decoration: none; font-weight: 500; }
.sidebar-links a:hover { color: var(--color-accent); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 40px; }
.post-tags a { display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--color-offwhite); color: var(--color-forest); font-size: 0.82rem; text-decoration: none; }
.post-navigation { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--color-border); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation a { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.post-navigation .nav-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); font-family: var(--font-heading); }
.post-navigation .nav-title { font: 700 1rem/1.35 var(--font-heading); color: var(--color-forest); }
.post-navigation a:hover .nav-title { color: var(--color-accent); }

.pagination { margin-top: 56px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 44px; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-btn); border: 1px solid var(--color-border); background: #fff;
  color: var(--color-forest); text-decoration: none; font: 600 0.9rem var(--font-heading);
}
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.search-bar { max-width: 560px; margin: 0 auto 48px; }
.search-form { display: flex; gap: 10px; }
.search-field { flex: 1; padding: 13px 16px; border: 1.5px solid var(--color-border); border-radius: var(--radius-btn); font-size: 1rem; }
.search-field:focus { outline: none; border-color: var(--color-accent); }
.tsg-empty { text-align: center; padding: 40px 0; }
.tsg-empty p { margin-bottom: 20px; font-size: 1.1rem; }

/* ---------- Contact details ---------- */
.contact-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: stretch; }
.contact-info-grid--single { grid-template-columns: 1fr; max-width: 760px; }
.contact-info-main .section-header { margin-bottom: 32px; }
.contact-cards { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-card {
  display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm);
}
.contact-card-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(var(--color-accent-rgb), 0.12); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-card-icon svg { width: 20px; height: 20px; }
.contact-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-card-label { font: 600 0.72rem var(--font-heading); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); }
.contact-card-value { font: 700 1.05rem/1.4 var(--font-heading); color: var(--color-forest); text-decoration: none; overflow-wrap: anywhere; }
.contact-card-value--text { font-weight: 600; font-size: 0.95rem; }
a.contact-card-value:hover { color: var(--color-accent); }
.contact-card-sub { font-size: 0.85rem; color: var(--color-muted); text-decoration: none; }
.contact-map { border-radius: var(--radius-card); overflow: hidden; min-height: 420px; box-shadow: var(--shadow-card); background: var(--color-sage); }
.contact-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- Enquiry form ---------- */
.tsg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.quote-form { position: relative; }
.quote-form .btn[disabled] { opacity: 0.7; cursor: progress; }
.form-message {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 0.9rem; line-height: 1.5; text-align: center;
  background: var(--color-sage); color: var(--color-forest);
}
.form-message.is-success { background: #e3f3d8; color: #24521a; border: 1px solid #b6dc9c; }
.form-message.is-error { background: #fdecec; color: #8a1f1f; border: 1px solid #f3c2c2; }
.form-group.has-error input, .form-group.has-error select, .form-group.has-error textarea { border-color: #e05555; }
.cta-points { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .area-grid { grid-template-columns: repeat(3, 1fr); }
  .post-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
}
@media (max-width: 1024px) {
  .contact-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .area-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
  .about-grid--reverse .about-images { order: 0; }
}
@media (max-width: 768px) {
  .page-hero { min-height: 0; padding: calc(var(--header-height) + 40px) 0 48px; }
  .page-hero--tall { min-height: 480px; }
  .page-hero-sub { font-size: 1rem; }
  .tsg-text-logo .logo-icon { width: 34px; height: 34px; }
  .tsg-text-logo .logo-elm { font-size: 1.05rem; }
  .site-header .tsg-text-logo .logo-landscaping { display: none; }
  .contact-cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .area-grid, .post-grid { grid-template-columns: 1fr; }
  .page-hero-ctas .btn { width: 100%; justify-content: center; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { grid-column: 1; text-align: left; }
  .search-form { flex-direction: column; }
}

/* FAQ questions are wrapped in <h3> for the document outline; the button keeps its own styling. */
.faq-heading { margin: 0; font: inherit; }

/* Header phones: two stacked links inside .header-phone (was one link). */
.header-phone-numbers a { color: inherit; text-decoration: none; }
.header-phone-numbers a:hover { color: var(--color-accent); }
.header-phone:hover { color: rgba(255, 255, 255, 0.9); }
.site-header.scrolled .header-phone:hover, body.tsg-solid-header .header-phone:hover { color: var(--color-forest); }

/* Header fit on smaller desktops: tighten the menu and drop the second
   phone number, then hand over to the hamburger menu a little earlier than
   the original 1024px so nothing is pushed off-screen. */
@media (max-width: 1280px) {
  .nav-link, .nav-dropdown-trigger { padding: 8px 10px; }
  .header-inner { gap: 16px; }
}
@media (max-width: 1220px) {
  .header-phone-secondary { display: none; }
  .tsg-text-logo .logo-landscaping { display: none; }
  /* Room for a longer business name ("Elm Tree Surgery Galway"). */
  .nav-link, .nav-dropdown-trigger { padding: 8px 7px; }
  .header-inner { gap: 12px; }
}
@media (max-width: 1180px) {
  .site-nav, .header-actions { display: none; }
  .hamburger { display: flex; }
}

/* Stats band: as many columns as there are tiles (max 4) on desktop; on
   smaller screens an odd last tile spans the full row. */
@media (min-width: 1025px) {
  .stats-grid { grid-template-columns: repeat(var(--stat-cols, 4), 1fr); }
}
@media (max-width: 1024px) {
  .stats-grid > .stat-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Trust bar: let columns shrink and the small grey line wrap, so longer
   wording never pushes the row wider than the page. */
@media (min-width: 769px) {
  .trust-list { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); }
  .trust-item { min-width: 0; }
  .trust-text { min-width: 0; }
  .trust-text span { white-space: normal; line-height: 1.4; }
}
@media (min-width: 769px) and (max-width: 1280px) {
  .trust-item { padding: 14px 16px; gap: 10px; }
  .trust-text strong { white-space: normal; line-height: 1.3; }
}

/* Reviews block: editor-only placeholder for the live Google reviews widget. */
.tsg-reviews-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto; padding: 36px 28px; text-align: center; background: #fff; border: 2px dashed var(--color-border); border-radius: var(--radius-card); }
.tsg-reviews-placeholder__stars { display: flex; gap: 3px; }
.tsg-reviews-placeholder strong { font: 700 1.1rem var(--font-heading); color: var(--color-forest); }
.tsg-reviews-placeholder span { font-size: 0.9rem; color: var(--color-muted); }

/* Hero background video: an oversized 16:9 YouTube player centred behind
   the overlay, hidden until it is actually playing (the image shows until
   then). pointer-events: none keeps it purely decorative. */
.hero-video { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.hero-video iframe {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw;          /* 16:9 at full width */
  min-height: 100%; min-width: 177.78vh;  /* ...or full height */
  transform: translate(-50%, -50%) scale(1.15); /* crop YouTube's edges/title */
  border: 0;
}
.hero--video-playing .hero-video { opacity: 1; }
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* Services drop-down: a contained panel centred under the menu bar, rather
   than a full-width band across the header. */
@media (min-width: 1181px) {
  .mega-menu {
    left: 50%;
    right: auto;
    width: min(860px, calc(100vw - 48px));
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    transform: translate(-50%, -8px);
  }
  /* Invisible bridge over the gap between the menu item and the panel, so
     the panel stays open while the pointer travels down to it. */
  .mega-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 40px;
  }
  .has-dropdown:hover .mega-menu,
  .has-dropdown.active .mega-menu {
    transform: translate(-50%, 0);
  }
  .mega-menu-inner.container {
    max-width: none;
    margin: 0;
    padding: 32px 36px;
    grid-template-columns: 1fr 1.15fr;
  }
}

/* Contact details cards: slightly smaller text and tighter padding so the
   email address fits on one line. */
.contact-card { padding: 18px 18px 18px 16px; gap: 14px; }
.contact-card-icon { width: 40px; height: 40px; }
.contact-card-value { font-size: 0.95rem; }
.contact-card-value--text { font-size: 0.88rem; }
.contact-card-sub { font-size: 0.8rem; }
/* Small laptops: the details column beside the map is too narrow for two
   cards across, so stack them. */
@media (min-width: 1025px) and (max-width: 1260px) {
  .contact-info-grid:not(.contact-info-grid--single) .contact-cards { grid-template-columns: 1fr; }
}

/* Image logo (wide): smaller than the static design's 96px so the menu fits.
   The Editorial and Rugged skins set their own heights. */
@media (min-width: 769px) {
  .site-header .logo-img { height: 72px; }
}
.mobile-menu-header .logo-img { height: 44px; width: auto; }
.logo-img--footer { height: 64px; }

/* Hero photo focus (add under Advanced → Additional CSS class on the hero):
   "hero--img-right" keeps more of the right of the photo, nudging a subject
   on the left away from centred text. */
@media (min-width: 1280px) {
  .hero.hero--img-right .hero-bg img { object-position: 80% center; }
}
@media (min-width: 769px) and (max-width: 1279px) {
  /* Taller hero here, so the photo is cropped at the sides: keep the left subject in shot. */
  .hero.hero--img-right .hero-bg img { object-position: 25% center; }
}
