/* ================================================
   BLUE COLLAR HEATING - PRODUCTION STYLES
   CRO Optimized | Mobile-First | Clean UI
   ================================================ */

:root {
  --blue: #1e40af;
  --blue-dark: #1e3a8a;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ================================================
   HEADER / NAVIGATION
   ================================================ */

.site-header {
  background: var(--gray-900);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.logo:hover { text-decoration: none; opacity: 0.9; }

.logo svg { width: 28px; height: 28px; fill: var(--orange); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.nav-phone:hover { color: var(--orange); text-decoration: none; }

.nav-phone svg { width: 18px; height: 18px; fill: var(--orange); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

.btn-primary:hover { box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5); }

.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-300);
}

.breadcrumb a { color: var(--gray-300); }
.breadcrumb a:hover { color: var(--white); text-decoration: none; }
.breadcrumb .separator { color: var(--gray-600); }
.breadcrumb .current { color: var(--white); }

/* Mobile Header */
@media (max-width: 768px) {
  .site-header { padding: 0.75rem 1rem; }
  .nav-phone span { display: none; }
  .btn span { display: none; }
  .btn { padding: 0.5rem 0.75rem; }
  .logo span { display: none; }
}

/* ================================================
   HERO SECTION (Index Page)
   ================================================ */

.hero {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Trust Bar */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
}

.trust-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.trust-item svg { width: 20px; height: 20px; fill: var(--blue); }

/* ================================================
   ARTICLE GRID (Index Page)
   ================================================ */

.articles-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.articles-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

.article-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

.article-card .category {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.article-card h3 {
  font-size: 1.125rem;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.article-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
  flex: 1;
  margin-bottom: 1rem;
}

.article-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-100);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* ================================================
   ARTICLE PAGE LAYOUT
   ================================================ */

.article-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: var(--white);
  padding: 2rem 1.5rem;
}

.article-header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.article-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.article-meta-item svg { width: 16px; height: 16px; fill: var(--orange); }

/* Article Content */
.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 260px 1fr;
  }
}

/* Sidebar / TOC */
.article-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.toc {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
}

.toc h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.toc ul { list-style: none; }

.toc li { margin-bottom: 0.5rem; }

.toc a {
  font-size: 0.875rem;
  color: var(--gray-700);
  display: block;
  padding: 0.375rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: all 0.2s;
}

.toc a:hover, .toc a.active {
  color: var(--blue);
  border-left-color: var(--blue);
  text-decoration: none;
}

/* Article Content */
.article-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--gray-200);
}

.article-content h2 {
  font-size: 1.5rem;
  color: var(--gray-900);
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
}

.article-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.article-content h3 {
  font-size: 1.25rem;
  color: var(--gray-800);
  margin: 1.5rem 0 0.75rem;
}

.article-content p { margin-bottom: 1rem; }

.article-content ul, .article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content li { margin-bottom: 0.5rem; }

.article-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

/* Quick Answer Box */
.quick-answer {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.quick-answer h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.quick-answer h3 svg { width: 20px; height: 20px; fill: var(--orange); }

.quick-answer p { opacity: 0.95; font-size: 0.95rem; margin: 0; }

/* CTA Box */
.cta-box {
  background: var(--gray-900);
  color: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 2rem 0;
}

.cta-box h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.cta-box p { opacity: 0.8; margin-bottom: 1.25rem; }

/* ================================================
   FOOTER
   ================================================ */

.site-footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: var(--orange);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-section p, .footer-section a {
  color: var(--gray-300);
  font-size: 0.875rem;
  line-height: 1.8;
  display: block;
}

.footer-section a:hover { color: var(--white); text-decoration: none; }

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-700);
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ================================================
   MODAL
   ================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  background: var(--blue-dark);
  color: var(--white);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 1.125rem; }

.modal-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-body { padding: 1.5rem; }

.contact-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-option {
  text-align: center;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
}

.contact-option:hover {
  border-color: var(--blue);
  text-decoration: none;
}

.contact-option svg {
  width: 32px;
  height: 32px;
  fill: var(--orange);
  margin-bottom: 0.5rem;
}

.contact-option span {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
}

/* ================================================
   STICKY CTA
   ================================================ */

.sticky-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
}

@media (max-width: 768px) {
  .sticky-cta { bottom: 1rem; right: 1rem; }
}

/* ================================================
   UTILITIES
   ================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ================================================
   ARTICLE IMAGES
   ================================================ */

.article-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.article-images figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.article-images img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
}

.article-images figcaption {
  padding: 1rem;
  background: var(--gray-50);
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: center;
}

/* ================================================
   ARTICLE HEADER (for articles)
   ================================================ */

.article-header .category {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

/* ================================================
   FAQ SECTION
   ================================================ */

.faq-section {
  margin-top: 2rem;
}

.faq-item {
  background: var(--gray-50);
  border-left: 4px solid var(--blue);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.faq-item h4 {
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.faq-item p {
  color: var(--gray-700);
  font-size: 0.95rem;
  margin: 0;
}

/* ================================================
   WARNING BOX
   ================================================ */

.warning-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.warning-box h4 {
  color: #92400e;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.warning-box p {
  color: #78350f;
  margin: 0;
}

/* ================================================
   INLINE IMAGES (single images in content)
   ================================================ */

.article-content .inline-image {
  margin: 1.5rem 0;
  text-align: center;
}

.article-content .inline-image img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.article-content .inline-image figcaption {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-style: italic;
  margin-top: 0.5rem;
}
