/* Pillar Page & Category Sub-Hub Styles */

/* ===== Pillar Hero ===== */
.pillar-hero {
  background: linear-gradient(135deg, var(--primary-blue, #1E88E5) 0%, var(--ai-purple, #8B5CF6) 100%);
  color: white;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.pillar-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.pillar-hero .pillar-subtitle {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== Pillar Sections ===== */
.pillar-section {
  padding: 3rem 0;
}

.pillar-section:nth-child(even) {
  background: var(--bg-page, #f8fafc);
}

.pillar-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.pillar-section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
  margin-bottom: 0.5rem;
}

.pillar-section-header p {
  font-size: 1rem;
  color: var(--text-muted, #4b5563);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Pillar Card Grid ===== */
.pillar-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pillar-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  color: inherit;
  text-decoration: none;
}

.pillar-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: var(--primary-blue, #1E88E5);
}

.pillar-card-icon svg {
  width: 24px;
  height: 24px;
}

.pillar-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.pillar-card p {
  font-size: 0.85rem;
  color: var(--text-muted, #4b5563);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ===== Category Card Variant ===== */
.pillar-card-category {
  border-left: 4px solid transparent;
  text-align: left;
  align-items: flex-start;
}

.pillar-card-category.cat-zdolnosc { border-left-color: #0E7490; }
.pillar-card-category.cat-porownania { border-left-color: #6D28D9; }
.pillar-card-category.cat-porady { border-left-color: #C2410C; }
.pillar-card-category.cat-scenariusze { border-left-color: #065F46; }
.pillar-card-category.cat-refinansowanie { border-left-color: #1D4ED8; }

.pillar-card-category .pillar-card-count {
  font-size: 0.8rem;
  color: var(--text-muted, #4b5563);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ===== Pillar CTA Block ===== */
.pillar-cta {
  background: linear-gradient(135deg, var(--primary-blue, #1E88E5) 0%, var(--ai-purple, #8B5CF6) 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.pillar-cta h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pillar-cta p {
  opacity: 0.92;
  max-width: 520px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.pillar-cta .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--primary-blue, #1E88E5);
  border: none;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.pillar-cta .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.pillar-cta .btn-cta svg {
  width: 20px;
  height: 20px;
}

/* Secondary CTA (outlined) for pillar pages */
.pillar-cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.pillar-cta .btn-cta-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.pillar-cta .btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: #ffffff;
}

/* ===== Pillar Intro ===== */
.pillar-intro {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary, #1f2937);
}

.pillar-intro p {
  margin-bottom: 1rem;
}

/* ===== Pillar FAQ ===== */
.pillar-faq {
  max-width: 800px;
  margin: 0 auto;
}

.pillar-faq details {
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
}

.pillar-faq details:first-of-type {
  border-top: 1px solid #e5e7eb;
}

.pillar-faq summary {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary, #1f2937);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.pillar-faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted, #4b5563);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.pillar-faq details[open] summary::after {
  content: "−";
}

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

.pillar-faq details p {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.95rem;
  color: var(--text-muted, #4b5563);
  line-height: 1.7;
}

/* ===== Category Hub Hero ===== */
.category-hub-hero {
  background: linear-gradient(135deg, var(--primary-blue, #1E88E5) 0%, var(--ai-purple, #8B5CF6) 100%);
  color: white;
  padding: 2.5rem 0 2rem;
}

.category-hub-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.75rem 0 0.25rem;
}

.category-hub-hero p {
  opacity: 0.9;
  margin-bottom: 0;
  max-width: 600px;
}

.category-hub-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ===== Category Hub Articles ===== */
.category-hub-content {
  padding: 3rem 0;
  background: var(--bg-page, #f8fafc);
  min-height: 40vh;
}

/* Category hub uses Bootstrap grid (row g-4 + col-md-6) for layout — no CSS Grid here */

.category-hub-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.category-hub-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted, #4b5563);
  background: white;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.category-hub-nav a:hover {
  border-color: var(--primary-blue, #1E88E5);
  color: var(--primary-blue, #1E88E5);
}

.category-hub-nav a svg {
  width: 16px;
  height: 16px;
}

/* ===== Calculator Cross-Links Section ===== */
.calculator-cross-links {
  padding: 2.5rem 0 1.5rem;
}

.calculator-cross-links h2 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-primary, #1f2937);
}

.cross-link-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.cross-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  color: inherit;
  text-decoration: none;
}

.cross-link-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: var(--primary-blue, #1E88E5);
}

.cross-link-card-icon svg {
  width: 20px;
  height: 20px;
}

.cross-link-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary, #1f2937);
}

.cross-link-card p {
  font-size: 0.82rem;
  color: var(--text-muted, #4b5563);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .pillar-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .pillar-hero h1 {
    font-size: 1.8rem;
  }
  .pillar-section-header h2 {
    font-size: 1.4rem;
  }
  .pillar-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .category-hub-hero h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .pillar-hero {
    padding: 2.5rem 0 2rem;
  }
  .pillar-hero h1 {
    font-size: 1.5rem;
  }
  .pillar-hero .pillar-subtitle {
    font-size: 1rem;
  }
  .pillar-card-grid {
    grid-template-columns: 1fr;
  }
  .pillar-card {
    padding: 1.25rem;
  }
  .pillar-cta h2 {
    font-size: 1.3rem;
  }
  .category-hub-nav {
    gap: 0.5rem;
  }
  .category-hub-nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
}
