.hero-section {
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
}

.hero-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.breadcrumb {
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 400;
}

.breadcrumb-container {
  max-width: 80%;
  margin: 0 auto;
  padding: 0 20px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-link {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

@media (hover: hover) {
  .breadcrumb-link:hover {
    color: var(--color-accent-1);
    text-decoration: none;
  }

  .breadcrumb-list:hover .breadcrumb-link:not(:hover) {
    color: var(--color-muted-2);
    transition: color 0.2s ease;
  }

  .breadcrumb-list:hover .breadcrumb-link:hover {
    color: var(--color-accent-2);
  }
}

.breadcrumb-link:active {
  color: var(--color-accent-2);
  transform: scale(0.98);
}

.breadcrumb-link:focus {
  outline: none;
  color: var(--color-accent-2);
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.breadcrumb-separator {
  color: var(--color-divider);
  font-size: 0.9rem;
  font-weight: 300;
  user-select: none;
  margin: 0 4px;
}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 15px 0;
    font-size: 0.9rem;
  }

  .breadcrumb-container {
    padding: 0 15px;
  }

  .breadcrumb-list {
    gap: 8px;
  }

  .breadcrumb-separator {
    margin: 0 2px;
  }
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 0.85rem;
  }

  .breadcrumb:has(.breadcrumb-item:nth-child(4)) .breadcrumb-item:nth-child(3):not(:nth-last-child(2))::before {
    content: "...";
    color: #cbd5e0;
    margin-right: 8px;
  }
}

.breadcrumb {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-header {
  background: var(--color-surface);
  padding: 10px 0 50px;
  border-bottom: 1px solid var(--color-border);
  border-radius: 40px;
  box-shadow: 0 10px 20px -10px var(--color-shadow-weak);
  margin-top: -50px;
  position: relative;
  z-index: 2;
}

.article-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.article-title {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--color-primary);
  line-height: 1.2;
  word-break: break-word;
  hyphens: auto;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--color-meta);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.meta-item i {
  color: var(--color-accent-1);
  font-size: 0.9rem;
}

.meta-divider {
  width: 1px;
  height: 20px;
  background: var(--color-border);
}

.article-content {
  max-width: 1050px;
  margin: -20px auto 0;
  padding: 50px 30px 60px;
  background: white;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease-out 0.3s both;
  position: relative;
  z-index: 1;
}



.article-intro {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--color-meta);
  line-height: 1.8;
  font-weight: 400;
  padding: clamp(15px, 3vw, 20px);
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent-2);
  word-break: break-word;
  hyphens: auto;
}

.article-text {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--color-text);
  line-height: 1.8;
  word-break: break-word;
  hyphens: auto;
}

.article-text p {
  margin-bottom: clamp(16px, 3vw, 20px);
}

.keyPhrase {
  color: var(--color-highlight);
}

.article-content ul.is-bullet,
.article-content ol.is-ordered {
  margin: 1.2em 0 0 1.5em;
  padding-left: 1.5em;
}

.article-content ul.is-bullet li,
.article-content ol.is-ordered li {
  margin-bottom: 0.5em;
  line-height: 1.6;
  color: #2d3748;
}

.article-content ul.is-bullet {
  list-style-type: disc;
}

.article-content ul.is-bullet li::marker {
  color: var(--color-highlight);
  font-size: 1.1em;
}

.article-content ol.is-ordered {
  list-style-type: decimal;
}

.my-image-wrapper {
  margin: clamp(20px, 4vw, 30px) 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.my-image-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

/* Fixed margin syntax - changed from margin-bottom with 3 values to margin with 3 values */
.section-heading {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--color-highlight);
  margin-top: clamp(25px, 5vw, 30px);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  word-break: break-word;
}

.highlight-link {
  color: var(--color-highlight);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  word-break: break-word;
}

@media (hover: hover) {
  .highlight-link:hover {
    color: var(--color-accent-3);
    text-decoration: underline;
  }
}

.highlight-link:active {
  color: #38b2ac;
  text-decoration: underline;
}

.quote-block {
  padding: clamp(15px, 3vw, 20px) clamp(20px, 4vw, 25px);
  background: var(--color-quote-bg);
  border-left: 4px solid var(--color-highlight);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--color-quote-text);
  position: relative;
  word-break: break-word;
  hyphens: auto;
}

.quote-block::before {
  content: '"';
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-quote-mark);
  position: absolute;
  top: -10px;
  left: 10px;
  font-family: serif;
  opacity: 0.3;
}

.quote-text {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  line-height: 1.6;
  margin-left: clamp(15px, 3vw, 20px);
}

.reference-link {
  margin-top: clamp(30px, 5vw, 40px);
  padding: clamp(15px, 3vw, 20px);
  background: var(--color-surface);
  border-radius: 10px;
  border: 1px solid var(--color-bg-light-mid);
}

.reference-text {
  color: var(--color-highlight);
  font-size: clamp(0.9rem, 2vw, 0.95rem);
  word-break: break-word;
}

@media (hover: hover) {
  .reference-text a:hover {
    text-decoration: underline;
  }
}

.reference-text a:active {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hero-section {
    height: 50vh;
    min-height: 300px;
  }

  .article-header {
    padding: 30px 0 40px;
    margin-top: -40px;
    border-radius: 30px;
  }

  .article-header-container {
    padding: 0 15px;
  }

  .article-meta {
    flex-direction: row;
    gap: 12px;
    font-size: 0.9rem;
  }

  .meta-divider {
    display: none;
  }

  .article-content {
    padding: 30px 20px 50px;
    margin: 0 10px;
    border-radius: 15px 15px 0 0;
    margin-top: -25px;
    position: relative;
    z-index: 1;
  }

  .quote-block {
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 0;
  }

  .my-image-wrapper {
    margin-left: -20px;
    margin-right: -20px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: 45vh;
    min-height: 280px;
  }

  .article-header {
    padding: 25px 0 35px;
    margin-top: -35px;
    border-radius: 25px;
  }

  .article-header-container {
    padding: 0 12px;
  }

  .article-content {
    padding: 25px 15px 40px;
    margin: 0 8px;
    margin-top: -20px;
  }

  .quote-block {
    margin-left: -15px;
    margin-right: -15px;
    padding: 15px 20px;
  }

  .my-image-wrapper {
    margin-left: -15px;
    margin-right: -15px;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-header {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.fade-in {
  animation: fadeInUp 0.8s ease-out;
}

.article-content .breadcrumb-container {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

#backToTop {
  position: fixed;
  bottom: clamp(20px, 4vw, 30px);
  right: clamp(15px, 4vw, 30px);
  width: clamp(50px, 10vw, 60px);
  height: clamp(50px, 10vw, 60px);
  border: none;
  border-radius: 50%;
  background-color: var(--color-accent-3);
  color: white;
  font-size: clamp(18px, 4vw, 24px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  -webkit-tap-highlight-color: rgba(56, 178, 172, 0.3);
  tap-highlight-color: rgba(56, 178, 172, 0.3);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

#backToTop.hide {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9);
}

@media (hover: hover) {
  #backToTop:hover {
    background-color: var(--color-accent-1);
    transform: scale(1.05);
  }
}

#backToTop:active {
  background-color: var(--color-accent-1);
  transform: scale(0.95);
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: clamp(3px, 1vw, 4px);
  background: linear-gradient(90deg, var(--color-accent-2), var(--color-accent-3));
  z-index: 1000;
  transition: width 0.1s ease;
}

.breadcrumb-link:focus-visible,
.highlight-link:focus-visible,
.reference-text a:focus-visible,
#backToTop:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 360px) {
  .hero-section {
    height: 40vh;
    min-height: 250px;
  }

  .article-header {
    padding: 20px 0 30px;
    margin-top: -30px;
    border-radius: 20px;
  }

  .article-header-container {
    padding: 0 10px;
  }

  .article-content {
    padding: 20px 12px 35px;
    margin: 0 5px;
    margin-top: -15px;
  }

  .quote-block {
    margin-left: -12px;
    margin-right: -12px;
    padding: 12px 15px;
  }

  .my-image-wrapper {
    margin-left: -12px;
    margin-right: -12px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    height: 80vh;
    min-height: 250px;
  }

  .article-header {
    padding: 15px 0 25px;
  }

  .article-content {
    padding: 25px 20px 35px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .breadcrumb-link,
  .highlight-link,
  .reference-text a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    margin: -8px -12px;
  }

  #backToTop {
    min-width: 48px;
    min-height: 48px;
  }
}

@media (prefers-contrast: high) {
  .breadcrumb-link:focus-visible,
  .highlight-link:focus-visible,
  .reference-text a:focus-visible,
  #backToTop:focus-visible {
    outline: 3px solid;
    outline-offset: 2px;
  }

  .progress-bar {
    background: #000;
  }

  .article-intro,
  .quote-block {
    border-left-width: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-header,
  .article-content,
  .breadcrumb,
  .fade-in {
    animation: none !important;
  }

  #backToTop {
    transition: none;
  }

  * {
    scroll-behavior: auto !important;
  }
}

@media print {
  .progress-bar,
  #backToTop {
    display: none !important;
  }

  .hero-section {
    height: auto;
    min-height: auto;
    page-break-inside: avoid;
  }

  .article-header {
    margin-top: 0;
    box-shadow: none;
    border-radius: 0;
    page-break-inside: avoid;
  }

  .article-content {
    box-shadow: none;
    margin: 0;
    padding: 20px 0;
  }

  .article-title {
    color: #000;
    page-break-after: avoid;
  }

  .section-heading {
    page-break-after: avoid;
  }

  .quote-block {
    page-break-inside: avoid;
    border: 1px solid #ccc;
  }

  .my-image-wrapper {
    page-break-inside: avoid;
  }
}

body.dark-theme .article-header {
  background: var(--color-bg-dark-start);
  border-bottom-color: var(--color-bg-dark-mid);
}

body.dark-theme .article-content {
  background: var(--color-bg-dark-start);
}

body.dark-theme .article-content::before {
  background: linear-gradient(to bottom, var(--color-bg-dark-mid), var(--color-bg-dark-mid));
}

body.dark-theme .article-title {
  color: var(--color-surface);
}

body.dark-theme .article-text {
  color: var(--color-surface);
}

body.dark-theme .article-intro {
  background: var(--color-bg-dark-mid);
  color: var(--color-surface);
}

body.dark-theme .breadcrumb-link {
  color: var(--color-muted-2);
}

body.dark-theme .breadcrumb-current {
  color: var(--color-surface);
}

body.dark-theme .breadcrumb-separator {
  color: var(--color-muted);
}

body.dark-theme .section-heading {
  color: var(--color-accent-2);
  border-bottom-color: var(--color-bg-dark-mid);
}

body.dark-theme .quote-block {
  background: var(--color-bg-dark-mid);
  color: var(--color-accent-2);
}

body.dark-theme .quote-block::before {
    color: var(--color-yellow-1) ;
}

body.dark-theme .reference-link {
  background: var(--color-bg-dark-mid);
  border-color: var(--color-meta);
}

body.dark-theme .article-content ul.is-bullet li,
body.dark-theme .article-content ol.is-ordered li {
  color: var(--color-surface);
}

body.dark-theme .article-content ul.is-bullet {
  list-style-type: disc;
}

body.dark-theme .article-content ol.is-ordered {
  list-style-type: decimal;
}

body.dark-theme .reference-text {
  color: var(--color-accent-2);
}

body.dark-theme .meta-item {
  color: var(--color-muted-2);
}

body.dark-theme .meta-divider {
  background: var(--color-meta);
}

body.dark-theme .breadcrumb-link:focus-visible,
body.dark-theme .highlight-link:focus-visible,
body.dark-theme .reference-text a:focus-visible,
body.dark-theme #backToTop:focus-visible {
  outline-color: var(--color-accent-2);
}

@media (max-width: 768px) {
  body.dark-theme .hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
  }
}

.article-content a,
.article-text a {
  word-break: break-word;
  hyphens: auto;
}

@media (max-width: 320px) {
  .article-meta {
    font-size: 0.8rem;
    gap: 8px;
  }

  .meta-item {
    gap: 6px;
  }

  .meta-item i {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .article-text {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .quote-text {
    font-size: 1rem;
    line-height: 1.5;
  }
}

@media (max-width: 768px) {
  .article-text p:last-child {
    margin-bottom: 0;
  }

  .section-heading:first-child {
    margin-top: 0;
  }
}
