/* ============================================================
   VDD PUBLIC CSS  –  v1.2
   ============================================================ */

/* ── Reset / Base ─────────────────────────────────────────── */
.vdd-shell *, .vdd-shell *::before, .vdd-shell *::after { box-sizing: border-box; }
.vdd-shell { font-family: inherit; color: #1a1a1a; }

/* ── Container ────────────────────────────────────────────── */
.vdd-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ── Grid ─────────────────────────────────────────────────── */
.vdd-archive-grid,
.vdd-single-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .vdd-archive-grid,
  .vdd-single-grid { grid-template-columns: 1fr; }
  .vdd-right { order: -1; }
}

/* ── Card ─────────────────────────────────────────────────── */
.vdd-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
}

/* ── Typography ───────────────────────────────────────────── */
.vdd-h1    { font-size: 1.65rem; font-weight: 700; margin: 0; line-height: 1.2; }
.vdd-h2    { font-size: 1.1rem;  font-weight: 700; margin: 0 0 14px; }
.vdd-h3    { font-size: .95rem;  font-weight: 700; margin: 0 0 12px; }
.vdd-muted { color: #888; font-size: .85rem; }

/* ── Chips ────────────────────────────────────────────────── */
.vdd-chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.vdd-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.vdd-chip:hover        { background: #c8e6c9; }
.vdd-chip-active       { background: #2e7d32 !important; color: #fff !important; }
.vdd-chip-dark         { background: #333; color: #fff; }
.vdd-chip-dark:hover   { background: #111; color: #fff; }
.vdd-chip-light        { background: #f0f0f0; color: #333; }
.vdd-chip-light:hover  { background: #ddd; }
.vdd-chip-koy          { background: #e3f2fd; color: #1565c0; }
.vdd-chip-koy:hover    { background: #bbdefb; }

/* ── Cards grid (archive) ─────────────────────────────────── */
.vdd-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .vdd-cards-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .vdd-cards-grid { grid-template-columns: 1fr; } }

/* ── Card Item ────────────────────────────────────────────── */
.vdd-item        { padding: 0; overflow: hidden; }
.vdd-item-media  { display: block; aspect-ratio: 4/3; overflow: hidden; background: #f5f5f5; }
.vdd-item-img    { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.vdd-item-media:hover .vdd-item-img { transform: scale(1.04); }
.vdd-item-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#f0f0f0,#e0e0e0); }
.vdd-item-chips  { padding: 10px 14px 0; }
.vdd-item-body   { padding: 8px 14px 14px; }
.vdd-item-title  { font-size: .95rem; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.vdd-item-title a { color: #7e22ce; text-decoration: none; }
.vdd-item-title a:hover { text-decoration: underline; }
.vdd-item-date   { font-size: .8rem; color: #888; }

.vdd-loading { opacity: .5; pointer-events: none; transition: opacity .2s; }

.vdd-empty { padding: 32px; text-align: center; color: #888; font-size: .95rem; }

/* ── Pagination ───────────────────────────────────────────── */
.vdd-pagination { margin-top: 24px; text-align: center; }
.vdd-pagination .page-numbers {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  margin: 2px;
  font-size: .9rem;
}
.vdd-pagination .current { background: #1b5e20; color: #fff; }

/* ── Single: media ────────────────────────────────────────── */
.vdd-media { padding: 0; overflow: hidden; }
.vdd-media-img { width: 100%; max-height: 520px; object-fit: cover; display: block; border-radius: 12px; }

/* ══════════════════════════════════════════════════════════
   BAŞLIK BLOĞU  — isim + tarih yan yana, chip, action satırı
   ══════════════════════════════════════════════════════════ */
.vdd-title-block { display: flex; flex-direction: column; gap: 0; }

/* İsim ve tarih yan yana */
.vdd-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 14px;
}
.vdd-title-date {
  font-size: 1rem;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Yazdır + Paylaş tek satır */
.vdd-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.vdd-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
  color: #fff;
  line-height: 1.3;
  white-space: nowrap;
}
.vdd-action-btn:hover { opacity: .82; }

/* Yazdır butonu farklı renk */
.vdd-print-btn  { background: #546e7a; color: #fff; }
.vdd-share-wa   { background: #25d366; }
.vdd-share-fb   { background: #1877f2; }
.vdd-share-x    { background: #000; }
.vdd-share-tg   { background: #229ed9; }
.vdd-share-copy { background: #6c757d; }

/* Mobilde sar */
@media (max-width: 600px) {
  .vdd-title-row    { flex-direction: column; gap: 4px; }
  .vdd-title-date   { font-size: .9rem; }
  .vdd-action-row   { gap: 5px; }
  .vdd-action-btn   { font-size: .75rem; padding: 5px 10px; }
}

/* ══════════════════════════════════════════════════════════
   VEFAT BİLGİLERİ GRID
   ══════════════════════════════════════════════════════════ */
.vdd-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
}
@media (max-width: 500px) { .vdd-info-grid { grid-template-columns: 1fr; } }

.vdd-info-item { display: flex; flex-direction: column; gap: 2px; }

.vdd-info-label {
  font-size: .72rem;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.vdd-info-val {
  font-size: .95rem;
  font-weight: 600;
  color: #1a1a1a;
}

/* ── Prose ────────────────────────────────────────────────── */
.vdd-prose { font-size: .95rem; line-height: 1.7; color: #333; }
.vdd-prose p { margin: 0 0 12px; }

/* ── Fotoğraf Galerisi ────────────────────────────────────── */
.vdd-galeri-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 600px) { .vdd-galeri-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 420px) { .vdd-galeri-grid { grid-template-columns: repeat(2,1fr); } }

.vdd-galeri-item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: #f5f5f5; }
.vdd-galeri-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.vdd-galeri-item:hover img { transform: scale(1.06); }

/* ── Lightbox ─────────────────────────────────────────────── */
.vdd-lb-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
}
body.vdd-lb-open { overflow: hidden; }
.vdd-lb-img { max-width: 90vw; max-height: 86vh; object-fit: contain; border-radius: 4px; box-shadow: 0 4px 40px rgba(0,0,0,.6); }

.vdd-lb-close, .vdd-lb-prev, .vdd-lb-next {
  position: absolute; background: rgba(255,255,255,.15); border: none; color: #fff;
  font-size: 1.6rem; cursor: pointer; border-radius: 50%;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.vdd-lb-close:hover, .vdd-lb-prev:hover, .vdd-lb-next:hover { background: rgba(255,255,255,.3); }
.vdd-lb-close { top: 16px; right: 16px; font-size: 1.2rem; }
.vdd-lb-prev  { left: 12px; }
.vdd-lb-next  { right: 12px; }

/* ── Related ──────────────────────────────────────────────── */
.vdd-related-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}
@media (max-width: 600px) { .vdd-related-grid { grid-template-columns: repeat(2,1fr); } }

.vdd-related-item  { display: flex; flex-direction: column; gap: 6px; }
.vdd-related-media { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 8px; background: #f5f5f5; }
.vdd-related-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.vdd-related-media:hover img { transform: scale(1.05); }
.vdd-related-title { font-size: .85rem; font-weight: 700; color: #7e22ce; text-decoration: none; }
.vdd-related-title:hover { text-decoration: underline; }
.vdd-related-date  { font-size: .75rem; color: #aaa; }

/* ── Sidebar form ─────────────────────────────────────────── */
.vdd-sticky  { position: sticky; top: 16px; }

.vdd-side-form label {
  display: block; font-size: .8rem; font-weight: 600; color: #555; margin: 10px 0 3px;
}
.vdd-side-form input[type=text],
.vdd-side-form select {
  width: 100%; border: 1px solid #ddd; border-radius: 8px;
  padding: 7px 10px; font-size: .85rem; background: #fafafa; font-family: inherit;
}
.vdd-side-form input:focus,
.vdd-side-form select:focus { outline: none; border-color: #2e7d32; }
.vdd-side-form button[type=submit] {
  margin-top: 12px; width: 100%; background: #1b5e20; color: #fff;
  border: none; border-radius: 8px; padding: 9px; font-size: .9rem;
  font-weight: 600; cursor: pointer; transition: background .15s;
}
.vdd-side-form button[type=submit]:hover { background: #2e7d32; }

.vdd-btn-clear {
  display: block; margin-top: 8px; text-align: center;
  font-size: .82rem; color: #888; text-decoration: underline; cursor: pointer;
}
.vdd-btn-clear:hover { color: #333; }

/* ── Archive head ─────────────────────────────────────────── */
.vdd-archive-head    { margin-bottom: 4px; }
.vdd-archive-results { min-height: 200px; }

/* ── Taziye ───────────────────────────────────────────────── */
.vdd-taziye-liste { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.vdd-taziye-item {
  background: #f9f9f9;
  border-left: 3px solid #2e7d32;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
}
.vdd-taziye-yeni { animation: vdd-fadein .4s ease; }
@keyframes vdd-fadein { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

.vdd-taziye-isim  { font-weight: 700; font-size: .9rem; }
.vdd-taziye-mesaj { font-size: .9rem; color: #333; margin: 4px 0; line-height: 1.5; }
.vdd-taziye-tarih { font-size: .75rem; color: #aaa; }

.vdd-taziye-form    { margin-top: 4px; }
.vdd-taziye-row     { margin-bottom: 10px; }
.vdd-taziye-row input,
.vdd-taziye-row textarea {
  width: 100%; border: 1px solid #ddd; border-radius: 8px;
  padding: 8px 12px; font-size: .9rem; font-family: inherit; transition: border-color .15s;
}
.vdd-taziye-row input:focus,
.vdd-taziye-row textarea:focus { outline: none; border-color: #2e7d32; }
.vdd-taziye-row textarea { resize: vertical; min-height: 72px; }

.vdd-btn-primary {
  background: #1b5e20; color: #fff; border: none; border-radius: 8px;
  padding: 9px 20px; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .15s;
}
.vdd-btn-primary:hover    { background: #2e7d32; }
.vdd-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.vdd-taziye-msg { margin-left: 10px; font-size: .85rem; font-weight: 600; }

/* ── Baskı / PDF ──────────────────────────────────────────── */
@media print {
  .vdd-no-print, .vdd-right, .vdd-related-grid, #wpadminbar { display: none !important; }
  .vdd-shell { font-size: 12pt; }
  .vdd-single-grid { grid-template-columns: 1fr !important; }
  .vdd-card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  .vdd-media-img { max-height: 300px; }
  a { color: inherit; text-decoration: none; }
}

/* ── Taziye: üst satır (isim + tarih + sil butonu) ───────── */
.vdd-taziye-ust {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.vdd-taziye-ust > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.vdd-taziye-isim  { font-weight: 700; font-size: .9rem; }
.vdd-taziye-tarih { font-size: .75rem; color: #aaa; }

/* Sil butonu — sadece admin görür */
.vdd-taziye-sil-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: .75rem;
  color: #bbb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1;
}
.vdd-taziye-sil-btn:hover {
  background: #fdecea;
  border-color: #c0392b;
  color: #c0392b;
}
.vdd-taziye-sil-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════
   MOBİL / DESKTOP LAYOUT ANAHTARLAMA
   ══════════════════════════════════════════════════════════ */

/* Varsayılan: masaüstü görünüm açık, mobil kapalı */
.vdd-mobile-layout  { display: none; }
.vdd-desktop-layout { display: grid;  }

/* Mobil: masaüstü kapat, mobil aç */
@media (max-width: 767px) {
  .vdd-mobile-layout  { display: block; }
  .vdd-desktop-layout { display: none;  }
}

/* ── Mobil filtre kartı ───────────────────────────────────── */
.vdd-mobile-filter { margin-bottom: 12px; }

.vdd-mobile-filter-form { display: flex; flex-direction: column; gap: 8px; }

.vdd-mobile-filter-row input[type=text] {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .95rem;
  font-family: inherit;
  background: #fafafa;
}
.vdd-mobile-filter-row input:focus { outline: none; border-color: #2e7d32; }

.vdd-mobile-filter-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.vdd-mobile-filter-selects select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: .85rem;
  background: #fafafa;
  font-family: inherit;
  appearance: auto;
}
.vdd-mobile-filter-selects select:focus { outline: none; border-color: #2e7d32; }

.vdd-mobile-filter-btn {
  width: 100%;
  background: #1b5e20;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.vdd-mobile-filter-btn:hover { background: #2e7d32; }

/* ── Mobil sonuçlar ───────────────────────────────────────── */
.vdd-mobile-results { margin-bottom: 12px; }

/* Mobilde 2 sütun */
@media (max-width: 767px) {
  .vdd-mobile-results .vdd-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 380px) {
  .vdd-mobile-results .vdd-cards-grid { grid-template-columns: 1fr; }
}

/* ── Mobil aileler: yatay kaydırma ───────────────────────── */
.vdd-mobile-aileler { margin-bottom: 0; }
.vdd-mobile-aileler .vdd-h3 { margin-bottom: 10px; }

.vdd-aileler-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.vdd-aileler-scroll::-webkit-scrollbar { display: none; }
.vdd-aileler-scroll .vdd-chip          { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   SHORTCODE / ANA SAYFA BLOĞU
   ══════════════════════════════════════════════════════════ */
.vdd-sc-wrap {
  margin: 16px 0;
}

/* Başlık + "Tümünü Gör" butonu */
.vdd-sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.vdd-sc-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
}
.vdd-sc-more {
  font-size: .85rem;
  font-weight: 600;
  color: #2e7d32;
  text-decoration: none;
  white-space: nowrap;
}
.vdd-sc-more:hover { text-decoration: underline; }

/* Grid — kolon sayısına göre */
.vdd-sc-grid { display: grid; gap: 16px; }

.vdd-sc-cols-2 .vdd-sc-grid { grid-template-columns: repeat(2, 1fr); }
.vdd-sc-cols-3 .vdd-sc-grid { grid-template-columns: repeat(3, 1fr); }
.vdd-sc-cols-4 .vdd-sc-grid { grid-template-columns: repeat(4, 1fr); }
.vdd-sc-cols-1 .vdd-sc-grid { grid-template-columns: 1fr; }

@media (max-width: 700px) {
  .vdd-sc-cols-3 .vdd-sc-grid,
  .vdd-sc-cols-4 .vdd-sc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .vdd-sc-cols-2 .vdd-sc-grid,
  .vdd-sc-cols-3 .vdd-sc-grid,
  .vdd-sc-cols-4 .vdd-sc-grid { grid-template-columns: 1fr; }
}

/* Shortcode kart */
.vdd-sc-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,.08);
  transition: box-shadow .2s;
}
.vdd-sc-card:hover { box-shadow: 0 3px 14px rgba(0,0,0,.13); }

.vdd-sc-media {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f5f5f5;
}
.vdd-sc-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.vdd-sc-media:hover img  { transform: scale(1.04); }
.vdd-sc-placeholder      { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#f0f0f0,#e0e0e0); }

.vdd-sc-body { padding: 10px 12px 12px; }

.vdd-sc-name {
  display: block;
  font-size: .9rem;
  font-weight: 700;
  color: #7e22ce;
  text-decoration: none;
  margin-top: 6px;
  line-height: 1.3;
}
.vdd-sc-name:hover { text-decoration: underline; }

.vdd-sc-date  { font-size: .78rem; color: #999; margin-top: 3px; }
.vdd-sc-empty { color: #888; font-size: .9rem; padding: 10px 0; }

/* Widget sidebar kullanımı (1 sütun) */
.vdd-sc-cols-1 .vdd-sc-card {
  display: flex;
  gap: 10px;
  border-radius: 8px;
}
.vdd-sc-cols-1 .vdd-sc-media {
  width: 70px;
  height: 70px;
  aspect-ratio: 1;
  flex-shrink: 0;
  border-radius: 8px;
}
.vdd-sc-cols-1 .vdd-sc-body {
  padding: 6px 6px 6px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vdd-sc-cols-1 .vdd-chip-row { display: none; }
