/* Handyman Sunderland - Main Stylesheet
   Font: Atkinson Hyperlegible
   Designed for accessibility and clarity
*/

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  --primary: #1d4e89;
  --primary-dark: #143862;
  --primary-light: #2c6ab0;
  --accent: #f5a623;
  --accent-dark: #d68b10;
  --dark: #1a1a1a;
  --text: #2b2b2b;
  --text-light: #555;
  --muted: #7a7a7a;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --bg-card: #ffffff;
  --border: #e2e6ec;
  --success: #2e8b57;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --radius: 6px;
  --radius-lg: 12px;
  --max-width: 1180px;
  --header-height: 80px;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
  margin-bottom: 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 1.4em; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); margin-top: 1.2em; }
h4 { font-size: 1.15rem; margin-top: 1em; }

p { margin-bottom: 1.1em; }

ul, ol { margin: 0 0 1.1em 1.4em; }
li { margin-bottom: 0.4em; }

/* ============ HEADER ============ */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo svg { width: 44px; height: 44px; flex-shrink: 0; }

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 1.15rem; color: var(--primary-dark); }
.logo-text small { font-size: 0.7rem; color: var(--accent-dark); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 6px; }

.main-nav a {
  padding: 10px 14px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.main-nav a:hover, .main-nav a.active {
  background: var(--bg-soft);
  color: var(--primary);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--dark) !important;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition);
  text-decoration: none;
  box-shadow: 0 2px 0 var(--accent-dark);
}

.btn:hover {
  background: var(--accent-dark);
  color: var(--dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary { background: var(--primary); color: #fff !important; box-shadow: 0 2px 0 var(--primary-dark); }
.btn-primary:hover { background: var(--primary-dark); color: #fff !important; }

.btn-large { padding: 14px 32px; font-size: 1.05rem; }

/* ============ MOBILE MENU ============ */
.menu-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block;
  padding: 14px 24px;
  color: var(--text);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:hover { background: var(--bg-soft); color: var(--primary); }

.mobile-nav .btn { margin: 16px 24px; display: block; text-align: center; }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 64px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(245,166,35,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero h1 { color: #fff; margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }

.hero p.lead {
  font-size: 1.2rem;
  max-width: 720px;
  margin-bottom: 28px;
  opacity: 0.95;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============ BREADCRUMBS ============ */
.breadcrumbs {
  background: var(--bg-soft);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.breadcrumbs ol { display: flex; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li::after { content: '/'; margin: 0 8px; color: var(--muted); }
.breadcrumbs li:last-child::after { display: none; }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs li[aria-current="page"] { color: var(--primary); font-weight: 700; }

/* ============ MAIN CONTENT ============ */
main { min-height: 60vh; }

.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 900px) {
  .content-grid.with-sidebar { grid-template-columns: 1fr 320px; }
}

.content-wrap p { font-size: 1.02rem; }

.feature-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 24px 0;
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}

/* ============ CARDS ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 5px;
  transition: all var(--transition);
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }

.card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.card-body { padding: 20px 22px; }

.card h3 { margin-top: 0; font-size: 1.2rem; }
.card h3 a { color: var(--primary-dark); }
.card p { color: var(--text-light); font-size: 0.95rem; }

/* ============ SIDEBAR ============ */
.sidebar { font-size: 0.95rem; }

.sidebar-box {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--accent);
}

.sidebar-box h3 { margin-top: 0; font-size: 1.1rem; color: var(--primary-dark); }

.sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.sidebar-box li { margin-bottom: 6px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.sidebar-box li:last-child { border-bottom: none; }
.sidebar-box a { color: var(--text); font-weight: 700; }
.sidebar-box a:hover { color: var(--primary); }

/* ============ TESTIMONIALS ============ */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.testimonial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}

.testimonial::before {
  content: '"';
  font-size: 4rem;
  color: var(--accent);
  position: absolute;
  top: -10px;
  left: 18px;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial p { font-style: italic; margin-bottom: 14px; color: var(--text); }
.testimonial cite { font-style: normal; font-weight: 700; color: var(--primary-dark); font-size: 0.95rem; }
.testimonial .stars { color: var(--accent); margin-bottom: 8px; font-size: 1.05rem; }

/* ============ FAQ ============ */
.faq-list { margin: 24px 0; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary-dark);
  list-style: none;
  position: relative;
  padding-right: 48px;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--accent-dark);
  transition: transform var(--transition);
}

.faq-item[open] summary::after { content: '−'; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-soft); }
.faq-item .faq-answer { padding: 0 20px 18px; color: var(--text-light); }

/* ============ FORM ============ */
/* ============ CONTACT FORM ============ */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 24px 0 32px;
  box-shadow: var(--shadow-sm);
}

/* Both old (.form-group) and new (.form-row) class names are styled */
.form-group, .form-row { margin-bottom: 22px; }

.form-group label, .form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.form-group label .required,
.form-group label .req,
.form-row label .required,
.form-row label .req { color: #c0392b; margin-left: 2px; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select,
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #a0a8b3;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover,
.form-row input:hover,
.form-row textarea:hover,
.form-row select:hover {
  border-color: #c2cad6;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29,78,137,0.12);
  background: #fff;
}

.form-group textarea,
.form-row textarea { min-height: 150px; resize: vertical; line-height: 1.55; }

/* Custom select arrow */
.form-group select,
.form-row select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4e89' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 44px;
  cursor: pointer;
}

/* Checkbox row */
.form-group.checkbox,
.form-row.form-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: #f6f8fb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}

.form-row.form-check:hover { border-color: var(--primary-light); }
.form-row.form-check:has(input:checked) { background: #eef3fa; border-color: var(--primary); }

.form-group.checkbox input[type="checkbox"],
.form-row.form-check input[type="checkbox"] {
  margin-top: 2px;
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-group.checkbox label,
.form-row.form-check label {
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0;
  color: var(--text);
  cursor: pointer;
}

/* Submit button */
.contact-form button[type="submit"] {
  width: 100%;
  padding: 16px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-top: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(29,78,137,0.25);
}

.contact-form button[type="submit"]:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29,78,137,0.35);
}

.contact-form button[type="submit"]:active {
  transform: translateY(0);
}

/* Status messages */
.form-message {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-message.error,
#form-error[style*="block"] {
  background: #fde7e7;
  color: #7a1f1f;
  border-left: 4px solid #c0392b;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 0.95rem;
}
.form-message.success {
  background: #e6f4ec;
  color: #1e7a3e;
  border-left: 4px solid #1e7a3e;
}

/* Two-column layout for short fields on desktop */
@media (min-width: 720px) {
  .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .form-grid-2 .form-row { margin-bottom: 0; }
}

/* Contact page hero polish */
.contact-form-section h2:first-of-type {
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 8px;
}
.contact-form-section .intro-text {
  color: var(--text-light);
  margin-bottom: 20px;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--primary-dark);
  color: #d4dde9;
  padding: 56px 0 24px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  margin-bottom: 36px;
}

.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.08em; }

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: #b9c5d6; font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }

.footer-col p { color: #b9c5d6; font-size: 0.95rem; }

.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-logo svg { width: 40px; height: 40px; }
.footer-logo strong { color: #fff; font-size: 1.05rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  text-align: center;
  font-size: 0.88rem;
  color: #9aa8bd;
}
.footer-bottom a { color: #b9c5d6; }

/* ============ MAP ============ */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 24px 0;
  aspect-ratio: 16/9;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ============ TWO-COL GALLERY ============ */
.image-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.image-row img { border-radius: var(--radius); box-shadow: var(--shadow-sm); aspect-ratio: 3/2; object-fit: cover; }

/* ============ SERVICE LIST ============ */
.service-list {
  columns: 2;
  column-gap: 32px;
  margin: 20px 0 28px 0;
  list-style: none;
  padding: 0;
}
.service-list li {
  padding: 6px 0 6px 24px;
  position: relative;
  break-inside: avoid;
  margin: 0;
  font-size: 0.95rem;
}
.service-list li::before {
  content: '✓';
  color: var(--accent-dark);
  font-weight: 700;
  position: absolute;
  left: 0;
}

/* ============ AREAS LIST ============ */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.areas-grid a {
  display: block;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
}
.areas-grid a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ HIGHLIGHT BOXES ============ */
.cta-block {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin: 36px 0;
}
.cta-block h3 { color: #fff; margin-top: 0; }
.cta-block p { font-size: 1.1rem; margin-bottom: 18px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
  .main-nav, .header-inner .btn { display: none; }
  .menu-toggle { display: inline-block; }
  .hero { padding: 48px 0 56px; }
  .section { padding: 40px 0; }
  .service-list { columns: 1; }
  .header-inner { gap: 12px; }
  .logo-text small { display: none; }
  .contact-form { padding: 22px; }
  h1 { font-size: 1.85rem; }
  body { font-size: 0.98rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* ============ ACCESSIBILITY ============ */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.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;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
}
.skip-link:focus { top: 0; color: #fff !important; }
