/**
 * Boyraz Suite — Proje Kartları
 * Premium koyu kart tasarımı. Widget + proje arşiv template'i ortak kullanır.
 * Renk/tipografi varsayılanları buradadır; Elementor kontrolleri override eder.
 */

/* ── Izgara ───────────────────────────────────────────────────── */
.boyraz-pk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Kart ─────────────────────────────────────────────────────── */
.boyraz-pk-card {
    position: relative;
    background-color: #1b1b1b;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    list-style: none;
}
.boyraz-pk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.boyraz-pk-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.boyraz-pk-link:hover,
.boyraz-pk-link:focus {
    text-decoration: none;
    color: inherit;
}

/* ── Görsel ───────────────────────────────────────────────────── */
.boyraz-pk-media {
    position: relative;
    overflow: hidden;
    margin: 14px 14px 0;
    border-radius: 6px;
    aspect-ratio: 16 / 10;
    background-color: #2a2a2a;
    flex-shrink: 0;
}
.boyraz-pk-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}
/* Hover zoom (widget'ta prefix_class ile kapatılabilir:
   switcher kapalıyken wrapper "boyraz-pk-zoom-" sınıfını alır) */
.boyraz-pk-card:hover .boyraz-pk-media img {
    transform: scale(1.05);
}
.boyraz-pk-zoom- .boyraz-pk-card:hover .boyraz-pk-media img {
    transform: none;
}

.boyraz-pk-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #4d4d4d;
}
.boyraz-pk-noimg svg { width: 48px; height: 48px; }

/* ── Rozetler ─────────────────────────────────────────────────── */
.boyraz-pk-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}
.boyraz-pk-badge--ili {
    top: 12px;
    right: 14px;
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}
.boyraz-pk-badge--ili svg {
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}
.boyraz-pk-badge--durum {
    top: 12px;
    left: 14px;
    padding: 5px 12px;
    border-radius: 4px;
    background-color: #a98a5b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── İçerik ───────────────────────────────────────────────────── */
.boyraz-pk-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 24px 26px;
}

.boyraz-pk-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.boyraz-pk-slogan {
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a7a7a7;
    line-height: 1.5;
}

.boyraz-pk-divider {
    display: block;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.14);
    margin: 0 0 16px;
}

/* ── Özellik satırları ────────────────────────────────────────── */
.boyraz-pk-meta {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.boyraz-pk-meta li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.boyraz-pk-meta-ico {
    width: 17px;
    height: 17px;
    color: #cfcfcf;
    flex-shrink: 0;
    display: inline-flex;
}
.boyraz-pk-meta-ico svg { width: 100%; height: 100%; }
.boyraz-pk-meta-ico img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 2px;
}
.boyraz-pk-meta-text {
    font-size: 14px;
    color: #e3e3e3;
    line-height: 1.45;
}

/* ── Buton ────────────────────────────────────────────────────── */
/* Varsayılan renk Elementor Global Renkler'den (accent) gelir */
.boyraz-pk-btn {
    margin-top: auto;
    display: block;
    text-align: center;
    padding: 13px 18px;
    border-radius: 4px;
    background: var(--e-global-color-accent, #a98a5b);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.3;
    transition: filter 0.25s ease, transform 0.2s ease;
}
.boyraz-pk-link:hover .boyraz-pk-btn {
    filter: brightness(1.1);
}

/* ── Filtre sekmeleri ─────────────────────────────────────────── */
.boyraz-pk-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}
.boyraz-pk-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    border-radius: 999px;
    border: 1px solid #d8d2c7;
    background: transparent;
    color: #555555;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.boyraz-pk-filter-btn:hover {
    border-color: var(--e-global-color-accent, #a98a5b);
    color: var(--e-global-color-accent, #a98a5b);
}
.boyraz-pk-filter-btn.is-active {
    background-color: var(--e-global-color-accent, #a98a5b);
    border-color: var(--e-global-color-accent, #a98a5b);
    color: #ffffff;
}
.boyraz-pk-filter-count {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.65;
}

/* Filtre / load-more ile gizlenen kart (pk + bk ortak) */
.boyraz-pk-hide {
    display: none !important;
}

/* Geçişlerde yumuşak görünüm (pk + bk ortak) */
.boyraz-pk-appear {
    animation: boyrazPkFade 0.35s ease both;
}
@keyframes boyrazPkFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Daha Fazla Yükle (pk + bk ortak) ─────────────────────────── */
.boyraz-pk-loadmore-wrap {
    text-align: center;
    margin-top: 32px;
}
.boyraz-pk-loadmore {
    display: inline-block;
    padding: 12px 34px;
    border-radius: 4px;
    border: 1px solid var(--e-global-color-accent, #a98a5b);
    background: transparent;
    color: var(--e-global-color-accent, #a98a5b);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.boyraz-pk-loadmore:hover {
    background-color: var(--e-global-color-accent, #a98a5b);
    color: #ffffff;
}

/* ── Slider modu (pk + bk ortak) ──────────────────────────────── */
/* Yapısal kurallar Swiper'ın kendi CSS'i yüklenmese bile düzgün
   çalışacak şekilde burada tanımlıdır. */
.boyraz-pk-wrap,
.boyraz-bk-wrap {
    position: relative;
}
.boyraz-pk-wrap[data-layout="slider"] .swiper,
.boyraz-bk-wrap[data-layout="slider"] .swiper {
    position: relative;
    overflow: hidden;
}
.boyraz-pk-wrap[data-layout="slider"] .swiper-wrapper,
.boyraz-bk-wrap[data-layout="slider"] .swiper-wrapper {
    display: flex;
    box-sizing: content-box;
    width: 100%;
    transition-property: transform;
}
.boyraz-pk-wrap[data-layout="slider"] .swiper-slide,
.boyraz-bk-wrap[data-layout="slider"] .swiper-slide {
    position: relative;
    flex-shrink: 0;
    height: auto;
    display: flex;
}
.boyraz-pk-wrap[data-layout="slider"] .swiper-slide > article,
.boyraz-bk-wrap[data-layout="slider"] .swiper-slide > article {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Swiper "kilit" durumları (tek sayfa sığıyorsa ok/nokta gizlenir) */
.boyraz-cards-nav.swiper-button-lock,
.boyraz-cards-dots.swiper-pagination-lock {
    display: none;
}

/* Swiper yüklenemezse zarif geri düşüş: slider yerine grid göster */
.boyraz-slider-fallback .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(var(--bp-fallback-cols, 3), 1fr);
    gap: 28px;
}
.boyraz-slider-fallback .swiper-slide {
    width: auto !important;
    margin: 0 !important;
}
.boyraz-slider-fallback .boyraz-cards-nav,
.boyraz-slider-fallback .boyraz-cards-dots {
    display: none;
}
@media (max-width: 1024px) {
    .boyraz-slider-fallback .swiper-wrapper { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .boyraz-slider-fallback .swiper-wrapper { grid-template-columns: 1fr; }
}

/* Oklar */
.boyraz-cards-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: rgba(27, 27, 27, 0.85);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
    transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}
.boyraz-cards-nav svg { width: 45%; height: 45%; }
.boyraz-cards-nav:hover { background-color: var(--e-global-color-accent, #a98a5b); }

/* Konumlandırma değişkenleri widget kontrollerinden gelir:
   --bp-arrow-offset (kenara uzaklık), --bp-arrow-size (ok boyutu) */
.boyraz-cards-prev { left: var(--bp-arrow-offset, -8px); }
.boyraz-cards-next { right: var(--bp-arrow-offset, -8px); }

/* Oklar dışarıda: kartların kenarından ok boyutu + mesafe kadar dışarı */
.boyraz-arrows-outside .boyraz-cards-prev {
    left: calc(-1 * var(--bp-arrow-size, 46px) - var(--bp-arrow-offset, 12px));
}
.boyraz-arrows-outside .boyraz-cards-next {
    right: calc(-1 * var(--bp-arrow-size, 46px) - var(--bp-arrow-offset, 12px));
}

.boyraz-cards-nav.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Noktalar */
.boyraz-cards-dots {
    position: static;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.boyraz-cards-dots .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cfc8bb;
    opacity: 1;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.boyraz-cards-dots .swiper-pagination-bullet-active {
    background-color: var(--e-global-color-accent, #a98a5b);
    transform: scale(1.2);
}

/* Boş sonuç mesajı */
.boyraz-pk-empty {
    text-align: center;
    color: #999999;
    font-size: 15px;
    padding: 40px 0;
    margin: 0;
}

/* ── Editör placeholder ───────────────────────────────────────── */
.boyraz-pk-editor-placeholder {
    padding: 24px;
    text-align: center;
    border: 2px dashed #cccccc;
    color: #999999;
    font-size: 13px;
    border-radius: 6px;
}

/* ── Responsive fallback (Elementor dışı kullanım) ────────────── */
@media (max-width: 1024px) {
    .boyraz-pk-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (max-width: 640px) {
    .boyraz-pk-grid { grid-template-columns: 1fr; gap: 18px; }
    .boyraz-pk-title { font-size: 20px; }
}

/* Mobilde slider okları her zaman içeride ve küçük — dışarıda modu dar
   ekranda yatay taşma (sayfa kaydırma çubuğu) yaratacağı için devre dışı */
@media (max-width: 767px) {
    .boyraz-cards-nav { width: 36px; height: 36px; }
    .boyraz-cards-prev,
    .boyraz-arrows-outside .boyraz-cards-prev { left: var(--bp-arrow-offset, 6px); }
    .boyraz-cards-next,
    .boyraz-arrows-outside .boyraz-cards-next { right: var(--bp-arrow-offset, 6px); }
}

/* ══════════════════════════════════════════════════════════════
   KART TASARIMI VARYANTLARI
   Widget'taki "Kart Tasarımı" seçimi wrapper'a
   boyraz-pk-style-{klasik|overlay|zarif} sınıfını ekler.
   Klasik = yukarıdaki varsayılan stiller (ek kural gerekmez).
   ══════════════════════════════════════════════════════════════ */

/* ── OVERLAY: tam görsel, içerik görselin üzerinde ────────────── */
.boyraz-pk-style-overlay .boyraz-pk-card {
    background-color: #141414;
}
.boyraz-pk-style-overlay .boyraz-pk-link {
    position: relative;
    min-height: 460px;
    justify-content: flex-end;
}
.boyraz-pk-style-overlay .boyraz-pk-media {
    position: absolute;
    inset: 0;
    margin: 0 !important;          /* çerçeve boşluğu kontrolünü etkisizleştir */
    border-radius: 0 !important;
    aspect-ratio: auto !important; /* oran kontrolünü etkisizleştir */
    height: 100%;
}
.boyraz-pk-style-overlay .boyraz-pk-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 10, 0) 32%,
        rgba(10, 10, 10, 0.42) 58%,
        rgba(12, 10, 8, 0.94) 100%
    );
    z-index: 1;
    pointer-events: none;
}
.boyraz-pk-style-overlay .boyraz-pk-body {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 26px 26px 28px;
}
.boyraz-pk-style-overlay .boyraz-pk-divider {
    background-color: rgba(255, 255, 255, 0.26);
}
/* Özellik satırları hover'da açılır (dokunmatikte hep açık) */
.boyraz-pk-style-overlay .boyraz-pk-meta {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
}
.boyraz-pk-style-overlay .boyraz-pk-card:hover .boyraz-pk-meta {
    max-height: 240px;
    opacity: 1;
    margin-bottom: 22px;
}
@media (hover: none) {
    .boyraz-pk-style-overlay .boyraz-pk-meta {
        max-height: none;
        opacity: 1;
        margin-bottom: 22px;
    }
}
@media (max-width: 767px) {
    .boyraz-pk-style-overlay .boyraz-pk-link { min-height: 400px; }
}

/* ── ZARİF: açık zemin, ince altın detay ──────────────────────── */
.boyraz-pk-style-zarif .boyraz-pk-card {
    background-color: #ffffff;
    border: 1px solid #ece5d8;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}
.boyraz-pk-style-zarif .boyraz-pk-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--e-global-color-accent, #a98a5b);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
}
.boyraz-pk-style-zarif .boyraz-pk-card:hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.11);
}
.boyraz-pk-style-zarif .boyraz-pk-card:hover::before {
    opacity: 1;
}
.boyraz-pk-style-zarif .boyraz-pk-media {
    margin: 0 !important;   /* görsel kenardan kenara */
    border-radius: 0 !important;
    background-color: #f0ece4;
}
.boyraz-pk-style-zarif .boyraz-pk-noimg { color: #d5cdbd; }
.boyraz-pk-style-zarif .boyraz-pk-title { color: #1d1d1d; }
.boyraz-pk-style-zarif .boyraz-pk-slogan { color: #9b8f7c; }
.boyraz-pk-style-zarif .boyraz-pk-divider { background-color: #efe7d8; }
.boyraz-pk-style-zarif .boyraz-pk-meta-text { color: #555555; }
.boyraz-pk-style-zarif .boyraz-pk-meta-ico { color: var(--e-global-color-accent, #a98a5b); }
