.article-main {
  min-height: 70vh;
  padding: 72px 22px 90px;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.12), transparent 34%),
    linear-gradient(180deg, #08152d 0%, #0b1933 100%);
}

.article-card {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 66px);
  color: #eaf1ff;
  background: rgba(8, 23, 48, .88);
  border: 1px solid rgba(148, 178, 230, .18);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 36px;
  color: #9fb0ca;
  font-size: 14px;
}

.breadcrumbs a {
  color: #b9c8df;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #93c5fd;
}

.article-heading {
  display: block;
  position: static;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.article-category {
  display: inline-block;
  margin-bottom: 14px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-heading h1 {
  max-width: 880px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.article-summary {
  max-width: 820px;
  margin: 24px 0 0;
  color: #bdcbe0;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.65;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 28px 0 0;
  color: #91a4c2;
  font-size: 14px;
}

.article-cover {
  display: block;
  width: 100%;
  height: auto;
  margin: 42px 0;
  border: 1px solid rgba(148, 178, 230, .16);
  border-radius: 18px;
  box-shadow: 0 22px 58px rgba(0, 0, 0, .3);
}

.article-content {
  max-width: 800px;
  margin: 48px auto 0;
  color: #dce6f5;
  font-size: 18px;
  line-height: 1.82;
}

.article-content p {
  margin: 0 0 24px;
}

.article-content h2 {
  margin: 58px 0 20px;
  color: #ffffff;
  font-size: clamp(28px, 3.5vw, 38px);
  line-height: 1.2;
}

.article-content h3 {
  margin: 44px 0 18px;
  color: #ffffff;
  font-size: 26px;
}

.article-content h4 {
  margin: 34px 0 16px;
  color: #ffffff;
  font-size: 21px;
}

.article-content ul {
  margin: 0 0 28px;
  padding-left: 25px;
}

.article-content li {
  margin: 9px 0;
}

.article-content blockquote {
  margin: 34px 0;
  padding: 18px 24px;
  color: #c7d6eb;
  background: rgba(59, 130, 246, .09);
  border-left: 4px solid #60a5fa;
  border-radius: 0 14px 14px 0;
}

.callout {
  margin: 34px 0;
  padding: 22px 24px;
  color: #dce9ff;
  background: rgba(59, 130, 246, .11);
  border: 1px solid rgba(96, 165, 250, .28);
  border-radius: 16px;
}

.callout-warning {
  background: rgba(245, 158, 11, .1);
  border-color: rgba(245, 158, 11, .3);
}

.callout-tip {
  background: rgba(34, 197, 94, .1);
  border-color: rgba(34, 197, 94, .3);
}

.article-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 36px auto;
  border-radius: 16px;
}

.article-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 64px;
  padding: 30px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, .15),
    rgba(37, 99, 235, .06)
  );
  border: 1px solid rgba(96, 165, 250, .22);
  border-radius: 20px;
}

.article-cta h2 {
  margin: 0 0 10px;
  color: #ffffff;
}

.article-cta p {
  margin: 0;
  color: #aebed6;
}

.site-footer {
  margin-top: 0;
}

@media (max-width: 700px) {
  .article-main {
    padding: 32px 12px 58px;
  }

  .article-card {
    padding: 26px 20px;
    border-radius: 18px;
  }

  .article-heading h1 {
    font-size: 38px;
  }

  .article-content {
    font-size: 17px;
  }

  .article-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================================================
   XERIA Article TOC — Clean Implementation
   ========================================================= */

.article-content h2[id],
.article-content h3[id],
.article-content h4[id] {
    scroll-margin-top: 112px;
}

.article-card {
    width: min(1280px, calc(100vw - 48px));
}

.article-content {
    max-width: 860px;
}

.article-toc {
    display: block;
    width: 100%;
    margin: 0 0 40px;
    border: 0;
}

.article-toc-summary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    color: #f8fafc;
    background: rgba(7, 22, 48, 0.80);
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    list-style: none;
    user-select: none;
}

.article-toc-summary::-webkit-details-marker {
    display: none;
}

.article-toc-symbol::before {
    content: "+";
    color: #93c5fd;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
}

.article-toc[open] .article-toc-symbol::before {
    content: "−";
}

.article-toc-panel {
    margin-top: 8px;
    padding: 16px 18px 18px;
    background: rgba(7, 22, 48, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.20);
    border-radius: 14px;
}

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

.article-toc li {
    margin: 0;
    padding: 0;
}

.article-toc a {
    display: block;
    position: relative;
    padding: 7px 10px 7px 16px;
    color: #aebed6;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.article-toc a:hover,
.article-toc a.active {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.16);
}

.article-toc a.active::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 2px;
    border-radius: 999px;
    background: #60a5fa;
}

.article-toc .toc-level-3 a {
    padding-left: 30px;
    color: #91a4c2;
    font-size: 13px;
}

/* Dar ve orta ekran: tek sütun, açılır TOC */
@media (max-width: 1599px) {
    .article-card {
        display: block !important;
        width: min(1100px, calc(100vw - 32px));
    }

    .article-card > * {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .article-toc {
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .article-toc-summary {
        display: flex !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    .article-toc:not([open]) .article-toc-panel {
        display: none !important;
    }

    .article-toc[open] .article-toc-panel {
        display: block !important;
    }
}

/* Çok geniş ekran: sağda sticky ve sürekli açık */
@media (min-width: 1600px) {
    .article-card {
        display: grid !important;
        grid-template-columns: minmax(0, 880px) 280px;
        column-gap: 48px;
        justify-content: center;
        align-items: start;
    }

    .article-card > header,
    .article-card > .article-cover,
    .article-card > .article-content,
    .article-card > .article-related,
    .article-card > .article-cta {
        grid-column: 1;
    }

    .article-card > .article-toc {
        grid-column: 2;
        grid-row: 1 / span 4;
        position: sticky !important;
        top: 96px;
        margin: 0;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .article-toc-summary {
        pointer-events: none !important;
        cursor: default !important;
    }

    .article-toc-symbol {
        display: none;
    }

    .article-toc-panel {
        display: block !important;
        margin-top: 8px;
    }
}

@media (max-width: 700px) {
    .article-card {
        width: min(100%, calc(100vw - 24px));
    }

    .article-toc {
        margin-bottom: 28px;
    }

    .article-toc-summary {
        padding: 16px;
        border-radius: 14px;
    }

    .article-toc-panel {
        padding: 14px;
    }

    .article-content {
        max-width: none;
    }
}

/* =========================================================
   XERIA TOC — Medium desktop right-column layout
   ========================================================= */

/* Tablet ve küçük ekran: içerik üstünde tam genişlik */
@media (max-width: 1099px) {
    .article-card {
        display: block !important;
        width: min(1000px, calc(100vw - 32px));
    }

    .article-card > * {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .article-toc {
        position: static !important;
        width: 100% !important;
        margin: 0 0 36px !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

/* Normal masaüstü: TOC sağ sütunda */
@media (min-width: 1100px) {
    .article-card {
        display: grid !important;
        width: min(1280px, calc(100vw - 40px));
        grid-template-columns: minmax(0, 1fr) 250px;
        column-gap: 38px;
        align-items: start;
    }

    .article-card > .breadcrumbs,
    .article-card > .article-heading,
    .article-card > .article-cover,
    .article-card > .article-content,
    .article-card > .article-related,
    .article-card > .article-cta {
        grid-column: 1 !important;
    }

    .article-card > .article-toc {
        display: block !important;
        grid-column: 2 !important;
        grid-row: 1 / span 5 !important;
        position: sticky !important;
        top: 92px;
        width: 100% !important;
        margin: 0 !important;
        max-height: calc(100vh - 116px);
        overflow-y: auto;
    }

    .article-toc-summary {
        padding: 15px 16px;
        border-radius: 13px;
    }

    .article-toc-panel {
        padding: 12px;
    }

    .article-toc a {
        padding-top: 6px;
        padding-bottom: 6px;
        font-size: 13px;
    }

    .article-toc .toc-level-3 a {
        padding-left: 25px;
        font-size: 12px;
    }
}

/* Orta boy masaüstü: sağda kapalı/açılır */
@media (min-width: 1100px) and (max-width: 1599px) {
    .article-toc:not([open]) .article-toc-panel {
        display: none !important;
    }

    .article-toc[open] .article-toc-panel {
        display: block !important;
    }

    .article-toc-summary {
        display: flex !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }

    .article-toc-symbol {
        display: inline-block !important;
    }
}

/* Çok geniş masaüstü: sağda sürekli açık */
@media (min-width: 1600px) {
    .article-card {
        grid-template-columns: minmax(0, 880px) 280px;
        column-gap: 48px;
    }

    .article-toc-panel {
        display: block !important;
    }

    .article-toc-summary {
        pointer-events: none !important;
        cursor: default !important;
    }

    .article-toc-symbol {
        display: none !important;
    }
}

/* Reading progress
   -------------------------------------------------------------- */

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  z-index: 10000;
}

.reading-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--blue, #3b82f6);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.55);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress-bar {
    transition: none;
  }
}

/* FAQ accordion
   -------------------------------------------------------------- */

.article-faq {
  display: grid;
  gap: 12px;
  margin: 24px 0 40px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  background: rgba(15, 35, 66, 0.54);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  background: rgba(59, 130, 246, 0.08);
}

.faq-question h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.45;
}

.faq-symbol {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.faq-symbol::before,
.faq-symbol::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #60a5fa;
  content: "";
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease;
}

.faq-symbol::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-symbol::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-item[open] .faq-question {
  background: rgba(59, 130, 246, 0.1);
}

.faq-answer {
  padding: 0 20px 18px;
  color: #cbd5e1;
}

.faq-answer > :first-child {
  margin-top: 0;
}

.faq-answer > :last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .faq-question {
    padding: 16px;
  }

  .faq-question h3 {
    font-size: 17px;
  }

  .faq-answer {
    padding: 0 16px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-question,
  .faq-symbol::before,
  .faq-symbol::after {
    transition: none;
  }
}



/* Article Tables */

.article-table-wrapper {
  width: 100%;
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid rgba(148, 178, 230, 0.22);
  border-radius: 14px;
  background: rgba(8, 23, 48, 0.54);
  -webkit-overflow-scrolling: touch;
}

.article-table-wrapper:focus {
  outline: 2px solid rgba(96, 165, 250, 0.85);
  outline-offset: 3px;
}

.article-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: #dce6f5;
  font-size: 0.95rem;
  line-height: 1.55;
}

.article-table th,
.article-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid rgba(148, 178, 230, 0.14);
  border-bottom: 1px solid rgba(148, 178, 230, 0.14);
}

.article-table th:last-child,
.article-table td:last-child {
  border-right: 0;
}

.article-table tbody tr:last-child td {
  border-bottom: 0;
}

.article-table th {
  color: #ffffff;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.16);
}

.article-table tbody tr:nth-child(even) {
  background: rgba(148, 178, 230, 0.045);
}

.article-table tbody tr:hover {
  background: rgba(96, 165, 250, 0.08);
}

@media (max-width: 640px) {
  .article-table-wrapper {
    margin: 1.5rem 0;
    border-radius: 12px;
  }

  .article-table {
    min-width: 560px;
    font-size: 0.9rem;
  }

  .article-table th,
  .article-table td {
    padding: 0.75rem 0.85rem;
  }
}

/* Related Articles */

.article-related {
  clear: both;
  width: 100%;
  max-width: 800px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color, rgba(148, 163, 184, 0.22));
}

.article-related > h2 {
  margin: 0 0 1.25rem;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(280px, 340px)
  );
  gap: 1rem;
  justify-content: start;
}

.article-related-card {
  width: 100%;
}

.article-related-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.22));
  border-radius: 1rem;
  background: var(--card-background, rgba(15, 35, 66, 0.62));
}

.article-related-card > a {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.article-related-card > a:hover h3 {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.article-related-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.35);
}

.article-related-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-related-card-body {
  padding: 1.1rem;
}

.article-related-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
}

.article-related-card p {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted-text, #b4c2d7);
}

@media (max-width: 640px) {
  .article-related {
    margin-top: 2.25rem;
    padding-top: 1.5rem;
  }

  .article-related-grid {
    grid-template-columns: 1fr;
  }
}
