/* Anasayfa Etkinlikler takvimi — KKU tema (kırmızı / lacivert) */

.etkinlik-takvimi-section {
  --kku-red: #c9151b;
  --kku-darkred: #9e1b32;
  --kku-navy: #053170;
  --kku-navy-soft: #1d3a5f;
  --kku-gold: #b69a51;
  --kku-paper: #f7f8fa;
  --kku-ink: #01172f;
  --kku-muted: #5c6b7a;

  position: relative;
  padding: 8px 0 28px;
  overflow-x: hidden;
  overflow-y: visible;
  background:
    radial-gradient(ellipse 48% 42% at 0% 0%, rgba(201, 21, 27, 0.07), transparent 55%),
    radial-gradient(ellipse 42% 38% at 100% 100%, rgba(5, 49, 112, 0.06), transparent 50%),
    var(--kku-paper);
}

.etkinlik-takvimi-section .container {
  position: relative;
  z-index: 1;
}

.etkinlik-takvimi,
.gunun-etkinlikleri {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(1, 23, 47, 0.07);
  box-shadow: 0 6px 22px rgba(1, 23, 47, 0.08);
  overflow: hidden;
  height: 100%;
  min-height: 440px;
  display: flex;
  flex-direction: column;
}

.etkinlik-takvimi {
  padding: 0;
}

/* —— Başlık bandı —— */
.takvim-header {
  margin: 0;
  padding: 14px 16px;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    var(--kku-red) 0%,
    var(--kku-darkred) 42%,
    var(--kku-navy) 100%
  );
  color: #fff;
  box-shadow: 0 4px 14px rgba(158, 27, 50, 0.22);
}

.ay-secici {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  gap: 8px;
}

.ay-yil-baslik {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0.02em;
  transition: background 0.2s ease;
  color: #fff;
}

.ay-yil-baslik span {
  margin: 0 4px;
  font-size: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
}

.ay-yil-baslik:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ay-onceki,
.ay-sonraki {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  outline: 0 !important;
  box-shadow: none;
}

.ay-onceki:hover,
.ay-sonraki:hover,
.ay-onceki:focus,
.ay-sonraki:focus {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(1.05);
  outline: 0 !important;
}

/* —— Takvim gövde —— */
.takvim-govde {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.takvim-gunler {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(180deg, #eef2f7 0%, #e8edf4 100%);
  border-bottom: 1px solid rgba(5, 49, 112, 0.1);
  flex-shrink: 0;
  gap: 0;
  margin: 0;
}

.gun-baslik {
  text-align: center;
  padding: 10px 0;
  font-weight: 700 !important;
  color: var(--kku-navy);
  text-transform: uppercase;
  font-size: 11px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.04em;
}

.takvim-tarihler {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: rgba(5, 49, 112, 0.08);
  padding: 1px;
  min-height: 0;
}

.tarih {
  background: #fff;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  padding: 4px;
  border-radius: 0;
}

.tarih:hover:not(.bos) {
  background: #f4f7fb;
  z-index: 1;
}

.tarih.has-event:hover {
  background: #fff5f5;
  box-shadow: 0 4px 12px rgba(201, 21, 27, 0.14);
  z-index: 2;
}

.tarih.bos {
  background: #f3f5f8;
  cursor: default;
}

.tarih.bugun {
  background: linear-gradient(160deg, rgba(5, 49, 112, 0.08), rgba(201, 21, 27, 0.06));
  box-shadow: inset 0 0 0 2px var(--kku-navy);
}

.tarih.secili {
  background: linear-gradient(160deg, rgba(201, 21, 27, 0.12), rgba(201, 21, 27, 0.05));
  box-shadow: inset 0 0 0 2px var(--kku-red);
  transform: scale(1.04);
  z-index: 2;
}

.tarih.bugun.secili {
  box-shadow: inset 0 0 0 2px var(--kku-red);
}

.gun-numara {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--kku-ink);
  line-height: 1.2 !important;
}

.bugun .gun-numara {
  color: var(--kku-navy);
  font-weight: 800;
}

.has-event .gun-numara {
  color: var(--kku-darkred);
}

.secili .gun-numara {
  color: var(--kku-red);
}

.etkinlik-gosterge {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.event-badge {
  background: linear-gradient(135deg, #e02a30, var(--kku-red));
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(201, 21, 27, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.45);
  line-height: 1;
}

/* —— Günün etkinlikleri —— */
.gunun-etkinlikleri {
  padding: 18px 18px 14px;
  position: relative;
}

.gunun-etkinlikleri::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--kku-red), var(--kku-navy));
}

.gunun-etkinlikleri h3 {
  margin: 0 0 14px;
  padding: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--kku-navy);
  border-bottom: 1px solid rgba(5, 49, 112, 0.12);
  position: relative;
  z-index: 2;
}

.etkinlik-listesi {
  flex: 1;
  overflow-y: auto;
  overflow-anchor: none;
  position: relative;
  z-index: 2;
  min-height: 120px;
}

.etkinlik-ozet {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  border-left: 3px solid var(--kku-red);
  padding: 12px 14px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(1, 23, 47, 0.06);
  border-left-width: 3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(1, 23, 47, 0.04);
}

.etkinlik-ozet:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 16px rgba(1, 23, 47, 0.1);
  border-color: rgba(201, 21, 27, 0.2);
  background: #fffafa;
}

.etkinlik-ikon {
  color: var(--kku-red);
  font-size: 1.15rem;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.etkinlik-detay {
  flex: 1;
  min-width: 0;
}

.etkinlik-detay h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.etkinlik-detay h4 a,
.etkinlik-detay h4 a:visited {
  color: var(--kku-ink);
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.etkinlik-detay h4 a:hover,
.etkinlik-detay h4 a:focus {
  color: var(--kku-red);
  text-decoration: none !important;
  outline: 0 !important;
}

.etkinlik-yok {
  color: var(--kku-muted);
  text-align: center;
  padding: 28px 12px;
  font-style: italic;
  margin: 0;
}

.yukleniyor-spinner {
  text-align: center;
  color: var(--kku-navy);
  padding: 24px 12px;
}

.fade-in {
  opacity: 0;
  animation: kkuEtkinlikFadeIn 0.45s ease forwards;
}

@keyframes kkuEtkinlikFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* —— Popover (ay/yıl seçici) —— */
.tarih-secici-popover {
  max-width: 300px;
  padding: 0;
}

.popover-aylar,
.popover-yillar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
}

.popover-aylar .ay-item,
.popover-yillar .yil-item {
  padding: 8px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  font-size: 13px;
}

.popover-aylar .ay-item:hover,
.popover-yillar .yil-item:hover {
  background: rgba(5, 49, 112, 0.08);
  color: var(--kku-navy);
}

.popover-aylar .ay-item.active,
.popover-yillar .yil-item.active {
  background: linear-gradient(135deg, var(--kku-red), var(--kku-darkred));
  color: #fff;
  font-weight: 700;
}

.popover-secimler {
  display: flex;
  border-bottom: 1px solid rgba(5, 49, 112, 0.12);
}

.popover-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--kku-muted);
  font-size: 13px;
  font-weight: 600;
}

.popover-tab.active {
  border-bottom-color: var(--kku-red);
  color: var(--kku-red);
}

.popover-panel {
  display: none;
}

.popover-panel.active {
  display: block;
}

/* —— Responsive —— */
@media (max-width: 767px) {
  .etkinlik-takvimi-section {
    padding: 4px 0 20px;
  }

  .etkinlik-takvimi,
  .gunun-etkinlikleri {
    min-height: 360px;
    margin-bottom: 12px;
  }

  .gun-baslik {
    font-size: 10px;
    padding: 8px 0;
  }

  .gun-numara {
    font-size: 13px;
  }

  .event-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .ay-yil-baslik {
    font-size: 1rem;
  }

  .ay-onceki,
  .ay-sonraki {
    width: 32px;
    height: 32px;
  }

  .gunun-etkinlikleri h3 {
    font-size: 1.05rem;
  }

  .etkinlik-detay h4 {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .takvim-tarihler {
    gap: 0;
  }

  .gun-numara {
    font-size: 12px;
  }

  .event-badge {
    width: 16px;
    height: 16px;
    font-size: 9px;
  }
}
