@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --primary-color: #007bff;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --pharmacy-red: #D92E2E;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 2.5rem;
}

header p {
    font-size: 1.1rem;
    color: #6c757d;
}

.red-text {
    color: var(--pharmacy-red);
}

/* YENİ TARİH METNİ İÇİN STİL */
.date-display {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem; /* Sonuçlarla arasında boşluk bırakır */
    padding: 0.75rem;
    background-color: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.1);
    border-radius: 5px;
    text-align: center;
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto; /* 3'lü yapıya geri döndük */
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

select, button { /* input[type="date"] kaldırıldı */
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--card-bg);
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
}

button {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

button:hover:not(:disabled) {
    background-color: #0056b3;
}

button:disabled, select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

#sonuclar-container {
    display: grid;
    gap: 1.5rem;
}

#sonuclar-container h2 {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    font-size: 1.5rem;
}

.bilgi-mesaji, .hata-mesaji, .loading {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 5px;
    font-style: italic;
    color: #6c757d;
}

.hata-mesaji {
    color: #dc3545;
    font-weight: 500;
}

.eczane-karti {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease-in-out;
}

.eczane-karti:hover {
    transform: translateY(-5px);
}

.eczane-karti h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.eczane-karti p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eczane-karti p strong {
    min-width: 60px;
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Mobil Uyum (Responsive) */
@media (max-width: 650px) { /* Media query basitleştirildi */
    .controls {
        grid-template-columns: 1fr;
    }
}

/* Footer Link Stilleri */
footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}


/* Kullanım Koşulları Sayfası İçin Ek Stiller */
.legal-text {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: left;
}

.legal-text h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}

.legal-text p, .legal-text ul {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.legal-text .disclaimer {
    color: #856404;
    font-weight: 500;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 1rem;
    border-radius: 5px;
}

.faq-section {
    margin-top: 4rem;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}
.faq-item {
    margin-bottom: 1.5rem;
}
.faq-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Yeni Liste Sayfaları İçin Stiller */
.iller-listesi {
    list-style: none;
    padding: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.iller-listesi li a {
    display: block;
    padding: 1rem;
    background-color: #fff;
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.2s ease-in-out;
}
.iller-listesi li a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* İl Sayfası (İki Sütunlu Yapı) */
.page-container {
    display: flex;
    flex-wrap: wrap; /* Mobil için */
    gap: 2rem;
    max-width: 1200px;
    margin: 1rem auto;
    padding: 1rem;
}
.main-content {
    flex: 3;
    min-width: 300px; /* Mobil için */
}
.main-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}
.sidebar {
    flex: 1;
    min-width: 250px; /* Mobil için */
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    box-shadow: var(--shadow);
}
.sidebar h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.ilce-listesi {
    list-style: none;
    padding: 0;
}
.ilce-listesi li a {
    display: block;
    padding: 0.6rem;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.ilce-listesi li a:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

/* Yeni Eczane Listesi Stili */
.eczane-listesi-yeni { margin-top: 2rem; }
.liste-baslik {
    display: flex;
    font-weight: bold;
    padding: 0.75rem;
    background-color: #343a40;
    color: white;
    border-radius: 5px 5px 0 0;
}
.eczane-karti-yeni {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #fff;
}
.eczane-karti-yeni:last-child {
    border-bottom: none;
    border-radius: 0 0 5px 5px;
}
.col-eczane { flex: 2; }
.col-adres { flex: 3; }
.col-telefon { flex: 1.5; text-align: right; }
.ilce-etiket {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Yeni Liste Sayfaları İçin Stiller */
.iller-listesi {
    list-style: none;
    padding: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.iller-listesi li a {
    display: block;
    padding: 1rem;
    background-color: #fff;
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.2s ease-in-out;
}
.iller-listesi li a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* İl Sayfası (İki Sütunlu Yapı) */
.page-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 1rem auto;
    padding: 1rem;
}
.main-content {
    flex: 3;
    min-width: 300px;
}
.sidebar {
    flex: 1;
    min-width: 250px;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    box-shadow: var(--shadow);
}
.sidebar {
    flex: 1;
    min-width: 250px;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    box-shadow: var(--shadow);
    position: sticky; /* YAPIŞKAN ÖZELLİĞİ */
    top: 2rem;        /* EKRANIN ÜSTÜNDEN 2rem BOŞLUK BIRAKIR */
}
.ilce-listesi {
    list-style: none;
    padding: 0;
}
.ilce-listesi li a {
    display: block;
    padding: 0.6rem;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.ilce-listesi li a:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

/* Yeni Eczane Listesi Stili */
.eczane-listesi-yeni { margin-top: 2rem; }
.liste-baslik {
    display: flex;
    font-weight: bold;
    padding: 0.75rem;
    background-color: #343a40;
    color: white;
    border-radius: 5px 5px 0 0;
    align-items: center;
}
.eczane-karti-yeni {
    display: flex;
    align-items: center;
    padding: 1rem 0.75rem; /* Dikey boşluğu artırdık */
    border-bottom: 1px solid var(--border-color);
    background-color: #fff;
}
.eczane-karti-yeni:last-child {
    border-bottom: none;
    border-radius: 0 0 5px 5px;
}
.col-eczane { flex: 2; }
.col-adres { flex: 4; }
.col-telefon { flex: 1.5; text-align: right; }
.col-konum { flex: 1.5; text-align: center; }
.ilce-etiket {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Sıkça Sorulan Sorular Bölümü Stilleri */
.faq-section {
    margin-top: 4rem;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: left;
}
.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}
.faq-item {
    margin-bottom: 1.5rem;
}
.faq-item:last-child {
    margin-bottom: 0;
}
.faq-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.map-link {
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}
.map-link:hover {
    background-color: #0056b3;
}

/* Ana Sayfadaki İl Listesi Bölümü */
.iller-section {
    margin-top: 4rem;
    text-align: center;
}

.iller-section h2 {
    margin-bottom: 0.5rem;
}

.iller-section p {
    margin-bottom: 2rem;
    color: #6c757d;
}

.iller-listesi {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    text-align: left;
}
.iller-listesi li a {
    display: block;
    padding: 1rem;
    background-color: #fff;
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.2s ease-in-out;
}
.iller-listesi li a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}