/* KKÜ kampüs — yan banner + alt slider */
.kkr-shell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 20px);
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(8px, 2vw, 16px);
  box-sizing: border-box;
}
.kkr-main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.kkr-rail {
  display: none;
  flex: 0 0 168px;
  width: 168px;
  position: sticky;
  top: calc(var(--header-h, 64px) + 12px);
  padding-top: 16px;
}
.kkr-ad {
  display: block;
  text-decoration: none !important;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ececef;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.kkr-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
}
.kkr-ad img {
  display: block;
  width: 100%;
  height: auto;
}
.kkr-slide--rail .kkr-ad img {
  object-fit: contain;
}
.kkr-slider {
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ececef;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
}
.kkr-slider__viewport {
  overflow: hidden;
  aspect-ratio: 720 / 200;
  background: #f8f8fa;
}
.kkr-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}
.kkr-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.kkr-slide.is-on {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.kkr-slide .kkr-ad {
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.kkr-slide .kkr-ad:hover {
  transform: none;
  box-shadow: none;
}
.kkr-slide .kkr-ad img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.kkr-slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #fff;
}
.kkr-slider__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d8d8de;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.kkr-slider__dots button.is-on {
  background: #8b1e2d;
  transform: scale(1.15);
}
@media (min-width: 1080px) {
  .kkr-rail {
    display: block;
  }
}
@media (min-width: 1280px) {
  .kkr-rail {
    flex-basis: 190px;
    width: 190px;
  }
}
@media (max-width: 480px) {
  .kkr-slider {
    margin-top: 12px;
    border-radius: 14px;
  }
  .kkr-slider__viewport {
    aspect-ratio: 16 / 7;
  }
}

/* kku.php topluluklar + kkugruplar alt banner */
.page-kku .kku-kampus-ad {
  padding: 4px 12px 18px;
  max-width: 720px;
  margin: 0 auto;
}
.page-kku .kku-kampus-ad .kkr-slider {
  margin-top: 6px;
}
.page-kku .kku-forum-list .kku-kampus-ad {
  padding-bottom: 24px;
}
.page-kku-gruplar .kkr-slider {
  margin-top: 12px;
}
.kkr-rail:empty {
  display: none !important;
}

/* Canlı sohbet — logo yanı tetikleyici + modal */
.kkr-chat-modal[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.kkr-chat-modal.is-open {
  display: grid;
  pointer-events: auto;
}
.kkr-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  place-items: end center;
  padding: 12px 12px calc(var(--mob-nav-h, 64px) + 12px);
  pointer-events: none;
}
.kkr-chat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.kkr-chat-modal__panel {
  position: relative;
  width: min(100%, 400px);
  max-height: min(78vh, 620px);
  display: flex;
  flex-direction: column;
  background: #f4f6fb;
  border-radius: 18px 18px 14px 14px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
  animation: kkrChatIn .28s ease;
}
@keyframes kkrChatIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.kkr-chat-modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
}
.kkr-chat-modal__av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .18);
  font-size: 1rem;
  overflow: hidden;
  flex: 0 0 38px;
}
.kkr-chat-modal__av img,
.kkr-chat-msg__av--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}
.kkr-chat-msg__av--img {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7ef;
}
.kkr-chat-modal__head strong {
  display: block;
  font-size: .92rem;
  line-height: 1.2;
}
.kkr-chat-modal__head span,
.kkr-chat-modal__status {
  display: block;
  font-size: .68rem;
  opacity: .88;
  margin-top: 2px;
}
.kkr-chat-modal__status.is-typing {
  opacity: 1;
}
.kkr-chat-modal__status.is-typing::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 5px;
  vertical-align: middle;
  animation: kkrStatusBlink 1.2s ease-in-out infinite;
}
@keyframes kkrStatusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.kkr-chat-modal__x {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.kkr-chat-modal__body {
  padding: 12px 12px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 200px;
}
.kkr-chat-typing {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}
.kkr-chat-typing[hidden] {
  display: none !important;
}
.kkr-chat-typing__bubble {
  padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  border: 1px solid #e5e7ef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.kkr-chat-typing__dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 14px;
}
.kkr-chat-typing__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: kkrTypingDot 1.2s ease-in-out infinite;
}
.kkr-chat-typing__dots span:nth-child(2) { animation-delay: .15s; }
.kkr-chat-typing__dots span:nth-child(3) { animation-delay: .3s; }
@keyframes kkrTypingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.kkr-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}
.kkr-chat-msg.is-show {
  opacity: 1;
  transform: translateY(0);
}
.kkr-chat-msg[hidden] {
  display: none !important;
}
.kkr-chat-msg__av {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  font-size: .72rem;
}
.kkr-chat-msg--bot {
  margin-right: auto;
}
.kkr-chat-msg p {
  margin: 0;
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 36px);
  padding: 10px 12px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  border: 1px solid #e5e7ef;
  font-size: .84rem;
  line-height: 1.45;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.kkr-chat-modal__ads {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.kkr-chat-modal__ads.is-show {
  opacity: 1;
  transform: translateY(0);
}
.kkr-chat-modal__ads[hidden] {
  display: none !important;
}
.kkr-chat-ad {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7ef;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.kkr-chat-ad img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}
.kkr-chat-cta {
  display: block;
  text-align: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff !important;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none !important;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.kkr-chat-cta.is-show {
  opacity: 1;
  transform: translateY(0);
}
.kkr-chat-cta[hidden] {
  display: none !important;
}
body.kkr-chat-open {
  overflow: hidden;
}
