/* ============================================================
   Dr. Ali Hatay – Ana Stil Dosyası
   Mobile-First Responsive Design
   ============================================================ */

/* === Değişkenler === */
:root {
  --primary:       #1565c0;
  --primary-dark:  #0d47a1;
  --primary-light: #1e88e5;
  --secondary:     #00acc1;
  --accent:        #f57c00;
  --success:       #2e7d32;
  --danger:        #c62828;
  --bg:            #f4f6f9;
  --card-bg:       #ffffff;
  --text:          #212121;
  --text-muted:    #757575;
  --border:        #e0e0e0;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.10);
  --shadow-md:     0 4px 14px rgba(0,0,0,.14);
  --shadow-lg:     0 8px 28px rgba(0,0,0,.18);
  --radius:        10px;
  --radius-sm:     6px;
  --nav-h:         64px;
  --ease:          .2s ease;
}

/* === Sıfırlama === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

a { color: var(--primary); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 1rem;
  max-width: 1280px;
  margin: 0 auto;
  gap: 1rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo:hover { color: rgba(255,255,255,.9); }
.site-logo img {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.3);
}
.site-logo-text { line-height: 1.25; }
.site-logo-text small { display: block; font-size: .68rem; font-weight: 400; opacity: .75; }

/* ============================================================
   HAMBURGEr BUTONU (mobil)
   ============================================================ */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ============================================================
   NAVİGASYON – MOBİL
   ============================================================ */
.main-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-dark);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 999;
  padding: .5rem 0 2rem;
  -webkit-overflow-scrolling: touch;
}
.main-nav.open { display: block; }

.nav-list { list-style: none; }
.nav-list > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  color: #fff;
  font-size: .95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background var(--ease);
}
.nav-list > li > a:hover,
.nav-list > li > a:focus { background: rgba(255,255,255,.12); color: #fff; outline: none; }

.has-dropdown > a::after { content: '▾'; font-size: .75rem; margin-left: .4rem; opacity: .7; }

/* Dropdown mobil */
.dropdown { display: none; background: rgba(0,0,0,.25); list-style: none; }
.dropdown.open { display: block; }
.dropdown li a {
  display: block;
  padding: .7rem 1.25rem .7rem 2.25rem;
  color: rgba(255,255,255,.82);
  font-size: .88rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background var(--ease);
}
.dropdown li a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ============================================================
   NAVİGASYON – MASAÜSTÜ (768px+)
   ============================================================ */
@media (min-width: 768px) {
  .hamburger { display: none; }

  .main-nav {
    display: flex !important;
    position: static;
    background: none;
    overflow: visible;
    padding: 0;
    flex: 1;
    justify-content: flex-end;
    bottom: auto; top: auto; left: auto; right: auto;
  }

  .nav-list {
    display: flex;
    align-items: stretch;
  }

  .nav-list > li { position: relative; display: flex; }

  .nav-list > li > a {
    align-items: center;
    padding: 0 .8rem;
    height: var(--nav-h);
    font-size: .85rem;
    border-bottom: 3px solid transparent;
    border-left: none;
    white-space: nowrap;
  }
  .nav-list > li > a:hover {
    background: rgba(255,255,255,.1);
    border-bottom-color: rgba(255,255,255,.8);
  }

  .has-dropdown > a::after { content: ' ▾'; }

  /* Dropdown masaüstü */
  .dropdown {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--primary);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 1200;
    padding: .25rem 0;
  }
  .nav-list > li:hover > .dropdown,
  .nav-list > li:focus-within > .dropdown { display: block !important; }

  .dropdown li a {
    padding: .65rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: .85rem;
    white-space: nowrap;
  }
}

/* ============================================================
   HERO BANDI
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 2.5rem 1rem;
  text-align: center;
}
.hero h1 { font-size: 1.65rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.25; }
.hero p  { font-size: .95rem; opacity: .9; max-width: 520px; margin: 0 auto; }

@media (min-width: 768px) {
  .hero { padding: 4.5rem 2rem; }
  .hero h1 { font-size: 2.4rem; }
  .hero p  { font-size: 1.05rem; }
}

/* ============================================================
   LAYOUT YARDIMCILARI
   ============================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-content { min-height: calc(100vh - var(--nav-h) - 120px); }

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 3px solid var(--primary);
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ============================================================
   KART IZGARASI – ANA SAYFA
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  padding-bottom: 2rem;
}

@media (min-width: 480px)  { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px)  { .cards-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(5, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem .75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  color: var(--text);
  min-height: 110px;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  color: var(--text);
}

.card-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: .4rem;
}

.card-title {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.card-badge {
  display: inline-block;
  font-size: .65rem;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: .1rem .4rem;
  margin-top: .3rem;
}

@media (min-width: 768px) {
  .card { padding: 1.5rem 1rem; min-height: 130px; }
  .card-icon { font-size: 2.4rem; }
  .card-title { font-size: .9rem; }
}

/* ============================================================
   İÇERİK SAYFASI
   ============================================================ */
.page-wrapper {
  padding: 1.5rem 0 3rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb-sep { opacity: .45; }

.page-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.page-box h1 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--primary);
  line-height: 1.3;
}
.page-box h2 { font-size: 1.2rem; color: var(--primary-light); margin: 1.5rem 0 .5rem; }
.page-box h3 { font-size: 1rem; margin: 1rem 0 .35rem; }
.page-box p  { margin-bottom: .9rem; }
.page-box ul, .page-box ol { padding-left: 1.5rem; margin-bottom: .9rem; }
.page-box li { margin-bottom: .3rem; }
.page-box img { max-width: 100%; border-radius: var(--radius-sm); margin: .75rem 0; }
.page-box table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.page-box th, .page-box td {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  text-align: left;
  font-size: .9rem;
}
.page-box th { background: var(--primary); color: #fff; }
.page-box tr:nth-child(even) td { background: #f9f9f9; }

@media (min-width: 768px) {
  .page-box { padding: 2rem 2.5rem; }
  .page-box h1 { font-size: 2rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: 2rem 1rem 1.5rem;
  text-align: center;
  font-size: .85rem;
  margin-top: 2rem;
}
.site-footer a { color: rgba(255,255,255,.7); transition: color var(--ease); }
.site-footer a:hover { color: #fff; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.25rem;
  margin-bottom: 1rem;
}

/* ============================================================
   YUKARI ÇIK BUTONU
   ============================================================ */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 900;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover   { transform: scale(1.12); background: var(--primary-dark); }

/* ============================================================
   ORTAK YARDIMCILAR
   ============================================================ */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); font-size: .88rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--ease), transform var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary   { background: var(--primary);   color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #00838f; color: #fff; }
.btn-danger    { background: var(--danger);    color: #fff; }
.btn-danger:hover { background: #b71c1c; color: #fff; }
.btn-outline   { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .9rem;
  border-left: 4px solid;
}
.alert-success { background: #e8f5e9; color: #1b5e20; border-color: var(--success); }
.alert-danger  { background: #ffebee; color: #b71c1c; border-color: var(--danger); }
.alert-info    { background: #e3f2fd; color: #0d47a1; border-color: var(--primary); }

/* ============================================================
   MOBİL < 480px ince ayar
   ============================================================ */
@media (max-width: 479px) {
  .hero h1 { font-size: 1.4rem; }
  .cards-grid { gap: .6rem; }
  .card { min-height: 95px; padding: 1rem .5rem; }
  .card-icon { font-size: 1.75rem; }
  .card-title { font-size: .78rem; }
}
