/* NY Plumbing - Design System & Stylesheet
   plg.nyplumbing.sbs (Prospect Lefferts Gardens, Brooklyn)
   Primary Brand Palette: Deep Navy & Clean White with High-Contrast Accent
*/

:root {
    --primary-color: #0F172A;      /* Deep Navy */
    --primary-dark: #0A0F1D;       /* Midnight Navy */
    --primary-light: #1E293B;      /* Slate Navy */
    --accent-color: #DC2626;       /* High-contrast Red/Amber accent reserved for telephone CTAs */
    --accent-hover: #B91C1C;
    --text-color: #334155;         /* Readable charcoal body */
    --text-muted: #64748B;
    --light-bg: #F8FAFC;           /* Alternating section background */
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --border-subtle: #CBD5E1;
    --white: #FFFFFF;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3.5rem;
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    line-height: 1.65;
    background-color: var(--white);
    padding-bottom: 72px; /* Space for mobile sticky call bar */
    -webkit-font-smoothing: antialiased;
}

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

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

a {
    color: #1D4ED8;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s ease-in-out;
}

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

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

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

h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 1.25rem;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1.25rem;
}

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

li {
    margin-bottom: 0.5rem;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: var(--spacing-lg) 0;
}

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

.skip-link {
    position: absolute;
    top: -50px;
    left: 10px;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    z-index: 999;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    min-height: 44px;
    min-width: 44px;
    line-height: 1.2;
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white) !important;
    text-decoration: none !important;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

/* Header & Navigation */
.site-header {
    background-color: var(--primary-color);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.site-logo {
    display: flex;
    flex-direction: column;
}

.logo-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-link:hover {
    color: var(--white);
}

.logo-location {
    font-size: 0.75rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

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

.main-nav li {
    margin: 0;
    position: relative;
}

.nav-link {
    color: #E2E8F0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 1rem 0;
    display: inline-block;
    transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--white);
}

/* Dropdown Menu - Strict Hidden Default */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    background: transparent;
    border: none;
    color: #E2E8F0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 0;
    font-family: inherit;
    line-height: 1;
    transition: color 0.15s ease;
}

.dropdown-trigger:hover,
.dropdown.open .dropdown-trigger {
    color: var(--white);
}

.dropdown-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-dark);
    min-width: 270px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: none;
    z-index: 150;
    padding: 0.5rem 0;
    list-style: none;
}

@media (min-width: 901px) {
    .dropdown:hover .dropdown-menu,
    .dropdown.open .dropdown-menu {
        display: block !important;
    }
    .dropdown:hover .dropdown-arrow,
    .dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }
    .dropdown:hover .dropdown-trigger {
        color: var(--white);
    }
}

@media (max-width: 900px) {
    .dropdown.open .dropdown-menu {
        display: block !important;
    }
}

.dropdown-menu li {
    padding: 0;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 400;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus,
.dropdown-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-weight: 600;
}

.header-cta {
    display: none;
}

@media (min-width: 1024px) {
    .header-cta {
        display: block;
    }
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: 0.3s;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .main-nav li {
        padding: 0 1.25rem;
    }
    .nav-link, .dropdown-trigger {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.85rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.25);
        border: none;
        padding-left: 1rem;
        display: none !important;
    }
    .dropdown.open .dropdown-menu {
        display: block !important;
    }
}

/* Mobile Sticky Call Bar */
.mobile-call-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 90;
    background: var(--primary-dark);
    padding: 0.65rem 1rem;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.2);
    display: block;
}

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

/* Breadcrumbs */
.breadcrumbs {
    background-color: var(--light-bg);
    padding: 0.75rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

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

.breadcrumbs li {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs li::after {
    content: "/";
    color: #94A3B8;
}

.breadcrumbs li:last-child::after {
    content: "";
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
    color: var(--primary-color);
    font-weight: 600;
}

/* Hero Section */
.hero {
    background-color: var(--light-bg);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.hero-content {
    max-width: 650px;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--text-color);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.hero-image-wrap {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
    border: 1px solid var(--border-color);
    background-color: #E2E8F0;
    position: relative;
}

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

/* Full-Width Edge-to-Edge Responsive Image Banner */
.fullwidth-image-banner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0F172A;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.fullwidth-image-banner img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    object-position: center 35%;
    display: block;
}

/* Emergency Safety Banner */
.safety-banner {
    background-color: #FEF2F2;
    border-left: 4px solid #DC2626;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.safety-banner h3 {
    color: #991B1B;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.safety-banner p {
    color: #7F1D1D;
    margin-bottom: 0.5rem;
}

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

/* Grids & Cards */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

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

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

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

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

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    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-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

/* Numbered Process Workflow */
.process-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

.process-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.process-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Callout Box */
.cta-box {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin: 2.5rem 0;
}

.cta-box h2, .cta-box h3 {
    color: var(--white);
    margin-top: 0;
}

.cta-box p {
    color: #CBD5E1;
    max-width: 650px;
    margin: 0 auto 1.75rem auto;
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10B981;
    font-weight: bold;
}

/* Technical Comparison Table */
.comparison-wrap {
    overflow-x: auto;
    margin: 2.5rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.editorial-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    text-align: left;
    font-size: 0.95rem;
}

.editorial-table th {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.editorial-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.editorial-table tr:nth-child(even) td {
    background-color: var(--light-bg);
}

.editorial-table tr:last-child td {
    border-bottom: none;
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

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

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

.faq-toggle-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

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

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

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

/* Related Services Box */
.related-services {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-top: 3rem;
}

/* Site Footer */
.site-footer {
    background-color: var(--primary-dark);
    color: #94A3B8;
    padding: 4rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

@media (min-width: 960px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    }
}

.footer-col h3, .footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

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

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

.footer-col a {
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.925rem;
}

.footer-col a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #64748B;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
}

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

.footer-bottom a {
    color: #94A3B8;
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--white);
}

.nearby-badge {
    font-size: 0.875rem;
    color: #94A3B8;
    line-height: 1.5;
    margin-top: 0.5rem;
}
