/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Color Palette */
  --primary: #0f766e;        /* Deep Organic Teal/Green */
  --primary-hover: #115e59;
  --secondary: #e11d48;      /* Urgent Red */
  --secondary-hover: #be123c;
  --warning: #d97706;        /* Highlight Amber */
  --text-dark: #1e293b;      /* Slate 800 */
  --text-muted: #64748b;     /* Slate 500 */
  --bg-main: #f8fafc;        /* Slate 50 */
  --bg-card: #ffffff;
  --border-color: #e2e8f0;   /* Slate 200 */
  
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Lora', Georgia, Cambria, "Times New Roman", Times, serif;
  
  /* Layout */
  --container-width: 1100px;
  --article-width: 720px;
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

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

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

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Sticky Top Alert */
.top-alert {
  background-color: #000000;
  color: white;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 1000;
  position: relative;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.top-alert span.badge {
  background-color: #f59e0b;
  color: #000000;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 800;
  animation: pulse 1.5s infinite;
}

/* Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 1001;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Header */
header {
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--text-dark);
  padding: 1.5rem 0;
}

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

.brand-logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo span {
  color: var(--primary);
}

.editorial-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Main Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 5rem;
}

@media (min-width: 900px) {
  .main-grid {
    grid-template-columns: 2.2fr 1fr;
  }
}

/* ==========================================================================
   ARTICLE CONTENT & COPY STYLING
   ========================================================================== */
.article-container {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}

@media (min-width: 640px) {
  .article-container {
    padding: 2.5rem;
  }
}

.article-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .article-title {
    font-size: 2.75rem;
  }
}

.article-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1.5rem;
  line-height: 1.4;
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
}

/* Author Box */
.author-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #cbd5e1;
  object-fit: cover;
}

.author-details strong {
  color: var(--text-dark);
  display: block;
}

/* Body Text */
.article-body {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.75;
  color: #2d3748;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body p.dropcap::first-letter {
  font-family: var(--font-sans);
  font-size: 3.5rem;
  float: left;
  line-height: 0.8;
  padding: 0.2rem 0.6rem 0.1rem 0;
  font-weight: 900;
  color: var(--primary);
}

.article-body h2 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
}

/* Feature Images */
.featured-image-wrapper {
  margin: 1.5rem 0;
}

.featured-image-wrapper figcaption {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Highlight boxes / callouts */
.callout-box {
  background-color: #f0fdfa; /* Teal 50 */
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: #115e59;
}

.callout-box strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--primary-hover);
}

.warning-box {
  background-color: #fff1f2; /* Rose 50 */
  border-left: 4px solid var(--secondary);
  color: #9f1239;
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.warning-box strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--secondary-hover);
}

/* ==========================================================================
   SIDEBAR COMPONENTS
   ========================================================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background-color: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.widget-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Advertorial Card */
.promo-sidebar-card {
  text-align: center;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.promo-sidebar-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 80%);
  pointer-events: none;
}

.promo-sidebar-card .widget-title {
  color: white;
  border-bottom-color: rgba(255,255,255,0.2);
}

.promo-price {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fbbf24;
  margin: 1rem 0;
}

.promo-discount {
  background-color: #000000;
  color: white;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
}

/* ==========================================================================
   INTERACTIVE AIR QUALITY QUIZ
   ========================================================================== */
.quiz-container {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
  font-family: var(--font-sans);
}

.quiz-header {
  text-align: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.quiz-header h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.quiz-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quiz-progress {
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  margin: 1rem auto;
  max-width: 250px;
  overflow: hidden;
}

.quiz-progress-inner {
  height: 100%;
  background-color: var(--primary);
  width: 33%;
  transition: width 0.3s ease;
}

.quiz-step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.quiz-step.active {
  display: block;
}

.quiz-question {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 350px;
  margin: 0 auto;
}

.quiz-btn {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-dark);
  outline: none;
}

.quiz-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.quiz-btn:active {
  transform: scale(0.98);
}

/* Quiz Loader */
.quiz-loader {
  display: none;
  text-align: center;
  padding: 2rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(15, 118, 110, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

/* Quiz Result */
.quiz-result {
  display: none;
  text-align: center;
  animation: fadeIn 0.4s ease forwards;
}

.result-badge {
  background-color: #000000;
  color: #ffffff;
  font-weight: 800;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
  border: 2px solid #ef4444;
  animation: flashRed 2s infinite;
}

.quiz-result h4 {
  font-size: 1.5rem;
  color: #991b1b;
  margin-bottom: 0.5rem;
}

.quiz-result p {
  color: var(--text-dark);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   BUTTONS & CALLS TO ACTION (CTA)
   ========================================================================== */
.cta-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: white !important;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 1.1rem 2rem;
  border-radius: 8px;
  border-bottom: 4px solid #b45309;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 450px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cta-button:hover {
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(217, 119, 6, 0.4);
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
}

.cta-button:active {
  transform: translateY(1px);
  border-bottom-width: 1px;
  margin-top: 3px;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.2);
}

.cta-container {
  text-align: center;
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.cta-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.cta-subtext svg {
  fill: #22c55e;
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   COMPARISON TABLE
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: var(--bg-card);
  font-family: var(--font-sans);
}

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

.comparison-table th {
  background-color: #f1f5f9;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
}

.comparison-table td {
  border-bottom: 1px solid var(--border-color);
}

.comparison-table tr:hover {
  background-color: #f8fafc;
}

.comparison-table .highlight-col {
  background-color: #f0fdfa; /* Teal 50 */
  font-weight: 600;
  border-left: 1px solid #ccfbf1;
  border-right: 1px solid #ccfbf1;
}

.comparison-table th.highlight-col {
  background-color: #ccfbf1;
  color: var(--primary);
}

.check-icon {
  color: #10b981;
  font-weight: bold;
  font-size: 1.15rem;
}

.cross-icon {
  color: #ef4444;
  font-weight: bold;
  font-size: 1.15rem;
}

/* ==========================================================================
   COMMENTS / USER TESTIMONIALS SECTION
   ========================================================================== */
.comments-section {
  margin-top: 3.5rem;
  border-top: 2px solid var(--text-dark);
  padding-top: 2rem;
  font-family: var(--font-sans);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.comments-count {
  font-size: 1.25rem;
  font-weight: 700;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #e2e8f0;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background-size: cover;
  background-position: center;
}

.comment-content {
  flex-grow: 1;
}

.comment-author {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verified-badge {
  background-color: #e0f2fe;
  color: #0369a1;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.comment-text {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 0.75rem;
}

.comment-actions {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-action-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.comment-action-btn:hover {
  color: var(--primary);
}

/* ==========================================================================
   STICKY FOOTER
   ========================================================================== */
.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000000;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.25);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  backdrop-filter: blur(8px);
  border-top: 1px solid #222222;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-footer.visible {
  transform: translateY(0);
}

.sticky-footer-content {
  width: 100%;
  max-width: var(--article-width);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .sticky-footer-content {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.sticky-text {
  text-align: center;
}

@media (min-width: 640px) {
  .sticky-text {
    text-align: left;
  }
}

.sticky-headline {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
}

.sticky-timer {
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 0.15rem;
}

.sticky-btn-wrapper {
  width: 100%;
  max-width: 250px;
}

.sticky-btn-wrapper .cta-button {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-bottom-width: 3px;
  max-width: 100%;
}

/* ==========================================================================
   FOOTER (AD DISCLAIMERS)
   ========================================================================== */
footer {
  background-color: #1e293b;
  color: #94a3b8;
  padding: 3rem 0;
  font-size: 0.75rem;
  text-align: center;
  border-top: 3px solid var(--primary);
  margin-top: 4rem;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--primary);
}

.footer-links {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-disclaimer {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flashRed {
  0% {
    background-color: #000000;
    border-color: #ef4444;
  }
  50% {
    background-color: #1a1a1a;
    border-color: #f87171;
  }
  100% {
    background-color: #000000;
    border-color: #ef4444;
  }
}
