/* Blog & Cost Guide Styles */

/* Navigation Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 0.7rem;
  margin-left: 5px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 220px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border-radius: 12px;
  padding: 10px 0;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: var(--bg-light);
  color: var(--accent);
}

/* Cost Hero Section */
.cost-hero {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.cost-hero .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: start;
}

.cost-hero-content {
  max-width: 700px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.cost-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.2;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.cost-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 30px;
}

.cost-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cost-card.highlight {
  background: var(--accent);
  color: white;
  transform: scale(1.05);
}

.cost-card.highlight .cost-label,
.cost-card.highlight .cost-range {
  color: rgba(255,255,255,0.8);
}

.cost-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cost-avg {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.cost-card.highlight .cost-avg {
  color: white;
}

.cost-range {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.cost-hero-cta {
  position: sticky;
  top: 100px;
}

.cta-box {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  text-align: center;
}

.cta-box h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.cta-box p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.cta-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--cta);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background 0.3s;
}

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

.cta-note {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 15px;
}

/* Table of Contents */
.toc-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  position: sticky;
  top: 64px;
  z-index: 100;
}

.toc-nav .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

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

.toc-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

/* Blog Content */
.blog-content {
  padding: 60px 0;
  background: white;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
}

.main-content {
  max-width: 800px;
}

.content-section {
  margin-bottom: 50px;
}

.content-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.content-section p {
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 15px;
}

/* Cost Table */
.cost-table {
  overflow-x: auto;
  margin: 25px 0;
}

.cost-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cost-table th {
  background: var(--primary);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

.cost-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border);
}

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

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

/* Cost Breakdown */
.cost-breakdown {
  background: var(--bg-light);
  border-radius: 16px;
  padding: 25px;
  margin: 25px 0;
}

.cost-breakdown h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.breakdown-grid {
  display: grid;
  gap: 12px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: white;
  border-radius: 8px;
}

.breakdown-item .size {
  color: var(--text-dark);
}

.breakdown-item .price {
  font-weight: 700;
  color: var(--accent);
}

/* Material Cards */
.material-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.material-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s;
}

.material-card:hover {
  border-color: var(--accent);
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.1);
}

.material-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.material-header h4 {
  font-weight: 700;
  color: var(--primary);
}

.material-price {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

.material-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.material-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Factors Grid */
.factors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.factor-item {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 20px;
}

.factor-item h4 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.factor-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* FAQ List */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-light);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 20px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
}

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

.faq-item p {
  padding: 0 20px 20px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Content CTA */
.content-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  color: white;
  margin-top: 50px;
}

.content-cta h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  border: none;
  color: white;
}

.content-cta p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 25px;
}

.cta-btn-large {
  display: inline-block;
  padding: 18px 40px;
  background: var(--cta);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background 0.3s;
}

.cta-btn-large:hover {
  background: var(--cta-hover);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 150px;
  height: fit-content;
}

.sidebar-widget {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
}

.sidebar-widget h4 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.sidebar-widget p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.sidebar-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: background 0.3s;
}

.sidebar-btn:hover {
  background: #1d4ed8;
}

.related-links {
  list-style: none;
}

.related-links li {
  margin-bottom: 10px;
}

.related-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.related-links a:hover {
  text-decoration: underline;
}

.trust-widget {
  background: var(--bg-light);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.trust-icon {
  width: 20px;
  height: 20px;
  background: var(--secondary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Article Styles */
.article-header {
  text-align: center;
  padding: 60px 0 40px;
}

.article-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 15px;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.article-intro {
  background: var(--bg-light);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 40px;
}

.article-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dark);
  margin: 0;
}

/* Tip Sections */
.tip-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.tip-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.tip-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.pro-tip {
  background: rgba(8, 145, 178, 0.1);
  border-left: 4px solid var(--secondary);
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
  margin-top: 20px;
}

.cost-context {
  background: var(--bg-light);
  padding: 15px 20px;
  border-radius: 8px;
  margin-top: 15px;
}

/* Sign Sections */
.sign-section {
  margin-bottom: 35px;
  padding: 25px;
  border-radius: 16px;
}

.sign-section.warning {
  background: var(--bg-light);
  border-left: 4px solid var(--accent);
}

.sign-section.critical {
  background: rgba(220, 38, 38, 0.05);
  border-left: 4px solid #dc2626;
}

.sign-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 10px;
}

.sign-section.critical .sign-icon {
  background: #dc2626;
}

.sign-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.alert-box {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 15px 20px;
  border-radius: 8px;
  margin-top: 15px;
}

.red-flags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.red-flag {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
}

.decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.decision-box {
  background: var(--bg-light);
  border-radius: 16px;
  padding: 25px;
}

.decision-box.repair {
  border-left: 4px solid var(--secondary);
}

.decision-box.replace {
  border-left: 4px solid var(--cta);
}

.decision-box h3 {
  font-weight: 700;
  margin-bottom: 15px;
}

/* Maintenance Sections */
.maintenance-section {
  margin-bottom: 40px;
}

.maintenance-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.task-card {
  background: var(--bg-light);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
}

.task-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.task-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.task-meta span {
  font-size: 0.85rem;
  padding: 5px 12px;
  background: white;
  border-radius: 20px;
  color: var(--text-muted);
}

.task-meta .savings {
  background: rgba(8, 145, 178, 0.1);
  color: var(--secondary);
}

.warning-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
  margin-top: 15px;
}

.professional-tasks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.task-category {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.task-category h3 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.cost-box {
  background: rgba(8, 145, 178, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
}

.warning-signs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.warning-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.warning-item h4 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.warning-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.maintenance-calendar {
  margin-top: 30px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.calendar-grid .month {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 20px;
}

.calendar-grid .month h4 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
  .cost-hero .container {
    grid-template-columns: 1fr;
  }
  
  .cost-hero-cta {
    position: static;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .decision-grid,
  .professional-tasks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cost-summary-cards {
    grid-template-columns: 1fr;
  }
  
  .cost-card.highlight {
    transform: none;
  }
  
  .material-cards {
    grid-template-columns: 1fr;
  }
  
  .factors-grid {
    grid-template-columns: 1fr;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    display: none;
  }
  
  .dropdown.active .dropdown-menu {
    display: block;
  }
}
