/* ============================================
   UPSTATE SC SEPTIC SERVICES — Design System
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: #1a1a2e; background: #fff; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* --- CSS Variables --- */
:root {
  --primary: #0D7377;
  --primary-dark: #095355;
  --primary-light: #11999e;
  --accent: #E8A838;
  --accent-hover: #d4952e;
  --form-green: #2ECC71;
  --form-green-dark: #27ae60;
  --dark: #0F1B2D;
  --dark-light: #1a2a40;
  --light: #F7F9FC;
  --white: #FFFFFF;
  --gray-100: #f0f2f5;
  --gray-200: #e2e5ea;
  --gray-300: #c5c9d1;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--gray-900); }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
p { color: var(--gray-700); margin-bottom: 1rem; font-size: 1.05rem; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 5rem 0; }
.section--dark { background: var(--dark); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: var(--gray-300); }
.section--light { background: var(--light); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header p { max-width: 650px; margin: 1rem auto 0; color: var(--gray-500); font-size: 1.1rem; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.75rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; cursor: pointer; border: none; transition: var(--transition); text-align: center; }
.btn--primary { background: var(--accent); color: var(--dark); }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--cta { background: linear-gradient(135deg, var(--accent), #f0b840); color: var(--dark); font-size: 1.1rem; padding: 1rem 2rem; letter-spacing: 0.5px; }
.btn--cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,168,56,0.4); }
.btn--outline { background: transparent; border: 2px solid var(--white); color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--dark); }
.btn--green { background: var(--form-green); color: var(--white); }
.btn--green:hover { background: var(--form-green-dark); }
.btn--block { width: 100%; }
.btn--phone { font-size: 1.2rem; letter-spacing: 0.5px; }

/* --- Top Bar (Phone) --- */
.top-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1001; background: var(--primary-dark); padding: 0.4rem 0; }
.top-bar__inner { display: flex; align-items: center; justify-content: space-between; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.top-bar__phone { color: var(--white); font-size: 1.3rem; font-weight: 800; letter-spacing: 0.5px; display: flex; align-items: center; gap: 0.5rem; }
.top-bar__phone svg { width: 18px; height: 18px; }
.top-bar__info { color: rgba(255,255,255,0.7); font-size: 0.82rem; }

/* --- Header --- */
.header { position: fixed; top: 2.1rem; left: 0; right: 0; z-index: 1000; background: rgba(15, 27, 45, 0.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.08); transition: var(--transition); }
.header__inner { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1.25rem; max-width: var(--max-width); margin: 0 auto; }
.header__logo { font-size: 1.2rem; font-weight: 700; color: var(--white); white-space: nowrap; }
.header__logo span { color: var(--accent); }
.header__nav { display: flex; align-items: center; gap: 0; }
.header__nav-link { color: rgba(255,255,255,0.85); padding: 0.5rem 0.9rem; font-size: 0.9rem; font-weight: 500; transition: var(--transition); position: relative; }
.header__nav-link:hover { color: var(--accent); }

/* Dropdown */
.header__dropdown { position: relative; }
.header__dropdown-toggle { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.header__dropdown-toggle::after { content: '▾'; font-size: 0.7rem; }
.header__dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--dark-light); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm); min-width: 220px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: var(--transition); padding: 0.5rem 0; box-shadow: var(--shadow-xl); }
.header__dropdown:hover .header__dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.header__dropdown-menu a { display: block; padding: 0.6rem 1.2rem; color: rgba(255,255,255,0.8); font-size: 0.88rem; transition: var(--transition); }
.header__dropdown-menu a:hover { background: rgba(255,255,255,0.05); color: var(--accent); }

.header__cta { margin-left: 0.75rem; }
.header__cta .btn { padding: 0.6rem 1.2rem; font-size: 0.88rem; }

/* Mobile menu toggle */
.header__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.header__hamburger span { width: 24px; height: 2px; background: var(--white); transition: var(--transition); border-radius: 2px; }

/* --- Hero --- */
.hero { padding-top: 8rem; min-height: 90vh; display: flex; align-items: center; background: url('../images/hero-driveway.png') center/cover no-repeat; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(15,27,45,0.92) 0%, rgba(15,27,45,0.75) 40%, rgba(15,27,45,0.25) 70%, transparent 100%); }
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.hero__content { color: var(--white); }
.hero__content h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero__content p { color: rgba(255,255,255,0.85); font-size: 1.2rem; margin-bottom: 1.75rem; max-width: 520px; line-height: 1.8; }
.hero__phone-btn { margin-top: 0.75rem; }

/* --- Image + Text Split Section --- */
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split-section--reverse { direction: rtl; }
.split-section--reverse > * { direction: ltr; }
.split-section__image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.split-section__image img { width: 100%; height: 100%; object-fit: cover; min-height: 350px; }
.split-section__content h2 { margin-bottom: 1.25rem; }
.split-section__content p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.25rem; }
.split-section__content ul { margin-bottom: 1.5rem; }
.split-section__content ul li { padding: 0.4rem 0 0.4rem 1.75rem; position: relative; color: var(--gray-700); font-size: 1.05rem; }
.split-section__content ul li::before { content: '✓'; color: var(--primary); position: absolute; left: 0; font-weight: 700; font-size: 1.1rem; }

/* --- Quote Form --- */
.quote-form { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); overflow: hidden; }
.quote-form__header { background: var(--form-green); padding: 1rem 1.5rem; text-align: center; }
.quote-form__header h3 { color: var(--white); font-size: 1.15rem; letter-spacing: 0.5px; margin: 0; }
.quote-form__body { padding: 1.5rem; }
.quote-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
.quote-form__field { margin-bottom: 0.75rem; }
.quote-form__field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.5px; }
.quote-form__field input,
.quote-form__field select,
.quote-form__field textarea { width: 100%; padding: 0.7rem 0.9rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 0.95rem; transition: var(--transition); background: var(--white); color: var(--gray-900); }
.quote-form__field input:focus,
.quote-form__field select:focus,
.quote-form__field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,115,119,0.1); }
.quote-form__field textarea { resize: vertical; min-height: 80px; }
.quote-form__submit { margin-top: 0.5rem; }

/* --- Service Cards --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.service-card { background: var(--white); border-radius: var(--radius-md); padding: 1.75rem 1.25rem; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); transition: var(--transition); position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-light)); transform: scaleX(0); transition: var(--transition); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card:hover::before { transform: scaleX(1); }
.service-card__icon { width: 56px; height: 56px; margin: 0 auto 1rem; background: var(--light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.5rem; }
.service-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.service-card p { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.service-card__link { color: var(--primary); font-weight: 600; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 4px; transition: var(--transition); }
.service-card__link:hover { color: var(--primary-dark); gap: 8px; }

/* --- Service Detail Sections --- */
.service-details { margin-top: 3rem; display: flex; flex-direction: column; gap: 1.5rem; }
.service-detail { background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm); overflow: hidden; scroll-margin-top: 6rem; }
.service-detail__header { display: flex; align-items: center; gap: 0.75rem; padding: 1.25rem 1.5rem; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); cursor: default; }
.service-detail__header h3 { color: var(--white); font-size: 1.15rem; margin: 0; }
.service-detail__icon { font-size: 1.4rem; }
.service-detail__body { padding: 1.5rem 1.5rem 1.75rem; }
.service-detail__body p { color: var(--gray-600); font-size: 1rem; line-height: 1.75; margin-bottom: 1rem; }
.service-detail__body ul { list-style: none; padding: 0; margin: 0 0 1.5rem 0; }
.service-detail__body ul li { padding: 0.4rem 0 0.4rem 1.75rem; position: relative; color: var(--gray-600); font-size: 0.95rem; }
.service-detail__body ul li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* --- FAQ Section --- */
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.faq-card { background: var(--white); border-radius: var(--radius-md); padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); transition: var(--transition); display: flex; flex-direction: column; }
.faq-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.faq-card h3 { font-size: 1.05rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.faq-card p { font-size: 0.9rem; color: var(--gray-500); flex: 1; }
.faq-card__link { color: var(--primary); font-weight: 600; font-size: 0.88rem; margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 4px; }

/* --- Service Areas --- */
.areas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; }
.areas-grid a, .areas-grid span { padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-size: 0.95rem; transition: var(--transition); }
.areas-grid a, .areas-grid span { color: var(--primary); font-weight: 600; background: rgba(13,115,119,0.06); }
.areas-grid a:hover { background: var(--primary); color: var(--white); }

/* --- Testimonials --- */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.testimonial-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 2rem 1.5rem 1.5rem; position: relative; }
.testimonial-card__quote { font-size: 3.5rem; font-weight: 700; color: var(--gray-300); line-height: 1; position: absolute; top: 0.75rem; left: 1.25rem; font-family: Georgia, serif; }
.testimonial-card p { font-style: italic; color: var(--gray-700); font-size: 0.92rem; line-height: 1.7; margin-top: 1.5rem; margin-bottom: 1rem; }
.testimonial-card__author { font-weight: 600; color: var(--gray-900); font-size: 0.88rem; font-style: normal; }

/* --- CTA Section --- */
.cta-center { text-align: center; padding: 2rem 0; }

/* --- Map --- */
.map-container { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); margin-top: 1.5rem; }
.map-container iframe { width: 100%; height: 350px; border: 0; }

/* --- Footer --- */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 2.5rem 0 1.5rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer__nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__nav a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: var(--transition); }
.footer__nav a:hover { color: var(--accent); }
.footer__phone { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.footer__legal { width: 100%; display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.8rem; flex-wrap: wrap; gap: 0.75rem; }
.footer__legal-links { display: flex; gap: 1.5rem; }
.footer__legal-links a { color: rgba(255,255,255,0.5); }
.footer__legal-links a:hover { color: var(--accent); }

/* --- Scroll Animations --- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- Sub-page Hero --- */
.page-hero { padding: 9rem 0 3rem; background: linear-gradient(135deg, var(--dark), var(--primary-dark)); }
.page-hero h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-hero p { color: rgba(255,255,255,0.75); }

/* --- Back Button --- */
.back-bar { background: var(--light); border-bottom: 1px solid var(--gray-100); padding: 0.75rem 0; }
.back-bar__link { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1rem; font-weight: 600; color: var(--primary); transition: var(--transition); }
.back-bar__link:hover { color: var(--primary-dark); gap: 0.75rem; }
.back-bar__link svg { width: 20px; height: 20px; }
.page-hero__inner { display: grid; grid-template-columns: 1fr 400px; gap: 3rem; align-items: start; }

/* Content + form layout for sub-pages */
.content-with-form { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
.content-main h2 { margin-bottom: 1rem; color: var(--gray-900); }
.content-main ul { padding-left: 1.25rem; margin-bottom: 1.5rem; }
.content-main ul li { margin-bottom: 0.5rem; color: var(--gray-700); position: relative; padding-left: 1.25rem; }
.content-main ul li::before { content: '✓'; color: var(--primary); position: absolute; left: 0; font-weight: 700; }

/* Breadcrumbs */
.breadcrumbs { padding: 0.75rem 0; font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.breadcrumbs a { color: rgba(255,255,255,0.7); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 0.4rem; }

/* --- Related Services --- */
.related-services { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.related-services a { padding: 0.5rem 1rem; background: var(--light); border-radius: var(--radius-sm); color: var(--primary); font-weight: 500; font-size: 0.9rem; transition: var(--transition); }
.related-services a:hover { background: var(--primary); color: var(--white); }

/* --- Responsive --- */
@media (max-width: 968px) {
  .hero__inner, .page-hero__inner, .content-with-form, .split-section, .split-section--reverse { grid-template-columns: 1fr; }
  .split-section--reverse { direction: ltr; }
  .quote-form { max-width: 500px; }
  .header__nav { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--dark); flex-direction: column; justify-content: center; align-items: center; gap: 0.5rem; }
  .header__nav.active { display: flex; }
  .header__nav-link { font-size: 1.2rem; padding: 0.75rem 1.5rem; }
  .header__dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; background: transparent; border: none; box-shadow: none; min-width: 0; text-align: center; padding: 0; }
  .header__dropdown-toggle::after { display: none; }
  .header__cta { margin-left: 0; margin-top: 1rem; }
  .header__hamburger { display: flex; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .top-bar__info { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .quote-form__row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__nav { justify-content: center; }
  .footer__legal { flex-direction: column; text-align: center; }
}

@media (max-width: 400px) {
  .services-grid { grid-template-columns: 1fr; }
}
