/*
Theme Name: SFS Carport
Theme URI: https://sfscarport.co.za
Author: SFS Carport
Author URI: https://sfscarport.co.za
Description: A premium, fast, mobile-first WordPress theme built for SFS Carport, a Gauteng-based carport and outdoor structure installation company. Optimized for local SEO, lead generation (calls and quote requests), and Core Web Vitals performance.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: sfs-carport
Tags: custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, one-column, accessibility-ready, block-styles

This theme, like WordPress, is licensed under the GPL.
*/

/* =========================================================
   1. CSS VARIABLES / DESIGN TOKENS
   ========================================================= */
:root {
  /* Brand palette */
  --sfs-light-blue: #eaf4fb;
  --sfs-blue: #1f6fb2;
  --sfs-blue-dark: #124a78;
  --sfs-white: #ffffff;
  --sfs-steel-50: #f4f6f7;
  --sfs-steel-100: #e7ebee;
  --sfs-steel-300: #b9c2c9;
  --sfs-steel-500: #64707a;
  --sfs-steel-700: #3b444c;
  --sfs-steel-900: #1c2226;
  --sfs-accent: #d9591f;       /* steel/rust orange accent */
  --sfs-accent-dark: #b5450f;
  --sfs-success: #2f7d4f;

  --sfs-font-heading: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --sfs-font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  --sfs-radius: 10px;
  --sfs-radius-sm: 6px;
  --sfs-shadow-sm: 0 2px 8px rgba(28, 34, 38, 0.08);
  --sfs-shadow-md: 0 8px 24px rgba(28, 34, 38, 0.12);
  --sfs-container: 1200px;
  --sfs-header-height: 76px;
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sfs-font-body);
  color: var(--sfs-steel-900);
  background: var(--sfs-white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sfs-blue); text-decoration: none; }
a:hover { color: var(--sfs-blue-dark); }
ul { padding-left: 1.2em; }
h1, h2, h3, h4, h5 {
  font-family: var(--sfs-font-heading);
  color: var(--sfs-steel-900);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 600;
}
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; }
.container {
  width: 100%;
  max-width: var(--sfs-container);
  margin: 0 auto;
  padding: 0 20px;
}
.sr-only {
  position: absolute; 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: -999px; top: 0; background: var(--sfs-accent);
  color: #fff; padding: 12px 18px; z-index: 10000; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }
section { padding: 64px 0; }
section.tight { padding: 40px 0; }
.bg-light-blue { background: var(--sfs-light-blue); }
.bg-steel { background: var(--sfs-steel-50); }
.bg-dark { background: var(--sfs-steel-900); color: #fff; }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: #fff; }
.text-center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sfs-accent);
  margin-bottom: 10px;
}
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head.align-left { margin: 0 0 40px; text-align: left; }

/* =========================================================
   3. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--sfs-radius-sm);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  line-height: 1.1;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--sfs-accent); color: #fff; }
.btn-primary:hover { background: var(--sfs-accent-dark); color: #fff; box-shadow: var(--sfs-shadow-md); }
.btn-secondary { background: #fff; color: var(--sfs-blue-dark); border-color: var(--sfs-white); }
.btn-secondary:hover { color: var(--sfs-blue-dark); background: var(--sfs-steel-100); }
.btn-outline { background: transparent; color: var(--sfs-blue-dark); border-color: var(--sfs-blue); }
.btn-outline:hover { background: var(--sfs-blue); color: #fff; }
.btn-call { background: var(--sfs-blue); color: #fff; }
.btn-call:hover { background: var(--sfs-blue-dark); color: #fff; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-row.center { justify-content: center; }

/* =========================================================
   4. HEADER
   ========================================================= */
#masthead {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,0.97);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--sfs-steel-100);
  height: var(--sfs-header-height);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-branding a { display: flex; align-items: center; gap: 10px; color: var(--sfs-steel-900); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 8px;
  background: linear-gradient(145deg, var(--sfs-blue), var(--sfs-blue-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-family: var(--sfs-font-heading);
  flex-shrink: 0;
}
.site-title {
  font-family: var(--sfs-font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
  color: var(--sfs-steel-900);
  line-height: 1.1;
}
.site-title span { display: block; font-size: 0.65rem; font-weight: 600; color: var(--sfs-steel-500); letter-spacing: 0.06em; text-transform: uppercase; }

.main-navigation { display: none; }
@media (min-width: 992px) {
  .main-navigation { display: block; }
}
.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
}
.main-navigation li { position: relative; }
.main-navigation a {
  color: var(--sfs-steel-700);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 8px 2px;
}
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--sfs-blue); }
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  box-shadow: var(--sfs-shadow-md);
  border-radius: var(--sfs-radius-sm);
  padding: 10px 0;
  min-width: 240px;
  list-style: none;
  margin: 0;
  z-index: 20;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { display: block; }
.main-navigation .sub-menu a { display: block; padding: 10px 18px; white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-call-btn { display: none; }
@media (min-width: 560px) {
  .header-call-btn { display: inline-flex; }
}
.header-quote-btn { padding: 12px 20px; font-size: 0.92rem; }

.mobile-toggle {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--sfs-steel-100);
  border-radius: var(--sfs-radius-sm);
  background: #fff;
  cursor: pointer;
}
@media (min-width: 992px) { .mobile-toggle { display: none; } }
.mobile-toggle span, .mobile-toggle::before, .mobile-toggle::after { display: none; }
.mobile-toggle svg { width: 22px; height: 22px; }

.mobile-menu-panel {
  display: none;
  position: fixed;
  inset: var(--sfs-header-height) 0 0 0;
  background: #fff;
  z-index: 998;
  overflow-y: auto;
  padding: 20px;
}
.mobile-menu-panel.is-open { display: block; }
.mobile-menu-panel ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu-panel li { border-bottom: 1px solid var(--sfs-steel-100); }
.mobile-menu-panel a { display: block; padding: 16px 4px; font-weight: 600; font-size: 1.05rem; color: var(--sfs-steel-900); }
.mobile-menu-panel .sub-menu { padding-left: 14px; }
.mobile-menu-cta { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }

@media (min-width: 992px) { .site-header-mobile-call { display: none; } }

/* =========================================================
   5. HERO
   ========================================================= */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--sfs-blue-dark) 0%, var(--sfs-blue) 55%, #2b86c9 100%);
  color: #fff;
  overflow: hidden;
  padding: 72px 0;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 60px);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  gap: 40px;
  position: relative;
  z-index: 1;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p.lead { font-size: 1.15rem; color: rgba(255,255,255,0.92); max-width: 560px; margin-bottom: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; }
.hero-badges span { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: rgba(255,255,255,0.9); }
.hero-badges svg { width: 18px; height: 18px; color: var(--sfs-accent); flex-shrink: 0; }
.hero-media {
  border-radius: var(--sfs-radius);
  overflow: hidden;
  box-shadow: var(--sfs-shadow-md);
  aspect-ratio: 4/3;
  background: var(--sfs-steel-300);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.demo-flag {
  position: relative;
}
.demo-flag::before {
  content: "DEMO IMAGE — REPLACE";
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(28,34,38,0.75); color: #fff;
  font-size: 0.65rem; letter-spacing: 0.04em; font-weight: 700;
  padding: 4px 8px; border-radius: 4px; z-index: 2;
}

/* =========================================================
   6. BENEFIT / TRUST STRIP
   ========================================================= */
.benefit-strip { background: var(--sfs-light-blue); padding: 40px 0; }
.benefit-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .benefit-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .benefit-grid { grid-template-columns: repeat(6, 1fr); } }
.benefit-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.benefit-item .icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: var(--sfs-blue); box-shadow: var(--sfs-shadow-sm);
}
.benefit-item .icon svg { width: 22px; height: 22px; }
.benefit-item span.label { font-size: 0.88rem; font-weight: 600; color: var(--sfs-steel-700); }

/* =========================================================
   7. CARDS (services, locations, gallery, blog, faq)
   ========================================================= */
.card-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid.cols-2 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px) { .card-grid.cols-3 { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 900px) { .card-grid.cols-4 { grid-template-columns: repeat(4,1fr); } }

.service-card {
  background: #fff;
  border: 1px solid var(--sfs-steel-100);
  border-radius: var(--sfs-radius);
  overflow: hidden;
  box-shadow: var(--sfs-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--sfs-shadow-md); }
.service-card .card-media { aspect-ratio: 16/10; background: var(--sfs-steel-100); overflow: hidden; position: relative; }
.service-card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.service-card .card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.service-card h3 { margin-bottom: 4px; font-size: 1.15rem; }
.service-card .card-link { margin-top: auto; font-weight: 700; color: var(--sfs-blue); display: inline-flex; align-items: center; gap: 6px; }
.service-card .card-link svg { width: 16px; height: 16px; }

.location-pill-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.location-pill {
  background: #fff; border: 1px solid var(--sfs-steel-100);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  color: var(--sfs-steel-700);
}
.location-pill:hover { border-color: var(--sfs-blue); color: var(--sfs-blue); background: var(--sfs-light-blue); }

.gallery-grid { display: grid; gap: 16px; grid-template-columns: repeat(2,1fr); }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3,1fr); } }
.gallery-item { position: relative; border-radius: var(--sfs-radius-sm); overflow: hidden; aspect-ratio: 4/3; background: var(--sfs-steel-100); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 12px; font-size: 0.8rem; color: #fff; background: linear-gradient(to top, rgba(0,0,0,0.65), transparent); }

.faq-item { border-bottom: 1px solid var(--sfs-steel-100); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--sfs-blue); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding-top: 10px; color: var(--sfs-steel-700); }

.blog-card .card-meta { font-size: 0.8rem; color: var(--sfs-steel-500); text-transform: uppercase; letter-spacing: 0.04em; }

/* =========================================================
   8. WHY CHOOSE / SPLIT SECTIONS
   ========================================================= */
.split-section { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split-section { grid-template-columns: 1fr 1fr; } }
.split-media { border-radius: var(--sfs-radius); overflow: hidden; box-shadow: var(--sfs-shadow-sm); aspect-ratio: 4/3; background: var(--sfs-steel-100); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.reasons-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.reasons-list li { display: flex; gap: 14px; align-items: flex-start; }
.reasons-list .icon {
  width: 34px; height: 34px; border-radius: 8px; background: var(--sfs-light-blue);
  color: var(--sfs-blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.reasons-list .icon svg { width: 18px; height: 18px; }

/* =========================================================
   9. CTA BANNER
   ========================================================= */
.cta-banner {
  background: var(--sfs-steel-900);
  color: #fff;
  border-radius: var(--sfs-radius);
  padding: 44px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-banner h2 { color: #fff; margin-bottom: 6px; }
.cta-banner p { color: rgba(255,255,255,0.8); margin-bottom: 0; }

/* =========================================================
   10. QUOTE FORM
   ========================================================= */
.quote-form-wrap {
  background: #fff;
  border: 1px solid var(--sfs-steel-100);
  border-radius: var(--sfs-radius);
  padding: 30px;
  box-shadow: var(--sfs-shadow-sm);
}
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 640px) { .form-row.two-col { grid-template-columns: 1fr 1fr; } }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; color: var(--sfs-steel-700); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--sfs-steel-300);
  border-radius: var(--sfs-radius-sm); font-family: inherit; font-size: 1rem; background: #fff;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--sfs-blue); box-shadow: 0 0 0 3px rgba(31,111,178,0.15);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-hp { position: absolute !important; left: -9999px !important; top: -9999px !important; }
.form-note { font-size: 0.82rem; color: var(--sfs-steel-500); margin-top: 10px; }
.form-success { background: #eaf7ef; border: 1px solid #bfe6cc; color: var(--sfs-success); padding: 16px; border-radius: var(--sfs-radius-sm); margin-bottom: 20px; }
.form-error { background: #fdeeee; border: 1px solid #f3c6c6; color: #a12a2a; padding: 16px; border-radius: var(--sfs-radius-sm); margin-bottom: 20px; }

/* =========================================================
   11. BREADCRUMBS
   ========================================================= */
.breadcrumbs { padding: 14px 0; font-size: 0.85rem; color: var(--sfs-steel-500); background: var(--sfs-steel-50); }
.breadcrumbs a { color: var(--sfs-steel-500); }
.breadcrumbs a:hover { color: var(--sfs-blue); }
.breadcrumbs .sep { margin: 0 6px; }

/* =========================================================
   12. PAGE HERO (interior pages)
   ========================================================= */
.page-hero {
  background: linear-gradient(120deg, var(--sfs-blue-dark), var(--sfs-blue));
  color: #fff; padding: 56px 0;
}
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.9); max-width: 680px; margin-bottom: 0; }

/* =========================================================
   13. CONTENT / PROSE
   ========================================================= */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul { margin-bottom: 1.2em; }
.two-col-layout { display: grid; gap: 40px; }
@media (min-width: 992px) { .two-col-layout { grid-template-columns: 2.2fr 1fr; } }
.sidebar-box {
  background: var(--sfs-light-blue);
  border-radius: var(--sfs-radius);
  padding: 26px;
  position: sticky; top: calc(var(--sfs-header-height) + 20px);
}
.sidebar-box h3 { margin-bottom: 14px; }
.sidebar-box .btn { margin-top: 6px; }
.sidebar-list { list-style: none; padding: 0; margin: 0 0 18px; }
.sidebar-list li { padding: 8px 0; border-bottom: 1px solid rgba(31,111,178,0.12); }
.sidebar-list a { font-weight: 600; }

/* =========================================================
   14. FOOTER
   ========================================================= */
#colophon { background: var(--sfs-steel-900); color: rgba(255,255,255,0.85); padding: 60px 0 24px; }
.footer-grid { display: grid; gap: 34px; grid-template-columns: 1fr; margin-bottom: 40px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-desc { font-size: 0.92rem; color: rgba(255,255,255,0.65); max-width: 320px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: rgba(255,255,255,0.75); font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-call { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; font-size: 1.05rem; margin-top: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
}
.footer-bottom ul { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }

/* =========================================================
   15. FLOATING MOBILE CALL BUTTON
   ========================================================= */
.floating-call-btn {
  position: fixed; bottom: 18px; right: 18px; z-index: 900;
  background: var(--sfs-accent); color: #fff;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sfs-shadow-md);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.floating-call-btn.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.floating-call-btn svg { width: 26px; height: 26px; }
@media (min-width: 992px) { .floating-call-btn { display: none; } }

/* =========================================================
   16. MISC UTILITIES
   ========================================================= */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.tag-pill { background: var(--sfs-steel-100); color: var(--sfs-steel-700); padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.stat-row { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 10px; }
.demo-notice {
  background: #fff7e6; border: 1px solid #ffe2a8; color: #7a5300;
  padding: 12px 16px; border-radius: var(--sfs-radius-sm); font-size: 0.85rem; margin-bottom: 24px;
}
.wp-pagination { display: flex; gap: 8px; margin-top: 30px; }
.wp-pagination a, .wp-pagination span { padding: 8px 14px; border: 1px solid var(--sfs-steel-100); border-radius: 6px; }

/* Print */
@media print { #masthead, #colophon, .floating-call-btn { display: none; } }
