/* ==========================================================================
   NY Plumbing — East Williamsburg, Brooklyn
   Master Design System & Production Stylesheet
   ========================================================================== */

:root {
  --color-primary-navy: #0f233d;
  --color-navy-dark: #0a1728;
  --color-navy-light: #18375e;
  --color-accent-amber: #d97706;
  --color-accent-hover: #b45309;
  --color-accent-light: #fef3c7;
  --color-emergency-red: #dc2626;
  --color-emergency-bg: #fef2f2;
  --color-emergency-border: #f87171;
  --color-text-main: #1f2937;
  --color-text-muted: #4b5563;
  --color-text-light: #6b7280;
  --color-bg-white: #ffffff;
  --color-bg-neutral: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-bg-card: #ffffff;
  --color-border: #e2e8f0;
  --color-border-subtle: #edf2f7;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --max-width: 1200px;
  --header-height: 76px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--color-text-main);
  background-color: var(--color-bg-neutral);
  line-height: 1.65;
  padding-bottom: 74px; /* Space for mobile sticky call bar */
  overflow-x: hidden;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--color-navy-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-accent-amber);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-navy);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 3.8vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); margin-top: 1.75rem; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin-top: 1.25rem; }

p {
  margin-bottom: 1.25rem;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 10px;
  background: var(--color-accent-amber);
  color: #fff;
  padding: 10px 18px;
  z-index: 9999;
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 10px;
}

/* Containers & Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Top Utility Notice Bar */
.top-notice-bar {
  background-color: var(--color-navy-dark);
  color: #e2e8f0;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-notice-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-location {
  display: inline-block;
  background-color: rgba(217, 119, 6, 0.25);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background-color: var(--color-primary-navy);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-accent-amber);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-primary-navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Desktop Navigation */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--color-primary-navy);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--color-accent-amber);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  padding: 0.5rem 0;
  z-index: 1010;
  margin-top: 0.25rem;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.55rem 1.2rem;
  color: var(--color-text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--color-bg-alt);
  color: var(--color-accent-amber);
}

/* Primary Header Call Button */
.btn-header-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-accent-amber);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-header-call:hover,
.btn-header-call:focus {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--color-primary-navy);
  min-width: 44px;
  min-height: 44px;
}

@media (min-width: 992px) {
  .mobile-toggle {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  background-color: var(--color-bg-white);
  border-bottom: 2px solid var(--color-accent-amber);
  padding: 1rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid var(--color-border-subtle);
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 0;
  color: var(--color-primary-navy);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  color: var(--color-accent-amber);
}

.mobile-submenu {
  list-style: none;
  padding-left: 1rem;
  background-color: var(--color-bg-neutral);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.mobile-submenu-item {
  border-bottom: 1px solid var(--color-border-subtle);
}

.mobile-submenu-item:last-child {
  border-bottom: none;
}

.mobile-submenu-link {
  display: block;
  padding: 0.6rem 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

.mobile-submenu-link:hover,
.mobile-submenu-link:focus {
  color: var(--color-accent-amber);
}

.mobile-cta-wrapper {
  margin-top: 1.25rem;
}

.mobile-cta-wrapper .btn-header-call {
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
  font-size: 1.05rem;
}

/* Breadcrumbs */
.breadcrumbs {
  background-color: var(--color-bg-alt);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.breadcrumbs-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
}

.breadcrumbs-item a {
  color: var(--color-navy-light);
  text-decoration: none;
}

.breadcrumbs-item a:hover {
  text-decoration: underline;
}

.breadcrumbs-separator {
  color: var(--color-text-light);
}

/* Section Padding & Backgrounds */
.section-pad {
  padding: 3.5rem 0;
}

.section-bg-white {
  background-color: var(--color-bg-white);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.section-bg-alt {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0f233d 0%, #18375e 100%);
  color: #ffffff;
  padding: 3.5rem 0 4rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-badge {
  display: inline-block;
  background-color: rgba(217, 119, 6, 0.25);
  border: 1px solid rgba(217, 119, 6, 0.5);
  color: #fbbf24;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-section h1 {
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 1.75rem;
}

.hero-cta-group {
  margin-bottom: 1rem;
}

.btn-primary-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--color-accent-amber);
  color: #ffffff !important;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-primary-call:hover,
.btn-primary-call:focus {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
}

.hero-guarantee {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 0;
}

.hero-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255, 255, 255, 0.15);
}

.hero-image-wrap img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Page Intro Block for Inner Pages */
.page-intro {
  background: linear-gradient(135deg, #0f233d 0%, #1a365d 100%);
  color: #ffffff;
  padding: 3rem 0;
}

.page-intro h1 {
  color: #ffffff;
  margin-bottom: 1rem;
}

.page-intro p.lead {
  font-size: 1.15rem;
  color: #e2e8f0;
  max-width: 850px;
  margin-bottom: 1.5rem;
}

/* Service Image Banner */
.service-image-block {
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.service-image-block img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Cards */
.card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.card h3 {
  margin-top: 0;
  color: var(--color-primary-navy);
}

.card p:last-child {
  margin-bottom: 0;
}

/* Process Steps */
.step-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.step-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background-color: var(--color-primary-navy);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--color-accent-amber);
}

.step-body h3 {
  margin-top: 0;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.step-body p:last-child {
  margin-bottom: 0;
}

/* Callout Box */
.callout-box {
  background-color: var(--color-bg-white);
  border-left: 4px solid var(--color-accent-amber);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--color-border-subtle);
  border-right: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.callout-box h3 {
  margin-top: 0;
}

.callout-box p:last-child {
  margin-bottom: 0;
}

/* Emergency Safety Banner */
.emergency-banner {
  background-color: var(--color-emergency-bg);
  border: 2px solid var(--color-emergency-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.emergency-banner h3 {
  color: var(--color-emergency-red);
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.emergency-banner p:last-child {
  margin-bottom: 0;
}

/* Dedicated Mid-Page Phone CTA */
.cta-banner {
  background: linear-gradient(135deg, #0f233d 0%, #18375e 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
}

.cta-banner h2, .cta-banner h3 {
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: #cbd5e1;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
}

/* FAQs */
.faq-list {
  margin-top: 1.5rem;
}

.faq-item {
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  border-top: 1px solid var(--color-border-subtle);
}

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

/* Site Footer */
.site-footer {
  background-color: var(--color-navy-dark);
  color: #cbd5e1;
  padding: 3.5rem 0 1.5rem;
  border-top: 3px solid var(--color-accent-amber);
  font-size: 0.925rem;
}

.site-footer a {
  color: #e2e8f0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 2px;
  background-color: var(--color-accent-amber);
}

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

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-phone-cta {
  display: inline-block;
  background-color: var(--color-accent-amber);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  margin-top: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Sticky Mobile Call Bar */
.sticky-mobile-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-navy-dark);
  padding: 0.6rem 1rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
  border-top: 2px solid var(--color-accent-amber);
}

@media (min-width: 992px) {
  .sticky-mobile-bar {
    display: none;
  }
}

.sticky-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background-color: var(--color-accent-amber);
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
