/*
Theme Name: Su Kesintileri
Theme URI: https://sukesintileri.info
Description: Türkiye genelinde güncel su kesintisi bilgileri. 81 il ve tüm ilçeler için planlı ve plansız su kesintisi saatleri, etkilenen mahalleler ve sular ne zaman gelecek bilgisi.
Version: 2.0.0
Author: SuKesintileri.info
Author URI: https://sukesintileri.info
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: su-kesintileri
Tags: one-column, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #1a1a1a;
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #64748b;
  --color-border: #e5e7eb;
  --color-muted-bg: #f9fafb;
  --color-sky: #0ea5e9;
  --color-sky-light: #e0f2fe;
  --color-sky-dark: #0284c7;
  --color-red: #ef4444;
  --color-red-light: #fef2f2;
  --color-green: #22c55e;
  --color-green-light: #f0fdf4;
  --color-blue: #3b82f6;
  --radius: 0.625rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --container: 1200px;
  --header-height: 64px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  border: none;
  background: none;
}

.site-logo svg {
  color: var(--color-sky);
  width: 22px;
  height: 22px;
}

.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--color-muted-bg);
  transition: all 0.2s;
}

.header-search input:focus {
  outline: none;
  border-color: var(--color-sky);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
  background: white;
}

.header-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-secondary);
}

.header-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

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

.header-search-item {
  padding: 0.625rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  transition: background 0.15s;
}

.header-search-item:hover {
  background: var(--color-muted-bg);
}

.header-search-item .plate {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
}

@media (max-width: 639px) {
  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    gap: 0.5rem;
  }
  .header-search {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  padding: 1rem 0;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-sky-dark);
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--color-sky);
}

.breadcrumb .separator {
  color: var(--color-text-secondary);
}

.breadcrumb .current {
  color: var(--color-text);
  font-weight: 500;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: clamp(1.875rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-search {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 0.875rem 1.25rem 0.875rem 3rem;
  border: 2px solid var(--color-border);
  border-radius: 9999px;
  font-size: 1rem;
  transition: all 0.2s;
}

.hero-search input:focus {
  outline: none;
  border-color: var(--color-sky);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.15);
}

.hero-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
}

.hero-search-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

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

/* Sections */
.section {
  padding: 2rem 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.section-title svg {
  display: inline-block;
  width: 22px;
  height: 22px;
  vertical-align: text-bottom;
  margin-right: 0.5rem;
  color: var(--color-sky);
}

@media (min-width: 768px) {
  .section-title {
    font-size: 1.75rem;
  }
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
}

.card-clickable {
  cursor: pointer;
}

/* Featured Outages Grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.featured-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: white;
  border: 1px solid var(--color-sky);
  border-left: 4px solid var(--color-sky);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.featured-card:hover {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  border-color: var(--color-sky-dark);
  border-left-color: var(--color-sky-dark);
}

.featured-card .city-name {
  font-weight: 600;
  font-size: 1rem;
}

.featured-card .outage-info {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}

.featured-card .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-sky {
  background: var(--color-sky-light);
  color: var(--color-sky-dark);
}

.badge-red {
  background: var(--color-red-light);
  color: var(--color-red);
}

.badge-green {
  background: var(--color-green-light);
  color: var(--color-green);
}

/* City Grid */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .city-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (min-width: 1024px) {
  .city-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  gap: 0.375rem;
}

.city-card.has-outage {
  border-color: var(--color-sky);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.city-card.has-outage:hover {
  border-color: var(--color-sky-dark);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.city-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.city-card .city-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.city-card .plate-badge {
  font-size: 0.6875rem;
  color: var(--color-text-secondary);
  background: var(--color-muted-bg);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

/* District Grid */
.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.district-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.district-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
}

.district-card .name {
  font-weight: 500;
  font-size: 0.9375rem;
}

.district-card .count {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* Outage List */
.outage-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}

.outage-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.outage-card .district-name {
  font-weight: 600;
  font-size: 1rem;
}

.outage-card .time-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.outage-card .time-range svg {
  width: 16px;
  height: 16px;
  color: var(--color-sky);
  flex-shrink: 0;
}

.outage-card .duration {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.outage-card .reason {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-top: 0.375rem;
}

.outage-card .region {
  font-size: 0.8125rem;
  color: var(--color-text);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

/* Empty State */
.empty-state {
  background: var(--color-green-light);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--color-green);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #166534;
}

.empty-state p {
  font-size: 0.9375rem;
  color: #15803d;
}

/* Date Navigation */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.date-nav button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-text);
}

.date-nav button:hover {
  background: var(--color-muted-bg);
  border-color: #d1d5db;
}

.date-nav .current-date {
  font-size: 0.9375rem;
  font-weight: 500;
  min-width: 200px;
  text-align: center;
}

/* FAQ / Accordion */
.faq-section {
  padding: 2rem 0;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
  color: var(--color-text);
  font-family: inherit;
  line-height: 1.5;
}

.faq-question:hover {
  background: var(--color-muted-bg);
}

.faq-question svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-secondary);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  display: block;
}

/* SEO Content */
.seo-content {
  padding: 2rem 0;
}

.seo-content p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.seo-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1rem;
  margin-top: 2rem;
  color: var(--color-primary);
}

.seo-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

/* Related Cities */
.related-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.related-city-link {
  display: inline-flex;
  padding: 0.375rem 0.875rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s;
  color: var(--color-text);
}

.related-city-link:hover {
  background: var(--color-sky-light);
  border-color: var(--color-sky);
  color: var(--color-sky-dark);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--color-muted-bg);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-brand .logo svg {
  color: var(--color-sky);
  width: 20px;
  height: 20px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.footer-col h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.375rem;
}

.footer-col a, .footer-col button {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s;
}

.footer-col a:hover, .footer-col button:hover {
  color: var(--color-primary);
}

.footer-col .info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.footer-col .info-item svg {
  color: var(--color-sky);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* Utility */
.text-center {
  text-align: center;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}
.mt-2 {
  margin-top: 1rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Print */
@media print {
  .site-header, .site-footer, .date-nav, .hero-search, .header-search {
    display: none !important;
  }
}
