html {
  scroll-behavior: smooth;
}

.article-wrapper {
  background-color: #222831;
  min-height: 100%;
}

.hero-section {
  background: linear-gradient(135deg, #222831 0%, #393E46 50%, #222831 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(223,208,184,0.05) 0%, transparent 50%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.stat-card {
  background: linear-gradient(145deg, #393E46 0%, #2a2f38 100%);
  border: 1px solid rgba(223,208,184,0.1);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(223,208,184,0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.content-section {
  background-color: #fff;
}

.sidebar-card {
  background: linear-gradient(145deg, #DFD0B8 0%, #c9b89e 100%);
}

.toc-link {
  color: #393E46;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  padding-left: 12px;
}

.toc-link:hover {
  color: #222831;
  border-left-color: #948979;
  padding-left: 16px;
}

.quote-block {
  background: linear-gradient(90deg, #DFD0B8 0%, rgba(223,208,184,0.3) 100%);
  border-left: 4px solid #948979;
}

.cta-section {
  background: linear-gradient(135deg, #393E46 0%, #222831 100%);
}

.cta-button {
  background: linear-gradient(135deg, #DFD0B8 0%, #c9b89e 100%);
  color: #222831;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(223,208,184,0.3);
}

.section-number {
  color: #948979;
  font-weight: 700;
}

.key-point {
  background-color: rgba(223,208,184,0.1);
  border-left: 4px solid #DFD0B8;
}

.metric-badge {
  background-color: #DFD0B8;
  color: #222831;
}

.scroll-indicator {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.float-in {
  animation: floatIn 0.8s ease-out;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-image {
  width: 100%;
  border-radius: 12px;
  margin: 24px 0;
  position: relative;
  animation: fadeIn 1s ease-out;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .hero-image {
    height: 270px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .hero-image {
    height: 520px;
  }
}

@media (min-width: 1024px) {
  .hero-image {
    height: 520px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.in-text-image {
  width: 100%;
  max-width: 290px;
  height: 245px;
  background: linear-gradient(135deg, #DFD0B8 0%, #948979 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0px 0px;
  float: right;
  margin-left: 20px;
  animation: slideInRight 0.6s ease-out;
  overflow: hidden;
  border-radius: 20px;
}

.in-text-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 20px;
}

@media (max-width: 768px) {
  .in-text-image {
    float: none;
    margin:auto;
    margin-bottom: 1rem;
    width: 100%;
  }
}

.accordion-item {
  border-bottom: 1px solid rgba(223,208,184,0.2);
}

.accordion-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  transition: all 0.3s ease;
}

.accordion-button:hover {
  background-color: rgba(223,208,184,0.05);
}

.accordion-button.active {
  color: #DFD0B8;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.accordion-button.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 16px;
}

.accordion-content.open {
  max-height: 1000px;
  padding: 0 16px 16px 16px;
}


.case-study-box {
  background: linear-gradient(145deg, #DFD0B8 0%, rgba(223,208,184,0.3) 100%);
  border-left: 4px solid #948979;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.case-study-box h4 {
  color: #222831;
  margin-top: 0;
}

.metric-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .metric-comparison {
    grid-template-columns: 1fr;
  }
}

.comparison-item {
  padding: 16px;
  border-radius: 8px;
  background-color: rgba(223,208,184,0.1);
  border-left: 3px solid #948979;
}

.comparison-label {
  font-size: 14px;
  color:  #222831;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.comparison-value {
  font-size: 24px;
  font-weight: bold;
  color: #222831;
}

/* Reading progress bar */
.progress-bar {
  background: #222831;
  height: 4px;
  width: 0%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: width 0.1s ease;
}

/* Mobile menu */
.mobile-menu {
  background-color: #222831;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Print styles */
@media print {
  .no-print { display: none !important; }
  .content-section { background: white !important; }
}

  .share-section {
    background-color: #DFD0B8;
    font-family: 'Ferduka', system-ui, -apple-system, sans-serif;
  }
  .share-title {
    color: #222831;
    font-weight: 600;
    letter-spacing: 0.5px;
  }
  .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background-color: #948979;
    color: #fff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(57, 62, 70, 0.08);
    text-decoration: none;
    position: relative;
    overflow: hidden;
  }
  .share-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
  }
  .share-btn:hover {
    background-color: #393E46;
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 40, 49, 0.15);
  }
  .share-btn:hover svg {
    transform: rotate(6deg) scale(1.1);
  }
  .share-btn-copy {
    background-color: #393E46;
  }
  .share-btn-copy:hover {
    background-color: #222831;
  }
  .share-btn {
    animation: fadeUp 0.5s ease both;
  }
  .share-btn:nth-child(1) { animation-delay: 0.05s; }
  .share-btn:nth-child(2) { animation-delay: 0.10s; }
  .share-btn:nth-child(3) { animation-delay: 0.15s; }
  .share-btn:nth-child(4) { animation-delay: 0.20s; }
  @keyframes fadeUp {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
  }
  @media (max-width: 480px) {
    .share-btn {
      width: 2.5rem;
      height: 2.5rem;
    }
    .share-btn svg {
      width: 1rem;
      height: 1rem;
    }
  }
  
  /* ---------- RELATED ARTICLES – SELF‑CONTAINED STYLES ---------- */
  .ra-section {
    padding: 4rem 1.5rem;
    background-color: #222831;
    overflow: hidden;
  }
  .ra-container {
    max-width: 1280px;
    margin: 0 auto;
  }
  .ra-heading {
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'Ferduka', system-ui, sans-serif; /* use your own font stack */
  }
  .ra-heading h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
  }
  .ra-heading .ra-subtitle {
    color: #948979;
    font-size: 1.05rem;
  }
  .ra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
  /* card wrapper – animated border glow */
  .ra-card {
    position: relative;
    border-radius: 20px;
    background: rgba(57, 62, 70, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(223, 208, 184, 0.15);
    box-shadow: 0 25px 45px rgba(0,0,0,0.25);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    transform: translateY(0);
  }
  .ra-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(223,208,184,0.35), rgba(223,208,184,0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: opacity 0.4s;
    opacity: 0.6;
  }
  .ra-card:hover::before {
    opacity: 1;
  }
  .ra-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 55px rgba(0,0,0,0.35);
  }
  .ra-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
  }
  .ra-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
  }
  .ra-card:hover .ra-card-image img {
    transform: scale(1.05);
  }
  .ra-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(34,40,49,0.6) 0%, transparent 60%);
    opacity: 0.9;
  }
  .ra-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(34,40,49,0.75);
    backdrop-filter: blur(8px);
    color: #DFD0B8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    letter-spacing: 0.3px;
    border: 1px solid rgba(223,208,184,0.25);
  }
  .ra-card-body {
    padding: 1.5rem 1.5rem 2rem;
    position: relative;
    z-index: 2;
  }
  .ra-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ra-card-excerpt {
    font-size: 0.95rem;
    color: #948979;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ra-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #DFD0B8;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.25s;
    padding-bottom: 2px;
  }
  .ra-read-more svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s;
  }
  .ra-read-more:hover {
    border-bottom-color: #DFD0B8;
    color: #fff;
  }
  .ra-read-more:hover svg {
    transform: translateX(4px);
  }

  /* Entrance animation – invisible until observed */
  .ra-card.ra-animate {
    opacity: 0;
    transform: translateY(40px);
  }
  .ra-card.ra-animate.ra-visible {
    animation: ra-fadeInUp 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  }
  @keyframes ra-fadeInUp {
    0% {
      opacity: 0;
      transform: translateY(40px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Responsive tweaks */
  @media (max-width: 640px) {
    .ra-section {
      padding: 3rem 1rem;
    }
    .ra-card-image {
      height: 170px;
    }
  }