/* ═══════════════════════════════════════════════════
   Hizmet Kartı Widget — style.css
   ═══════════════════════════════════════════════════ */

/* ─── Grid ─────────────────────────────────────────── */
.hk-grid {
    display: grid;
    gap: 20px;
}
.hk-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.hk-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.hk-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .hk-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
    .hk-grid--cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .hk-grid--cols-4,
    .hk-grid--cols-3,
    .hk-grid--cols-2 { grid-template-columns: 1fr; }
}

/* ─── Kart ──────────────────────────────────────────── */
.hk-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e8eef5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.hk-card:hover {
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
    transform: translateY(-3px);
}

/* ─── Metin Bölümü (Üst) ────────────────────────────── */
.hk-card__body {
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 240px;
}

/* İkon */
.hk-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: #eff6ff;
    margin-bottom: 18px;
    flex-shrink: 0;
}
.hk-card__icon i {
    font-size: 28px;
    color: #2563eb;
    line-height: 1;
}
.hk-card__icon svg {
    width: 28px;
    height: 28px;
    color: #2563eb;
    fill: #2563eb;
}

/* Başlık */
.hk-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin: 0 0 10px;
}

/* Açıklama */
.hk-card__desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.65;
    margin: 0 0 auto;
    flex: 1;
}

/* ─── Ok ────────────────────────────────────────────── */
.hk-card__arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: #2563eb;
    text-decoration: none;
    width: fit-content;
    transition: color 0.2s;
}
.hk-card:hover .hk-card__arrow {
    color: #1d4ed8;
}
.hk-card__arrow svg {
    display: block;
    flex-shrink: 0;
    transition: transform 0.28s ease;
}
.hk-card:hover .hk-card__arrow svg {
    transform: translateX(4px);
}

/* Ok yanı metin — max-width ile fiziksel olarak gizlenir */
.hk-card__arrow-text {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-8px);
    transition: max-width 0.28s ease, opacity 0.28s ease, transform 0.28s ease;
}
.hk-card:hover .hk-card__arrow-text {
    max-width: 200px;
    opacity: 1;
    transform: translateX(0);
}

/* ─── Görsel Bölümü (Alt) ───────────────────────────── */
.hk-card__image-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}
.hk-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.hk-card:hover .hk-card__image-wrap img {
    transform: scale(1.04);
}
.hk-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
}

/*
 * Katman sırası (alttan üste):
 *   z-index 1 → .hk-card__image-dim      : sabit karanlık dim
 *   z-index 2 → .hk-card__hover-overlay  : hover renk kaplamasi
 *   z-index 3 → .hk-card__image-overlay  : yalnızca metin (transparan arkaplan)
 *
 * Böylece hover-overlay hiçbir zaman Elementor'un ürettiği CSS ile
 * çakışmaz; metin her zaman en üstte görünür kalır.
 */

/* z-index 1 — sabit karanlık dim */
.hk-card__image-dim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

/* z-index 2 — hover renk kaplamasi */
.hk-card__hover-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #005af5;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.hk-card:hover .hk-card__hover-overlay {
    opacity: 0.75;
}

/* z-index 3 — sadece metin, arkaplan yok */
.hk-card__image-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px 16px;
    gap: 0;
    pointer-events: none;
}

/* Görsel etiket */
.hk-card__image-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    margin: 0 0 4px;
}

/* Görsel başlık */
.hk-card__image-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0;
}

/* Alt yazı */
.hk-card__image-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
    margin: 3px 0 0;
}

/* ─── Aktif (vurgulanan) kart ───────────────────────── */
.hk-card.is-active .hk-card__image-dim {
    background: #2563eb;
}
