:root {
  --portal-primary: #1e40af;
  --portal-primary-light: #dbeafe;
  --portal-accent: #0ea5e9;
  --portal-success: #16a34a;
  --portal-warning: #d97706;
  --portal-orange: #ea580c;
  --portal-bg: #f8fafc;
  --portal-text: #1e293b;
  --portal-muted: #64748b;
  --portal-border: #e2e8f0;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
}

body {
  background: var(--portal-bg);
  color: var(--portal-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Navbar ──────────────────────────────────────── */
.portal-navbar {
  background: var(--portal-primary) !important;
  box-shadow: 0 2px 8px rgba(30, 64, 175, .3);
  padding: 0.75rem 0;
}

.portal-navbar .navbar-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.25rem;
}

.portal-navbar .brand-icon {
  font-size: 1.4rem;
  margin-right: 6px;
}

.portal-navbar .nav-link {
  color: rgba(255, 255, 255, .85) !important;
  font-size: 0.9rem;
  padding: .5rem .8rem !important;
  border-radius: 6px;
  transition: all .15s;
}

.portal-navbar .nav-link:hover,
.portal-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, .15);
}

.portal-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, .4);
}

.portal-navbar .navbar-toggler-icon {
  filter: invert(1);
}

.btn-portal-login {
  background: #fff;
  color: var(--portal-primary);
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: .45rem 1rem;
  border-radius: 8px;
  transition: all .15s;
}

.btn-portal-login:hover {
  background: var(--portal-primary-light);
  color: var(--portal-primary);
}

/* ── Hero ─────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--portal-primary) 0%, #1e3a8a 60%, #0f172a 100%);
  color: #fff;
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.1rem;
  opacity: .85;
  max-width: 560px;
}

/* ── Section headings ─────────────────────────────── */
.section-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--portal-text);
  border-left: 4px solid var(--portal-primary);
  padding-left: 12px;
  margin-bottom: 1.2rem;
}

/* ── Portal cards ─────────────────────────────────── */
.portal-card {
  border: 1px solid var(--portal-border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Sidebar'daki kartlar içerik yüksekliğine göre boyutlanmalı */
.bolum-sidebar .portal-card {
  height: auto;
}

.portal-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.portal-card .card-img-top {
  height: 180px;
  object-fit: cover;
}

.portal-card .card-img-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.portal-card .card-body {
  padding: 1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portal-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: .5rem;
}

.portal-card .card-title a {
  color: var(--portal-text);
  text-decoration: none;
}

.portal-card .card-title a:hover {
  color: var(--portal-primary);
}

.portal-card .card-text {
  font-size: .875rem;
  color: var(--portal-muted);
  flex: 1;
}

.portal-card .card-footer-actions {
  margin-top: auto;
  padding-top: .75rem;
}

/* ── Type badges ──────────────────────────────────── */
.badge-haber {
  background: #dcfce7;
  color: #15803d;
}

.badge-duyuru {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-etkinlik {
  background: #ffedd5;
  color: #c2410c;
}

.badge-tur {
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Dept cards ───────────────────────────────────── */
.dept-card {
  border: 1px solid var(--portal-border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: all .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.dept-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--portal-accent);
  color: inherit;
}

.dept-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--portal-primary-light);
}

.dept-card h5 {
  font-weight: 700;
  font-size: 1rem;
  color: var(--portal-text);
}

.dept-card .dept-head {
  font-size: .8rem;
  color: var(--portal-muted);
  margin-bottom: .5rem;
}

.dept-card .dept-desc {
  font-size: .85rem;
  color: var(--portal-muted);
}

/* ── Content detail ───────────────────────────────── */
.content-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.content-meta {
  font-size: .85rem;
  color: var(--portal-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.content-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--portal-text);
}

.content-body p {
  margin-bottom: 1rem;
}

/* ── Footer ───────────────────────────────────────── */
.portal-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
}

.portal-footer h5,
.portal-footer h6 {
  color: #e2e8f0;
}

.footer-heading {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: .75rem;
}

.footer-links li {
  margin-bottom: .35rem;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  font-size: .875rem;
  transition: color .15s;
}

.footer-links a:hover {
  color: #e2e8f0;
}

.footer-hr {
  border-color: #1e293b;
  margin: 1.5rem 0 1rem;
}

/* ── Pagination ───────────────────────────────────── */
.portal-pagination .page-link {
  color: var(--portal-primary);
  border-color: var(--portal-border);
}

.portal-pagination .page-item.active .page-link {
  background: var(--portal-primary);
  border-color: var(--portal-primary);
}

/* ── Placeholders ─────────────────────────────────── */
.ph-haber {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.ph-duyuru {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.ph-etkinlik {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
}

/* ── Etkinlik Timeline ────────────────────────────── */
.etkinlik-timeline {
  position: relative;
  margin: 0 auto;
  padding: 8px 0 8px 0;
  max-width: 820px;
}
.etkinlik-timeline::before {
  content: '';
  position: absolute;
  left: 110px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--portal-primary), var(--portal-accent));
  border-radius: 3px;
}
.tl-item {
  position: relative;
  display: flex;
  gap: 24px;
  padding: 0 0 30px 0;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-tarih {
  flex: 0 0 92px;
  text-align: right;
  padding-top: 4px;
}
.tl-tarih .tl-gun   { font-size: 1.9rem; font-weight: 800; color: var(--portal-primary); line-height: 1; }
.tl-tarih .tl-ay    { font-size: .8rem; font-weight: 600; color: var(--portal-text); text-transform: uppercase; }
.tl-tarih .tl-yil   { font-size: .72rem; color: var(--portal-muted); }
.tl-tarih .tl-saat  { font-size: .72rem; color: var(--portal-accent); margin-top: 3px; font-weight: 600; }
.tl-nokta {
  position: absolute;
  left: 102px;
  top: 8px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--portal-primary);
  z-index: 2;
}
.tl-item.gecmis .tl-nokta { border-color: var(--portal-muted); }
.tl-item.gecmis .tl-gun   { color: var(--portal-muted); }
.tl-govde {
  flex: 1;
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  margin-left: 18px;
}
.tl-govde:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tl-govde img { width: 100%; max-height: 220px; object-fit: cover; }
.tl-govde-ic { padding: 16px 20px; }
.tl-rozet {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; padding: 3px 9px; border-radius: 5px;
  background: #ffedd5; color: #c2410c; margin-bottom: 8px;
}
.tl-rozet.gecmis { background: #e2e8f0; color: #64748b; }
.tl-govde h5 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.tl-govde h5 a { color: var(--portal-text); text-decoration: none; }
.tl-govde h5 a:hover { color: var(--portal-primary); }
.tl-govde p { font-size: .9rem; color: var(--portal-muted); margin-bottom: 10px; line-height: 1.6; }
.tl-meta { font-size: .78rem; color: var(--portal-muted); display: flex; flex-wrap: wrap; gap: 14px; }

@media (max-width: 576px) {
  .etkinlik-timeline::before { left: 70px; }
  .tl-nokta { left: 62px; }
  .tl-tarih { flex-basis: 56px; }
  .tl-tarih .tl-gun { font-size: 1.4rem; }
  .tl-item { gap: 14px; }
  .tl-govde { margin-left: 14px; }
}