/* ==========================================================================
   Climate Challenge New Zealand - Custom Site Stylesheet
   Strict adherence to professional editorial standards, sticky footer,
   clean typographic hierarchy, responsive tables and zero purple/neon styling.
   ========================================================================== */

/* 1. Sticky Footer Setup */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

#wrapper {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  position: relative;
}

.main-content {
  flex: 1 0 auto !important;
  width: 100%;
}

footer.footer {
  flex-shrink: 0 !important;
  margin-top: auto !important;
}

/* 2. Hide template demo overlays */
#solix-template-navigator,
.color-switcher,
#switcher-panel {
  display: none !important;
  visibility: hidden !important;
}

/* 3. Typography & Editorial Enhancements */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #2b3036;
  background-color: #fcfcfc;
  -webkit-font-smoothing: antialiased;
}

.article-content,
.article-text-body {
  font-size: 1.0625rem;
  line-height: 1.82;
  color: #2e343b;
}

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

.article-content h2,
.article-text-body h2 {
  font-size: 1.625rem;
  font-weight: 700;
  color: #171d24;
  margin-top: 2.5rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
  line-height: 1.35;
}

.article-content h3,
.article-text-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #222b35;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Clean Tables */
.article-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.article-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.article-table-wrapper th {
  background-color: #f7fafc;
  color: #1a202c;
  font-weight: 600;
  text-transform: none !important;
  padding: 14px 18px;
  border-bottom: 2px solid #edf2f7;
}

.article-table-wrapper td {
  padding: 13px 18px;
  border-bottom: 1px solid #edf2f7;
  color: #4a5568;
  text-transform: none !important;
}

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

.article-table-wrapper tr:hover td {
  background-color: #f8fafc;
}

.article-content .decision-list {
  margin: 1.25rem 0 1.75rem;
  padding-left: 1.5rem;
  color: #4a5568;
}

.article-content .decision-list li {
  padding: 0.35rem 0 0.35rem 0.25rem;
  line-height: 1.7;
}

.article-content .decision-list li + li {
  margin-top: 0.3rem;
}

.article-content .decision-list strong {
  color: #222b35;
}

/* Callout and Executive Briefing Boxes */
.editorial-callout {
  background: #f4f8ee;
  border-left: 4px solid #87ab42;
  border-radius: 4px;
  padding: 20px 24px;
  margin: 2rem 0;
}

.editorial-callout h4 {
  color: #4b661d;
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 700;
}

.editorial-callout p {
  margin-bottom: 0;
  color: #3b4530;
  font-size: 0.98rem;
  line-height: 1.65;
}

.key-takeaways-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: 4px solid #87ab42;
  border-radius: 6px;
  padding: 24px;
  margin: 1.5rem 0 2rem;
}

.key-takeaways-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a202c;
  margin-top: 0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-takeaways-box ul {
  margin: 0;
  padding-left: 20px;
}

.key-takeaways-box li {
  margin-bottom: 8px;
  color: #4a5568;
  font-size: 0.96rem;
  line-height: 1.6;
}

/* Secondary In-Content Image */
.in-content-media {
  margin: 2.2rem 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  background: #f1f5f9;
}

.in-content-media img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.in-content-media .media-caption {
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-style: italic;
}

/* Category Cards Grid */
.category-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 30px;
  margin-bottom: 40px;
}

.category-article-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.category-article-card .card-thumb {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.category-article-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-article-card:hover .card-thumb img {
  transform: scale(1.04);
}

.category-article-card .card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.category-article-card .card-category-badge {
  display: inline-block;
  background: #eef6dd;
  color: #55751f;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.category-article-card .card-title {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px 0;
}

.category-article-card .card-title a {
  color: #1a202c;
  text-decoration: none;
  transition: color 0.15s ease;
}

.category-article-card .card-title a:hover {
  color: #87ab42;
}

.category-article-card .card-excerpt {
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.category-article-card .card-footer-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: #87ab42;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-article-card .card-footer-link:hover {
  color: #678332;
}

/* FAQ Accordion */
.faq-accordion-block {
  margin: 2.5rem 0;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #1a202c;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: #f8fafc;
}

.faq-question .toggle-icon {
  font-size: 1.2rem;
  color: #87ab42;
  transition: transform 0.2s ease;
}

.faq-item.active .faq-question .toggle-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px 18px;
  color: #4a5568;
  font-size: 0.96rem;
  line-height: 1.65;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Related articles row */
.related-posts-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e2e8f0;
}

.related-posts-section h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Author box */
.author-profile-card {
  display: flex;
  gap: 20px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
  margin-top: 2.5rem;
}

.author-profile-card .author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.author-profile-card .author-bio h5 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.author-profile-card .author-bio p {
  margin: 0;
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.5;
}

/* Breadcrumbs styling */
.tm-page-title-elementor .breadcrumbs-nav {
  margin-top: 10px;
}

.tm-page-title-elementor .breadcrumbs-nav a {
  color: #e2e8f0;
  text-decoration: none;
}

.tm-page-title-elementor .breadcrumbs-nav a:hover {
  color: #ffffff;
}

.tm-page-title-elementor .breadcrumbs-nav span {
  color: #cbd5e1;
}

/* Contact Page Specific */
.contact-info-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 28px;
  margin-bottom: 24px;
}

.contact-info-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #1a202c;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.contact-info-item i {
  color: #87ab42;
  font-size: 1.25rem;
  margin-top: 4px;
}

.contact-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 32px;
}

.contact-author-card {
  margin: 24px 0;
  padding: 17px 20px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #87ab42;
  border-radius: 6px;
  background: #f8fafc;
}

.contact-author-card__label {
  display: block;
  margin: 0 0 5px;
  color: #55751f;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-author-card__name {
  margin: 0 !important;
  color: #1a202c;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Privacy Policy Layout */
.privacy-policy-body {
  font-size: 1.03rem;
  line-height: 1.8;
  color: #334155;
}

.privacy-policy-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

/* General Layout Fixes */
.post-single {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.entry-header .post-thumb {
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.entry-header .post-thumb img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .category-articles-grid {
    grid-template-columns: 1fr;
  }
  .author-profile-card {
    flex-direction: column;
    text-align: center;
  }
}
