/*
Theme Name: Dorset Plumbing
Theme URI: https://www.dorsetplumbing.com/
Author: Dorset Plumbing
Author URI: https://www.dorsetplumbing.com/
Description: Custom theme for Dorset Plumbing — plumber in Bournemouth & Poole. Full-width page layouts, red/white branding, price circles widget area, Gas Safe footer.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: Proprietary
Text Domain: dorset-plumbing
*/

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  background: #fff;
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #c0151a; text-decoration: none; }
a:hover { text-decoration: underline; }

/* =====================================================
   LAYOUT
   ===================================================== */
.dp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  background: #fff;
  border-bottom: 3px solid #c0151a;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  gap: 16px;
}

/* Logo */
.site-logo { display: flex; align-items: center; text-decoration: none; }
.site-logo img { height: 60px; width: auto; }
.site-logo-text {
  font-size: 28px;
  font-weight: 900;
  color: #c0151a;
  letter-spacing: -1px;
  line-height: 1;
  text-decoration: none;
}
.site-logo-text span { color: #222; }
.site-logo-sub {
  display: block;
  font-size: 11px;
  color: #888;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Header right */
.header-right { display: flex; align-items: center; gap: 20px; }

.header-book-btn {
  background: #c0151a;
  color: #fff;
  padding: 11px 22px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.header-book-btn:hover { background: #8b0000; text-decoration: none; color: #fff; }

.header-phone-wrap { text-align: right; }
.header-phone-label { font-size: 11px; color: #999; display: block; }
.header-phone {
  font-size: 24px;
  font-weight: 700;
  color: #c0151a;
  text-decoration: none;
  white-space: nowrap;
  display: block;
}
.header-phone:hover { color: #8b0000; text-decoration: none; }

/* Nav */
.main-nav {
  border-top: 1px solid #f0f0f0;
  padding: 0 32px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}
.main-nav ul li { position: relative; }
.main-nav ul li a {
  display: block;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a,
.main-nav ul li.current_page_item > a,
.main-nav ul li.current-menu-ancestor > a {
  color: #c0151a;
  border-bottom-color: #c0151a;
  text-decoration: none;
}

/* Dropdown */
.main-nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #f0cece;
  border-top: 3px solid #c0151a;
  min-width: 220px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 100;
  flex-direction: column;
}
.main-nav ul li:hover > ul { display: flex; }
.main-nav ul li ul li a {
  padding: 11px 18px;
  border-bottom: 1px solid #f5f5f5;
  font-weight: 500;
  border-left: none;
}
.main-nav ul li ul li a:hover { background: #fff5f5; color: #c0151a; }

/* WhatsApp link in nav */
.nav-whatsapp {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px !important;
  color: #25d366 !important;
  font-size: 13px !important;
  border-bottom-color: transparent !important;
}
.nav-whatsapp:hover { color: #1da851 !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid #c0151a;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  color: #c0151a;
  font-size: 20px;
  line-height: 1;
}

/* Price circles removed from theme - handled in page content */

/* =====================================================
   PAGE TITLE BANNER (for pages without dp-hero)
   ===================================================== */
.page-title-banner {
  background: #c0151a;
  padding: 32px;
  color: #fff;
}
.page-title-banner h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

/* =====================================================
   CONTENT AREA (sidebar pages)
   ===================================================== */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 40px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.content-area { min-width: 0; }

/* =====================================================
   FULL WIDTH PAGE TEMPLATE
   ===================================================== */
.page-template-full-width .content-sidebar-wrap,
.page-template-page-full-width .content-sidebar-wrap {
  grid-template-columns: 1fr;
  padding: 0;
  max-width: 100%;
  gap: 0;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar { font-size: 14px; }

.widget {
  background: #fff;
  border: 1px solid #f0cece;
  border-top: 3px solid #c0151a;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
}
.widget-title {
  font-size: 15px;
  font-weight: 700;
  color: #8b0000;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0cece;
}
.widget ul { list-style: none; }
.widget ul li { padding: 6px 0; border-bottom: 1px solid #f5f5f5; }
.widget ul li a { color: #333; font-size: 14px; }
.widget ul li a:hover { color: #c0151a; }

.sidebar-cta {
  background: #c0151a;
  border-radius: 6px;
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}
.sidebar-cta p { color: rgba(255,255,255,0.9); font-size: 14px; margin-bottom: 12px; }
.sidebar-cta a.sidebar-phone {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.sidebar-cta a.sidebar-btn {
  display: block;
  background: #8b0000;
  color: #fff;
  padding: 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
}

/* =====================================================
   DP PAGE COMPONENTS (used in page content)
   ===================================================== */
.dp-wrap { color: #222; line-height: 1.7; font-size: 16px; }
.dp-wrap *, .dp-wrap *::before, .dp-wrap *::after { box-sizing: border-box; }

.dp-emergency {
  background: #8b0000;
  color: #fff;
  text-align: center;
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 600;
}
.dp-emergency a { color: #fff; text-decoration: underline; font-weight: 700; }

.dp-hero {
  background: #c0151a;
  color: #fff;
  padding: 56px 32px 48px;
}
.dp-hero-badge {
  display: inline-block;
  background: #8b0000;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 3px;
  margin-bottom: 18px;
}
.dp-hero h1, .dp-h1 {
  color: #fff;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px 0;
  padding: 0;
}
.dp-hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.92);
  margin: 0 0 28px 0;
  max-width: 700px;
}

.dp-btn-red   { display: inline-block; background: #8b0000; color: #fff; padding: 14px 26px; border-radius: 4px; font-weight: 700; font-size: 15px; text-decoration: none; margin-right: 12px; margin-bottom: 10px; transition: background 0.15s; }
.dp-btn-red:hover { background: #5a0000; color: #fff; text-decoration: none; }
.dp-btn-white { display: inline-block; background: #fff; color: #c0151a; padding: 14px 26px; border-radius: 4px; font-weight: 700; font-size: 15px; text-decoration: none; margin-bottom: 10px; transition: background 0.15s; }
.dp-btn-white:hover { background: #f5f5f5; text-decoration: none; color: #8b0000; }

.dp-trust-row { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.dp-trust-item { background: rgba(0,0,0,0.2); color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }

.dp-content { padding: 0 32px; max-width: 1200px; margin: 0 auto; }
.page-template-full-width .dp-content,
.page-template-page-full-width .dp-content { max-width: 100%; padding: 0 32px; }

.dp-section { padding: 44px 0; border-bottom: 1px solid #f0cece; }
.dp-section:last-child { border-bottom: none; }

.dp-h2 { font-size: 26px; font-weight: 700; color: #8b0000; margin: 0 0 14px 0; padding: 0; line-height: 1.25; }
.dp-h3 { font-size: 18px; font-weight: 700; color: #c0151a; margin: 22px 0 10px 0; padding: 0; }
.dp-p  { font-size: 16px; color: #333; margin: 0 0 14px 0; line-height: 1.7; }

.dp-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

.dp-stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 24px 0; }
.dp-stat { background: #fff5f5; border-left: 4px solid #c0151a; border-radius: 5px; padding: 16px; text-align: center; }
.dp-stat-num   { font-size: 30px; font-weight: 700; color: #c0151a; line-height: 1; }
.dp-stat-label { font-size: 12px; color: #666; margin-top: 6px; }

.dp-why { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 20px; }
.dp-why-card { background: #fff5f5; border-bottom: 3px solid #c0151a; border-radius: 6px; padding: 20px; }
.dp-why-title { font-size: 15px; font-weight: 700; color: #8b0000; margin: 0 0 7px 0; }
.dp-why-text  { font-size: 13px; color: #555; margin: 0; }

.dp-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 14px; margin-top: 18px; }
.dp-card { background: #fff; border: 1px solid #f0cece; border-top: 3px solid #c0151a; border-radius: 6px; padding: 18px; }
.dp-card-title { font-size: 15px; font-weight: 700; color: #8b0000; margin: 0 0 7px 0; }
.dp-card-text  { font-size: 13px; color: #555; margin: 0; line-height: 1.5; }

.dp-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 18px; }
.dp-table th { background: #8b0000; color: #fff; padding: 11px 16px; text-align: left; font-weight: 700; }
.dp-table td { padding: 10px 16px; border-bottom: 1px solid #f0cece; color: #333; }
.dp-table tr:nth-child(even) td { background: #fff5f5; }
.dp-table td:nth-child(2) { font-weight: 700; color: #c0151a; white-space: nowrap; }
.dp-table-wrap { overflow-x: auto; }

.dp-faq { margin-top: 18px; }
.dp-faq-item { border: 1px solid #f0cece; border-radius: 5px; margin-bottom: 10px; overflow: hidden; }
.dp-faq-q { background: #fff5f5; padding: 14px 18px; font-weight: 700; font-size: 15px; color: #8b0000; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; margin: 0; }
.dp-faq-q::after { content: "+"; font-size: 20px; color: #c0151a; font-weight: 400; }
details[open] .dp-faq-q::after { content: "−"; }
.dp-faq-a { padding: 14px 18px; font-size: 15px; color: #333; }

.dp-areas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dp-area { background: #fff5f5; border: 1px solid #f0cece; border-radius: 4px; padding: 6px 13px; font-size: 14px; color: #8b0000; font-weight: 600; text-decoration: none; }
.dp-area:hover { background: #ffecec; text-decoration: none; color: #8b0000; }

.dp-notice { background: #fff5f5; border: 1px solid #ffcdd2; border-left: 4px solid #c0151a; border-radius: 5px; padding: 14px 18px; font-size: 15px; color: #333; margin: 18px 0; }
.dp-warning { background: #fff8e1; border: 1px solid #ffe082; border-left: 4px solid #f9a825; border-radius: 5px; padding: 14px 18px; font-size: 15px; color: #333; margin: 18px 0; }

.dp-cta { background: #c0151a; color: #fff; border-radius: 8px; padding: 40px 32px; text-align: center; margin: 36px 0; }
.dp-cta-h2    { color: #fff; font-size: 26px; font-weight: 700; margin: 0 0 10px 0; }
.dp-cta-p     { color: rgba(255,255,255,0.9); font-size: 16px; max-width: 500px; margin: 0 auto 20px; }
.dp-cta-phone { display: block; font-size: 36px; font-weight: 700; color: #ffcdd2; text-decoration: none; margin-bottom: 18px; }
.dp-cta-phone:hover { color: #fff; text-decoration: none; }

.dp-steps-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; margin-top: 20px; }
.dp-step-card { background: #fff5f5; border-radius: 6px; padding: 20px; text-align: center; border-bottom: 3px solid #c0151a; }
.dp-step-num  { width: 36px; height: 36px; background: #8b0000; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; margin: 0 auto 10px; }
.dp-step-title { font-size: 13px; font-weight: 700; color: #8b0000; margin: 0 0 5px 0; }
.dp-step-text  { font-size: 12px; color: #555; margin: 0; }

.dp-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.dp-price-card { border-radius: 8px; padding: 26px; text-align: center; }
.dp-price-card.residential { background: #fff5f5; border: 2px solid #c0151a; }
.dp-price-card.commercial  { background: #f5f5f5; border: 2px solid #999; }
.dp-price-label  { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.dp-price-card.residential .dp-price-label { color: #8b0000; }
.dp-price-card.commercial  .dp-price-label { color: #555; }
.dp-price-amount { font-size: 40px; font-weight: 700; line-height: 1; margin-bottom: 5px; }
.dp-price-card.residential .dp-price-amount { color: #c0151a; }
.dp-price-card.commercial  .dp-price-amount { color: #333; }
.dp-price-vat  { font-size: 12px; color: #666; margin-bottom: 12px; }
.dp-price-desc { font-size: 13px; color: #444; margin: 0; }
.dp-price-beat { background: #8b0000; color: #fff; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 20px; display: inline-block; margin-top: 10px; }

.dp-legal-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.dp-legal-badge  { background: #fff; border: 2px solid #f0cece; border-radius: 6px; padding: 8px 16px; font-size: 12px; font-weight: 700; color: #8b0000; }

.dp-brands { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dp-brand  { background: #f5f5f5; border: 1px solid #ddd; border-radius: 4px; padding: 9px 20px; font-size: 14px; font-weight: 700; color: #333; }

.dp-checklist { list-style: none; padding: 0; margin: 16px 0; }
.dp-checklist li { padding: 7px 0 7px 28px; position: relative; font-size: 15px; color: #333; border-bottom: 1px solid #f5f5f5; }
.dp-checklist li::before { content: "✓"; position: absolute; left: 0; color: #c0151a; font-weight: 700; }

/* Blog */
.dp-posts-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 24px; }
.dp-post-card { border: 1px solid #f0cece; border-top: 3px solid #c0151a; border-radius: 6px; overflow: hidden; }
.dp-post-card-img { width: 100%; height: 180px; object-fit: cover; }
.dp-post-card-body { padding: 18px; }
.dp-post-card-title { font-size: 16px; font-weight: 700; color: #8b0000; margin-bottom: 8px; }
.dp-post-card-title a { color: #8b0000; text-decoration: none; }
.dp-post-card-title a:hover { color: #c0151a; }
.dp-post-card-excerpt { font-size: 14px; color: #555; margin-bottom: 12px; }
.dp-post-card-meta { font-size: 12px; color: #999; }
.dp-read-more { display: inline-block; color: #c0151a; font-weight: 700; font-size: 14px; margin-top: 8px; }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 40px 32px 0;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 40px;
  padding-bottom: 32px;
}

.footer-col h4 {
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { color: #aaa; text-decoration: none; transition: color 0.15s; }
.footer-col ul li a:hover { color: #fff; }

.footer-address { font-style: normal; color: #aaa; line-height: 2; font-size: 13px; }
.footer-phone { color: #ffcdd2; font-weight: 700; font-size: 18px; text-decoration: none; display: block; margin-top: 6px; }
.footer-phone:hover { color: #fff; }

.footer-logos { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.footer-logo-img { height: 36px; width: auto; background: #fff; padding: 3px 6px; border-radius: 3px; }

.footer-fca {
  border-top: 1px solid #333;
  padding: 16px 0;
  font-size: 11px;
  color: #555;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 14px 0;
  font-size: 12px;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom a { color: #888; text-decoration: none; }
.footer-bottom a:hover { color: #ccc; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
  .dp-why { grid-template-columns: repeat(2,1fr); }
  .dp-steps-grid { grid-template-columns: repeat(3,1fr); }
  .dp-posts-grid { grid-template-columns: repeat(2,1fr); }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  /* price circles handled in page content */
  .price-circle-price { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .header-top { padding: 12px 16px; flex-wrap: wrap; }
  .header-right { gap: 12px; }
  .header-phone { font-size: 18px; }
  .header-book-btn { padding: 9px 14px; font-size: 13px; }
  .main-nav { display: none; padding: 0 16px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav ul li ul { position: static; box-shadow: none; border: none; border-left: 3px solid #f0cece; margin-left: 16px; display: flex; flex-direction: column; }
  .main-nav ul li:hover > ul { display: flex; }
  .menu-toggle { display: block; margin: 0 16px 12px; }
  .price-circles-area { padding: 28px 16px; }
  .price-circles-inner { gap: 12px; }
  .price-circle { width: 140px; height: 140px; border-width: 6px; padding: 12px; }
  .price-circle-title { font-size: 13px; }
  .price-circle-from  { font-size: 11px; }
  .price-circle-price { font-size: 20px; }
  .dp-hero { padding: 32px 16px; }
  .dp-hero h1, .dp-h1 { font-size: 26px; }
  .dp-hero-sub { font-size: 15px; }
  .dp-content { padding: 0 16px; }
  .dp-two-col { grid-template-columns: 1fr; gap: 20px; }
  .dp-stats-row { grid-template-columns: 1fr 1fr; }
  .dp-why { grid-template-columns: 1fr; }
  .dp-steps-grid { grid-template-columns: 1fr 1fr; }
  .dp-cta { padding: 28px 16px; }
  .dp-cta-phone { font-size: 28px; }
  .dp-price-grid { grid-template-columns: 1fr; }
  .dp-posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .site-footer { padding: 28px 16px 0; }
}

@media (max-width: 480px) {
  .dp-cards { grid-template-columns: 1fr; }
  .dp-steps-grid { grid-template-columns: 1fr; }
  .price-circle { width: 120px; height: 120px; }
  .price-circle-title { font-size: 12px; }
  .price-circle-price { font-size: 18px; }
}
