/* ============================================
   FilterSizes.com — Main Stylesheet
   A practical HVAC filter sizing reference
   ============================================ */

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

:root {
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-primary: #1a5276;
  --color-primary-light: #2980b9;
  --color-accent: #e67e22;
  --color-accent-hover: #d35400;
  --color-text: #2c3e50;
  --color-text-light: #5d6d7e;
  --color-border: #dce1e6;
  --color-success: #27ae60;
  --color-info-bg: #eaf2f8;
  --color-warning-bg: #fef9e7;
  --color-warning-border: #f0c040;
  --font-body: 'Source Sans 3', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --font-heading: 'Bitter', Georgia, serif;
  --max-width: 1100px;
  --radius: 8px;
  --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 24px rgba(0,0,0,0.12);
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.2rem; margin-bottom: 0.6em; }
h2 { font-size: 1.6rem; margin-bottom: 0.5em; margin-top: 1.8em; }
h3 { font-size: 1.25rem; margin-bottom: 0.4em; margin-top: 1.4em; }

p { margin-bottom: 1em; }

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

/* --- Header / Nav --- */
.site-header {
  background: var(--color-primary);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

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

.site-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.site-logo span {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.site-nav a {
  color: rgba(255,255,255,0.85);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a6fa0 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.6rem;
  margin-bottom: 0.4em;
  font-weight: 800;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto 1.5em;
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.hero-note a {
  color: #ffffff;
  text-decoration: underline;
}

.hero-cta {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.15s;
}

.hero-cta:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

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

.page-hero h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 0.3em;
}

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

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

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

.breadcrumbs a:hover {
  color: var(--color-primary-light);
}

.breadcrumbs span {
  margin: 0 0.4rem;
  opacity: 0.5;
}

/* --- Content --- */
.content-section {
  padding: 2.5rem 0;
}

.content-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.content-card h2:first-child {
  margin-top: 0;
}

/* --- Feature Grid (homepage) --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--color-primary-light);
  transition: box-shadow 0.2s, transform 0.15s;
}

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

.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.feature-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

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

.feature-card a {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Size Table --- */
.size-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: 0.95rem;
}

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

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

tbody tr:hover {
  background: var(--color-info-bg);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* --- Info Box / Callout --- */
.info-box {
  background: var(--color-info-bg);
  border-left: 4px solid var(--color-primary-light);
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.info-box.warning {
  background: var(--color-warning-bg);
  border-left-color: var(--color-warning-border);
}

.info-box strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--color-primary);
}

/* --- Recommendation Card --- */
.rec-card {
  background: var(--color-surface);
  border: 2px solid var(--color-primary-light);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin: 2rem 0;
  position: relative;
  box-shadow: var(--shadow-md);
}

.rec-card.top-pick {
  border-color: var(--color-accent);
}

.rec-badge {
  position: absolute;
  top: -12px;
  left: 1.5rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.9rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rec-card h3 {
  margin-top: 0.5rem;
  font-size: 1.3rem;
}

.rec-card ul {
  margin: 0.8rem 0;
  padding-left: 1.2rem;
}

.rec-card ul li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.rec-card .rec-link {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.5rem;
  transition: background 0.2s;
}

.rec-card .rec-link:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

/* --- Steps / How-to --- */
.steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.steps li {
  counter-increment: step-counter;
  position: relative;
  padding: 1.2rem 1.2rem 1.2rem 3.8rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 2rem;
  height: 2rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.steps li strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--color-primary);
}

/* --- FAQ --- */
.faq-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.faq-item summary:hover {
  background: var(--color-info-bg);
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--color-primary-light);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item .faq-body {
  padding: 0 1.5rem 1.2rem;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* --- Comparison / Checklist --- */
.comparison-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.checklist li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

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

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.6;
}

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

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

.footer-col ul a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-col ul a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.2rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 1.5rem;
  font-size: 0.82rem;
  text-align: center;
}

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

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow-lg);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.6rem 0.85rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero p {
    font-size: 1rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.35rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .content-card {
    padding: 1.4rem;
  }

  .rec-card {
    padding: 1.4rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

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

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
