*{box-sizing:border-box}body{margin:0;background:#f3f6f9;color:#263746;font:16px/1.5 system-ui,sans-serif}header{background:linear-gradient(110deg,#087fba,#12a6d8);color:white;position:sticky;top:0;z-index:2}header>div,main{max-width:1500px;margin:auto;padding:16px 22px}header>div,nav,.filters{display:flex;align-items:center;gap:12px;flex-wrap:wrap}header a{color:white;text-decoration:none}header strong{font-size:22px}header input,header span {flex:1;max-width:600px;margin:auto}a{color:#066da1}label{display:block;margin:.6em 0}label input,label select,textarea{display:block;width:min(100%,42rem)}input,button,select,textarea{font:inherit;padding:8px 12px;border:1px solid #ccd7df;border-radius:8px}button,.tab{cursor:pointer}.tab,article,form.box,.card,details{border:1px solid #e0e7ec;border-radius:10px;background:white;padding:12px;color:inherit}.tab.active,button{background:#087fba;color:white}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:10px}.list{grid-template-columns:1fr}.card{text-decoration:none;display:flex;gap:10px;align-items:center;overflow-wrap:anywhere}.card b{color:#087fba;background:#e8f3fa;border-radius:5px;padding:0 6px}article,details{margin:12px 0}h1{font-size:1.55rem}h2{font-size:1.2rem}small{color:#506677}footer{text-align:center;padding: 30px 15px;color: var(--muted);font-size: 12px;}button:focus-visible,a:focus-visible{outline:3px solid #efa400}textarea{min-height:6rem}p{overflow-wrap:anywhere}@media(max-width:620px){header>div,main{padding:12px}header input{order:3;flex-basis:100%;max-width:none}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.list{grid-template-columns:1fr}.card{padding:8px;font-size:.85rem}nav{flex-wrap:nowrap;overflow:auto;padding:5px}.tab{white-space:nowrap}}
[hidden]{display:none!important}.filters>*{max-width:100%}
body{background-image:linear-gradient(#f3f6f9ef,#f3f6f9ef),url(images/bg.jpg);background-size:cover;background-attachment:fixed}.card:has(.shot){flex-wrap:wrap}.shot{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:5px}

/* Eski dizin görünümü */
section[data-group] .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; }
section[data-group] .grid.list { grid-template-columns: 1fr; }
section[data-group] .card {
  min-width: 0; gap: 11px; padding: 14px;
  border: 1px solid #e8edf2; border-radius: 11px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 2.5%);
  font-size: 13px; font-weight: 600;
  transition: transform .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
section[data-group] .card:hover,
section[data-group] .card:focus-visible {
  color: #0788c7; border-color: #9bd4ef;
  box-shadow: 0 6px 17px rgb(0 0 0 / 8%);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  section[data-group] .card:hover { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) { section[data-group] .card { transition: none; } }
section[data-group] > h2, #feed h2 { font-weight: 700; }
@media (max-width: 1200px) { section[data-group] .grid:not(.list) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  section[data-group] .grid:not(.list) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  section[data-group] .card { padding: 11px 9px; font-size: 12px; }
}
@media (max-width: 360px) { section[data-group] .grid:not(.list) { grid-template-columns: 1fr; } }

/* Üst görünüm düğmeleri, Haberler ve dil bağlantıları */
header > div > a:not(:first-child) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 10px; border-radius: 10px;
  background: rgb(255 255 255 / 15%);
  transition: background-color .2s ease;
}
header > div > a:not(:first-child):is(:hover, :focus-visible) {
  background: rgb(255 255 255 / 30%);
}

/* Üst kategori sekmeleri */
main > nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 5px 2px 14px;
  scrollbar-width: thin;
}
main > nav > button.tab {
  position: relative;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 11px 16px;
  border: 1px solid #e2ebf2;
  border-radius: 10px;
  background: #fff;
  color: #30485c;
  font-size: 13px;
  font-weight: 700;
  transition: background-color .22s ease, color .22s ease,
              border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}
main > nav > button.tab:focus-visible:not(.active) {
  background: #eff8fc;
  color: #075b83;
}
main > nav > button.tab.active {
  background: #e8f5fc;
  border-color: #9acbe4;
  color: #064d71;
  box-shadow: 0 3px 9px rgb(7 91 131 / 9%);
}
main > nav > button.tab::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: auto 13px 4px;
  height: 2px;
  border-radius: 999px;
  background: #0788c7;
  transform: scaleX(0);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
main > nav > button.tab:is(:focus-visible, .active)::after {
  transform: scaleX(1);
  opacity: 1;
}
@media (hover: hover) {
  main > nav > button.tab:hover:not(.active) {
    background: #eff8fc;
    border-color: #afd7ea;
    color: #075b83;
    box-shadow: 0 3px 9px rgb(7 91 131 / 8%);
    transform: translateY(-1px);
  }
  main > nav > button.tab:hover::after {
    transform: scaleX(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  header > div > a:not(:first-child),
  main > nav > button.tab,
  main > nav > button.tab::after { transition: none; }
  main > nav > button.tab:hover:not(.active) { transform: none; }
}




/* TopInfoSites yönetim paneli */
body:has(> header > div > strong + a[href="./"]:last-child) {
  --admin-bg: #f4f6fa;
  --admin-surface: #fff;
  --admin-text: #17253a;
  --admin-muted: #52637a;
  --admin-line: #dce4ee;
  --admin-primary: #2457c5;
  --admin-primary-dark: #1944a5;
  --admin-tint: #edf3ff;
  --admin-radius: 14px;
  --admin-shadow: 0 4px 16px rgb(23 37 58 / 5%);

  min-height: 100vh;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.55;

  /* Üst çubuk */
  & > header {
    background: #17253a;
    box-shadow: 0 2px 10px rgb(23 37 58 / 12%);
  }

  & > header > div,
  & > main {
    max-width: 1080px;
    padding-inline: clamp(14px, 4vw, 32px);
  }

  & > header > div {
    justify-content: space-between;
    gap: 8px 16px;
    min-height: 68px;
    padding-block: 12px;
  }

  & > header strong {
    font-size: clamp(1rem, 3vw, 1.2rem);
    letter-spacing: -.02em;
  }

  & > header > div > a[href="./"] {
    min-height: 40px;
    padding-inline: 14px;
    border: 1px solid rgb(255 255 255 / 30%);
    border-radius: 8px;
    background: transparent;
    font-size: .875rem;
    font-weight: 600;
  }

  & > header > div > a[href="./"]:hover {
    background: rgb(255 255 255 / 14%);
  }

  /* Genel bakış */
  & > main {
    padding-block: clamp(22px, 5vw, 44px) 48px;
  }

  & > main h1 {
    margin: 0 0 16px;
    font-size: clamp(1.55rem, 4vw, 2rem);
    line-height: 1.2;
    letter-spacing: -.035em;
  }

  & > main > article {
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid #cad9fa;
    border-inline-start: 4px solid var(--admin-primary);
    border-radius: var(--admin-radius);
    background: var(--admin-tint);
    line-height: 1.7;
  }

  /* Açılır yönetim bölümleri */
  & > main > details {
    margin: 0 0 12px;
    padding: 0;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
  }

  & > main > details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 13px clamp(14px, 3vw, 22px);
    border-radius: inherit;
    list-style: none;
    cursor: pointer;
    font-weight: 700;
  }

  & > main > details > summary::-webkit-details-marker {
    display: none;
  }

  & > main > details > summary::after {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-inline-end: 3px;
    border-inline-end: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
    transform: rotate(45deg);
  }

  & > main > details > summary:hover {
    background: #f5f8fd;
  }

  & > main > details[open] {
    padding-bottom: 4px;
    border-color: #bacbf0;
  }

  & > main > details[open] > summary {
    margin-bottom: 14px;
    border-bottom: 1px solid #d8e4ff;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
    background: var(--admin-tint);
    color: #1a4197;
  }

  & > main > details[open] > summary::after {
    transform: rotate(225deg);
  }

  & > main > details > :is(form, article, p, code, a) {
    margin: 0 clamp(12px, 3vw, 22px) 14px;
  }

  /* Formlar */
  & > main form {
    min-width: 0;
  }

  & > main > details > :is(form, article) {
    padding: clamp(12px, 2.5vw, 18px);
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    background: #fafbfd;
  }

  & > main label {
    margin-block: 0 14px;
    color: #334760;
    font-size: .875rem;
    font-weight: 650;
  }

  & > main :is(input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="submit"]), select, textarea) {
    display: block;
    width: min(100%, 44rem);
    min-height: 42px;
    margin-top: 5px;
    border: 1px solid #b9c7d7;
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 1rem;
    font-weight: 400;
  }

  & > main textarea {
    min-height: 112px;
    resize: vertical;
  }

  & > main :is(input[type="checkbox"], input[type="radio"]) {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin: 0 6px 0 0;
    padding: 0;
    accent-color: var(--admin-primary);
    vertical-align: -.12em;
  }

  & > main :is(button, input[type="submit"]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 42px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--admin-primary);
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
  }

  & > main :is(button, input[type="submit"]):hover {
    background: var(--admin-primary-dark);
  }

  & > main > form:last-child {
    margin-top: 20px;
  }

  & > main:has(> details) > form:last-child :is(button, input[type="submit"]) {
    border-color: #b9c7d7;
    background: var(--admin-surface);
    color: var(--admin-text);
  }

  & > main:has(> details) > form:last-child :is(button, input[type="submit"]):hover {
    background: var(--admin-tint);
  }

  /* Haber düzenleme ve yayın — ilk açılır bölüm */
  & > main > details:first-of-type[open] > form {
    & > label:has(> input[type="hidden"]) {
      display: none;
    }

    @media (width < 800px) {
      & :is(button, input[type="submit"]) {
        width: 100%;
      }
    }

    @media (width >= 800px) {
      display: grid;
      grid-template-columns:
        minmax(0, 1.15fr)
        minmax(0, 1.65fr)
        minmax(0, 1fr)
        max-content;
      align-items: start;
      gap: 12px;
      margin-bottom: 0;
      padding: 12px 14px;
      border-radius: 0;
      background: var(--admin-surface);

      &:first-of-type {
        border-start-start-radius: 10px;
        border-start-end-radius: 10px;
      }

      &:nth-of-type(even) {
        background: #f4f7fc;
      }

      &:last-of-type {
        margin-bottom: 14px;
        border-end-start-radius: 10px;
        border-end-end-radius: 10px;
      }

      & > label {
        min-width: 0;
        margin: 0;
      }

      & :is(input[name="title"], textarea[name="summary"], select[name="status"]) {
        width: 100%;
        min-width: 0;
        font-size: .875rem;
        line-height: 1.4;
      }

      & textarea[name="summary"] {
        min-height: 64px;
      }

      &:first-of-type > :is(button, input[type="submit"]) {
        margin-top: calc(1em * 1.55 + 5px);
      }

      &:not(:first-of-type) {
        border-top: 0;

        & > label {
          font-size: 0;
          line-height: 0;
        }

        & :is(input[name="title"], textarea[name="summary"], select[name="status"]) {
          margin-top: 0;
        }
      }
    }
  }

  /* Tarama satırları, geçmiş ve API anahtarı */
  & > main > details > p {
    margin-bottom: 0;
    padding-block: 10px;
    border-bottom: 1px solid var(--admin-line);
    overflow-wrap: anywhere;
  }

  & > main > details > p:last-child {
    margin-bottom: 10px;
    border-bottom: 0;
  }

  & > main > details article h2 {
    margin: 6px 0;
    font-size: 1.05rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  & > main > details article p {
    margin: 6px 0 10px;
  }

  & > main small {
    color: var(--admin-muted);
  }

  & > main > details > code {
    display: block;
    padding: 12px;
    border: 1px solid var(--admin-line);
    border-radius: 8px;
    background: #f0f4fa;
    overflow-wrap: anywhere;
  }

  & > main a {
    color: var(--admin-primary-dark);
    text-underline-offset: .18em;
  }

  & > main > details > a {
    display: inline-block;
    padding-block: 6px;
    font-weight: 650;
  }

  & > main :is(a, button, summary, input, select, textarea):focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 3px;
  }

  /* Yönetici girişi */
  & > main:not(:has(> details)) {
    max-width: 470px;
    padding-top: clamp(28px, 9vw, 100px);
  }

  & > main:not(:has(> details)) > form {
    padding: clamp(18px, 5vw, 28px);
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
  }

  & > main:not(:has(> details)) > form :is(button, input[type="submit"]) {
    width: 100%;
  }
}

/* TopInfoSites — haber akışı ve haber detayı */
main:has(> #feed),
html:has(> head > script[type="application/ld+json"]) > body > main {
  --news-ink: #172439;
  --news-text: #34465f;
  --news-muted: #52637a;
  --news-blue: #1657b5;
  --news-navy: #132644;
  --news-line: #dbe4ee;
  --news-surface: #fff;
  --news-radius: 16px;
  --news-shadow: 0 4px 18px rgb(19 38 68 / 6%);
}

/* Haber bölümü başlığı */
main:has(> #feed) > h1 {
  margin: 30px 0 18px;
  padding-block: 3px;
  padding-inline-start: 14px;
  border-inline-start: 4px solid var(--news-blue);
  color: var(--news-ink);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

main:has(> .filters ~ #feed) > h1 {
  margin-top: 12px;
}

/* Arama, tarih, ülke, kategori ve kaynak filtreleri */
main:has(> #feed) > .filters {
  display: grid;
  grid-template-columns:
    minmax(170px, 1.5fr)
    minmax(136px, 1fr)
    repeat(3, minmax(0, 1fr))
    auto;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--news-line);
  border-radius: var(--news-radius);
  background: var(--news-surface);
  box-shadow: var(--news-shadow);
}

main:has(> #feed) > .filters > :is(input:not([type="hidden"]), select) {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #b9c8d9;
  border-radius: 9px;
  background: #f8fafc;
  color: var(--news-ink);
  font-size: 14px;
}

main:has(> #feed) > .filters > button,
main:has(> #feed) > #apply-feed {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--news-blue);
  color: #fff;
  font-weight: 700;
}

main:has(> #feed) > :is(.filters > button, #apply-feed):hover {
  background: #10458f;
}

main:has(> #feed) > #apply-feed {
  margin-bottom: 14px;
}

/* Haber kartları */
#feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  margin-bottom: 18px;
}

#feed > article {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: clamp(15px, 2vw, 24px);
  border: 1px solid var(--news-line);
  border-radius: var(--news-radius);
  background: var(--news-surface);
  box-shadow: var(--news-shadow);
}

#feed > article h2 {
  margin: 0;
  color: var(--news-ink);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

#feed > article h2 a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: .2em;
}

#feed > article h2 a:is(:hover, :focus-visible) {
  text-decoration: underline;
}

#feed > article p {
  margin: 10px 0 16px;
  color: var(--news-text);
  font-size: .9375rem;
  line-height: 1.65;
}

#feed > article small {
  display: block;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--news-line);
  color: var(--news-muted);
  font-size: .8125rem;
  line-height: 1.45;
}

/* Yalnızca Haberler sayfasındaki ilk haber */
.filters ~ #feed > article:first-of-type {
  border-color: var(--news-navy);
  background: linear-gradient(135deg, #132644, #1e4275);
}

.filters ~ #feed > article:first-of-type h2 {
  color: #fff;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.filters ~ #feed > article:first-of-type p {
  max-width: 72ch;
  color: #e3edf9;
}

.filters ~ #feed > article:first-of-type small {
  border-color: rgb(255 255 255 / 24%);
  color: #d6e4f6;
}

/* Boş sonuç ve sayfalama */
#feed > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 16px;
  border: 1px dashed #b9c8d9;
  border-radius: var(--news-radius);
  background: var(--news-surface);
  color: var(--news-muted);
  text-align: center;
}

main > #feed ~ a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 8px 8px 0;
  padding: 8px 15px;
  border: 1px solid var(--news-line);
  border-radius: 9px;
  background: var(--news-surface);
  color: var(--news-blue);
  font-weight: 700;
  text-decoration: none;
}

main > #feed ~ a:hover {
  background: #eaf2ff;
}

/* Tek haber sayfası */
html:has(> head > script[type="application/ld+json"]) > body > main {
  max-width: 920px;
  padding-block: clamp(24px, 5vw, 60px) 42px;
}

html:has(> head > script[type="application/ld+json"]) > body > main > h1 {
  margin: 0 0 16px;
  color: var(--news-ink);
  font-size: clamp(1.85rem, 5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

html:has(> head > script[type="application/ld+json"]) > body > main > h1 + p {
  margin: 0 0 26px;
  padding: 14px 18px;
  border-inline-start: 4px solid var(--news-blue);
  border-radius: 0 12px 12px 0;
  background: #ecf3ff;
  color: var(--news-text);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
}

html:has(> head > script[type="application/ld+json"]) > body > main > article {
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--news-line);
  border-radius: var(--news-radius);
  background: var(--news-surface);
  box-shadow: var(--news-shadow);
  overflow-wrap: anywhere;
}

html:has(> head > script[type="application/ld+json"]) > body > main > article > strong {
  color: var(--news-muted);
  font-size: .875rem;
}

html:has(> head > script[type="application/ld+json"]) > body > main > article a {
  color: var(--news-blue);
  text-underline-offset: .18em;
}

html:has(> head > script[type="application/ld+json"]) > body > main > article > p {
  margin: 10px 0 14px;
  color: var(--news-text);
  line-height: 1.65;
}

html:has(> head > script[type="application/ld+json"]) > body > main > article > strong + p {
  color: var(--news-ink);
  font-size: 1.1rem;
  font-weight: 700;
}

html:has(> head > script[type="application/ld+json"]) > body > main > article > div {
  padding: 5px 0;
  border-top: 1px solid var(--news-line);
  color: var(--news-muted);
  font-size: .8125rem;
}

main:has(> #feed) :is(a, button, input, select):focus-visible {
  outline: 2px solid var(--news-blue);
  outline-offset: 3px;
}

.filters ~ #feed > article:first-of-type a:focus-visible {
  outline-color: #fff;
}

/* Ekran boyutuna göre yerleşim */
@media (min-width: 1024px) {
  .filters ~ #feed > article:first-of-type {
    grid-column: span 2;
  }

  .filters ~ #feed > article:only-of-type {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1023px) {
  #feed,
  main:has(> #feed) > .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  main:has(> #feed) > .filters > input[name="q"],
  .filters ~ #feed > article:first-of-type {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  #feed {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  main:has(> #feed) > .filters {
    gap: 8px;
    padding: 10px;
  }

  main:has(> #feed) > .filters > button {
    grid-column: 1 / -1;
  }
}