/* ==========================================================================
   UstaBulduk — Herkese açık usta profili (/ustalar/{slug}) stilleri (v40.24)
   Önceden views/usta/profile.php içinde 3 ayrı <style> bloğu olarak her ziyarette gönderiliyordu.
   ========================================================================== */

@keyframes glbSpin{to{transform:rotate(360deg)}}
.glb-main{display:flex;align-items:center;gap:10px;width:96vw;max-height:70vh}
.glb-btn{background:rgba(255,255,255,.18);border:none;color:#fff;font-size:1.5rem;width:40px;height:40px;border-radius:50%;cursor:pointer;flex-shrink:0;backdrop-filter:blur(4px)}
.glb-img{max-width:100%;max-height:70vh;width:auto;object-fit:contain;border-radius:8px;box-shadow:0 8px 40px rgba(0,0,0,.5);transition:opacity .2s;display:block}
@media(max-width:600px){
    .glb-main{gap:6px;width:100vw;max-height:60vh;padding:0 4px}
    .glb-btn{width:36px;height:36px;font-size:1.25rem;flex-shrink:0}
    .glb-img{max-height:60vh;border-radius:4px}
}

/* ===== USTA PROFILE CARD ===== */
.usta-profile-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    overflow: visible;
}

/* ===== HEADER ===== */
.usta-profile-header {
    padding: 28px 32px 24px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}
.usta-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-lg);
    border: 4px solid var(--white);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    margin-top: -44px;
    flex-shrink: 0;
}

/* ===== ONAYLI USTA — avatarın üstünde belirgin rozet (v40.82) ===== */
.usta-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    display: block;
    /* Negatif boşluk artık sarmalayıcıda: böylece sarmalayıcının üst kenarı
       avatarın görünen üst kenarıyla aynı olur ve rozet tam avatarın üstüne oturur */
    margin-top: -44px;
}
.usta-avatar-wrap .usta-profile-avatar { margin-top: 0; display: block; }

/* Avatarın hemen üstünde, kapak görselinin üzerinde duran rozet */
.usta-avatar-verified {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1;
    border: 2px solid rgba(255,255,255,.92);
    box-shadow: 0 4px 14px rgba(5,150,105,.45);
    cursor: default;
}
.usta-avatar-verified i { font-size: .85rem }

/* Avatarın sağ alt köşesindeki onay tiki */
.usta-avatar-seal {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669, #10b981);
    border: 3px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .75rem;
    box-shadow: 0 2px 8px rgba(5,150,105,.4);
}
/* Onaylı ustalarda avatar çerçevesi yeşil vurgu alır */
.usta-avatar-wrap.is-verified .usta-profile-avatar {
    box-shadow: var(--shadow-lg), 0 0 0 2px #10b981;
}
.usta-profile-info { flex: 1; min-width: 0; }
.usta-profile-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2px;
    width: 100%;
    min-width: 0;
}
.usta-profile-name {
    /* Tek satıra sığması için viewport'a göre dinamik font + taşma koruması */
    font-size: clamp(1rem, 2.4vw, 1.5rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}
.usta-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ecfdf5;
    color: #059669;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.usta-emergency-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dc2626;
    color: white !important;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    animation: emergencyBlink 1s ease-in-out infinite;
    text-decoration: none;
}
@keyframes emergencyBlink {
    0%, 100% { opacity:1; background:#dc2626; }
    50% { opacity:.85; background:#b91c1c; }
}
.usta-profile-title {
    color: var(--gray-500);
    font-size: .9375rem;
    margin: 0;
}
.usta-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    font-size: .8125rem;
    color: var(--gray-500);
}
.usta-profile-meta i { color: var(--primary-light); margin-right: 2px; }
.usta-profile-meta em { font-style: normal; }
.usta-profile-rating { display: inline-flex; align-items: center; gap: 4px; }
.usta-profile-cta { flex-shrink: 0; }

/* ===== ACTIONS BAR ===== */
.usta-profile-actions {
    padding: 12px 32px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    align-items: center;
}
.usta-share-wrap { position: relative; }
.usta-share-dropdown {
    display: none; position: absolute; left: 0; top: 100%; margin-top: 6px;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 170px; z-index: 20; overflow: hidden;
}
.usta-share-dropdown.show { display: block; }
.usta-share-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; font-size: .8125rem; color: var(--dark) !important;
    text-decoration: none !important; transition: background .15s;
}
.usta-share-dropdown a:hover { background: var(--gray-50); }
.usta-share-dropdown a i { font-size: 1rem; width: 20px; text-align: center; }

/* ===== VERIFIED INFO ===== */
.usta-verified-info {
    padding: 14px 32px;
    border-bottom: 1px solid var(--gray-200);
    background: #f8fafc;
}
.usta-verified-info-title {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.usta-verified-info-title i { color: #10b981; }
.usta-verified-info-items { display: flex; flex-wrap: wrap; gap: 8px; }
.usta-verified-info-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    background: white;
    border: 1px solid #d1fae5;
    color: #065f46;
    font-size: .8125rem;
    font-weight: 500;
}
.usta-verified-info-item i { color: #10b981; font-size: .75rem; }
.usta-verified-info-item em { font-style: normal; }
.vi-short { display: none; }

/* ===== TABS ===== */
.usta-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-100);
    padding: 0;
    margin: 0;
    position: relative;
    background: var(--white);
}
.usta-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-400);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
}
.usta-tab:hover { color: var(--primary); background: var(--gray-50); }
.usta-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.usta-tab i { font-size: .8rem; }

/* ===== TAB CONTENT ===== */
.profile-tab-content { padding: 28px 32px; }

/* ===== SHARE DROPDOWN ===== */
.share-dropdown.show { display: block !important; }

/* ===== CONTACT BUTTONS ===== */
.usta-profile-phone-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 16px; border-radius: 10px;
    border: 1.5px solid var(--gray-200); background: var(--white);
    color: var(--gray-600); font-size: .875rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
}
.usta-profile-phone-btn:hover { border-color: #10b981; color: #059669; background: #f0fdf4; }
.usta-profile-phone-revealed, a.usta-profile-phone-revealed {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 16px; border-radius: 10px;
    background: #059669; color: white !important; font-size: .9375rem;
    font-weight: 700; text-decoration: none !important; letter-spacing: .3px;
    transition: background .15s;
}
.usta-profile-phone-revealed:hover, a.usta-profile-phone-revealed:hover { background: #047857; color: white !important; }
.usta-profile-wa-btn, a.usta-profile-wa-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 16px; border-radius: 10px;
    background: #25d366; color: white !important; font-size: .875rem;
    font-weight: 600; text-decoration: none !important; transition: all .15s; flex: 1;
}
.usta-profile-wa-btn:hover, a.usta-profile-wa-btn:hover { background: #1ebe57; color: white !important; }

/* ===== FEED POST ===== */
.feed-post-card { transition: box-shadow .2s; }
.feed-post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

/* ===== MOBILE: max-width 768px ===== */
@media (max-width: 768px) {
    /* Header */
    .usta-profile-header {
        padding: 16px 16px 16px;
        gap: 10px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        flex-wrap: nowrap;
    }
    .usta-profile-avatar {
        width: 84px;
        height: 84px;
        margin-top: -42px;
        border-width: 3px;
        flex-shrink: 0;
    }
    .usta-profile-info { min-width: 0; width: 100%; }
    .usta-profile-name-row { justify-content: center; }
    /* .usta-profile-name font-size clamp() ile otomatik ayarlanıyor */
    .usta-verified-badge { font-size: .65rem; padding: 3px 8px; }
    .usta-avatar-wrap { margin-top: -42px; }
    .usta-avatar-wrap .usta-profile-avatar { margin-top: 0; }
    .usta-avatar-verified { font-size: .65rem; padding: 5px 11px; bottom: calc(100% + 6px); letter-spacing: .03em }
    .usta-avatar-verified i { font-size: .78rem }
    .usta-avatar-seal { width: 26px; height: 26px; font-size: .65rem; border-width: 2.5px }
    .usta-profile-title { font-size: .8125rem; text-align: center; }
    .usta-profile-meta { gap: 4px 10px; font-size: .75rem; margin-top: 6px; justify-content: center; }
    .usta-profile-meta span { display: inline-flex; align-items: center; gap: 3px; }
    .usta-profile-rating { display: flex; align-items: center; justify-content: center; }
    .usta-profile-rating .stars { font-size: .7rem; }
    .usta-profile-cta { width: 100%; }
    .usta-profile-cta .btn { width: 100%; justify-content: center; }
    .usta-profile-cta > div { width: 100%; }

    /* Actions bar */
    .usta-profile-actions { padding: 10px 16px; justify-content: center; }
    .usta-profile-actions .action-label { display: none; }
    .vi-full { display: none !important; }
    .vi-short { display: inline !important; }
    .usta-verified-info { padding: 12px 16px; }
    .usta-verified-info-item { font-size: .75rem; padding: 5px 10px; }

    /* Tabs */
    .usta-tabs { padding: 0; }
    .usta-tab {
        padding: 12px 6px;
        font-size: .75rem;
        gap: 4px;
    }
    .usta-tab i { font-size: .7rem; }
    .usta-tab span { display: inline; }

    /* Tab content */
    .profile-tab-content { padding: 16px !important; }

    /* Feed image grids */
    .feed-post-card [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ===== VERY SMALL: max-width 400px ===== */
@media (max-width: 400px) {
    /* .usta-profile-name font-size clamp() ile otomatik ayarlanıyor */
    .usta-profile-name-row { gap: 6px; }
    .usta-avatar-verified { font-size: .6rem; padding: 4px 9px; gap: 4px }
    .usta-tab span { display: none; }
    .usta-tab { padding: 12px 8px; }
    .usta-tab i { font-size: .9rem; }
}

.rpt-card:has(input:checked){border-color:#dc2626!important;background:#fef2f2}
.rpt-card:has(input:checked) i,.rpt-card:has(input:checked) span{color:#dc2626!important}
.rpt-card:hover{border-color:var(--gray-300);background:var(--gray-50)}

/* Onaylı belge rozetleri (v40.53) */
.usta-verified-info-item--doc { background: #ecfdf5; border-color: #a7f3d0; color: #047857; font-weight: 600; }
.usta-verified-info-item--doc i { color: #059669; }
.usta-verified-info-note { margin-top: 10px; font-size: .75rem; color: var(--gray-400); line-height: 1.5; }
.usta-verified-info-note i { color: #10b981; margin-right: 3px; }

/* ===== v50: kartlarla aynı rozet ve bilgi dili ===== */
.usta-avatar-wrap .usta-new-tag--profile { top: auto; right: auto; bottom: -8px; left: -12px; font-size: .68rem; padding: 5px 9px; border-width: 2.5px; } /* sol alt: sağ alttaki onay tikiyle çakışmaz */
.usta-profile-score { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.usta-profile-score em { font-style: normal; color: var(--gray-500); font-size: .8rem; }
.usta-profile-score:hover em { color: var(--primary); text-decoration: underline; }
.usta-profile-meta .usta-score, .usta-profile-score .usta-score {
    display: inline-flex; align-items: center; gap: 4px; background: #fffbeb; color: #b45309; border: 1px solid #fde68a;
    padding: 2px 9px; border-radius: 8px; font-size: .8125rem; font-weight: 800;
}
.usta-profile-score .usta-score i { font-size: .7rem; color: #f59e0b; }
.usta-profile-meta .usta-score-none { font-size: .8rem; color: var(--gray-400); }
.usta-profile-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: .8rem; color: var(--gray-500); }
.usta-profile-facts span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.usta-profile-facts i { color: var(--gray-400); font-size: .74rem; }
.usta-profile-facts .fa-check-double { color: #10b981; }
.usta-profile-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.usta-profile-signals .ub-signal {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px;
    font-size: .74rem; font-weight: 700; white-space: nowrap; cursor: help; border: 1px solid transparent;
}
.usta-profile-signals .ub-signal i { font-size: .7rem; }
.usta-profile-signals .ub-signal--acil { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.usta-profile-signals .ub-signal--ai { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.usta-profile-signals .ub-signal--garanti { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.usta-profile-signals .ub-signal--hizli { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.usta-profile-signals .ub-signal--kesif { background: #f0fdf4; color: #15803d; border-color: #86efac; }
.usta-tab-count { font-style: normal; font-size: .7rem; font-weight: 700; background: var(--gray-100); color: var(--gray-500); padding: 1px 7px; border-radius: 99px; margin-left: 4px; }
.usta-tab.active .usta-tab-count { background: var(--primary-50, #eff6ff); color: var(--primary); }
@media (max-width: 768px) {
    .usta-profile-facts, .usta-profile-signals { justify-content: center; }
    .usta-profile-facts { font-size: .74rem; gap: 2px 12px; }
    .usta-avatar-wrap .usta-new-tag--profile { bottom: -6px; left: -10px; font-size: .6rem; padding: 4px 7px; }
}

/* ═══════════ v50.3: yol gösterici, ilk değerlendirme daveti, çalışma örnekleri, hizmet bölgesi kısaltma ═══════════ */
/* .usta-crumbs (yol gösterici) kuralları style.css'e taşındı — tüm usta sayfalarında ortak */

.usta-profile-meta .usta-score-first { text-decoration: none; }
.usta-profile-meta .usta-score-first b { color: var(--primary); font-weight: 600; }
.usta-profile-meta .usta-score-first:hover b { text-decoration: underline; }

.usta-first-review { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 8px; padding: 18px 20px; border-radius: 14px;
    background: linear-gradient(135deg, #fffbeb, #fff7ed); border: 1px solid #fde68a; }
.usta-first-review-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: #f59e0b; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; box-shadow: 0 2px 8px rgba(245,158,11,.3); }
.usta-first-review-body strong { display: block; font-size: 1rem; color: var(--dark); margin-bottom: 4px; }
.usta-first-review-body p { margin: 0 0 12px; font-size: .875rem; color: var(--gray-600); line-height: 1.6; }

.usta-worksamples { margin-bottom: 24px; }
.usta-worksamples-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.usta-worksamples-head h3 { font-size: 1.125rem; margin: 0; }
.usta-worksamples-head a { font-size: .8125rem; font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap; }
.usta-worksamples-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.usta-worksample { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--gray-100); }
.usta-worksample img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.usta-worksample:hover img { transform: scale(1.06); }
.usta-worksample-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,.55); color: #fff; font-weight: 700; font-size: 1.05rem; }
.usta-worksample-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: .68rem; font-weight: 600; color: #fff; text-align: left; line-height: 1.25;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.usta-area-sum { font-size: .78rem; font-weight: 500; color: var(--gray-400); margin-left: 6px; }
.usta-area-list.is-collapsed .usta-area-chip.is-extra,
.usta-area-groups.is-collapsed .usta-area-group.is-extra { display: none !important; }
.usta-area-more { font-size: .8125rem; font-weight: 600; color: var(--primary); background: #eff6ff; border: 1px dashed #93c5fd; border-radius: 9999px; padding: 3px 12px; cursor: pointer; font-family: inherit; }
.usta-area-more:hover { background: #dbeafe; }
.usta-area-more--groups { align-self: flex-start; padding: 6px 14px; }

@media (max-width: 768px) {
    .usta-worksamples-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .usta-first-review { padding: 14px; gap: 10px; }
    .usta-first-review-icon { width: 34px; height: 34px; font-size: .9rem; }
}

/* Profil başlığı: değerlendirme fotoğrafın altında (v50.4) */
.usta-profile-side { display: flex; flex-direction: column; align-items: center; gap: 14px; flex-shrink: 0; align-self: flex-start; }
.usta-profile-side-rating { display: flex; justify-content: center; text-align: center; min-width: 100px; }
.usta-profile-side-rating .usta-profile-score { flex-direction: column; gap: 3px; }
.usta-profile-side-rating .usta-score {
    display: inline-flex; align-items: center; gap: 4px; background: #fffbeb; color: #b45309; border: 1px solid #fde68a;
    padding: 3px 10px; border-radius: 8px; font-size: .9rem; font-weight: 800;
}
.usta-profile-side-rating .usta-score i { font-size: .74rem; color: #f59e0b; }
.usta-profile-side-rating .usta-profile-score em { font-size: .74rem; }
.usta-profile-side-rating .usta-score-none { font-size: .72rem; color: var(--gray-400); line-height: 1.35; text-decoration: none; max-width: 120px; }
.usta-profile-side-rating .usta-score-first b { display: block; color: var(--primary); font-weight: 600; }
.usta-profile-side-rating .usta-score-first:hover b { text-decoration: underline; }
@media (max-width: 768px) {
    .usta-profile-side { align-self: center; gap: 12px; }
    .usta-profile-side-rating .usta-profile-score { flex-direction: row; gap: 6px; }
    .usta-profile-side-rating .usta-score-none { max-width: none; }
    .usta-profile-side-rating .usta-score-first b { display: inline; margin-left: 4px; }
}

/* v50.11 — seviye programı rozeti */
.usta-profile-signals .ub-signal--lv1 { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.usta-profile-signals .ub-signal--lv2 { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.usta-profile-signals .ub-signal--lv3 { background: linear-gradient(135deg,#fffbeb,#fef3c7); color: #b45309; border-color: #fcd34d; }
