/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #0891b2;
    --accent-color: #06b6d4;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Header and Navigation */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    color: white;
    padding: 4rem 0;
}

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

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-secondary:hover {
    background: transparent;
    color: white;
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    text-align: center;
}

.section-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* Benefits/Features Grid */
.benefits-grid,
.picks-grid,
.guide-grid,
.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card,
.guide-card,
.compatibility-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
}

.benefit-card:hover,
.guide-card:hover,
.compatibility-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-card h3,
.guide-card h3,
.compatibility-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.benefit-card p,
.guide-card p,
.compatibility-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Product Cards */
.pick-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
}

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

.pick-card.featured {
    border: 3px solid var(--primary-color);
}

.pick-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.pick-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.pick-content {
    padding: 1.5rem;
}

.pick-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.rating {
    color: #fbbf24;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.rating span {
    color: var(--text-light);
    font-size: 0.875rem;
}

.pick-features {
    list-style: none;
    margin: 1rem 0;
}

.pick-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.95rem;
}

.pick-features li:last-child {
    border-bottom: none;
}

.pick-specs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.spec-tag {
    background: var(--bg-light);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Contaminant Cards */
.contaminant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contaminant-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
}

.risk-level {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.risk-level.high {
    background: #fee2e2;
    color: #dc2626;
}

.risk-level.medium {
    background: #fef3c7;
    color: #d97706;
}

.risk-level.low {
    background: #d1fae5;
    color: #059669;
}

.filter-effectiveness {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-card img {
    border-radius: 8px;
    margin: 1rem auto;
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.step-card h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.125rem;
}

/* FAQ Section */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.7;
}

/* CTA Sections */
.cta-section {
    text-align: center;
    margin-top: 3rem;
}

.cta-final {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta-final h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-final p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.95;
}

/* Comparison Table */
.comparison-table-section {
    background: var(--bg-light);
}

.filter-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.filter-controls h3 {
    margin-bottom: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.comparison-table thead {
    background: var(--primary-color);
    color: white;
}

.comparison-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

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

.product-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-cell img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.rating-small {
    color: #fbbf24;
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.badge-featured,
.badge-value,
.badge-specialty,
.badge-luxury {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.badge-featured {
    background: #dbeafe;
    color: #1e40af;
}

.badge-value {
    background: #d1fae5;
    color: #065f46;
}

.badge-specialty {
    background: #fef3c7;
    color: #92400e;
}

.badge-luxury {
    background: #fce7f3;
    color: #9f1239;
}

.spec-excellent {
    color: var(--success-color);
    font-weight: 600;
}

.spec-good {
    color: var(--secondary-color);
    font-weight: 600;
}

.spec-fair {
    color: var(--warning-color);
    font-weight: 600;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.price-cell {
    font-weight: 600;
    color: var(--text-dark);
}

/* Cost Table */
.cost-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
}

.cost-table thead {
    background: var(--bg-light);
}

.cost-table th,
.cost-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.highlight-cell {
    background: #dbeafe;
    font-weight: 600;
    color: var(--primary-color);
}

.cost-note {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Contaminant Detail Pages */
.contaminant-intro {
    background: var(--bg-light);
}

.intro-content {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.intro-content h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.intro-content p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-light);
    line-height: 1.6;
}

.contaminants-detailed {
    background: var(--bg-white);
}

.contaminant-detail {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
    overflow: hidden;
}

.contaminant-header {
    background: var(--bg-light);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.contaminant-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.risk-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.risk-badge.high {
    background: #fee2e2;
    color: #dc2626;
}

.risk-badge.medium {
    background: #fef3c7;
    color: #d97706;
}

.risk-badge.low {
    background: #d1fae5;
    color: #059669;
}

.contaminant-body {
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.contaminant-info h4 {
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem;
    font-size: 1.125rem;
}

.contaminant-info h4:first-child {
    margin-top: 0;
}

.contaminant-info ul {
    margin-left: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.contaminant-info p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.filtration-solution {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.filtration-solution h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.solution-rating {
    margin-bottom: 1rem;
}

.rating-bar {
    height: 8px;
    background: var(--success-color);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.solution-rating span {
    font-weight: 600;
    color: var(--text-dark);
}

.filtration-solution ul {
    margin: 0.5rem 0 1rem 1.5rem;
    line-height: 1.8;
}

.filtration-solution p {
    margin-bottom: 0.75rem;
}

/* Testing Guide */
.testing-guide {
    background: var(--bg-light);
}

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

.testing-option {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.testing-option h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.testing-option .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.testing-option ul {
    margin: 1rem 0;
    line-height: 1.8;
}

/* Thread Adapter Info */
.thread-adapter-info {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.thread-adapter-info h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.thread-adapter-info ul {
    margin: 1rem 0 1rem 1.5rem;
    line-height: 1.8;
}

.pro-tip {
    background: #dbeafe;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary-color);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.7;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.disclosure {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .contaminant-body {
        grid-template-columns: 1fr;
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .table-wrapper {
        margin: 0 -20px;
        border-radius: 0;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .product-cell {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-cell img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.75rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .steps-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .cta-section,
    .cta-final,
    footer,
    .filter-controls {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    .comparison-table {
        page-break-inside: avoid;
    }
}
