/* ==============================================================================
   sondepremler.net — İnfografik Görselleştirici & Dışa Aktarma Stilleri
   ============================================================================== */

:root {
    --info-bg-dark: #0f172a;
    --info-card-bg-dark: #1e293b;
    --info-card-border-dark: rgba(255, 255, 255, 0.08);
    --info-text-dark: #f8fafc;
    --info-muted-dark: #94a3b8;

    --info-bg-light: #f8fafc;
    --info-card-bg-light: #ffffff;
    --info-card-border-light: #e2e8f0;
    --info-text-light: #0f172a;
    --info-muted-light: #64748b;
}

/* Filtre ve Kontrol Alanı (Normal Sayfa Modu) */
.filter-group-segmented {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 9999px;
    display: inline-flex;
    gap: 4px;
}

.filter-btn-segmented {
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-btn-segmented:hover {
    color: #0f172a;
}

.filter-btn-segmented.active {
    background: #3b82f6;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* İnfografik Dış Taşıyıcı */
.infographic-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0 40px;
    overflow-x: auto;
}

/* İnfografik Kart Konteyneri */
.infographic-container {
    position: relative;
    background-color: var(--info-bg-dark);
    color: var(--info-text-dark);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    box-sizing: border-box;
}

/* Açık Tema */
.infographic-container.theme-light {
    background-color: var(--info-bg-light);
    color: var(--info-text-light);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.infographic-container.theme-light .watermark {
    color: rgba(0, 0, 0, 0.03);
}

/* Arka Plan Filigranı */
.infographic-container .watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 8rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 1;
}

/* Header */
.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
}

.theme-light .info-header {
    border-bottom-color: #e2e8f0;
}

.info-logo h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.theme-light .info-logo h1 {
    color: #0f172a;
}

.info-logo h1 span {
    color: #ef4444;
}

.info-title {
    text-align: right;
}

.info-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: #f1f5f9;
}

.theme-light .info-title h2 {
    color: #1e293b;
}

.info-title p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--info-muted-dark);
    font-weight: 600;
}

.theme-light .info-title p {
    color: var(--info-muted-light);
}

/* Ana İçerik Izgarası */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 25px;
    flex: 1;
    position: relative;
    z-index: 2;
}

/* Sol Sütun */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 4'lü İstatistik Kartları */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-card {
    position: relative;
    background: var(--info-card-bg-dark);
    border: 1px solid var(--info-card-border-dark);
    border-radius: 14px;
    padding: 16px 18px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.theme-light .info-card {
    background: var(--info-card-bg-light);
    border-color: var(--info-card-border-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.info-card .card-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 4.5rem;
    opacity: 0.05;
    pointer-events: none;
}

.info-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-card-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.info-card-blue .info-card-icon-box { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.info-card-red .info-card-icon-box { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.info-card-yellow .info-card-icon-box { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.info-card-green .info-card-icon-box { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.info-card-content {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--info-muted-dark);
    margin-bottom: 4px;
}

.theme-light .stat-label {
    color: var(--info-muted-light);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.1;
}

.text-blue { color: #3b82f6 !important; }
.text-red { color: #ef4444 !important; }
.text-yellow { color: #f59e0b !important; }
.text-green { color: #10b981 !important; }

/* Orta Bölüm (Tablo ve Dağılım) */
.mid-row {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 15px;
    flex: 1;
}

.table-container, .dist-container {
    background: var(--info-card-bg-dark);
    border: 1px solid var(--info-card-border-dark);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.theme-light .table-container,
.theme-light .dist-container {
    background: var(--info-card-bg-light);
    border-color: var(--info-card-border-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.table-container h3, .dist-container h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-light .table-container h3,
.theme-light .dist-container h3 {
    color: #0f172a;
}

/* En Büyük Depremler Tablosu */
.eq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.eq-table th {
    text-align: left;
    padding: 6px 8px;
    color: var(--info-muted-dark);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-light .eq-table th {
    color: var(--info-muted-light);
    border-bottom-color: #e2e8f0;
}

.eq-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.theme-light .eq-table td {
    border-bottom-color: #f1f5f9;
    color: #334155;
}

.mag-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 800;
    line-height: 1;
}

.mag-0 { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.mag-1 { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.mag-2 { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.mag-3 { background: rgba(251, 146, 60, 0.2); color: #fb923c; }
.mag-4 { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }
.mag-5 { background: rgba(248, 113, 113, 0.25); color: #f87171; }

/* Büyüklük Dağılımı Çubuğu */
.dist-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
    height: 100px;
    margin-top: auto;
    padding-top: 10px;
}

.dist-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.dist-val {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--info-muted-dark);
    margin-bottom: 4px;
}

.theme-light .dist-val {
    color: var(--info-muted-light);
}

.dist-bar-wrapper {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
}

.theme-light .dist-bar-wrapper {
    background: #f1f5f9;
}

.dist-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
}

.dist-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--info-muted-dark);
    margin-top: 4px;
    white-space: nowrap;
}

.theme-light .dist-label {
    color: var(--info-muted-light);
}

/* Sağ Sütun / Harita */
.map-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#info-map {
    width: 100%;
    flex: 1;
    min-height: 480px;
    border-radius: 14px;
    border: 1px solid var(--info-card-border-dark);
    overflow: hidden;
    background: #0b1120;
    z-index: 2;
}

.theme-light #info-map {
    border-color: var(--info-card-border-light);
    background: #e2e8f0;
}

/* Footer */
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
}

.theme-light .footer-container {
    border-top-color: #e2e8f0;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 25px;
}

.social-item {
    font-size: 0.95rem;
    font-weight: 700;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-light .social-item {
    color: #475569;
}

.footer-qr img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: white;
    padding: 3px;
}

/* Format Uyarlamaları */
.format-169 .content-layout {
    grid-template-columns: 1fr 1.3fr;
}

.format-916 .content-layout {
    grid-template-columns: 1fr;
    gap: 20px;
}

.format-916 #info-map {
    min-height: 450px;
}

@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    .mid-row {
        grid-template-columns: 1fr;
    }
    #info-map {
        min-height: 350px;
    }
}
