/* CTA Sidebar Widget Styling */
.cta-sidebar-widget {
  background: linear-gradient(135deg, #265c73  0%, #265c73 100%);
  border-radius: 16px;
  padding: 32px 15px;
  position: sticky;
  top: 100px;
  box-shadow: 0 10px 30px rgba(11, 99, 246, 0.2);
  margin-bottom: 24px;
}

.cta-container {
  color: #ffffff;
}

.cta-header {
  text-align: center;
  margin-bottom: 24px;
}

.cta-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #ffffff;
}

.cta-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.cta-phone {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.cta-phone:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.phone-icon {
  color: #ffffff;
  flex-shrink: 0;
  margin-right: 12px;
}

.phone-content {
  display: flex;
  flex-direction: column;
}

.phone-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.phone-number {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s;
}

.phone-number:hover {
  color: rgba(255, 255, 255, 0.9);
}

.cta-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.cta-divider::before,
.cta-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 25px);
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.cta-divider::before {
  left: 0;
}

.cta-divider::after {
  right: 0;
}

.cta-divider span {
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Contact Form Styling */
.cta-form {
  margin-bottom: 20px;
}

.cta-form input[type="text"],
.cta-form input[type="email"],
.cta-form input[type="tel"],
.cta-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #0f172a;
  margin-bottom: 12px;
  font-size: 14px;
  transition: all 0.3s;
}

.cta-form input[type="text"]:focus,
.cta-form input[type="email"]:focus,
.cta-form input[type="tel"]:focus,
.cta-form textarea:focus {
  background: #ffffff;
  border-color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.cta-form input[type="text"]::placeholder,
.cta-form input[type="email"]::placeholder,
.cta-form input[type="tel"]::placeholder,
.cta-form textarea::placeholder {
  color: #5b6b80;
  opacity: 0.7;
}

.cta-form input[type="submit"] {
  width: 100%;
  padding: 14px 24px;
  background: #ffffff;
  color: #0b63f6;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.5px;
}

.cta-form input[type="submit"]:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.trust-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
}

/* Legacy card styles (kept for compatibility) */
.card{background:transparent; border:none; border-radius:0; box-shadow:none}
.card.pad{padding:0}

h2{font-size:clamp(22px,2.2vw,30px); line-height:1.2; margin:0}
h3{font-size:clamp(18px,1.8vw,22px); margin:0}
.lead{font-size:18px; color:var(--muted)}

.facts{display:grid; grid-template-columns:repeat(4,1fr); gap:6px}
.fact{padding:6px 0; border-bottom:1px solid var(--line)}
.fact b{display:block; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.02em}
.fact span{font-size:20px; font-weight:800}

.notice{display:flex; gap:12px; align-items:flex-start; background:#f8fbff; border-left:4px solid var(--brand); padding:14px; border-radius:6px}

.accordion details{border-bottom:1px solid var(--line); padding:12px 0; background:transparent}
.accordion details+details{margin-top:0}
.accordion summary{cursor:pointer}

.steps{display:grid; gap:12px}
.step{display:flex; gap:12px; align-items:flex-start}
.step .num{width:30px; height:30px; border:2px solid var(--brand); border-radius:50%; display:grid; place-items:center; font-weight:800}

.share{display:flex; gap:10px; margin-top:8px}
.share .btn{border:1px solid var(--line); border-radius:999px; padding:8px 12px; background:#fff}

/* Author Box Styling */
.author-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  margin: 32px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.author-content {
  display: flex;
  gap: 24px;
  align-items: center;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.author-info {
  flex: 1;
}

.author-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.author-title {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}

.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.share-btn svg {
  flex-shrink: 0;
}

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

.share-twitter:hover {
  background: #1DA1F2;
  color: #ffffff;
  border-color: #1DA1F2;
}

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

.share-copy {
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.share-copy:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.share-copy.copied {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.share-copy.copied span::before {
  content: "Copied!";
  position: absolute;
  left: 0;
  right: 0;
}

.share-copy.copied span {
  position: relative;
  color: transparent;
}

/* Legacy author styles (kept for compatibility) */
.author{display:flex; gap:14px; align-items:center}
.author img{width:52px; height:52px; border-radius:50%; border:2px solid var(--line)}

/* Related Reading Section */
.related-section {
  margin-top: 48px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.related-header {
  margin-bottom: 36px;
}

.related-title {
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

.related-icon {
  color: var(--brand);
  opacity: 0.8;
}

.related-subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.related-cards-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.related-card-item {
  list-style: none;
}

.related-article-card {
  height: 100%;
  position: relative;
  transition: transform 0.2s ease;
}

.related-link {
  text-decoration: none !important;
  display: block;
  height: 100%;
}

.related-link:hover {
  text-decoration: none !important;
}

/* Override link underlines in related section */
.related-section a {
  text-decoration: none !important;
}

.related-section a:hover {
  text-decoration: none !important;
}

.related-card-content {
  background: linear-gradient(145deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.related-article-card:hover .related-card-content {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(38, 92, 115, 0.12);
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
}

.related-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.related-category {
  background: var(--brand);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.related-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

.related-date svg {
  opacity: 0.6;
}

.related-card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 12px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  margin-top: auto;
}

.related-arrow {
  transition: transform 0.2s ease;
}

.related-article-card:hover .related-arrow {
  transform: translateX(4px);
}

/* Legacy related styles (kept for backward compatibility) */
.related{margin-top:8px}
.related-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px}
.related-grid{list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px}
.related-item{}
.related-card{display:block; height:100%; border:1px solid var(--line); border-radius:12px; padding:14px; background:#fff; text-decoration:none}
.related-card:hover{border-color:var(--brand)}
.related-card .related-meta{display:flex; gap:10px; align-items:center; margin-bottom:6px}
.related-card .related-meta .chip{background:#fff}
.related-card .related-meta .date{font-size:12px; color:var(--muted)}
.related-card .title{font-size:18px; line-height:1.3; margin:2px 0 6px}
.related-card .excerpt{color:var(--muted); margin:0 0 8px}
.related-card .more{display:inline-flex; align-items:center; gap:6px; font-weight:700; color:var(--brand)}
.related-card .more .arrow{transition:transform .15s ease}
.related-card:hover .more .arrow{transform:translateX(2px)}

/* Responsive styles for related posts */
@media (max-width:1100px){
  .related-grid{grid-template-columns:1fr 1fr}
  .related-cards-grid{grid-template-columns:1fr 1fr}

  .related-header {
    margin-bottom: 28px;
  }

  .related-title {
    font-size: 24px;
  }
}
@media (max-width:780px){
  .related-grid{grid-template-columns:1fr}
  .related-cards-grid{grid-template-columns:1fr}

  .related-section {
    padding: 32px 0;
  }

  .related-header {
    margin-bottom: 24px;
  }

  .related-card-content {
    padding: 20px;
  }

  .related-title {
    font-size: 22px;
  }

  .related-subtitle {
    font-size: 14px;
  }
}

.pager{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:8px}
.pager a{display:block; border:1px solid var(--line); border-radius:10px; padding:12px; background:#fff; text-decoration:none}
.pager a .k{display:block; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.02em}
.pager a .t{display:block; font-weight:700; color:var(--ink)}
.pager .disabled{display:block}

/* ========================================
   INTERACTIVE ELEMENTS AND ENHANCEMENTS
   ======================================== */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  z-index: 9999;
  transition: width 0.2s ease;
  width: 0%;
}

/* Admin bar adjustment */
.admin-bar .reading-progress {
  top: 32px;
}

/* Reading Time Badge (Sticky) */
.reading-time-badge {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--brand);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(38, 92, 115, 0.2);
}

.reading-time-badge:hover {
  opacity: 1;
}

.reading-time-badge::before {
  content: '⏱';
  font-size: 16px;
}

/* AI-Generated Content Badge */
.ai-generated-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 16px;
  font-weight: 500;
}

.ai-generated-badge::before {
  content: '✨';
  font-size: 14px;
}

/* Last Reviewed Indicator */
.last-reviewed {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(38, 92, 115, 0.05), rgba(200, 217, 7, 0.02));
  border-left: 3px solid var(--brand);
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}

.last-reviewed::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  flex-shrink: 0;
}

.last-reviewed-text {
  font-size: 14px;
  color: var(--muted);
}

.last-reviewed-date {
  font-weight: 600;
  color: var(--ink);
}

/* Copy Code/Text Button */
.copy-wrapper {
  position: relative;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  font-size: 12px;
  font-weight: 600;
}

.copy-wrapper:hover .copy-button {
  opacity: 1;
}

.copy-button:hover {
  transform: scale(1.05);
}

.copy-button.copied {
  background: #10b981;
}

.copy-button.copied::after {
  content: ' ✓';
}

/* Tooltip Component */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted var(--brand);
  cursor: help;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--ink) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Content Authenticity Indicator */
.content-verified {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0;
}

.content-verified::before {
  content: '🔒';
  font-size: 16px;
}

/* Quick Navigation (Anchor Links) */
.quick-nav {
  position: fixed;
  bottom: 40px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.quick-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-nav-btn:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(38, 92, 115, 0.2);
}

.quick-nav-btn.to-top::before {
  content: '↑';
  font-size: 20px;
  font-weight: bold;
}

.quick-nav-btn.to-bottom::before {
  content: '↓';
  font-size: 20px;
  font-weight: bold;
}

/* Interactive Hover Cards */
.hover-card {
  position: relative;
  display: inline-block;
}

.hover-card-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  min-width: 280px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  margin-bottom: 8px;
}

.hover-card:hover .hover-card-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-8px);
}



/* Scroll-triggered Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Print Styles */
@media print {
  .reading-progress,
  .reading-time-badge,
  .quick-nav,
  .cta-sidebar-widget,
  .share-buttons,
  .related-section {
    display: none !important;
  }

  .article {
    max-width: 100%;
  }

  .article h2 {
    page-break-after: avoid;
  }

  .article table,
  .article blockquote {
    page-break-inside: avoid;
  }
}
