/* ============================================
   Heartside Plumbing — Main Stylesheet
   Licensed Plumber Arroyo Grande CA
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2640;
  --accent: #e8a838;
  --accent-hover: #d4952e;
  --text: #333333;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-light: #f7f9fc;
  --bg-dark: #1a1a2e;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

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

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

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

h1, h2, h3, h4 {
  color: var(--primary-dark);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

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

/* --- Skip to content (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
}
.skip-link:focus { top: 0; }

/* --- Header / Navigation --- */
.site-header {
  background: var(--bg);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-top {
  background: var(--primary-dark);
  color: #fff;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  text-align: center;
}

.header-top a { color: var(--accent); font-weight: 600; }
.header-top a:hover { color: #fff; }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  height: 60px;
  width: 60px;
  border-radius: 50%;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--primary-dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-size: 0.95rem;
}

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

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 0.5rem 1.25rem !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 1;
}

.hero h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.95;
  position: relative;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  position: relative;
}

.hero-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
}

.hero-badge strong { color: var(--accent); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(232,168,56,0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary-dark);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* --- Sections --- */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-dark {
  background: var(--primary-dark);
  color: #fff;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

.section-header .tag {
  display: inline-block;
  background: rgba(26,58,92,0.1);
  color: var(--primary);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

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

.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.card h3 a {
  color: var(--primary-dark);
}

.card h3 a:hover {
  color: var(--accent);
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- Trust Bar --- */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
  padding: 2rem 0;
}

.trust-item {
  padding: 1.5rem;
}

.trust-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.trust-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* --- Area Tags --- */
.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.area-tag {
  background: var(--bg);
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.area-tag:hover {
  background: var(--primary);
  color: #fff;
}

/* --- FAQ / Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: var(--bg);
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.faq-question:hover { background: var(--bg-light); }

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  color: var(--text-light);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

/* --- Table --- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.info-table thead {
  background: var(--primary);
  color: #fff;
}

.info-table th,
.info-table td {
  padding: 1rem 1.25rem;
  text-align: left;
}

.info-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.info-table tbody tr:hover {
  background: var(--bg-light);
}

.info-table tbody tr:last-child {
  border-bottom: none;
}

/* --- Testimonials --- */
.testimonial {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  position: relative;
}

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

.testimonial p {
  font-style: italic;
  padding-left: 1rem;
}

.testimonial cite {
  display: block;
  margin-top: 1rem;
  padding-left: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--primary);
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #d4952e 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

.cta-banner .btn-outline {
  border-color: #fff;
  color: #fff;
}

.cta-banner .btn-outline:hover {
  background: #fff;
  color: var(--accent);
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-dark);
  color: #ccc;
  padding: 3rem 0 1.5rem;
}

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

.footer-col h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-col p,
.footer-col li {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col ul {
  list-style: none;
}

.footer-col a {
  color: #ccc;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
}

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

/* --- Breadcrumb --- */
.breadcrumb {
  background: var(--bg-light);
  padding: 0.75rem 0;
  font-size: 0.85rem;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-light); }

/* --- Page Hero (inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
  font-size: 2.5rem;
}

.page-hero p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0.5rem auto 0;
  font-size: 1.1rem;
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* --- Area Cards --- */
.area-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
  transition: all var(--transition);
}

.area-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--accent);
}

.area-card h3 {
  margin-bottom: 0.5rem;
}

.area-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    display: none;
  }

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

  .main-nav ul {
    flex-direction: column;
    padding: 1rem;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
  }

  .hero { padding: 3rem 1rem; }
  .hero h1 { font-size: 2rem; }
  .page-hero h1 { font-size: 1.8rem; }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .trust-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-main {
    padding: 0.5rem 1rem;
  }

  .logo-text { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .trust-bar {
    grid-template-columns: 1fr;
  }

  .hero-badges {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
}
