/* =============================================================================
   Duyurular — liste & detay sayfaları (public)
   Site genel tasarım diliyle (radius-2xl, shadow-card, border-soft, primary/muted
   token'ları) uyumlu, modern kart + hero düzeni.
   ============================================================================= */

/* ---------- Sayfa kabuğu ---------- */
.duy-page {
  max-width: 1120px;
  margin-inline: auto;
}

/* ---------- Liste sayfası: üst hero ---------- */
.duy-hero {
  position: relative;
  margin: 1rem 0 2rem;
  padding: 2rem 1.75rem;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.07), rgba(99, 102, 241, 0.02));
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.duy-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 100% 0%, rgba(99, 102, 241, 0.12), transparent 60%);
  pointer-events: none;
}

.duy-hero__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: rgb(79, 70, 229);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.duy-hero__eyebrow svg {
  width: 14px;
  height: 14px;
}

.duy-hero__title {
  position: relative;
  margin: 0.75rem 0 0.45rem;
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--foreground);
}

.duy-hero__sub {
  position: relative;
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- Liste grid ---------- */
.duy-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.duy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--background);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.duy-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: rgba(79, 70, 229, 0.22);
}

.duy-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.7), rgba(241, 245, 249, 0.45));
  display: flex;
  align-items: center;
  justify-content: center;
}

.duy-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.45s ease;
  -webkit-user-drag: none;
  user-select: none;
}

.duy-card__media--logo img {
  object-fit: contain;
  padding: 16%;
}

.duy-card:hover .duy-card__media img {
  transform: scale(1.05);
}

.duy-card__tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  z-index: 1;
}

.duy-card__urgent {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 1;
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.3);
}

.duy-card__urgent::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: duy-pulse 1.4s ease-in-out infinite;
}

@keyframes duy-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.55; }
}

.duy-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem 1.3rem;
}

.duy-card__date {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.duy-card__date svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}

.duy-card__title {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.duy-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.duy-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.duy-card:hover .duy-card__title a {
  color: rgb(79, 70, 229);
}

.duy-card__excerpt {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.duy-card__more {
  position: relative;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: rgb(79, 70, 229);
  text-decoration: none;
  align-self: flex-start;
  transition: gap 0.25s ease, color 0.2s ease;
}

.duy-card__more svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.duy-card:hover .duy-card__more {
  color: rgb(67, 56, 202);
}

.duy-card:hover .duy-card__more svg {
  transform: translateX(3px);
}

/* ---------- Boş durum ---------- */
.duy-empty {
  margin: 1rem 0 2rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-2xl);
  color: var(--muted);
}

.duy-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.08);
  color: rgb(79, 70, 229);
  margin-bottom: 0.85rem;
}

.duy-empty__icon svg {
  width: 26px;
  height: 26px;
}

.duy-empty__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
}

.duy-empty__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* =============================================================================
   Detay sayfası
   ============================================================================= */
.duy-article {
  max-width: 880px;
  margin-inline: auto;
}

.duy-article__back-row {
  margin: 1rem 0 1.5rem;
}

.duy-article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, gap 0.2s ease;
}

.duy-article__back svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.duy-article__back:hover {
  background: rgba(79, 70, 229, 0.08);
  color: rgb(79, 70, 229);
  gap: 0.65rem;
}

.duy-article__back:hover svg {
  transform: translateX(-2px);
}

.duy-article__hero {
  position: relative;
  margin: 0 0 1.75rem;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.7), rgba(241, 245, 249, 0.45));
  border: 1px solid var(--border-soft);
}

.duy-article__hero img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  -webkit-user-drag: none;
  user-select: none;
}

.duy-article__hero--logo img {
  object-fit: contain;
  padding: 11%;
}

.duy-article__header {
  margin: 0 0 1.5rem;
}

.duy-article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 1.1rem;
}

.duy-article__category {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: rgb(79, 70, 229);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.duy-article__date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.duy-article__date svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.duy-article__urgent {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.1);
  color: rgb(185, 28, 28);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.duy-article__urgent svg {
  width: 13px;
  height: 13px;
}

.duy-article__title {
  margin: 0 0 1.1rem;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--foreground);
}

.duy-article__excerpt {
  margin: 0;
  padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 3px solid rgb(99, 102, 241);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}

.duy-article__body {
  margin: 1.75rem 0 2rem;
}

.duy-article__body p {
  margin: 0 0 1.15rem;
  font-size: 1rem;
  line-height: 1.78;
  color: var(--foreground);
}

.duy-article__body p:last-child {
  margin-bottom: 0;
}

.duy-article__footer {
  margin: 2rem 0 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
}

/* =============================================================================
   Dark theme
   ============================================================================= */
html[data-theme="dark"] .duy-hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.03));
  border-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .duy-hero__eyebrow,
html[data-theme="dark"] .duy-article__category {
  background: rgba(129, 140, 248, 0.16);
  color: rgb(165, 180, 252);
}

html[data-theme="dark"] .duy-card {
  background: var(--surface-subtle);
  border-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .duy-card:hover {
  border-color: rgba(129, 140, 248, 0.32);
}

html[data-theme="dark"] .duy-card__media,
html[data-theme="dark"] .duy-article__hero {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .duy-card:hover .duy-card__title a,
html[data-theme="dark"] .duy-card__more {
  color: rgb(129, 140, 248);
}

html[data-theme="dark"] .duy-card:hover .duy-card__more {
  color: rgb(165, 180, 252);
}

html[data-theme="dark"] .duy-article__excerpt {
  border-color: rgb(129, 140, 248);
}

html[data-theme="dark"] .duy-article__back {
  background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .duy-article__back:hover {
  background: rgba(129, 140, 248, 0.15);
  color: rgb(165, 180, 252);
}

html[data-theme="dark"] .duy-article__urgent {
  background: rgba(220, 38, 38, 0.18);
  color: rgb(252, 165, 165);
}

html[data-theme="dark"] .duy-empty {
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .duy-empty__icon {
  background: rgba(129, 140, 248, 0.15);
  color: rgb(165, 180, 252);
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 640px) {
  .duy-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .duy-hero {
    margin: 0.75rem 0 1.5rem;
    padding: 1.5rem 1.25rem;
  }

  .duy-article__hero {
    margin-bottom: 1.25rem;
  }

  .duy-slider {
    margin-bottom: 1.25rem;
  }

  .duy-slider__arrow {
    width: 38px;
    height: 38px;
  }

  .duy-article__meta {
    gap: 0.55rem;
  }
}

/* =============================================================================
   Duyuru detay slider (çoklu görsel)
   ============================================================================= */
.duy-slider {
  position: relative;
  margin: 0 0 1.75rem;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.7), rgba(241, 245, 249, 0.45));
  border: 1px solid var(--border-soft);
  outline: none;
}

.duy-slider:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.duy-slider__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}

.duy-slider__viewport.is-dragging {
  cursor: grabbing;
}

.duy-slider__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.duy-slider__viewport.is-dragging .duy-slider__track {
  transition: none;
}

.duy-slider__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.duy-slider__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  /* Pointer event'lerini her zaman viewport'a yönlendir; tarayıcının kendi
   * "image drag" arayüzü tetiklenmez, böylece swipe ile slayt değiştirme
   * kesintisiz çalışır. */
  pointer-events: none;
  pointer-events: none;
}

.duy-slider--logo .duy-slider__img {
  object-fit: contain;
  padding: 11%;
}

.duy-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.92);
  color: var(--foreground);
  cursor: pointer;
  z-index: 3;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.duy-slider__arrow:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.04);
}

.duy-slider__arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.duy-slider__arrow--prev { left: 0.75rem; }
.duy-slider__arrow--next { right: 0.75rem; }

.duy-slider__counter {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.duy-slider__dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3;
}

.duy-slider__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, width 200ms ease;
}

.duy-slider__dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

.duy-slider__dot.is-active {
  background: #ffffff;
  width: 20px;
}

/* Dark theme */
html[data-theme="dark"] .duy-slider {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .duy-slider__arrow {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.25);
  color: #f1f5f9;
}

html[data-theme="dark"] .duy-slider__arrow:hover {
  background: rgba(51, 65, 85, 0.95);
}

@media (max-width: 480px) {
  .duy-slider__arrow {
    width: 34px;
    height: 34px;
  }

  .duy-slider__arrow--prev { left: 0.45rem; }
  .duy-slider__arrow--next { right: 0.45rem; }

  .duy-slider__counter {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.72rem;
  }

  .duy-slider__dots {
    bottom: 0.5rem;
    padding: 0.3rem 0.55rem;
  }
}

