/**
 * Herkese Açık Profil Sayfası (public) — Modern Tasarım v3
 * /profile/:slug  sayfası için
 */

:root {
    --pub-primary: var(--system_primery_color, #7c3aed);
    --pub-dark:    #0f172a;
    --pub-text:    #475569;
    --pub-border:  #f1f5f9;
    --pub-bg:      #f8fafc;
    --pub-shadow:  0 4px 24px rgba(0,0,0,0.07);
    --pub-radius:  20px;
}

/* ════════════════════════════
   HERO / COVER
════════════════════════════ */
.pub_profile_hero {
    position: relative;
    margin-bottom: 0;
}

.pub_profile_cover {
    height: 220px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.pub_profile_cover--gradient {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.pub_profile_cover--gradient::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 280px; height: 280px;
    background: rgba(124,58,237,0.13);
    border-radius: 50%;
}

.pub_profile_cover--gradient::before {
    content: '';
    position: absolute;
    bottom: -50px; left: -40px;
    width: 160px; height: 160px;
    background: rgba(79,209,197,0.07);
    border-radius: 50%;
}

/* Hero body — sits on the cover bottom edge */
.pub_profile_hero_body {
    position: relative;
    z-index: 2;
    margin-top: -60px;
    padding-bottom: 0;
}

/* ── Avatar ── */
.pub_avatar_wrap {
    position: relative;
    flex-shrink: 0;
}

.pub_avatar_img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    display: block;
    background: #e2e8f0;
}

.pub_online_dot {
    position: absolute;
    bottom: 8px; right: 8px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #22c55e;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.25);
}

.pub_online_dot--offline {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239,68,68,0.2);
}

/* ── İsim / sub ── */
.pub_hero_info {
    padding-bottom: 8px;
}

.pub_hero_name {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.pub_hero_sub {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    margin: 0 0 10px;
}

/* Badges row */
.pub_badges_row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.pub_badge_img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
    transition: transform 0.18s;
}

.pub_badge_img:hover {
    transform: scale(1.15);
}

/* ── Follow buton ── */
.pub_hero_actions {
    padding-bottom: 8px;
    text-align: center;
}

.pub_follow_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: var(--pub-primary);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(124,58,237,0.35);
    white-space: nowrap;
}

.pub_follow_btn:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(109,40,217,0.4);
}

.pub_follow_meta {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    margin: 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pub_follow_meta .sep {
    opacity: 0.4;
}

/* ════════════════════════════
   İSTATİSTİK ÇUBUĞU
════════════════════════════ */
.pub_stats_bar {
    background: #fff;
    border-bottom: 1px solid var(--pub-border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.pub_stats_inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
}

.pub_stat_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    border-right: 1px solid var(--pub-border);
    flex-shrink: 0;
    min-width: 90px;
}

.pub_stat_val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pub-dark);
    line-height: 1.2;
}

.pub_stat_lbl {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--pub-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* Sosyal strip — en sağda */
.pub_social_strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 0 24px;
}

.pub_soc {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    color: #fff !important;
    text-decoration: none !important;
    transition: transform 0.18s, opacity 0.18s;
}

.pub_soc:hover { transform: translateY(-2px); opacity: 0.85; }
.pub_soc_fb { background: #1877f2; }
.pub_soc_tw { background: #1da1f2; }
.pub_soc_li { background: #0077b5; }
.pub_soc_ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.pub_soc_yt { background: #ff0000; }

/* ════════════════════════════
   PROFIL BODY
════════════════════════════ */
.pub_profile_body {
    background: var(--pub-bg);
    min-height: 60vh;
    padding: 32px 0 60px;
}

/* ── Tab Nav ── */
.pub_tab_nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.pub_tab_btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: #fff;
    border: 1.5px solid var(--pub-border);
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--pub-text);
    cursor: pointer;
    transition: all 0.18s;
    outline: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.pub_tab_btn i {
    color: var(--pub-primary);
    font-size: 0.82rem;
}

.pub_tab_btn:hover {
    border-color: var(--pub-primary);
    color: var(--pub-primary);
    background: rgba(124,58,237,0.05);
}

.pub_tab_btn.active {
    background: var(--pub-primary);
    border-color: var(--pub-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(124,58,237,0.28);
}

.pub_tab_btn.active i { color: #fff; }

/* Tab pane */
.pub_tab_pane { animation: fadeInUp 0.22s ease; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════
   ABOUT KART
════════════════════════════ */
.pub_about_card {
    background: #fff;
    border-radius: var(--pub-radius);
    padding: 28px 32px;
    box-shadow: var(--pub-shadow);
    border: 1px solid var(--pub-border);
}

.pub_card_title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pub-dark);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pub_card_title i { color: var(--pub-primary); }

.pub_about_text {
    color: var(--pub-text);
    font-size: 0.93rem;
    line-height: 1.8;
}

.pub_about_text p { margin-bottom: 10px; }

/* Skills */
.pub_skill_list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pub_skill_tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(124,58,237,0.08);
    color: var(--pub-primary);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(124,58,237,0.15);
}

/* Offline notice */
.pub_offline_notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: var(--pub-dark);
}

.pub_offline_notice i {
    color: #ef4444;
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.pub_offline_notice p { margin: 4px 0 0; font-size: 0.9rem; color: var(--pub-text); }

/* ════════════════════════════
   KURS KARTLARI
════════════════════════════ */
.pub_course_card {
    background: #fff;
    border-radius: var(--pub-radius);
    overflow: hidden;
    box-shadow: var(--pub-shadow);
    border: 1px solid var(--pub-border);
    transition: transform 0.22s, box-shadow 0.22s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pub_course_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}

.pub_course_thumb {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #e2e8f0;
    text-decoration: none !important;
}

.pub_course_thumb_img {
    width: 100%; height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    transition: transform 0.35s;
}

.pub_course_card:hover .pub_course_thumb_img {
    transform: scale(1.04);
}

.pub_course_body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pub_course_title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pub-dark);
    margin-bottom: 10px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub_course_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--pub-border);
    margin-bottom: 12px;
}

.pub_course_meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--pub-text);
    font-weight: 500;
}

.pub_course_rating i { color: #f59e0b; }

.pub_cart_btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(124,58,237,0.08);
    color: var(--pub-primary) !important;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.18s;
    margin-top: auto;
}

.pub_cart_btn:hover {
    background: var(--pub-primary);
    color: #fff !important;
}

/* ════════════════════════════
   EĞİTMEN KARTLARI
════════════════════════════ */
.pub_instructor_card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: var(--pub-radius);
    padding: 24px 16px;
    box-shadow: var(--pub-shadow);
    border: 1px solid var(--pub-border);
    text-decoration: none !important;
    transition: transform 0.22s, box-shadow 0.22s;
}

.pub_instructor_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(124,58,237,0.12);
}

.pub_instructor_img {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--pub-border);
    margin-bottom: 12px;
}

.pub_instructor_name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pub-dark);
    margin-bottom: 4px;
}

.pub_instructor_role {
    font-size: 0.8rem;
    color: var(--pub-text);
}

/* ════════════════════════════
   TİMELINE (Eğitim / Deneyim)
════════════════════════════ */
.pub_timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 28px;
}

.pub_timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 8px; bottom: 8px;
    width: 2px;
    background: var(--pub-border);
    border-radius: 2px;
}

.pub_timeline_item {
    position: relative;
    padding: 20px 0 20px 24px;
    border-bottom: 1px solid var(--pub-border);
}

.pub_timeline_item:last-child { border-bottom: none; }

.pub_timeline_dot {
    position: absolute;
    left: -20px; top: 26px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--pub-primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--pub-primary);
}

.pub_timeline_body h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pub-dark);
    margin-bottom: 4px;
}

.pub_timeline_body p {
    font-size: 0.9rem;
    color: var(--pub-text);
    margin-bottom: 4px;
}

.pub_timeline_body small {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* ════════════════════════════
   RESPONSIVE
════════════════════════════ */
@media (max-width: 768px) {
    .pub_profile_cover { height: 150px; }
    .pub_profile_hero_body { margin-top: -50px; }
    .pub_avatar_img { width: 88px; height: 88px; }
    .pub_hero_name { font-size: 1.35rem; }
    .pub_stat_item { padding: 12px 16px; min-width: 70px; }
    .pub_stat_val { font-size: 1.1rem; }
    .pub_social_strip { padding: 12px 16px; margin-left: 0; }
    .pub_about_card { padding: 20px; }
    .pub_tab_btn { padding: 9px 14px; font-size: 0.82rem; }
    .pub_profile_hero_body .d-flex { flex-direction: column; align-items: flex-start !important; }
    .pub_hero_actions { width: 100%; text-align: left; }
}

@media (max-width: 480px) {
    .pub_stats_inner { justify-content: flex-start; }
    .pub_stat_item { min-width: 80px; }
    .pub_social_strip { width: 100%; border-top: 1px solid var(--pub-border); }
}
