/* ---------- Profile ---------- */

/* ============================================================
   Profile — STYLES
   Keep page/component styles in logical sections below.
   ============================================================ */

/* =====================================
   PROFILE PAGE
===================================== */

.profile-section{
    width:100%;
    max-width:1200px;
    margin:3px auto;
    padding:20px;
    box-sizing:border-box;
}

.profile-cover{
    width:100%;
    max-width:1200px;
    height:260px;
    margin:0 auto;
    border-radius:20px;
    background-image:url("../images/profile-covers/cover-01.svg");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    position:relative;
    overflow:hidden;
}

.profile-card{
    width:100%;
    max-width:1000px;
    margin:-120px auto 40px;
    background:#fff;
    border-radius:20px;
    box-shadow:0 15px 40px rgba(0,0,0,.12);
    padding:40px;
    text-align:center;
    box-sizing:border-box;
}

.profile-image-box{
    margin-top:-95px;
}

.profile-image-box img{
    width:170px;
    height:170px;
    border-radius:50%;
    object-fit:cover;
    border:6px solid #fff;
    background:#fff;
}

.profile-info h2{
    margin-top:15px;
    margin-bottom:15px;
    font-size:32px;
    color:#222;
}

.profile-info p{
    margin:10px 0;
    color:#555;
    font-size:17px;
}

.profile-buttons{
    margin-top:25px;
    display:flex;
    justify-content:center;
    gap:15px;
    flex-wrap:wrap;
}

.profile-btn{
    text-decoration:none;
    padding:12px 24px;
    border-radius:10px;
    font-weight:600;
    transition:.3s;
}

.edit-btn{
    background:#ff6600;
    color:#fff;
}

.ads-btn{
    background:#222;
    color:#fff;
}

.promote-btn{
    background:linear-gradient(135deg,#ff6b00,#ff8a2b);
    color:#fff;
}

.profile-btn:hover{
    transform:translateY(-2px);
}

.profile-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:30px;
    margin-top:35px;
    max-width:1100px;
    margin-left:auto;
    margin-right:auto;
}

.stat-card{
    background:#fff;
    border-radius:15px;
    padding:25px;
    text-align:center;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.stat-card h3{
    margin-bottom:10px;
    color:#666;
}

.stat-card span{
    font-size:32px;
    font-weight:bold;
    color:#ff6600;
}

.profile-shortcuts{
    max-width:1100px;
    margin:35px auto 0;
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
}

.profile-shortcuts a{
    background:#fff;
    text-decoration:none;
    color:#333;
    padding:18px;
    border-radius:12px;
    text-align:center;
    font-weight:600;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
    transition:.3s;
}

.profile-shortcuts a:hover{
    background:#ff6600;
    color:#fff;
}

@media(max-width:768px){


.profile-stats{
    grid-template-columns:1fr;
}

.profile-shortcuts{
    grid-template-columns:1fr;
}

.profile-image-box img{
    width:140px;
    height:140px;
}

.profile-info h2{
    font-size:26px;
}

}

.stat-card{position:relative;}
.stat-card span{display:inline-flex;min-width:34px;min-height:34px;align-items:center;justify-content:center;}

#profileImage{display:block;width:120px;height:120px;margin:0 auto;border-radius:50%;object-fit:cover;background:#f3f4f6;border:4px solid #fff;box-shadow:0 5px 18px rgba(0,0,0,.12)}


.profile-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.04),rgba(0,0,0,.12));pointer-events:none}

/* Profile cover picker */
.profile-cover-settings{margin:8px 0 30px;padding:22px;border:1px solid #eceff3;border-radius:18px;background:#fafbfc;text-align:left}
.cover-settings-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.cover-settings-head h3{margin:0 0 4px;font-size:18px;color:#222}
.cover-settings-head p{margin:0;color:#737b87;font-size:13px}
.cover-selected-label{font-size:12px;font-weight:800;color:#ff6b00;background:#fff1e7;border:1px solid #ffd5ba;border-radius:999px;padding:7px 11px;white-space:nowrap}
.cover-design{border:2px solid transparent;background:#fff;padding:0;border-radius:14px;overflow:hidden;cursor:pointer;text-align:left;box-shadow:0 3px 12px rgba(15,23,42,.06);transition:.18s ease;font:inherit;color:#222}
.cover-design:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(15,23,42,.10)}
.cover-design.active{border-color:#ff6b00;box-shadow:0 0 0 3px rgba(255,107,0,.12)}
.cover-design img{display:block;width:100%;height:72px;object-fit:cover}
.cover-design span{display:block;padding:8px 9px;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:760px){.cover-design-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.cover-settings-head{align-items:flex-start;flex-direction:column}.cover-design img{height:65px}}
@media(max-width:460px){.cover-design-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-cover-settings{padding:16px}}

/* =====================================================
   PROFILE PHOTO — FINAL CENTERING FIX
   Keep the avatar mathematically centered regardless of
   card/content widths, global flex rules, or breakpoints.
===================================================== */
.profile-card .profile-image-box{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    position:relative;
    margin-top:-95px;
    margin-left:0;
    margin-right:0;
    text-align:center;
    box-sizing:border-box;
    z-index:3;
}

.profile-card .profile-image-box img#profileImage,
.profile-card .profile-image-box img{
    display:block;
    flex:0 0 auto;
    width:140px;
    height:140px;
    min-width:140px;
    min-height:140px;
    max-width:140px;
    max-height:140px;
    margin:0 auto;
    border-radius:50%;
    object-fit:cover;
    object-position:center;
    border:5px solid #fff;
    background:#f3f4f6;
    box-shadow:0 8px 24px rgba(0,0,0,.16);
    box-sizing:border-box;
}

.profile-card .profile-info{
    width:100%;
    text-align:center;
    box-sizing:border-box;
    margin-left:0;
    margin-right:0;
}

.profile-card .profile-info h1#profileName{
    margin:16px 0 12px;
    font-size:32px;
    line-height:1.2;
    color:#222;
}

@media(max-width:768px){
    .profile-card .profile-image-box{
        margin-top:-78px;
    }
    .profile-card .profile-image-box img#profileImage,
    .profile-card .profile-image-box img{
        width:120px;
        height:120px;
        min-width:120px;
        min-height:120px;
        max-width:120px;
        max-height:120px;
    }
    .profile-card .profile-info h1#profileName{
        font-size:26px;
    }
}
