/* Single Post (post) template styles extracted from `single.php` */

/* HERO SECTION */
.post-header {
  background-color: var(--dark-bg);
  padding-top: 9rem;
  padding-bottom: 5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

/* Background image (decorative) */
.post-header .post-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Dark gradient overlay for readability */
.post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(11, 15, 25, 0.9), rgba(11, 15, 25, 0.8));
  z-index: 1;
}

/* Ensure content stays above overlays */
.post-header .bg-grid { position: absolute; inset: 0; z-index: 2; }
.post-header .container { position: relative; z-index: 3; }

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
}

.breadcrumb-item.active {
  color: white;
  font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

.author-meta img {
  width: 56px;
  height: 56px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.meta-divider {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.4);
  margin: 0 12px;
  vertical-align: middle;
}

/* ARTICLE BODY */
.article-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #2c3e50;
}

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

/* Article Links - Primary Color */
.article-body a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.article-body a:hover {
  border-bottom-color: var(--primary-color);
}

/* Icons inside content */
.article-body i[data-lucide],
.article-body svg {
  color: var(--primary-color);
  vertical-align: middle;
}

/* AI Overview Box */
.ai-overview-box {
  background: #f8f9fa;
  border: 1px solid #cce0ff;
  border-left: 4px solid var(--primary-color);
  padding: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.ai-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ai-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}

.ai-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background-color: var(--primary-color);
}

/* FAQ Section - REFERENCE STYLES */
.faq-accordion .accordion-item {
  border: none;
  border-bottom: 1px solid #ccc;
  background: transparent;
}

.faq-accordion .accordion-button {
  background: transparent;
  box-shadow: none;
  padding: 1.25rem 0;
  font-weight: 700;
  color: #1a1a1a;
  font-size: 1.1rem;
  border-radius: 0;
}

.faq-accordion .accordion-button:not(.collapsed) {
  color: var(--primary-color);
  background: transparent;
}

.faq-accordion .accordion-body {
  padding: 0 0 1.5rem 0;
  color: #555;
  font-size: 1rem;
}

/* Fix: some themes override `.collapse` with `visibility: collapse` which breaks Bootstrap accordion */
.faq-accordion .accordion-collapse,
.faq-accordion .accordion-collapse.collapse,
.faq-accordion .accordion-collapse.collapsing {
  visibility: visible !important;
}

/* Link Wall */
.link-wall-section {
  background: white;
  padding: 4rem 0;
  border-top: 1px solid #eee;
}

.link-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.link-wall-item {
  display: flex;
  align-items: center;
  background: #fff;
  color: #333;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

.link-wall-item:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: #f8faff;
}

.link-wall-item i,
.link-wall-item svg {
  color: #ccc;
  margin-right: 10px;
  transition: color 0.2s;
}

.link-wall-item:hover i,
.link-wall-item:hover svg {
  color: var(--primary-color);
}

/* NEWSLETTER SECTION */
.newsletter-section {
  background-color: var(--dark-bg);
  color: white;
  padding: 4rem 0;
  border-top: 3px solid var(--primary-color);
  position: relative;
  overflow: hidden;
}

/* Fix: global h1-h6 color is dark; override for dark section */
.newsletter-section h1,
.newsletter-section h2,
.newsletter-section h3,
.newsletter-section h4,
.newsletter-section h5,
.newsletter-section h6 {
  color: #fff !important;
}

.newsletter-section a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

.newsletter-section .row {
  row-gap: 1rem;
}

.eshield-newsletter-form,
#eshield-newsletter-form {
  max-width: 520px;
  margin-left: auto;
}

.newsletter-input {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.92);
  caret-color: #fff;
  padding: 12px 20px;
  border-radius: 2px;
  width: 100%;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

/* Chrome/Edge autofill makes text dark by default */
.newsletter-input:-webkit-autofill,
.newsletter-input:-webkit-autofill:hover,
.newsletter-input:-webkit-autofill:focus {
  -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.06) inset !important;
  transition: background-color 9999s ease-in-out 0s;
}

.newsletter-input:focus {
  outline: none;
  border-color: rgba(0, 102, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.25);
}

.btn-newsletter {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.btn-newsletter:hover {
  filter: brightness(1.07);
}

.btn-newsletter:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Consent line readability */
#eshield-newsletter-form label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78) !important;
}

#eshield-newsletter-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.newsletter-message {
  font-size: 0.95rem;
}

@media (max-width: 576px) {
  #eshield-newsletter-form .d-flex.gap-2 {
    flex-direction: column;
  }
  .btn-newsletter {
    width: 100%;
  }
}

/* Sidebar */
.sidebar-sticky {
  position: sticky;
  top: 110px;
}

.toc-card {
  border: 1px solid #eee;
  background: white;
  padding: 1.5rem;
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-link {
  text-decoration: none;
  color: #555;
  display: block;
  padding: 5px 0 5px 10px;
  border-left: 2px solid transparent;
}

.toc-link:hover,
.toc-link.active {
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.cta-box {
  background: var(--dark-secondary);
  color: white;
  padding: 2rem;
  text-align: center;
  border-top: 3px solid var(--warning-color);
  margin-top: 2rem;
}

/* SafetySoftware promo (shown only on selected PL posts) */
/* Match the site's existing CTA style: dark, clean, enterprise */
.safetysoftware-box {
  background: var(--dark-secondary);
  color: white;
  padding: 2rem;
  text-align: center;
  border-top: 3px solid var(--primary-color);
}
.safetysoftware-box .ss-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  margin-bottom: 0.85rem;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
}
.safetysoftware-box .ss-desc {
  color: rgba(255,255,255,0.75);
  margin-bottom: 1.25rem;
}
/* Ensure the CTA looks like our button, not a link */
.safetysoftware-box a.ss-btn {
  text-decoration: none !important;
  color: #111 !important;
  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}
.safetysoftware-box a.ss-btn:hover {
  color: #111 !important;
  filter: brightness(1.03);
}

/* Footer overrides */
.footer-section {
  background: var(--dark-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 5rem 0 2rem 0;
}

/* Share Buttons - Enterprise Style */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #555;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn.linkedin:hover {
  background: #0077B5;
  border-color: #0077B5;
  color: white;
}

.share-btn.facebook:hover {
  background: #1877F2;
  border-color: #1877F2;
  color: white;
}

.share-btn.copy-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.share-btn svg,
.share-btn i {
  width: 16px;
  height: 16px;
}

.share-btn.copied {
  background: #28a745 !important;
  border-color: #28a745 !important;
  color: white !important;
}

/* Tag Badge - Reference Style */
.tag-badge {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  color: white;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0 !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
}

.tag-badge:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Share Buttons - Gray Style (Reference Match) */
.btn-outline-secondary svg,
.btn-outline-secondary svg path,
.btn-outline-secondary svg line,
.btn-outline-secondary svg polyline,
.btn-outline-secondary svg circle,
.btn-outline-secondary svg rect {
  color: #6c757d !important;
  stroke: #6c757d !important;
  fill: none !important;
}

/* OVERRIDE: Prevent article body links from turning share buttons blue */
.article-body a.btn-outline-secondary,
.article-body button.btn-outline-secondary {
  color: #6c757d !important;
  border-bottom: 1px solid #6c757d !important;
}

.article-body a.btn-outline-secondary:hover,
.article-body button.btn-outline-secondary:hover {
  color: #fff !important;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

.article-body a.btn-outline-secondary:hover svg,
.article-body a.btn-outline-secondary:hover svg *,
.article-body button.btn-outline-secondary:hover svg,
.article-body button.btn-outline-secondary:hover svg * {
  stroke: #fff !important;
}

