/* ========================================
   15 Günlük Hava Durumları - Ana CSS
   ======================================== */

/* Genel */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    font-size: 0.95rem;
}

a {
    color: #0d6efd;
    transition: color 0.2s;
}

a:hover {
    color: #0a58ca;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.1rem;
}

.dropdown-menu-scroll {
    max-height: 400px;
    overflow-y: auto;
}

/* Arama Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1050;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown .search-item {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.search-dropdown .search-item:hover {
    background-color: #f0f7ff;
}

.search-dropdown .search-item:last-child {
    border-bottom: none;
}

.search-dropdown .search-item .city-name {
    font-weight: 600;
    color: #333;
}

.search-dropdown .search-item .district-info {
    font-size: 0.8rem;
    color: #666;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0099ff 50%, #00b4d8 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="60" r="25" fill="rgba(255,255,255,0.03)"/><circle cx="50" cy="80" r="20" fill="rgba(255,255,255,0.04)"/></svg>');
    pointer-events: none;
}

/* Hava Durumu Kartları */
.weather-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.weather-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

.weather-card .temperature {
    color: #0d6efd;
}

/* Forecast Tablosu */
.forecast-table {
    font-size: 0.9rem;
}

.forecast-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.forecast-table td {
    vertical-align: middle;
}

.forecast-table tr:hover {
    background-color: #f0f7ff;
}

.temp-high {
    color: #e74c3c;
}

.temp-low {
    color: #3498db;
}

/* Detay Kutuları */
.detail-box {
    transition: background-color 0.2s;
}

.detail-box:hover {
    background-color: #e9ecef !important;
}

/* Saatlik Scroll */
.hourly-scroll {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.hourly-scroll::-webkit-scrollbar {
    height: 6px;
}

.hourly-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}

.hourly-item {
    display: inline-block;
    min-width: 70px;
    border-right: 1px solid #f0f0f0;
}

.hourly-item:last-child {
    border-right: none;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.85rem;
}

/* Kartlar */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-size: 0.95rem;
}

/* Sidebar */
aside .card {
    border-radius: 8px;
}

aside .list-group-item {
    border-left: none;
    border-right: none;
    font-size: 0.88rem;
}

aside .list-group-item:first-child {
    border-top: none;
}

/* Footer */
footer {
    font-size: 0.9rem;
}

footer h5, footer h6 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

footer a {
    transition: color 0.2s;
}

footer a:hover {
    color: #fff !important;
}

/* Admin Panel */
.admin-sidebar {
    min-height: 100vh;
    background: #1e293b;
}

.admin-sidebar .nav-link {
    color: #94a3b8;
    padding: 10px 20px;
    border-radius: 0;
    transition: all 0.2s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: #334155;
}

.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

.stat-card {
    border-radius: 10px;
    border: none;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Tüm İller Sayfası */
.city-grid .city-item {
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.city-grid .city-item:hover {
    background-color: #f0f7ff;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem !important;
    }

    .hero-section h1 {
        font-size: 1.3rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .forecast-table {
        font-size: 0.82rem;
    }

    .detail-box small {
        font-size: 0.7rem;
    }

    .detail-box strong {
        font-size: 0.85rem;
    }

    .navbar-brand {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .btn-group .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .hourly-item {
        min-width: 60px;
    }
}

/* Loading animasyonu */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Install Sayfası */
.install-page {
    max-width: 700px;
    margin: 40px auto;
}

.install-page .step {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.install-page .step .status {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
}

.install-page .step .status.success {
    background: #28a745;
    color: #fff;
}

.install-page .step .status.error {
    background: #dc3545;
    color: #fff;
}

/* ========================================
   Reklam Alanları
   ======================================== */
.ad-container {
    overflow: hidden;
    text-align: center;
    margin: 0 auto;
    max-width: 100%;
}

.ad-container:empty {
    display: none;
}

.ad-container ins {
    display: block !important;
}

/* Mobil yapışkan reklam alt padding */
@media (max-width: 768px) {
    .ad-slot-mobile_sticky {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        background: #fff;
        padding: 5px 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        text-align: center;
    }

    /* Mobil yapışkan reklam olduğunda footer'a padding ekle */
    body {
        padding-bottom: 60px;
    }
}

/* Desktop'ta yapışkan reklam gizle */
@media (min-width: 769px) {
    .ad-slot-mobile_sticky {
        display: none !important;
    }
}

/* Navbar Favorilere Ekle butonu */
#navAddFavorite {
    animation: favPulse 2s ease-in-out 3;
}

@keyframes favPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Anket Sistemi */
.poll-option {
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #dee2e6;
}

.poll-option:hover {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}

.poll-option.selected {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.poll-bar {
    height: 28px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
    position: relative;
}

.poll-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.poll-bar-text {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}
