/* ============================================
   Malvern & Worcester Plastering — Main Stylesheet
   Mobile-first responsive, clean and fast
   ============================================ */

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

:root {
  --navy: #1a1a1a;
  --orange: #d4531f;
  --charcoal: #2d2d2d;
  --cream: #f7f5f0;
  --white: #ffffff;
  --light-grey: #e5e5e5;
  --navy-light: #333333;
  --orange-dark: #b8441a;
  --accent: #555555;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 6px;
  --transition: 0.2s ease;
}

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

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-bottom: 0.75rem; }

p + p { margin-top: 1rem; }

.container { width: 92%; max-width: 1200px; margin: 0 auto; }

/* --- Skip Link --- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--white);
  padding: 0.5rem 1rem; z-index: 9999;
}
.skip-link:focus { left: 0; }

/* --- Header & Nav --- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--navy);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

/* --- Logo --- */
.site-logo {
  display: flex; align-items: center;
  flex-shrink: 0;
}
.site-logo img {
  height: 64px;
  width: auto;
}

/* Hamburger */
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0.5rem;
}
.nav-toggle span {
  display: block; width: 26px; height: 3px;
  background: var(--white); border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.main-nav { display: none; width: 100%; padding-bottom: 0.5rem; }
.main-nav.open { display: block; }

.nav-list {
  list-style: none; display: flex; flex-direction: column;
}
.nav-list li { position: relative; }
.nav-list a {
  display: block; padding: 0.85rem 1rem;
  color: var(--white); font-size: 0.95rem; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-list a:hover, .nav-list a.active { color: var(--white); opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Dropdown */
.has-dropdown > a::after { content: ' \25BE'; font-size: 0.7em; }
.dropdown {
  list-style: none; display: none;
  background: rgba(0,0,0,0.15);
}
.dropdown.open { display: block; }
.dropdown a { padding-left: 2rem; font-size: 0.9rem; }
.dropdown { max-height: 50vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Phone in header */
.header-phone {
  display: none;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}
.header-phone a { color: var(--white); font-weight: 700; }
.header-phone a:hover { opacity: 0.8; }

/* --- Mobile Phone Banner --- */
.mobile-phone-banner {
  display: block;
  background: var(--orange);
  text-align: center;
  padding: 0.75rem;
}
.mobile-phone-banner a {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: block;
  padding: 0.25rem 0;
}

/* --- Hero --- */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../images/van3-mobile.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: var(--white); margin-bottom: 1rem; text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.hero h1 span { color: var(--light-grey); }
.hero p { font-size: 1.1rem; max-width: 640px; margin: 0 auto 1.5rem; opacity: 0.92; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.hero-buttons {
  display: flex; gap: 0.75rem; justify-content: center;
  flex-direction: column; align-items: center;
}
.hero-buttons .btn { width: 100%; max-width: 320px; }

/* --- Page Header (subpages) --- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 2rem 0 1.5rem;
}
.page-header h1 { color: var(--white); margin-bottom: 0.5rem; }

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: #888;
  border-bottom: 1px solid var(--light-grey);
}
.breadcrumbs a { color: var(--navy); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 0.4rem; color: #bbb; }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 0.8rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600; font-size: 1rem;
  text-align: center;
  cursor: pointer; border: none;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--charcoal); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); color: var(--white); }
.btn-phone {
  background: var(--orange); color: var(--white);
  font-size: 1.2rem; padding: 1rem 2.5rem;
}
.btn-phone:hover { background: var(--orange-dark); color: var(--white); }

/* --- Sections --- */
.section { padding: 3rem 0; }
.section-alt { background: var(--white); }
.section-heading { text-align: center; margin-bottom: 2.5rem; }
.section-heading p {
  max-width: 600px; margin: 0.5rem auto 0;
  color: #666; font-size: 1.05rem;
}

/* --- Cards Grid --- */
.card-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  border-top: 3px solid var(--navy);
}
.card h3 a { color: var(--navy); }
.card h3 a:hover { color: var(--accent); }
.card-icon {
  width: 52px; height: 52px;
  background: var(--cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--navy);
}
.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--navy);
  font-weight: 600;
}
.card-link:hover { color: var(--accent); }

/* Service sub-list within cards — pill tags */
.card .service-sub-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
  list-style: none;
}
.card .service-sub-list span {
  display: inline-block;
  background: var(--cream);
  border: 1px solid var(--light-grey);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  color: var(--charcoal);
  white-space: nowrap;
}

/* --- Features / USP --- */
.usp-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
.usp-item {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.usp-item h4 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.usp-item p { font-size: 0.92rem; line-height: 1.55; color: #555; }
.usp-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
}
.usp-text { flex: 1; min-width: 0; }

/* --- Service Detail --- */
.service-content {
  display: grid; gap: 2rem;
}
.service-content img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--light-grey);
}
.service-benefits { list-style: none; margin: 1rem 0; }
.service-benefits li {
  padding: 0.5rem 0 0.5rem 1.8rem;
  position: relative;
}
.service-benefits li::before {
  content: '\2713';
  position: absolute; left: 0; top: 0.5rem;
  color: var(--navy); font-weight: 700;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
.gallery-item {
  aspect-ratio: 4/3;
  background: var(--light-grey);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: #aaa; font-size: 0.85rem;
  text-align: center; padding: 1rem;
}
.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, 0.75);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
}
.gallery-category { margin-top: 2.5rem; margin-bottom: 1rem; }
.gallery-category:first-child { margin-top: 0; }
.service-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* --- Testimonials --- */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--navy);
  margin-bottom: 1.5rem;
}
.testimonial-card blockquote {
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: var(--charcoal);
}
.testimonial-card blockquote::before { content: '\201C'; font-size: 1.5rem; color: var(--navy); margin-right: 0.2rem; }
.testimonial-card cite {
  font-style: normal;
  font-weight: 600;
  color: var(--navy);
}
.testimonial-stars { color: #d4a017; margin-bottom: 0.5rem; letter-spacing: 2px; }

/* --- Contact Info --- */
.contact-grid { display: grid; gap: 2rem; }
.contact-details dt {
  font-weight: 700; color: var(--navy);
  margin-top: 1.25rem;
}
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin-top: 0.25rem; }
.contact-details a { color: var(--navy); font-weight: 600; }
.contact-details a:hover { color: var(--accent); }

/* Contact form */
.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}
.contact-form-wrap h2 { margin-top: 0; color: var(--navy); }
.form-intro { margin-bottom: 1.5rem; color: var(--accent); }
.form-row { margin-bottom: 1.1rem; }
.form-row label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.form-row .req { color: var(--orange); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(212,83,31,0.15);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.form-grid { display: grid; gap: 0 1rem; }
.hp-field { display: none !important; }
.form-submit { margin-top: 0.5rem; border: none; cursor: pointer; }
.form-result {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  display: none;
}
.form-result--ok,
.form-result--err { display: block; }
.form-result--ok { background: #e8f3e8; color: #1f6b2c; }
.form-result--err { background: #fbeaea; color: #a32020; }

@media (min-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16/10;
  background: var(--light-grey);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* --- Areas Grid --- */
.areas-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
.area-link {
  display: block;
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  border-bottom: 3px solid transparent;
}
.area-link:hover {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* --- Town Page Specific --- */
.town-intro { display: grid; gap: 2rem; }
.town-services-list { display: grid; gap: 1rem; margin: 1.5rem 0; }
.town-service-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--navy);
}

/* --- Van / Feature Image --- */
.van-section { padding: 3rem 0; text-align: center; }
.van-image-wrapper {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.van-image-wrapper img { width: 100%; height: auto; display: block; }
.van-placeholder {
  background: var(--light-grey);
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 0.95rem;
  text-align: center; padding: 2rem;
  border: 2px dashed #ccc;
  border-radius: var(--radius);
}
.van-section p { margin-top: 1rem; font-size: 1.05rem; color: #666; }

/* --- CTA Banner --- */
.cta-banner {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 3rem 0;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-banner p { margin-bottom: 1.5rem; opacity: 0.9; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-phone { font-size: 1.05rem; padding: 1rem 1.5rem; width: 100%; max-width: 320px; }
.cta-banner .btn-outline { font-size: 1.05rem; padding: 1rem 1.5rem; width: 100%; max-width: 320px; margin-top: 0.75rem; }

/* --- Footer --- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0 1.5rem;
}
.footer-grid { display: grid; gap: 2rem; }
.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 0.75rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
}

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

/* ============================================
   Tablet (600px+)
   ============================================ */
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .usp-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .areas-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .town-intro { grid-template-columns: 1fr 1fr; align-items: start; }
  .service-content { grid-template-columns: 1fr 1fr; align-items: start; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   Desktop (900px+)
   ============================================ */
@media (min-width: 900px) {
  .header-inner { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .main-nav { display: block !important; width: auto; padding-bottom: 0; }
  .nav-list { flex-direction: row; align-items: center; }
  .nav-list a { border-bottom: none; padding: 0.5rem 0.9rem; white-space: nowrap; }

  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown { display: block; }
  .dropdown {
    position: absolute; top: 100%; left: 0;
    background: var(--navy); min-width: 220px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg); z-index: 100;
  }
  .dropdown a { padding: 0.6rem 1.2rem; }

  .header-phone { display: block; margin-left: 1rem; white-space: nowrap; }
  .mobile-phone-banner { display: none; }

  .site-logo img { height: 90px; }

  .hero { padding: 5rem 0; min-height: 480px; }
  .hero-buttons { flex-direction: row; }
  .hero-buttons .btn { width: auto; }
  .hero-bg { background-image: url('../images/van3.jpg'); }

  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .usp-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .areas-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }

  .section { padding: 4rem 0; }
}

/* ============================================
   Large Desktop (1100px+)
   ============================================ */
@media (min-width: 1100px) {
  .areas-grid { grid-template-columns: repeat(6, 1fr); }
}

/* --- Lightbox --- */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center;
  flex-direction: column;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 90vw; max-height: 80vh;
  object-fit: contain; border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: rgba(255,255,255,0.85); font-size: 0.95rem;
  margin-top: 1rem; text-align: center; max-width: 600px;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem;
  background: none; border: none; color: #fff;
  font-size: 2.2rem; cursor: pointer; line-height: 1;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { color: var(--orange); }
.lightbox-prev,
.lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff;
  font-size: 2.5rem; cursor: pointer; padding: 1rem;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--orange); }

@media (min-width: 600px) {
  .lightbox-prev { left: 1.5rem; }
  .lightbox-next { right: 1.5rem; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .cta-banner, .nav-toggle, .mobile-phone-banner { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
