/*
Theme Name: Konya Hava Durumu
Author: Taner Özay
Description: WeatherAPI ile Konya hava durumu + günlük özet + 3 günlük tablo + saatlik tahmin, mobil uyumlu ve canlı tasarım.
Version: 5.0
*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #e8f2fa;
    color: #374151;
}

a {
    color: inherit;
    text-decoration: none;
}

/* GENEL KAP */

.khd-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 16px;
}

/* Kart + dinamik arka planlar */

.khd-card {
    border-radius: 16px;
    max-width: 1100px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, #f9fafb, #e5e7eb);
    color: #111827;
}

/* Gündüz/gece + duruma göre temalar */

.khd-bg-sunny-day {
    background: radial-gradient(circle at top, #ffeaa7, #fab387 40%, #f97316 85%);
    color: #111827;
}

.khd-bg-cloudy-day {
    background: radial-gradient(circle at top, #e5e7eb, #cbd5f5 40%, #6b7280 90%);
    color: #0f172a;
}

.khd-bg-rainy-day {
    background: radial-gradient(circle at top, #1e293b, #0f172a 45%, #020617 90%);
    color: #e5e7eb;
}

.khd-bg-snowy-day {
    background: radial-gradient(circle at top, #e0f2fe, #f9fafb 40%, #bfdbfe 90%);
    color: #0f172a;
}

.khd-bg-night {
    background: radial-gradient(circle at top, #020617, #0f172a 55%, #111827 100%);
    color: #e5e7eb;
}

/************* BAŞLIK *************/

.khd-main-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.khd-main-title {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.khd-main-title span.khd-city-emoji {
    font-size: 20px;
}

.khd-main-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

/************* GÜNLÜK ÖZET *************/

.khd-daily {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.khd-daily-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.khd-daily-current {
    font-size: 42px;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.khd-daily-current small {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.8;
}

.khd-daily-desc {
    text-transform: capitalize;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.khd-daily-desc-emoji {
    font-size: 20px;
}

.khd-daily-icon img {
    width: 60px;
    height: 60px;
}

.khd-daily-meta {
    font-size: 13px;
    opacity: 0.9;
}

.khd-daily-meta strong {
    font-weight: 700;
}

.khd-daily-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 10px 20px;
    align-content: center;
}

.khd-daily-item span {
    font-size: 12px;
    opacity: 0.8;
}

.khd-daily-item strong {
    font-size: 15px;
}

/************* ROZETLER *************/

.khd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.khd-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px);
}

.khd-badge-emoji {
    font-size: 14px;
}

/************* METİN BAŞLIKLARI *************/

.khd-section-title {
    font-size: 17px;
    font-weight: 700;
    margin-top: 14px;
    margin-bottom: 4px;
}

.khd-section-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

/************* TABLO GENEL *************/

.khd-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 16px;
}

.khd-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    background: rgba(255, 255, 255, 0.06);
}

.khd-table thead th {
    border-bottom: 2px solid rgba(148, 163, 184, 0.5);
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    opacity: 0.9;
}

.khd-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.06);
}

.khd-table tbody td {
    padding: 9px 6px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
}

/* Tarih + gün kolonu */

.khd-date-cell {
    text-align: left;
}

.khd-date-main {
    font-weight: 600;
}

.khd-date-sub {
    font-size: 12px;
    opacity: 0.85;
}

/* İkon + durum */

.khd-col-icon img {
    width: 30px;
    height: 30px;
    display: block;
    margin: 0 auto 3px;
}

.khd-cond-text {
    font-size: 12px;
}

/************* SAAT SAAT TABLO *************/

.khd-hourly-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 440px;
    background: rgba(15, 23, 42, 0.08);
}

.khd-hourly-table thead th {
    border-bottom: 2px solid rgba(129, 140, 248, 0.7);
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    opacity: 0.9;
}

.khd-hourly-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.08);
}

.khd-hourly-table tbody td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 12px;
    text-align: center;
}

/* Sıcaklık barı */

.khd-temp-bar-wrapper {
    width: 70px;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    margin: 0 auto;
    overflow: hidden;
}

.khd-temp-bar-inner {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #22c55e, #f97316, #ef4444);
}

/************* MİKRO YORUM *************/

.khd-microcopy {
    font-size: 12px;
    opacity: 0.95;
    margin-bottom: 10px;
}

/************* PAYLAŞ ALANI *************/

.khd-share {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.khd-share-label {
    opacity: 0.9;
}

.khd-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.khd-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(15, 23, 42, 0.18);
}

.khd-share-btn-whatsapp {
    background: rgba(22, 163, 74, 0.85);
    border-color: rgba(22, 163, 74, 1);
}

.khd-share-btn-x {
    background: rgba(15, 23, 42, 0.85);
}

/************* RESPONSIVE *************/

/* Tablet ve küçük ekranlar */
@media (max-width: 768px) {
    .khd-wrapper {
        padding: 24px 10px;
    }

    .khd-card {
        padding: 16px 14px;
    }

    .khd-main-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .khd-daily {
        flex-direction: column;
        align-items: flex-start;
    }

    .khd-daily-current {
        font-size: 34px;
    }

    .khd-daily-right {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .khd-table thead th,
    .khd-table tbody td,
    .khd-hourly-table thead th,
    .khd-hourly-table tbody td {
        font-size: 12px;
        padding: 7px 5px;
    }
}

/* Telefonlar */
@media (max-width: 480px) {
    .khd-wrapper {
        padding: 16px 6px;
    }

    .khd-card {
        padding: 12px 10px;
    }

    .khd-main-header {
        align-items: center;
        text-align: center;
    }

    .khd-main-title {
        font-size: 18px;
        justify-content: center;
    }

    .khd-main-subtitle {
        font-size: 11px;
    }

    .khd-daily {
        padding: 12px;
    }

    .khd-daily-current {
        font-size: 28px;
    }

    .khd-daily-icon img {
        width: 48px;
        height: 48px;
    }

    .khd-daily-right {
        grid-template-columns: 1fr;
    }

    .khd-daily-item {
        text-align: left;
    }

    .khd-section-title {
        font-size: 15px;
    }

    .khd-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

