/* ─── Job Feed Cards ─────────────────────────────────────────────────────────── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.feed-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--panel);
    border: 1px solid var(--border);
    /* Yumuşatılmış çok katmanlı difüz gölge — sert kontrast yok */
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    padding: var(--space-6) var(--space-6) var(--space-6) calc(var(--space-6) + 4px);
    display: grid;
    gap: var(--space-4);
    transition: box-shadow var(--transition-normal), transform var(--transition-normal), border-color var(--transition-normal);
}

.feed-card:hover {
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
    transform: translateY(-1px);
    border-color: var(--border-medium);
}

/* Left-side brand-green accent stripe */
.feed-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    /* FIX: #0891b2 hardcode → var(--gradient-brand-v) token */
    background: var(--gradient-brand-v);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    transition: opacity var(--transition-fast);
}

.feed-card:hover::before {
    opacity: 0.85;
}

.feed-card--featured::before {
    /* FIX: hardcode → var(--gradient-featured) token */
    background: var(--gradient-featured);
}

/* Featured glow */
.feed-card--featured {
    border-color: rgba(217, 119, 6, 0.20);
    box-shadow: var(--shadow-card), 0 0 0 2px rgba(217, 119, 6, 0.08);
}

html[data-theme="dark"] .feed-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)), var(--panel);
}

html[data-theme="dark"] .feed-card:hover {
    box-shadow: var(--shadow-raise);
}

html[data-theme="dark"] .feed-card--featured {
    box-shadow: 0 6px 24px rgba(217, 119, 6, 0.12);
}

/* ─── Card Head ──────────────────────────────────────────────────────────────── */
.feed-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}

.company-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 0;
}

.company-avatar {
    width: 46px;
    height: 46px;
    /* FIX: 14px → var(--radius-md) token eşleşiyor */
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    /* FIX: hardcode rgba → var(--gradient-brand-soft) token */
    background: var(--gradient-brand-soft);
    border: 1px solid var(--border);
    color: var(--brand-navy);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
    /* Corporate touch: font feature settings for initials */
    font-feature-settings: "cv02", "cv03";
}

html[data-theme="dark"] .company-avatar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(34, 197, 94, 0.16));
    color: var(--text);
}

/* Logo görseli varyantı — initial yerine <img>. object-fit:cover oranı korur,
   width/height attr CLS önler, font/gradient stillerini sıfırlar. */
img.company-avatar--logo {
    object-fit: cover;
    object-position: center;
    background: var(--panel);
    padding: 0;
    font-size: 0;
}

.company-copy {
    min-width: 0;
}

/* h3 olarak render edilir — başlık varsayılan marginleri sıfırlanır */
.company-name {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    flex-wrap: wrap;
    /* FIX: 16px → var(--font-base) token */
    font-size: var(--font-base);
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--brand-navy);
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.22;
}

html[data-theme="dark"] .company-name {
    color: #eef2ff;
}

.company-subtitle {
    margin-top: 2px;
    color: var(--muted);
    /* FIX: 12px → var(--font-xs) token */
    font-size: var(--font-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    /* Overflow guard for long location strings */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.verified-badge {
    width: 17px;
    height: 17px;
    color: var(--brand-green);
    flex: 0 0 auto;
}

/* ─── Company Badges ─────────────────────────────────────────────────────────── */
.company-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(217, 119, 6, 0.10);
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.18);
    flex-shrink: 0;
    white-space: nowrap;
    align-self: flex-start;
}

html[data-theme="dark"] .company-badge {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.16);
}

.company-badge--verified {
    background: rgba(11, 35, 71, 0.07);
    color: var(--brand-navy);
    border-color: rgba(11, 35, 71, 0.14);
}

html[data-theme="dark"] .company-badge--verified {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.18);
}

/* Öne çıkan — hafif, ışıldayan amber gradyan etiket */
.company-badge--featured {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(217, 119, 6, 0.05));
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.32);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.22);
    font-weight: 700;
}

html[data-theme="dark"] .company-badge--featured {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(217, 119, 6, 0.06));
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.30);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.18);
}

.company-badge--direct {
    background: rgba(26, 183, 105, 0.10);
    color: var(--brand-green-hover);
    border-color: rgba(26, 183, 105, 0.20);
}

html[data-theme="dark"] .company-badge--direct {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.18);
}

.company-badge--subcontractor {
    background: rgba(217, 119, 6, 0.10);
    color: #92400e;
    border-color: rgba(217, 119, 6, 0.18);
}

html[data-theme="dark"] .company-badge--subcontractor {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.18);
}

.company-badge--community {
    background: rgba(124, 58, 237, 0.08);
    color: #5b21b6;
    border-color: rgba(124, 58, 237, 0.16);
}

html[data-theme="dark"] .company-badge--community {
    background: rgba(168, 85, 247, 0.14);
    color: #c4b5fd;
    border-color: rgba(168, 85, 247, 0.18);
}

/* ─── Card Body ──────────────────────────────────────────────────────────────── */
.feed-card__body {
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.72;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* pre-wrap yalnızca ilan metninde — şablon girintileri boşluk olarak render edilmesin */
.feed-card__excerpt {
    white-space: pre-wrap;
}

html[data-theme="dark"] .feed-card__body {
    color: #c7d7ef;
}

/* ─── Meta Pills ─────────────────────────────────────────────────────────────── */
.feed-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-medium);
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="dark"] .meta-pill {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
    color: var(--muted);
}

.meta-pill--salary {
    color: var(--brand-navy);
    background: rgba(11, 35, 71, 0.06);
    border-color: rgba(11, 35, 71, 0.12);
}

html[data-theme="dark"] .meta-pill--salary {
    color: var(--text);
    background: rgba(59, 130, 246, 0.08);
}

.meta-pill--location {
    color: var(--brand-green-hover);
    background: rgba(26, 183, 105, 0.07);
    border-color: rgba(26, 183, 105, 0.18);
}

html[data-theme="dark"] .meta-pill--location {
    color: var(--text);
    background: rgba(34, 197, 94, 0.08);
}

.meta-pill--worktype {
    color: #92400e;
    background: rgba(217, 119, 6, 0.07);
    border-color: rgba(217, 119, 6, 0.16);
}

html[data-theme="dark"] .meta-pill--worktype {
    color: var(--text);
    background: rgba(245, 158, 11, 0.08);
}

.meta-pill--subcontractor { border-color: rgba(217, 119, 6, 0.22); }
.meta-pill--direct        { border-color: rgba(26, 183, 105, 0.22); }
.meta-pill--featured      { border-color: rgba(11, 35, 71, 0.18); }

/* ─── Action Grid ────────────────────────────────────────────────────────────── */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
}

.action-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

/* Üçlü düzen: WhatsApp / Harita / Telefon — kompakt satır */
.action-grid--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-grid--triple .action-btn {
    min-height: 44px;
    padding: var(--space-2) var(--space-2);
    gap: 6px;
    font-size: var(--font-xs);
    /* Glassmorphic doku — gradyan arka planlar yarı saydam, blur ile derinlik kazanır */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.06);
}

.action-grid--triple .action-btn svg {
    width: 15px;
    height: 15px;
}

.action-grid--triple .contact-label {
    white-space: normal;
    line-height: 1.2;
}

/* Üçlü satır buton kişilikleri — canlı gradyan + parlama */
.action-grid--triple .action-btn--wa {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(22, 163, 74, 0.05));
    border-color: rgba(34, 197, 94, 0.32);
    box-shadow: 0 6px 18px -6px rgba(34, 197, 94, 0.30);
}

.action-grid--triple .action-btn--map {
    box-shadow: 0 6px 18px -6px rgba(8, 145, 178, 0.30);
}

/* Neon pin — ikon hafifçe ışıldar */
.action-grid--triple .action-btn--map svg {
    filter: drop-shadow(0 0 4px rgba(8, 145, 178, 0.45));
}

/* Hemen Ara — yüksek dönüşümlü indigo persona */
.action-grid--triple .action-btn--tel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(59, 130, 246, 0.06));
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.30);
    box-shadow: 0 6px 18px -6px rgba(99, 102, 241, 0.32);
}

.action-grid--triple .action-btn--tel:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.20), rgba(59, 130, 246, 0.10));
    border-color: rgba(99, 102, 241, 0.45);
}

html[data-theme="dark"] .action-grid--triple .action-btn--tel {
    color: #a5b4fc;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(59, 130, 246, 0.08));
    border-color: rgba(165, 180, 252, 0.28);
}

/* Dokunma hissi — iOS/Android pres efekti */
.action-grid--triple .action-btn:active {
    transform: scale(0.95);
}

/* ─── Empty Feed ─────────────────────────────────────────────────────────────── */

.feed-empty {
    /* FIX: 56px/24px/32px hardcode → space tokens (40px/24px/32px) */
    padding: var(--space-10) var(--space-6) var(--space-8);
    display: grid;
    place-items: center;
    text-align: center;
    gap: var(--space-3);
    color: var(--muted);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow-card);
}

html[data-theme="dark"] .feed-empty {
    background: var(--panel);
}

.feed-empty__icon {
    width: 56px;
    height: 56px;
    color: var(--brand-green-hover);
    opacity: 0.92;
    background: var(--brand-green-muted);
    border-radius: var(--radius-xl);
    padding: 14px;
    box-sizing: content-box;
    border: 1px solid rgba(26, 183, 105, 0.22);
    box-shadow: 0 6px 18px rgba(26, 183, 105, 0.10);
    animation: feed-empty-float 4s ease-in-out infinite;
}

@keyframes feed-empty-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .feed-empty__icon { animation: none; }
}

html[data-theme="dark"] .feed-empty__icon {
    color: var(--success-bright);
    background: var(--success-soft);
    border-color: var(--success-ring);
    box-shadow: 0 6px 18px var(--success-soft);
}

.feed-empty__title {
    /* FIX: 17px → var(--font-md) = 18px — stronger heading */
    font-size: var(--font-md);
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--brand-navy);
}

html[data-theme="dark"] .feed-empty__title {
    color: var(--text);
}

.feed-empty__text {
    font-size: 14px;
    line-height: 1.65;
    max-width: 38ch;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .feed-card__head {
        flex-direction: column;
        align-items: stretch;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    /* Üçlü düzen mobilde tek satır kalır; ikon üstte, etiket altta */
    .action-grid--triple {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .action-grid--triple .action-btn {
        flex-direction: column;
        gap: 4px;
        padding: var(--space-2) var(--space-1);
        font-size: 11px;
        text-align: center;
    }
}

@media (max-width: 720px) {
    .company-name {
        font-size: 15px;
    }

    .feed-card__body {
        font-size: 13.5px;
        line-height: 1.66;
    }
}

@media (max-width: 420px) {
    .feed-card {
        max-width: 100vw;
        overflow: hidden;
        word-wrap: break-word;
        word-break: break-word;
        padding: var(--space-5) var(--space-4) var(--space-5) calc(var(--space-4) + 4px);
    }

    .meta-pill {
        width: fit-content;
        max-width: 100%;
    }
}

/* ─── Job Specs — yatay, kutusu olmayan zarif metadata satırı ────────────────── */
.job-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-4);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--border);
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.spec-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-xs);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-2);
    background: none;
    border: 0;
    padding: 0;
    min-width: 0;
    overflow: hidden;
}

html[data-theme="dark"] .spec-item {
    color: #94a3b8;
    background: none;
}

/* Mikro-ikon renk kodlaması — alan başına ayrı vurgu */
.spec-item--exp .spec-icon   { color: #d97706; }
.spec-item--edu .spec-icon   { color: var(--brand-green); }
.spec-item--shift .spec-icon { color: #3b82f6; }
.spec-item--count .spec-icon { color: #7c3aed; }

.spec-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    line-height: 1.2;
}

.spec-icon {
    width: 16px;
    height: 16px;
    color: var(--brand-green);
    opacity: 0.85;
    flex: 0 0 auto;
}

/* ─── Transit Info ───────────────────────────────────────────────────────────── */
.job-transit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(59, 130, 246, 0.02));
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-left: 3px solid #3b82f6;
    width: fit-content;
    max-width: 100%;
}

html[data-theme="dark"] .job-transit {
    background: rgba(59, 130, 246, 0.08);
}

.transit-icon {
    width: 16px;
    height: 16px;
    color: #3b82f6;
    margin-top: 2px;
    flex-shrink: 0;
}

.transit-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-2);
}

html[data-theme="dark"] .transit-text {
    color: #94a3b8;
}

/* ─── Social Benefits Chips ──────────────────────────────────────────────────── */
.job-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.benefit-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    background: rgba(26, 183, 105, 0.06);
    border: 1px solid rgba(26, 183, 105, 0.15);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-green-hover);
    transition: all var(--transition-normal);
}

.benefit-chip:hover {
    border-color: var(--brand-green);
    color: var(--brand-green-hover);
    transform: translateY(-1px);
}

.benefit-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--brand-green);
    opacity: 0.6;
}

.benefit-chip:hover .benefit-chip__dot {
    opacity: 1;
    transform: scale(1.2);
}

html[data-theme="dark"] .benefit-chip {
    background: var(--surface-tint);
    border-color: var(--border);
    color: var(--success-bright);
}

/* ─── Meta Pill Deadline ─────────────────────────────────────────────────────── */
.meta-pill--deadline {
    color: #b45309;
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.18);
}

html[data-theme="dark"] .meta-pill--deadline {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.08);
}

/* Accordion-style expanded focus state — applied to the card that matches ?id=. */
.feed-card--expanded-focus {
    border: 2px solid var(--jg-accent, #1ab769);
    box-shadow: 0 0 0 4px rgba(26, 183, 105, 0.12), 0 18px 48px rgba(26, 183, 105, 0.18);
    scroll-margin-top: 96px;
}

html[data-theme="dark"] .feed-card--expanded-focus {
    box-shadow: 0 0 0 4px rgba(26, 183, 105, 0.18), 0 18px 60px rgba(0, 0, 0, 0.55);
}

.feed-card--expanded-focus::before {
    background: linear-gradient(180deg, rgba(26, 183, 105, 0.18), rgba(26, 183, 105, 0));
    opacity: 1 !important;
}

.feed-card__excerpt--full {
    white-space: normal;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    word-break: break-word;
    line-height: 1.6;
}

.feed-card__close-row {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--jg-line, rgba(255, 255, 255, 0.12));
    display: flex;
    justify-content: flex-end;
}

.feed-card__close-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--jg-muted, #8b9099);
    background: transparent;
    border: 1px solid var(--jg-line, rgba(255, 255, 255, 0.12));
    border-radius: 999px;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.feed-card__close-link:hover,
.feed-card__close-link:focus-visible {
    color: var(--jg-ink, #ffffff);
    border-color: var(--jg-accent, #1ab769);
    background: rgba(26, 183, 105, 0.08);
    outline: none;
}

/* Sabit köşede yüzen kapatma butonu — uzun ilanlarda alt linke kadar
   scrollanmadan tek dokunuşla kapanır. Tasarımı kurumsal: yeşil aksan
   + yumuşak gölge + erişilebilir minimum 44×44 hit-area. */
.feed-card__close-fab {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    color: var(--jg-ink, #1f2937);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--jg-line, rgba(0, 0, 0, 0.1));
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease,
        transform 120ms ease, box-shadow 160ms ease;
}

html[data-theme="dark"] .feed-card__close-fab {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.feed-card__close-fab:hover,
.feed-card__close-fab:focus-visible {
    color: #ffffff;
    background: var(--jg-accent, #1ab769);
    border-color: var(--jg-accent, #1ab769);
    outline: none;
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(26, 183, 105, 0.45);
}

.feed-card__close-fab:active {
    transform: scale(0.96);
}

/* Mobilde daha büyük dokunma alanı */
@media (max-width: 640px) {
    .feed-card__close-fab {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
}

/* Permalink wrapper anchor — preserve card visuals, suppress default link styling. */
.feed-card__permalink-wrapper,
.feed-card__permalink-wrapper:link,
.feed-card__permalink-wrapper:visited,
.feed-card__permalink-wrapper:hover,
.feed-card__permalink-wrapper:focus,
.feed-card__permalink-wrapper:active {
    color: inherit;
    text-decoration: none;
    display: block;
}

.feed-card__permalink-wrapper:focus-visible {
    outline: 2px solid var(--jg-accent, #1ab769);
    outline-offset: 3px;
    border-radius: 14px;
}
