/* =============================================
   public.css — หน้าสาธารณะ (ไม่ต้อง login)
   ============================================= */

/* ── Body ── */
.pub-body {
    background: #f8fafc;
    font-family: 'Sarabun', sans-serif;
}

/* ── Navbar ── */
.pub-navbar {
    background: linear-gradient(135deg, #1e3a8a, #2563eb) !important;
    backdrop-filter: blur(8px);
}

/* ── Hero ── */
.pub-hero {
    background: linear-gradient(145deg, #1e3a8a 0%, #2563eb 60%, #0ea5e9 100%);
    padding: 3.5rem 0 3rem;
    text-align: center;
}
.pub-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 600;
    color: #fff;
    margin-bottom: .4rem;
}
.pub-hero-sub {
    color: rgba(255,255,255,.7);
    font-size: .95rem;
    margin-bottom: 1.8rem;
}
.pub-search-box {
    max-width: 620px;
    border-radius: .75rem;
    overflow: hidden;
}
.pub-search-box .form-control {
    font-size: 1rem;
    border: none;
    border-radius: 0;
    box-shadow: none !important;
}
.pub-search-box .input-group-text {
    border: none;
    border-radius: 0;
}
.pub-search-box .btn {
    border-radius: 0;
    font-size: .95rem;
}

/* ── Filter ── */
.pub-filter-select {
    max-width: 220px;
    border-radius: .5rem;
    font-size: .85rem;
    border-color: #e2e8f0;
}

/* ── Staff Card ── */
@keyframes pubCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pub-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    border: 1px solid #f1f5f9;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: pubCardIn .3s ease both;
    height: 100%;
}
.pub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(37,99,235,.12);
    border-color: #bfdbfe;
}

.pub-card-photo {
    padding: 1.25rem 1rem .75rem;
    text-align: center;
}
.pub-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.pub-avatar-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    border: 3px solid #bfdbfe;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #93c5fd;
    margin: 0 auto;
}

.pub-card-body {
    padding: 0 1rem .75rem;
    flex: 1;
}
.pub-card-name {
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: .15rem;
    line-height: 1.35;
}
.pub-card-name-en {
    font-size: .75rem;
    color: #94a3b8;
    margin-bottom: .4rem;
}
.pub-card-meta {
    font-size: .78rem;
    color: #64748b;
    margin-bottom: .2rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: .35rem;
}
.pub-card-meta i { flex-shrink: 0; margin-top: .15rem; }
.pub-card-edu {
    color: #7c3aed;
    font-style: italic;
}
.pub-card-exp {
    color: #d97706;
    font-size: .75rem;
}

/* Profile expertise tags */
.prof-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.prof-exp-tag {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 999px;
    padding: .22rem .75rem;
    font-size: .78rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}
.prof-exp-desc {
    color: #b45309;
    font-weight: 400;
}
.pub-email-link {
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
}
.pub-email-link:hover { text-decoration: underline; }

.pub-card-footer {
    padding: .6rem 1rem;
    border-top: 1px solid #f1f5f9;
    background: #fafcff;
    text-align: right;
}

/* ── Badges ── */
.pub-badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.pub-badge {
    font-size: .68rem;
    font-weight: 500;
    padding: .18rem .55rem;
    border-radius: 999px;
    border: 1px solid;
    line-height: 1.4;
}
.pub-badge-type {
    background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe;
}
.pub-badge-line {
    background: #f0fdf4; color: #15803d; border-color: #bbf7d0;
}

/* ── Profile Modal ── */
.prof-photo {
    width: 140px; height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.prof-photo-placeholder {
    width: 140px; height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    border: 4px solid #bfdbfe;
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem; color: #93c5fd;
    margin: 0 auto;
}

.prof-section-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #94a3b8;
    border-left: 3px solid #2563eb;
    padding-left: .5rem;
    margin-bottom: .6rem;
}

.prof-info-grid { display: flex; flex-direction: column; gap: .3rem; }
.prof-info-row {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .875rem;
    padding: .3rem 0;
    border-bottom: 1px solid #f8fafc;
}
.prof-info-label {
    min-width: 90px;
    color: #64748b;
    flex-shrink: 0;
    font-size: .8rem;
}
.prof-info-value { color: #1e293b; font-weight: 500; line-height: 1.4; }

/* Education in profile */
.prof-edu { display: flex; flex-direction: column; gap: .5rem; }
.prof-edu-row {
    background: #f8fafc;
    border-radius: .5rem;
    padding: .6rem .75rem;
    border-left: 3px solid #7c3aed;
}
.prof-edu-degree {
    font-weight: 600;
    font-size: .875rem;
    color: #1e293b;
    margin-bottom: .2rem;
}
.prof-edu-detail {
    display: flex; flex-wrap: wrap; gap: .4rem .9rem;
    font-size: .78rem;
    color: #64748b;
}
.prof-edu-detail span { display: flex; align-items: center; gap: .25rem; }

/* Contact */
.prof-contacts { display: flex; flex-direction: column; gap: .4rem; }
.prof-contact-item {
    display: flex; align-items: center; gap: .6rem;
    font-size: .85rem;
    color: #1e293b;
    text-decoration: none;
    padding: .4rem .6rem;
    border-radius: .5rem;
    background: #f8fafc;
    transition: background .15s;
    word-break: break-all;
}
.prof-contact-item:hover { background: #eff6ff; color: #2563eb; }
.prof-contact-item i { font-size: 1rem; flex-shrink: 0; }

/* ── Footer ── */
.pub-footer {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

/* ── Loading skeleton shimmer ── */
@media (max-width: 575.98px) {
    .pub-hero { padding: 2rem 0 2rem; }
    .pub-hero-title { font-size: 1.4rem; }
    .pub-search-box { max-width: 100%; border-radius: .5rem; }
    .pub-filter-select { max-width: 100%; }
    .pub-avatar, .pub-avatar-placeholder { width: 64px; height: 64px; }
}
