/* ===============================================
   ERCİŞ REHBER - GLOBAL MOBİL STİLLERİ (AJAX UYUMLU)
   =============================================== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');
:root {
    --ercis-primary: #2563eb;    /* Ana Mavi */
    --ercis-surface: #ffffff;    /* Kart Yüzeyleri */
    --ercis-background: #f8fafc; /* Sayfa Arka Planı */
    --ercis-text-primary: #1e293b;
    --ercis-text-secondary: #64748b;
    --ercis-radius: 16px;
    --ercis-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    --ercis-safe-area: env(safe-area-inset-bottom, 20px);
}
body {
    font-family: 'Roboto', -apple-system, sans-serif;
    background-color: var(--ercis-background) !important;
    color: var(--ercis-text-primary);
    margin: 0; padding: 0;
    padding-bottom: 80px !important;
}

/* Google Font - Flutter/Android hissiyatı için Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

/* :root - Renk Paletimiz */
:root {
    --ercis-primary: #2563eb;    /* Ana Mavi */
    --ercis-surface: #ffffff;    /* Kart Yüzeyleri */
    --ercis-background: #f8fafc; /* Sayfa Arka Planı */
    --ercis-text-primary: #1e293b;
    --ercis-text-secondary: #64748b;
    --ercis-radius: 16px;       /* Yuvarlak Köşeler */
    --ercis-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

/* === TEMEL SAYFA AYARLARI === */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--ercis-background);
    color: var(--ercis-text-primary);
    margin: 0;
    padding: 0;
    /* Alt panel (panel.php) için boşluk bırak */
    padding-bottom: 80px;
}

/* === YENİ APP BAR (ÜST ÇUBUK) === */
/* Mevcut #top-menu'yü yeniden stillendiriyoruz */
#top-menu {
    position: sticky;
    top: 0;
    z-index: 998;
    background-color: var(--ercis-surface);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 26px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* Logoyu ortalamak için (Eğer hamburger menü her zaman varsa) */
#top-menu img {
    height: 35px; /* Yükseklik ayarı */
    width: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
/* Hamburger Menü İkonu */
#horizontal-navtoggle {
    color: var(--ercis-primary);
    font-size: 24px;
    z-index: 1; /* Logonun önünde olmalı */
}

/* === ANA SAYFA İÇERİK ALANI === */
.ercis-page-container {
    padding: 15px;
}

/* === KARŞILAMA VE GİRİŞ KARTI === */
.ercis-welcome-box {
    background: var(--ercis-surface);
    border-radius: var(--ercis-radius);
    box-shadow: var(--ercis-shadow);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}
.ercis-welcome-box h2 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
}
.ercis-welcome-box p {
    font-size: 14px;
    color: var(--ercis-text-secondary);
    margin-bottom: 15px;
}
.ercis-welcome-button {
    display: block;
    padding: 12px;
    background-color: var(--ercis-primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}
.ercis-welcome-button:hover {
    background-color: #1e4de6;
    color: white;
}
.ercis-welcome-button i {
    margin-right: 8px;
}

/* === ANA KATEGORİ KARTLARI (Referans Görseldeki Gibi) === */
.ercis-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Sütunlu ızgara */
    gap: 15px;
    margin-bottom: 20px;
}
.ercis-hero-card {
    position: relative;
    display: block;
    height: 140px;
    border-radius: var(--ercis-radius);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--ercis-shadow);
    transition: transform 0.3s ease;
}
.ercis-hero-card:hover {
    transform: translateY(-5px);
}
/* Arkaplan Resmi */
.ercis-hero-card .hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    z-index: 1;
}
/* Renk Katmanı (Referans görseldeki gibi) */
.ercis-hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    opacity: 0.7;
    background: linear-gradient(135deg, var(--color-1), var(--color-2));
}
/* Renk Varyantları */
[data-color="blue"] { --color-1: #00c6ff; --color-2: #0072ff; }
[data-color="purple"] { --color-1: #a55eea; --color-2: #6d28d9; }
[data-color="green"] { --color-1: #86efac; --color-2: #16a34a; }
[data-color="orange"] { --color-1: #fbbf24; --color-2: #f97316; }

/* Kart İçeriği (İkon ve Yazı) */
.ercis-hero-content {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 3;
    color: white;
}
.ercis-hero-content i {
    font-size: 24px;
    margin-bottom: 5px;
}
.ercis-hero-content span {
    display: block;
    font-size: 16px;
    font-weight: 700;
}

/* === HIZLI ERİŞİM HİZMETLERİ === */
.ercis-quick-grid-container {
    background: var(--ercis-surface);
    border-radius: var(--ercis-radius);
    box-shadow: var(--ercis-shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.ercis-quick-grid-container h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.ercis-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Sütunlu ızgara */
    gap: 15px;
}
.ercis-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--ercis-text-primary);
    transition: transform 0.2s ease;
}
.ercis-quick-item:hover {
    transform: translateY(-3px);
}
.ercis-quick-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background-color: var(--ercis-background);
}
.ercis-quick-icon img {
    width: 30px;
    height: 30px;
}
.ercis-quick-item span {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* === HAVA DURUMU KARTI === */
.ercis-weather-card {
    background: var(--ercis-surface);
    border-radius: var(--ercis-radius);
    box-shadow: var(--ercis-shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.ercis-weather-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
}
.ercis-weather-card img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
}

/* === SKELETON LOADING (İSKELET YÜKLEME) === */
.ercis-skeleton-loader {
    padding: 15px;
}
.skeleton-box {
    background: #e9e9e9;
    background: linear-gradient(to right, #e9e9e9 0%, #f6f6f6 20%, #e9e9e9 40%);
    background-size: 1000px 100%;
    animation: ercis-loading-anim 1.5s infinite linear;
    border-radius: 10px;
}
@keyframes ercis-loading-anim {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.skeleton-welcome {
    height: 150px;
    margin-bottom: 20px;
}
.skeleton-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.skeleton-hero-card {
    height: 140px;
}
.skeleton-services {
    height: 250px;
}

/* Yardımcı Sınıf */
.ercis-hidden {
    display: none;
}
/* === HEADER.PHP ÇAKIŞMA DÜZELTMELERİ === */
@media (max-width: 991px) {

    body { padding-top: 0 !important; }
    .ercis-desktop-only { display: none !important; }
    .ercis-mobile-full-width {
        width: 100%; max-width: 100%; flex: 0 0 100%;
        padding-left: 0 !important; padding-right: 0 !important;
    }
    .sptb { padding-top: 0 !important; padding-bottom: 10px !important; }
    .container { padding-left: 0 !important; padding-right: 0 !important; }
}
@media (min-width: 992px) {
    .ercis-mobile-only { display: none !important; }
}
/* === PANEL.PHP (Alt Navigasyon) === */
.ercis-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 60px; background: var(--ercis-surface);
    display: flex; justify-content: space-around; align-items: center;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 999; padding-bottom: var(--ercis-safe-area);
}
.ercis-nav-item {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-decoration: none !important; color: var(--ercis-text-secondary);
    font-size: 10px; font-weight: 500;
    flex-grow: 1; height: 100%; position: relative;
}
.ercis-nav-icon { font-size: 22px; margin-bottom: 2px; }
.ercis-nav-item.active .ercis-nav-icon,
.ercis-nav-item.active .ercis-nav-label { color: var(--ercis-primary); }
.ercis-nav-center { position: relative; }
.ercis-center-button {
    width: 60px; height: 60px; border-radius: 50%;
    background-color: var(--ercis-primary);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
    border: 4px solid var(--ercis-surface);
    position: absolute; top: -25px; left: 50%;
    transform: translateX(-50%);
}
.ercis-center-button i { color: var(--ercis-surface); font-size: 24px; }
.ercis-nav-center .ercis-nav-label {
    position: absolute; bottom: 5px; left: 50%;
    transform: translateX(-50%);
    width: 100%; text-align: center;
}
@media (min-width: 991px) { .panel_gizle { display: none !important; } }

/* === FİRMALAR.PHP STİLLERİ === */
.ercis-app-bar {
    position: sticky; top: 0; z-index: 998;
    background-color: var(--ercis-surface);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 10px 15px; display: flex;
    justify-content: space-between; align-items: center;
}
.ercis-app-bar-title { font-size: 22px; font-weight: 700; color: var(--ercis-text-primary); }
.ercis-filter-button {
    background: none; border: none;
    color: var(--ercis-primary);
    font-size: 24px; cursor: pointer;
}
.ercis-firma-card {
    display: flex; background: var(--ercis-surface);
    border-radius: var(--ercis-radius); box-shadow: var(--ercis-shadow);
    margin: 0 10px 15px 10px; overflow: hidden;
    text-decoration: none !important; color: var(--ercis-text-primary);
    opacity: 0; /* Animasyon için başlangıç durumu */
}
.ercis-firma-card:hover { color: var(--ercis-text-primary); }
.ercis-firma-img { width: 100px; height: 100px; flex-shrink: 0; }
.ercis-firma-img img { width: 100%; height: 100%; object-fit: cover; }
.ercis-firma-body {
    padding: 12px 15px; flex-grow: 1;
    display: flex; flex-direction: column;
    justify-content: space-between; min-width: 0;
}
.ercis-firma-title {
    font-size: 16px; font-weight: 700; margin: 0 0 5px 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ercis-firma-location {
    font-size: 13px; color: var(--ercis-text-secondary); margin-bottom: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ercis-firma-location i { margin-right: 4px; }
.ercis-firma-rating .stars { color: #f59e0b; font-size: 13px; }
.ercis-firma-card .ribbon { z-index: 1; }

/* === Animasyon === */
.firm-card-animate { animation: fadeInUp 0.5s ease-out forwards; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === İskelet Yükleme (Skeleton) === */
.skeleton-box {
    background: #e9e9e9;
    background: linear-gradient(to right, #e9e9e9 0%, #f6f6f6 20%, #e9e9e9 40%);
    background-size: 1000px 100%;
    animation: ercis-loading-anim 1.5s infinite linear;
    border-radius: 8px;
}
@keyframes ercis-loading-anim {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.ercis-skeleton-card {
    display: flex; background: var(--ercis-surface);
    border-radius: var(--ercis-radius); box-shadow: var(--ercis-shadow);
    margin: 0 10px 15px 10px; overflow: hidden; padding: 10px;
}
.ercis-skeleton-img { width: 90px; height: 90px; flex-shrink: 0; }
.ercis-skeleton-body { flex-grow: 1; padding-left: 15px; padding-top: 10px; }
.skeleton-line { height: 15px; margin-bottom: 10px; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }

/* === Mobil Filtre Modalı === */
.ercis-filter-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); z-index: 1050;
    display: none; justify-content: center; align-items: center;
}
.ercis-filter-content {
    background: var(--ercis-background);
    width: 90%; max-width: 500px;
    height: 80%; max-height: 600px;
    border-radius: var(--ercis-radius);
    display: flex; flex-direction: column; overflow: hidden;
}
.ercis-filter-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; border-bottom: 1px solid #ddd;
    background: var(--ercis-surface);
}
.ercis-filter-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
.ercis-filter-close { background: none; border: none; font-size: 24px; cursor: pointer; line-height: 1; }
.ercis-filter-body { padding: 15px; overflow-y: auto; }
.ercis-filter-body .form-control { border-radius: 10px; margin-bottom: 15px; }
.ercis-filter-body .btn-block {
    background-color: var(--ercis-primary);
    color: white; padding: 12px;
    border-radius: 10px; font-size: 16px; font-weight: 500;
}
.ercis-filter-body .sidebar-card {
    box-shadow: none; border: none;
    margin-bottom: 0; background: none;
}
.ercis-filter-body .sidebar-card .card-header {
    background: none; padding-left: 0; padding-top: 0;
    color: var(--ercis-text-primary);
}
.ercis-filter-body .list-group-item { background: none; border: none; padding: 0.5rem 0; }

/* === Sınırlı Sayfalama === */
.ercis-pagination {
    display: flex; justify-content: center; align-items: center;
    list-style: none; padding: 0;
    margin: 25px 10px 0 10px;
}
.ercis-pagination .page-item .page-link {
    display: block; padding: 8px 12px;
    margin: 0 3px; border-radius: 8px;
    background: var(--ercis-surface);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    color: var(--ercis-text-secondary);
    font-weight: 500; text-decoration: none;
    transition: all 0.2s ease;
    border: none; font-size: 13px;
}
.ercis-pagination .page-item .page-link:hover { background: #eee; color: var(--ercis-text-primary); }
.ercis-pagination .page-item.active .page-link {
    background: var(--ercis-primary);
    color: white;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}
.ercis-pagination .page-item.disabled .page-link {
    background: #f0f0f0; color: #aaa; box-shadow: none;
}

/* ===============================================
   === NÖBETÇİ ECZANE SAYFASI STİLLERİ ===
   =============================================== */
/* ===============================================
   === NÖBETÇİ ECZANE (ELİT TASARIM v2) ===
   =============================================== */

/* Yeni Elit Renk Paleti (Sağlık Temalı) */
:root {
    --ercis-health-primary: #00796B; /* Koyu Camgöbeği (Teal) */
    --ercis-health-light: #E0F2F1; /* Çok Açık Nane Yeşili */
    --ercis-health-badge: #DD2C00; /* Acil/Nöbetçi Vurgu Rengi */
}

/* İstediğiniz "Eczane Resmi" (Filigran):
   Bu, her kartın arka planına yarı saydam olarak eklenecek.
   Lütfen 'assets/images/eczane_filigran.svg' yolunu kendi resminizle değiştirin
   veya bu SVG kodunu kullanın. (Bir artı işareti)
*/
.ercis-eczane-card {
    background-color: var(--ercis-surface);
    border-radius: var(--ercis-radius);
    box-shadow: var(--ercis-shadow);
    margin: 0 10px 15px 10px;
    overflow: hidden;
    position: relative; /* Filigran için gerekli */
    opacity: 0; /* Animasyon için */
    border: 1px solid var(--ercis-health-light); /* İnce bir çerçeve */
    
    /* === ECZANE FİLIGRANI (RESİM) === */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23E0F2F1" fill-opacity="0.6" d="M65 50.002a2.5 2.5 0 0 1-2.5 2.5h-10v10a2.5 2.5 0 0 1-5 0v-10h-10a2.5 2.5 0 0 1 0-5h10v-10a2.5 2.5 0 0 1 5 0v10h10a2.5 2.5 0 0 1 2.5 2.5z"/></svg>');
    background-repeat: no-repeat;
    background-position: 95% 20px; /* Sağ üst köşe */
    background-size: 60px;
}

/* Kart Başlığı (Eczane Adı) */
.ercis-eczane-header {
    padding: 15px;
    border-bottom: 1px solid var(--ercis-health-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ercis-eczane-header h3 {
    font-size: 1.2rem; /* 19px */
    font-weight: 700;
    margin: 0;
    color: var(--ercis-health-primary);
}
/* "Nöbetçi" Rozeti */
.ercis-eczane-header .badge {
    background-color: var(--ercis-health-badge);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 6px;
}

/* Kart Gövdesi (Adres ve Telefon) */
.ercis-eczane-body {
    padding: 15px;
    font-size: 0.95rem; /* 15px */
    line-height: 1.6;
}
.ercis-eczane-body .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    color: var(--ercis-text-dark);
}
.ercis-eczane-body .info-item i {
    font-size: 16px;
    color: var(--ercis-health-primary); /* İkonlar ana renkte */
    margin-right: 12px;
    margin-top: 4px;
    width: 20px;
    text-align: center;
}
.ercis-eczane-body .info-item p { margin: 0; flex: 1; }

/* Eylem Butonları (Yeni Elit Renkler) */
.ercis-eczane-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 15px 15px 15px;
}
.ercis-eczane-btn {
    display: block;
    padding: 10px 15px;
    border-radius: var(--ercis-radius-sm, 8px);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid var(--ercis-health-primary); /* Çerçeve eklendi */
}
.ercis-eczane-btn i { margin-right: 5px; }
/* Birincil Buton (Ara) - Dolu */
.ercis-eczane-actions .btn-primary-fill {
    background-color: var(--ercis-health-primary);
    color: white;
}
/* İkincil Buton (Yol Tarifi) - Boş */
.ercis-eczane-actions .btn-secondary-outline {
    background-color: var(--ercis-surface);
    color: var(--ercis-health-primary);
}
.ercis-eczane-actions .btn-secondary-outline:hover {
    background-color: var(--ercis-health-light);
}

/* Eczane İskelet Yükleyici (Yeni tasarıma uygun) */
.ercis-eczane-skeleton {
    background: var(--ercis-surface);
    border-radius: var(--ercis-radius);
    box-shadow: var(--ercis-shadow);
    margin: 0 10px 15px 10px;
    overflow: hidden;
    padding: 15px;
}
.ercis-eczane-skeleton .skeleton-line {
    border-radius: 5px;
}
.ercis-eczane-skeleton .skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.ercis-eczane-skeleton .skeleton-header .skeleton-line {
    width: 60%;
    height: 20px;
}
.ercis-eczane-skeleton .skeleton-header .skeleton-badge {
    width: 50px;
    height: 25px;
}
.ercis-eczane-skeleton .skeleton-body {
    padding-top: 10px;
}


