/* Depremİstatistik.com — global.css
   Her sayfada yüklenen temel katman: token'lar, font, reset, duyuru bandı, başlık/gezinme,
   panel, geri bağlantısı, bölüm başlıkları, alt bilgi. Animasyonlar yalnız transform + opacity ile (GPU). */

/* Nunito self-host (variable 400-900, OFL). Render-blocking dış istek yok. */
@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/nunito-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: dark;
    --bg: #0a1c2e;
    --bar: #0b1f33;
    --surface: #0f2740;
    --surface-raised: #132f4c;
    --line: #234466;
    --text: #eef4fa;
    --text-muted: #a9bccf;
    --accent: #ff5a36;
    --accent-strong: #d93916;
    --accent-text: #ff8a6b;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: "Nunito", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img, svg, video, canvas, iframe { max-width: 100%; }

/* hidden özniteliği bileşenin kendi display değerine yenilmez */
[hidden] { display: none !important; }

a { color: var(--accent-text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Duyuru bandı (Tema Ayarları): başlığın üstünde tam genişlik, rengi türüne göre; metin,
   karşısındaki kapatma düğmesi kadar boşlukla tam ortada (dar ekranda sola yaslı) */
.announce { color: var(--text); background: #1d4d7a; }
.announce-warning { color: #1a1300; background: #f2c230; }
.announce-urgent { color: #fff; background: #b42318; }
.announce :focus-visible { outline-color: currentColor; }

.announce-inner { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 0; }
.announce-inner::before { content: ""; flex: 0 0 32px; }

.announce-text { flex: 1; min-width: 0; margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.announce-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.announce-close {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.announce-close:hover { background: rgba(0, 0, 0, .16); }
.announce-close svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* Başlık: tepeye yapışık tam genişlik bar, alt kenarı turuncu çizgi */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top);
    border-bottom: 2px solid var(--accent);
    background: var(--bar);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 64px;
}

/* Logo: özel logo görseli ya da sismograf ikonlu metin logosu */
.site-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: var(--text);
}

.site-logo-image { display: block; width: auto; max-width: 280px; max-height: 44px; height: auto; }

.site-logo-mark { display: inline-flex; flex-shrink: 0; width: 30px; height: 30px; }

.site-logo-mark svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-logo-text {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
    white-space: nowrap;
}

.site-logo-tld { font-weight: 700; color: var(--text-muted); }

/* BETA: logo yazısının sağ üstünde, yazıya bitişik küçük etiket */
.site-logo-beta {
    position: absolute;
    right: 0;
    bottom: calc(100% - 4px);
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--accent-strong);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.2;
    color: #fff;
}

/* Gezinme (masaüstü: satır içi) */
.nav-toggle { display: none; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color .15s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0;
    transform: scaleX(.4);
    transition: opacity .15s ease, transform .15s ease;
}

.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { opacity: 1; transform: scaleX(1); }

.site-nav-title { font-size: 15px; font-weight: 700; }
.site-nav-desc { display: none; }

/* Sayfa iskeleti */
.page-main { padding-top: 28px; }
.page-intro { margin-bottom: 18px; }

.page-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--text);
}

.page-lead { max-width: 70ch; margin: 6px 0 0; font-size: 16px; line-height: 1.55; color: var(--text-muted); }

.panel {
    margin: 0 0 16px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--accent);
    border-radius: 18px;
    background: var(--surface);
}

/* Boş durum: kart değil, içeriğin geleceği alanın göstergesi (kesik çizgi, üst çizgi yok) */
.empty-state {
    margin: 0 0 16px;
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: var(--surface);
    text-align: center;
}

.empty-state p { margin: 0; font-weight: 700; color: var(--text-muted); }
.empty-state p + p { margin-top: 6px; font-weight: 400; }

/* Üst sayfaya dönüş bağlantısı (deprem detayı → son depremler, il → sıralama) */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-muted);
}

.back-link::before {
    content: "";
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.back-link:hover { color: var(--text); }

/* Panel içi bölüm başlığı ve açıklaması */
.section-title { margin: 0 0 4px; font-size: 18px; font-weight: 900; color: var(--text); }
.section-lead { margin: 0 0 14px; font-size: 14px; color: var(--text-muted); }
.section-empty { margin: 0; font-weight: 700; color: var(--text-muted); }

.button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    background: var(--accent-strong);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    transition: transform .18s ease, background .18s ease;
}

.button-primary:hover { transform: translate3d(0, -1px, 0); background: #c63414; }

/* Alt bilgi: üst kenarı turuncu çizgi */
.site-footer {
    margin-top: 64px;
    border-top: 2px solid var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    padding: 40px 0 32px;
}

.footer-col p { margin: 12px 0 0; font-size: 15px; line-height: 1.65; color: var(--text-muted); }
.footer-brand p { max-width: 42ch; }

/* Sosyal bağlantılar (Tema Ayarları): marka sütununda, açıklamanın altında */
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }

.footer-social a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-muted);
}

.footer-social a:hover { border-color: var(--accent); color: var(--text); }

.footer-heading { margin: 0; font-size: 15px; font-weight: 800; color: var(--text); }

.footer-links { margin: 8px 0 0; padding: 0; list-style: none; }

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-size: 15px;
    text-decoration: none;
    color: var(--text-muted);
}

.footer-links a:hover { color: var(--text); }

/* Telif solda, powered by sağda; dar ekranda alt alta */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding: 16px 0;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
}

.footer-bottom p { margin: 0; font-size: 14px; color: var(--text-muted); }

.footer-powered {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    line-height: 14px;
    text-decoration: none;
    color: var(--text-muted);
}

.footer-powered:hover { color: var(--text); }

.footer-powered img { display: block; width: auto; height: 14px; }

/* Metin taşma sertleştirmesi (uzun başlık/menü öğesi satırı bozmasın) */
.header-inner > *, .footer-grid > * { min-width: 0; }
.page-title, .site-nav-title, .site-nav-desc { overflow-wrap: anywhere; }

/* Kullanıcı "hareketi azalt" dediğinde tüm hareketi durdur */
@media (prefers-reduced-motion: reduce) {
    .site-nav, .site-nav a, .site-nav a::after, .nav-toggle, .nav-toggle span, .button-primary {
        transition: none !important;
    }
}
