 :root {
  color-scheme: light;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #e11d48;
  --primary-600: #be123c;
  --accent: #0ea5e9;
  --border: #e2e8f0;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --container: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #f8fafc 0%, #f1f5f9 45%, #eef2f7 100%);
  color: var(--text);
  line-height: 1.6;
}

/* Kim Kimdir Detay Sayfası - Haber detay sayfası gibi modern */
.article__content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-top: 24px;
}

.article__content h2,
.article__content h3,
.article__content h4 {
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--text);
  font-weight: 700;
}

.article__content p {
  margin-bottom: 15px;
}

.article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article__content ul,
.article__content ol {
  margin: 15px 0;
  padding-left: 30px;
}

.article__content li {
  margin-bottom: 8px;
}

.article__content a {
  color: var(--primary);
  text-decoration: underline;
}

.article__content a:hover {
  color: var(--primary-600);
}

.article__content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--muted);
}

.article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.article__content table th,
.article__content table td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.article__content table th {
  background: #f8f9fa;
  font-weight: 600;
}

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

.container {
  width: min(100% - 24px, var(--container));
  margin: 0 auto;
}

.topbar {
  background: #0b1120;
  color: #e2e8f0;
  font-size: 13px;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 12px;
  flex-wrap: wrap;
}

header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.header__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 22px;
}

.logo span {
  color: var(--primary);
}

.nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.nav .container {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  overflow-x: auto;
}

.nav a {
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}

main {
  padding: 28px 0 60px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.article {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--border);
}

.article__meta {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 12px 0 20px 0;
}

.article__meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article__meta i {
  color: var(--primary);
  font-size: 14px;
}

.article__image {
  margin: 24px 0;
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  position: relative;
  width: 100%;
  max-width: 100%;
  background-color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  max-height: 600px;
  padding: 20px;
}

.article__image--gallery {
  aspect-ratio: auto !important;
  min-height: auto !important;
  background-size: contain !important;
  background-color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.article__image--gallery img {
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.article__image img {
  max-width: 100%;
  max-height: 560px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  margin: 0 auto;
}

.gallery-detail-image {
  margin: 32px 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: #ffffff;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.gallery-detail-image img {
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 70vh;
  display: block;
  border-radius: 12px;
  object-fit: contain;
  background: #f9fafb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article__image--video {
  aspect-ratio: 16/9 !important;
  background: #000 !important;
  min-height: 500px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.article__image--video iframe,
.article__image--video video {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  border-radius: 16px;
}

.article__image--video video {
  object-fit: contain;
  background: #000;
}

.share {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 22px;
}

.share a {
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
}

.share a.primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.section {
  margin-top: 28px;
  width: 100%;
  max-width: 100%;
  grid-column: 1 / -1;
}

.section .comment-box {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section__title h2 {
  margin: 0;
  font-size: 20px;
}

.comment-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  grid-column: 1 / -1;
}

.comment-box .notice {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.comment-box input[type="text"] {
  margin-bottom: 0;
  width: 100%;
}

.comment-box input[type="email"] {
  grid-column: 1 / -1;
  margin-bottom: 0;
  width: 100%;
}

.comment-box textarea {
  grid-column: 1 / -1;
  margin-bottom: 0;
  width: 100%;
}

.comment-box button {
  grid-column: 1 / -1;
  width: 100%;
}

.comment-box input,
.comment-box textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.comment-box input:focus,
.comment-box textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.comment-box textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.btn {
  border: none;
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  max-width: 100%;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--primary-600);
}

/* Header butonları mobil/tablette index gibi yan yana (detay sayfalarında full-width olmasın) */
.header__actions .btn {
  width: auto;
  max-width: none;
  display: inline-flex;
  align-items: center;
}

.notice {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  padding: 8px 12px;
  background: rgba(225, 29, 72, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.comment-list {
  display: grid;
  gap: 14px;
  width: 100%;
}

.comment {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.2s;
}

.comment:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.comment__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.comment p {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(225, 29, 72, 0.12);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
  width: 100%;
}

.detail-main {
  min-width: 0;
  width: 100%;
}

.detail-sidebar {
  display: grid;
  gap: 16px;
}

.aside-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  border: 1px solid var(--border);
}

.related-sidebar-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.related-sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-sidebar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-sidebar-card__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.related-sidebar-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #f0f0f0;
  margin-bottom: 4px;
}

.related-sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-sidebar-video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.related-sidebar-card .badge {
  align-self: flex-start;
  font-size: 11px;
  padding: 4px 8px;
}

.related-sidebar-card .headline {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-square {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(135deg, #fde2e2, #fecaca);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #7f1d1d;
}

.mini-gallery {
  display: grid;
  gap: 12px;
}

.mini-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
}

.mini-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.mini-item > div:last-child {
  flex: 1;
  min-width: 0;
}

.mini-item .headline {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-item .meta {
  font-size: 12px;
  color: #6b7280;
}

.mini-thumb {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.related-grid-simple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-card-simple {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 100px;
  display: flex;
  align-items: flex-start;
}

.related-card-simple:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-card-simple__link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.related-card-simple .badge {
  align-self: flex-start;
  font-size: 11px;
  padding: 4px 8px;
}

.related-card-simple .headline {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
}

.related-thumb {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

.related-body {
  padding: 10px;
}

footer {
  background: #0f172a;
  color: #cbd5f5;
  padding: 40px 0;
  margin-top: 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.footer__grid h4 {
  margin-top: 0;
  color: white;
}

.footer__grid a {
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 900px) {
  /* Mobilde üst logo/topbar index.php gibi aşağı kayabilsin (sabit kalmasın) */
  .topbar {
    position: relative;
    top: auto;
  }

  header {
    position: relative;
    top: auto;
  }

  /* Menü butonu her zaman tıklanabilir olsun (detay sayfalarında açılsın) */
  .nav__toggle {
    position: relative;
    z-index: 26;
    pointer-events: auto;
  }

  /* Detay sayfalarında header butonları index.php gibi yan yana, kesilmeden */
  .header__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0 8px;
  }

  .header__actions .btn {
    width: auto;
    max-width: none;
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 13px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article__image {
    max-height: 500px;
    min-height: 300px;
    padding: 16px;
  }

  .article__image img {
    max-width: 100%;
    max-height: 468px;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .related-grid-simple {
    grid-template-columns: 1fr 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .article {
    padding: 20px;
  }

  .comment-box {
    padding: 16px;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 100%;
  }
  
  .comment-box input[type="text"],
  .comment-box input[type="email"],
  .comment-box textarea,
  .comment-box button {
    width: 100%;
  }
  
  .related-grid-simple {
    grid-template-columns: 1fr 1fr;
  }
  
  .related-sidebar-grid {
    gap: 10px;
  }
  
  .related-sidebar-thumb {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .related-grid-simple {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .article {
    padding: 16px;
    border-radius: 12px;
  }

  .comment-box {
    padding: 14px;
    gap: 10px;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }
  
  .comment-box input,
  .comment-box textarea {
    padding: 10px 12px;
    font-size: 14px;
    width: 100%;
  }
  
  .comment-box button {
    width: 100%;
  }
  
  .related-grid-simple {
    grid-template-columns: 1fr;
  }
  
  .related-sidebar-grid {
    gap: 8px;
  }
  
  .related-sidebar-thumb {
    aspect-ratio: 16 / 9;
  }
  
  .related-sidebar-video-overlay {
    width: 32px;
    height: 32px;
  }
  
  .related-sidebar-video-overlay svg {
    width: 16px;
    height: 16px;
  }

  .comment {
    padding: 14px;
  }

  .comment__head {
    font-size: 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .share {
    gap: 8px;
  }

  .share a {
    padding: 6px 10px;
    font-size: 12px;
  }

  .section__title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section__title h2 {
    font-size: 18px;
  }

  .container {
    padding: 0 12px;
  }

  .article__image {
    margin: 14px -16px;
    border-radius: 0;
    max-height: 400px;
    min-height: 250px;
    padding: 12px;
  }

  .article__image img {
    max-width: 100%;
    max-height: 376px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
  }

  .comment-box input,
  .comment-box textarea {
    -webkit-appearance: none;
    appearance: none;
  }

  .comment p {
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .comment-box {
    padding: 12px;
  }

  .comment {
    padding: 12px;
  }

  .share {
    flex-direction: column;
  }

  .share a {
    width: 100%;
    text-align: center;
  }
}
