/* ============================================
   Emergency Plumber Birmingham — Lead Gen Site
   Professional, trust-building, mobile-first
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0B1D3A;
  --navy-light: #132D54;
  --blue: #1565C0;
  --blue-light: #1E88E5;
  --orange: #FF6F00;
  --orange-hover: #E65100;
  --green: #2E7D32;
  --white: #FFFFFF;
  --off-white: #F5F7FA;
  --gray-100: #F0F2F5;
  --gray-200: #E0E3E8;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Utility --- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 70px 0; }
.section-alt { background: var(--off-white); }
.text-center { text-align: center; }
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* --- Top Bar --- */
.top-bar {
  background: var(--navy);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a { color: var(--white); }
.top-bar .badge {
  background: var(--green);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* --- Header --- */
.header {
  background: var(--white);
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}
.logo span { color: var(--blue); }
.logo small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.5px;
}
nav { display: flex; align-items: center; gap: 28px; }
nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: color 0.2s;
}
nav a:hover { color: var(--blue); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: 0.3s;
}

/* --- CTA Button --- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
}
.btn-cta:hover { background: var(--orange-hover); transform: translateY(-1px); }
.btn-cta-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: 0.2s;
}
.btn-secondary:hover { background: var(--blue-light); }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(21, 101, 192, 0.08);
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 125, 50, 0.2);
  border: 1px solid rgba(46, 125, 50, 0.4);
  color: #81C784;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  animation: pulse 1.5s infinite;
}
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero h1 .highlight { color: var(--orange); }
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 30px;
  max-width: 520px;
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}
.hero-trust-item { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.hero-trust-item strong {
  display: block;
  font-size: 1.6rem;
  color: var(--white);
  font-family: 'Outfit', sans-serif;
}

/* --- Postcode Checker --- */
.postcode-checker input:focus { outline: 2px solid var(--orange); }

/* --- Advice Quick Links --- */
.advice-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.advice-links a {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  transition: 0.2s;
}
.advice-links a:hover { border-color: var(--blue); color: var(--blue); }

/* --- Advice Content --- */
.advice-section { margin-bottom: 48px; padding-top: 20px; }
.advice-section h2 { margin-bottom: 16px; }
.advice-section p { color: var(--gray-700); margin-bottom: 12px; font-size: 0.95rem; }

/* --- Trust Bar --- */
.trust-bar {
  background: var(--white);
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-200);
}
.trust-items {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
}
.trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.service-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.service-card p { color: var(--gray-500); font-size: 0.95rem; }

/* --- Why Choose Us --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.why-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.why-number {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.why-card h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.why-card p { color: var(--gray-500); font-size: 0.93rem; }

/* --- Areas --- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.area-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  font-weight: 600;
  color: var(--navy);
  transition: 0.2s;
}
.area-card:hover { border-color: var(--blue); color: var(--blue); }
.area-card small { display: block; color: var(--gray-500); font-weight: 400; font-size: 0.82rem; margin-top: 4px; }

/* --- Reviews --- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.review-stars { color: #FFC107; font-size: 1.1rem; margin-bottom: 12px; }
.review-card p { color: var(--gray-700); font-size: 0.95rem; margin-bottom: 14px; font-style: italic; }
.review-author { font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.review-author span { font-weight: 400; color: var(--gray-500); }

/* --- FAQ --- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 0;
}
.faq-question {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-question::after { content: '+'; font-size: 1.4rem; color: var(--blue); min-width: 20px; text-align: center; }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--gray-500);
  font-size: 0.95rem;
}
.faq-item.open .faq-answer { max-height: 200px; padding-top: 12px; }

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.cta-section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.cta-section p { color: rgba(255,255,255,0.7); margin-bottom: 28px; font-size: 1.1rem; }
.cta-phone {
  font-family: 'Outfit', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--orange);
  display: block;
  margin-bottom: 24px;
}

/* --- Contact Form --- */
.contact-section { padding: 70px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-form { background: var(--off-white); padding: 36px; border-radius: var(--radius-lg); }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-900);
  transition: border 0.2s;
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); outline: none; }
.form-group textarea { resize: vertical; min-height: 100px; }
.contact-info h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}
.contact-info p { color: var(--gray-500); margin-bottom: 24px; }
.contact-detail {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.95rem;
}
.contact-detail strong { color: var(--navy); }

/* --- Footer --- */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.6);
  padding: 50px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 {
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer a { color: rgba(255,255,255,0.6); transition: color 0.2s; display: block; padding: 4px 0; font-size: 0.9rem; }
.footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Mobile Responsive --- */
@media (max-width: 900px) {
  .services-grid, .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 20px; gap: 16px; box-shadow: var(--shadow-md); border-top: 1px solid var(--gray-200); }
  nav.open { display: flex; }
  .nav-toggle { display: block; }
  .services-grid, .reviews-grid, .why-grid { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 50px 0; }
  .hero h1 { font-size: 1.9rem; }
  .hero-trust { gap: 20px; }
  .section { padding: 50px 0; }
  .section-title { font-size: 1.6rem; }
  .cta-phone { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .top-bar .container { justify-content: center; text-align: center; }
}

/* --- Schema-friendly hidden text --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Skip to Content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--blue);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 200;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* --- Cookie Consent Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gray-900);
  color: rgba(255,255,255,0.85);
  padding: 20px;
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-banner.cookie-visible { transform: translateY(0); }
.cookie-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-inner p { flex: 1; min-width: 280px; font-size: 0.9rem; line-height: 1.5; margin: 0; }
.cookie-inner a { color: var(--blue-light); text-decoration: underline; }
.cookie-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.btn-cookie-decline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.btn-cookie-decline:hover { border-color: rgba(255,255,255,0.6); color: var(--white); }

/* --- Form Validation States --- */
.input-error { border-color: #EF4444 !important; }
.form-error-msg {
  display: block;
  color: #EF4444;
  font-size: 0.82rem;
  margin-top: 4px;
  font-weight: 500;
}
.form-message {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 0.95rem;
  font-weight: 500;
}
.form-message-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.form-message-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.btn-cta:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* --- 404 Page --- */
.error-page {
  text-align: center;
  padding: 100px 20px 80px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.error-page h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 6rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}
.error-page h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.error-page p {
  color: var(--gray-500);
  font-size: 1.1rem;
  margin-bottom: 28px;
  max-width: 480px;
}
@media (max-width: 650px) {
  .error-page h1 { font-size: 4rem; }
  .error-page { padding: 60px 20px; min-height: 50vh; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .cookie-buttons { width: 100%; justify-content: center; }
}
