.archive-page-hero {
  padding: 22px 0 20px;
  color: var(--white);
  background: var(--navy-900);
  border-bottom: 3px solid var(--red-700);
}

.archive-page-heading {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 34px;
  align-items: end;
}

.archive-page-heading .eyebrow { margin: 0; }
.archive-page-heading h1 {
  margin: 4px 0 0;
  font: 2rem/1 var(--serif);
}

.archive-page-heading > p {
  max-width: 530px;
  margin: 0;
  color: rgba(255,255,255,.66);
  font-size: .72rem;
  line-height: 1.55;
}

.archive-browser { padding: 14px 0 90px; }

.archive-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 35px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--line);
}

.archive-filter { display: flex; align-items: center; min-width: 315px; border-bottom: 1px solid var(--navy-900); }
.archive-filter input { width: 100%; min-height: 43px; padding: 0 8px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .78rem; }
.archive-filter:focus-within { border-bottom-color: var(--red-700); }
.archive-filter > span:last-child { color: var(--red-700); font-size: 1.25rem; }
.archive-toolbar + .archive-results { margin-top: 18px; }

.archive-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.archive-results[data-type="kitaplar"] { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.archive-item { display: flex; min-width: 0; height: 300px; flex-direction: column; padding: 22px 20px 12px; overflow: hidden; border-top: 3px solid var(--blue-700); background: var(--white); box-shadow: 0 4px 18px rgba(8,24,45,.06); cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.archive-item:hover, .archive-item:focus-visible { outline: 0; transform: translateY(-3px); box-shadow: 0 12px 27px rgba(8,24,45,.12); }
.archive-item[data-type="videolar"] { border-top-color: var(--red-700); }
.archive-item[data-type="kitaplar"] { border-top-color: var(--gold-500); }
.archive-item[data-type="haberler"] { border-top-color: #397558; }
.archive-item-header { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .61rem; }
.archive-item-type { color: var(--red-700); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.archive-item h3 { display: -webkit-box; margin: 15px 0 7px; overflow: hidden; color: var(--navy-950); font: 1.17rem/1.3 var(--serif); -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.archive-item-description { display: -webkit-box; min-height: 0; margin: 0; overflow: hidden; color: var(--muted); font-size: .77rem; line-height: 1.58; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.archive-item-meta { display: flex; min-width: 0; flex-wrap: nowrap; align-items: center; gap: 12px; margin: 10px 0 0; padding-top: 0; color: var(--muted); font-size: .65rem; }
.archive-item[data-type="makaleler"] h3 { -webkit-line-clamp: var(--article-title-lines, 3); }
.archive-item[data-type="makaleler"] .archive-item-description { -webkit-line-clamp: var(--article-description-lines, 5); }
.archive-item[data-type="makaleler"] .archive-item-meta { min-height: 30px; margin-top: auto; padding-top: 10px; }
.archive-item-meta strong { color: var(--ink); font-weight: 700; }
.archive-author { display: inline-flex; min-width: 0; max-width: 66%; align-items: center; gap: 8px; }
.archive-author strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-author img { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; background: #e9edf1; }
.archive-source { min-width: 0; margin-left: auto; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.archive-item-link { position: relative; z-index: 2; align-self: flex-start; padding-bottom: 4px; color: var(--navy-900); border-bottom: 1px solid var(--navy-900); font-size: .7rem; font-weight: 700; }
.archive-item-link span { margin-left: 6px; color: var(--red-700); }

.archive-item.has-media { height: 332px; padding: 0; border-top: 0; border: 1px solid #e0e3e7; border-radius: 10px; }
.archive-media { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #dfe7ee; }
.archive-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.archive-item:hover .archive-media img { transform: scale(1.035); }
.archive-media-fallback { width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; color: rgba(255,255,255,.7); background: linear-gradient(135deg, var(--navy-800), var(--blue-700)); text-align: center; font: 1rem/1.3 var(--serif); }
.archive-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.08); }
.archive-play span { width: 46px; height: 46px; display: grid; place-items: center; padding-left: 3px; border-radius: 50%; color: var(--red-700); background: rgba(255,255,255,.92); box-shadow: 0 5px 18px rgba(0,0,0,.2); }
.archive-media-body { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 14px 16px 16px; }
.archive-item.has-media h3 { min-height: 3.7em; margin: 8px 0 7px; font: 1rem/1.25 var(--serif); -webkit-line-clamp: 3; }
.archive-item.has-media .archive-item-meta { margin-top: auto; margin-bottom: 0; padding-top: 8px; }
.archive-item.has-media .archive-item-description { -webkit-line-clamp: 2; }

.archive-item.book-layout { height: 430px; border-color: #d8dfe8; border-radius: 10px; }
.archive-item.book-layout .archive-media { aspect-ratio: 2 / 3; max-height: none; background: #edf0f2; }
.archive-item.book-layout .archive-media img { object-position: center top; }
.book-cover-badge { position: absolute; top: 10px; right: 10px; max-width: calc(100% - 20px); padding: 6px 8px; overflow: hidden; color: var(--white); border-radius: 6px; background: rgba(13,37,67,.88); font-size: .56rem; font-weight: 800; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.archive-item.book-layout .book-card-body { padding: 12px 13px 13px; }
.archive-item.book-layout h3 { min-height: 2.7em; margin: 0 0 7px; font: 700 .86rem/1.35 var(--sans); -webkit-line-clamp: 2; }
.book-card-author { margin: 0; overflow: hidden; color: var(--muted); font-size: .7rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.book-card-footer { display: flex; min-width: 0; align-items: center; gap: 8px; margin-top: auto; padding-top: 9px; color: var(--muted); font-size: .61rem; font-weight: 700; }
.book-card-publisher { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-card-tag { flex: 0 0 auto; margin-left: auto; padding: 4px 6px; color: var(--navy-900); border-radius: 999px; background: #edf2f8; font-size: .52rem; text-transform: uppercase; }
.archive-empty { grid-column: 1 / -1; padding: 70px 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); background: var(--white); }
.archive-empty strong { display: block; margin-bottom: 10px; color: var(--navy-950); font: 1.45rem var(--serif); }
.archive-scroll-sentinel { height: 2px; margin-top: 18px; }
.archive-scroll-sentinel[hidden] { display: none; }
.archive-footer { padding-top: 1px; }
.archive-footer .footer-bottom { margin-top: 0; }

.archive-modal-overlay { position: fixed; inset: 0; z-index: 1000; display: none; align-items: flex-start; justify-content: center; padding: 24px 20px; overflow-y: auto; background: rgba(8,24,45,.58); }
.archive-modal-overlay.is-open { display: flex; }
.archive-modal { width: min(760px, 100%); margin: auto; overflow: hidden; border-radius: 13px; background: var(--white); box-shadow: 0 24px 70px rgba(8,24,45,.3); }
.archive-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 27px 17px; border-bottom: 1px solid #e8e6e1; }
.archive-modal-type { margin: 0 0 8px; color: var(--red-700); font-size: .62rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.archive-modal-head h2 { margin: 0; color: var(--navy-950); font: 1.45rem/1.35 var(--serif); }
.archive-modal-close { flex: 0 0 auto; padding: 0 4px; color: var(--muted); border: 0; background: transparent; font: 1.65rem/1 var(--sans); cursor: pointer; }
.archive-modal-close:hover { color: var(--navy-950); }
.archive-modal-meta-row { display: flex; align-items: center; gap: 15px; padding: 10px 27px; border-bottom: 1px solid #e8e6e1; background: #f7f8f9; }
.archive-modal-meta { display: flex; flex: 1; flex-wrap: wrap; gap: 7px 13px; color: var(--muted); font-size: .72rem; }
.archive-modal-meta strong { color: var(--ink); }
.archive-modal-meta span + span::before { content: "·"; margin-right: 13px; opacity: .4; }
.archive-lang-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid #d8dee6; border-radius: 7px; background: #e9eef3; }
.archive-lang-switch[hidden] { display: none; }
.archive-lang-switch button { padding: 6px 9px; color: var(--muted); border: 0; border-radius: 5px; background: transparent; font-size: .68rem; font-weight: 700; cursor: pointer; }
.archive-lang-switch button.is-active { color: var(--navy-900); background: var(--white); box-shadow: 0 1px 4px rgba(8,24,45,.12); }
.archive-lang-switch button:disabled { opacity: .55; cursor: wait; }
.archive-modal-body { max-height: 58vh; padding: 23px 27px; overflow-y: auto; color: #374151; font-size: .9rem; line-height: 1.8; }
.archive-modal-body p { margin: 0 0 1em; }
.archive-modal-note { margin-top: 20px !important; padding: 12px 15px; color: #725318; border: 1px solid #ead79a; border-radius: 7px; background: #fffbea; font-size: .77rem; line-height: 1.55; }
.archive-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 27px; border-top: 1px solid #e8e6e1; }
.archive-modal-secondary, .archive-modal-source { min-height: 38px; padding: 0 16px; border-radius: 6px; font-size: .72rem; font-weight: 700; }
.archive-modal-secondary { color: var(--muted); border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.archive-modal-source { display: inline-flex; align-items: center; gap: 8px; color: var(--white); background: var(--navy-900); }
body.has-open-modal { overflow: hidden; }

@media (max-width: 900px) {
  .archive-page-heading { grid-template-columns: 1fr 1fr; gap: 34px; }
  .archive-results { grid-template-columns: 1fr 1fr; }
  .archive-results[data-type="kitaplar"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .archive-page-hero { padding: 16px 0 15px; }
  .archive-page-heading { grid-template-columns: 1fr; gap: 8px; }
  .archive-page-heading h1 { font-size: 1.7rem; }
  .archive-page-heading > p { display: block; font-size: .66rem; }
  .archive-toolbar { align-items: stretch; flex-direction: column; gap: 24px; }
  .archive-filter { min-width: 0; width: 100%; }
  .archive-results { grid-template-columns: 1fr; }
  .archive-results[data-type="kitaplar"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-modal-overlay { padding: 8px 6px; }
  .archive-modal { width: calc(100vw - 12px); border-radius: 10px; }
  .archive-modal-head { padding: 18px 18px 14px; }
  .archive-modal-head h2 { font-size: 1.25rem; }
  .archive-modal-meta-row { align-items: flex-start; flex-direction: column; padding: 10px 18px; }
  .archive-modal-body { max-height: 64vh; padding: 18px; }
  .archive-modal-foot { padding: 12px 18px; }
}
