/* Bucak Kaymakamlığı Web*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #1279b4;
  --primary-dark: #0e5f91;
  --primary-light:#e8f4fb;
  --accent:       #00cfe8;
  --danger:       #ea5455;
  --navy:       #1279b4;
  --navy-mid:   #0e5f91;
  --red:        #ea5455;
  --red-dark:   #d03e3f;
  --text:       #4b4b4b;
  --text-muted: #6e6b7b;
  --bg:         #f8f8f8;
  --card:       #ffffff;
  --border:     #ebe9f1;
  --radius:     6px;
  --max-w:      1200px;
  --shadow-xs:  0 2px 4px rgba(18,121,180,.08);
  --shadow-sm:  0 4px 12px rgba(18,121,180,.1);
  --gray-400:   #b9b9c3;
}

body {
  font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* Container */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/*  Topbar */
#topbar {
  background: var(--primary);
  color: #fff;
  border-top: 3px solid var(--accent);
  box-shadow: 0 2px 12px rgba(18,121,180,.2);
}
#topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  padding-bottom: .75rem;
  gap: 1rem;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.topbar-logo { width: 44px; height: 44px; flex-shrink: 0; }
.topbar-title { font-size: 1rem; font-weight: 700; }
.topbar-subtitle { font-size: .72rem; color: #8caad8; margin-top: .1rem; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .8rem;
  color: #8caad8;
}
.topbar-right a {
  color: #b0c4de;
  border: 1px solid rgba(255,255,255,.2);
  padding: .3rem .75rem;
  border-radius: 4px;
  font-size: .78rem;
  transition: background .15s;
}
.topbar-right a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Navbar */
#navbar {
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  z-index: 200;
}
#navbar .container {
  display: flex;
  align-items: center;
  position: relative;
}
.nav-inner {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-inner > li { position: relative; }
.nav-inner > li > a {
  display: block;
  padding: .85rem 1.1rem;
  font-size: .85rem;
  font-weight: 500;
  color: #b0c4de;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-inner > li > a:hover,
.nav-inner > li > a.active { color: #fff; background: rgba(255,255,255,.07); }
.nav-inner > li > a.active { border-bottom: 2px solid var(--red); }
.arrow { font-size: .65rem; opacity: .7; }

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  min-width: 200px;
  padding: .4rem 0;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.nav-inner > li:hover .dropdown { display: block; }
.dropdown li { list-style: none; }
.dropdown li a {
  display: block;
  padding: .55rem 1rem;
  font-size: .85rem;
  color: #b0c4de;
  transition: background .12s, color .12s;
}
.dropdown li a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Nav toggle (mobil için bu kısma sonradan tekrar bakılacak) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: .75rem 1rem;
}

/*  Page Hero  */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  padding: 2.5rem 0;
  border-bottom: 3px solid var(--red);
}
.page-hero h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: .5rem; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: #8caad8;
  margin-top: .5rem;
}
.breadcrumb a { color: #a8c4e8; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { opacity: .6; }

/*  Main Content  */
#main-content { padding: 2.5rem 0; min-height: 60vh; }

/*  Section Header  */
.section-header { margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: .5rem; }
.section-title {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.section-title::before { content: ''; display: inline-block; width: 3px; height: 14px; background: var(--red); border-radius: 2px; margin-right: .5rem; vertical-align: middle; }

/*  Units Grid  */
.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.unit-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .15s, transform .1s;
}
.unit-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.unit-card-icon { font-size: 1.75rem; margin-bottom: .6rem; }
.unit-card-name { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: .25rem; }
.unit-card-phone { font-size: .88rem; color: var(--red); font-weight: 600; }

/*  News Grid  */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: block;
  transition: box-shadow .15s, transform .1s;
}
.news-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.news-card-img { width: 100%; height: 190px; object-fit: cover; display: block; }
.news-card-img-placeholder { width: 100%; height: 190px; background: #eef1f5; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.news-card-body { padding: 1rem; }
.news-card-meta { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; flex-wrap: wrap; }
.news-card-title { font-size: .97rem; font-weight: 700; color: var(--navy); line-height: 1.4; margin-bottom: .4rem; }
.news-card-summary { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ── Badge ────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .18rem .5rem;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 700;
  background: #f0f4f8;
  color: var(--text-muted);
}
.badge.red,  .badge-red  { background: #fef2f2; color: var(--red); }
.badge.blue, .badge-blue { background: #eff6ff; color: #1d4ed8; }
.badge.green             { background: #f0fdf4; color: #166534; }
.badge.amber             { background: #fffbeb; color: #92400e; }

/* ── Announcements ───────────────────────────────────────────── */
.announcement-list { display: flex; flex-direction: column; gap: .5rem; }
.announcement-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--navy);
  border-radius: 4px;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
  transition: border-left-color .15s;
}
.announcement-item:hover { border-left-color: var(--red); }
.announcement-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); flex-shrink: 0; }
.announcement-item .dot.important { background: var(--red); }
.announcement-item a { color: var(--text); font-weight: 500; }
.announcement-item a:hover { color: var(--red); }

/* ── Kaymakam Profile ────────────────────────────────────────── */
.kaymakam-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.kaymakam-photo {
  width: 180px;
  height: 220px;
  border-radius: 6px;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  background: #e8edf4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.kaymakam-info h2 { font-size: 1.4rem; font-weight: 800; color: var(--navy); margin-bottom: .3rem; }
.kaymakam-info .title { font-size: .9rem; color: var(--red); font-weight: 600; margin-bottom: 1rem; }
.kaymakam-info p { font-size: .92rem; line-height: 1.8; color: var(--text-muted); margin-bottom: .75rem; }

/* ── Contact ─────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
}
.contact-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 1rem; }
.contact-row { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .65rem; font-size: .9rem; }
.contact-row span:first-child { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-muted); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .05em; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; border: 1px solid var(--border); border-radius: 5px; padding: .65rem .9rem;
  font-size: .93rem; font-family: inherit; outline: none; transition: border-color .2s;
  background: #f8fafc; color: var(--text);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--navy); background: #fff; }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-primary {
  background: var(--navy); color: #fff; border: none; border-radius: 5px;
  padding: .7rem 1.5rem; font-size: .93rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.btn-primary:hover { background: var(--navy-mid); }
.alert { padding: .65rem .9rem; border-radius: 5px; font-size: .85rem; margin-bottom: 1rem; }
.alert-error   { background: #fef2f2; border-left: 3px solid var(--red); color: #9b1c1c; }
.alert-success { background: #f0fdf4; border-left: 3px solid #16a34a; color: #166534; }
.hidden { display: none !important; }

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto .75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton ────────────────────────────────────────────────── */
@keyframes shimmer { from { background-position: -600px 0; } to { background-position: 600px 0; } }
.skeleton { border-radius: 4px; background: linear-gradient(90deg, #e8edf4 25%, #f5f7fa 50%, #e8edf4 75%); background-size: 600px; animation: shimmer 1.4s infinite linear; }
.skeleton-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.skeleton-img { height: 190px; }
.skeleton-body { padding: 1rem; }
.skeleton-line { height: 14px; margin-bottom: .6rem; }
.skeleton-line.short { width: 40%; }
.skeleton-line.med   { width: 70%; }
.skeleton-line.long  { width: 100%; }

/* ── Footer ──────────────────────────────────────────────────── */
#footer {
  background: var(--navy);
  color: #6a8aaa;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
  border-top: 3px solid var(--red);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.footer-logo svg { width: 48px; height: 48px; flex-shrink: 0; }
.footer-logo-text { font-size: .95rem; font-weight: 700; color: #fff; }
.footer-desc { font-size: .83rem; line-height: 1.75; }
.footer-col-title { font-size: .72rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .75rem; }
.footer-links { display: flex; flex-direction: column; gap: .45rem; }
.footer-links a { font-size: .83rem; color: #6a8aaa; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-logos-km {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 1.5rem;
}
.footer-logos-km img { height: 44px; width: auto; filter: brightness(0) invert(1); opacity: .85; transition: opacity .2s; }
.footer-logos-km img:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.25rem; font-size: .8rem; text-align: center; }

/* ── Scroll to top ───────────────────────────────────────────── */
#scroll-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: var(--navy); color: #fff; border: none;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
#scroll-top.visible { opacity: 1; visibility: visible; }

/* ── Page content ────────────────────────────────────────────── */
.page-content { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-xs); }
.page-content h2 { font-size: 1.25rem; font-weight: 700; color: var(--navy); margin: 1.5rem 0 .5rem; }
.page-content h2:first-child { margin-top: 0; }
.page-content p { margin-bottom: 1rem; line-height: 1.8; }
.page-content ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.page-content li { margin-bottom: .35rem; }

/* ── Contact page extra ──────────────────────────────────────── */
.page-content-area { }
.contact-info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1rem;
}
.contact-info-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #fff; background: var(--navy); padding: .55rem .9rem; margin: -1.25rem -1.25rem 1rem; border-radius: var(--radius) var(--radius) 0 0; }
.contact-info-item { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.contact-info-item:last-child { border-bottom: none; }
.contact-info-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.contact-info-label { font-size: .75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .15rem; }
.contact-info-value { font-size: .9rem; color: var(--text); }
.contact-form .form-group { position: relative; }
.error-msg { display: none; font-size: .75rem; color: var(--red); margin-top: .25rem; }
.form-group.invalid input,
.form-group.invalid textarea { border-color: var(--red); }
.form-group.invalid .error-msg { display: block; }
.alert.success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; border-radius: 5px; padding: .75rem 1rem; font-size: .9rem; }
.alert.error   { background: #fef2f2; border: 1px solid #fca5a5; color: #9b1c1c; border-radius: 5px; padding: .75rem 1rem; font-size: .9rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-inner { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); z-index: 100; padding: .5rem 0; border-top: 1px solid rgba(255,255,255,.1); }
  .nav-inner.open { display: flex; }
  .nav-inner > li > a { padding: .75rem 1.5rem; }
  .dropdown { position: static; border: none; box-shadow: none; background: rgba(0,0,0,.2); border-radius: 0; }
  .nav-inner > li.open .dropdown { display: block; }
  .page-hero h1 { font-size: 1.4rem; }
  .units-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .kaymakam-card { flex-direction: column; }
  .topbar-right span { display: none; }
}
