/* ══════════════════════════════════════════════════════════════════════════
 * LUMINA PROFILE SYSTEM & OWNER STUDIO
 * ══════════════════════════════════════════════════════════════════════════ */

.profile-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

/* ── Cover Photo Container ── */
.cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1782 / 397;
    height: auto;
    background: #000;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    cursor: pointer;
}
.cover-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    transition: transform 0.4s ease;
}
.cover-wrapper:hover .cover-photo {
    transform: scale(1.01);
}

.cover-hint-badge {
    position: absolute;
    bottom: 14px;
    right: 18px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    display: none;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    z-index: 5;
}
body.owner-mode-active .cover-hint-badge {
    display: inline-flex;
}

/* ── Cover Reposition Toolbar ── */
.cover-reposition-toolbar {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    background: rgba(11, 24, 56, 0.95);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 16px;
    padding: 12px 18px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    z-index: 25;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
}
.cover-reposition-toolbar.open {
    display: flex;
}

/* ── Profile Header Card ── */
.profile-head-card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 0 32px 28px;
    margin-top: -60px;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.profile-head-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.avatar-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #0f172a;
    border: 4px solid var(--bg-base);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
    margin-top: -70px;
}
.avatar-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.avatar-edit-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border: 2px solid #fff;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
body.owner-mode-active .avatar-edit-badge {
    display: flex;
}

.head-user-name {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}
.head-user-location {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.head-user-bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 14px 0 20px;
    max-width: 860px;
}

.user-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.tag-chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Profile Grid Layouts ── */
.profile-body-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

/* 3-Column Panoramic Founder Layout (Cezary, Wioletta, etc. - Rock Solid Flexbox) */
.profile-body-grid.founder-3col,
.profile-body-grid:has(.right-founder-wing) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.profile-body-grid.founder-3col .left-founder-wing,
.profile-body-grid:has(.right-founder-wing) .left-founder-wing {
    flex: 0 0 280px !important;
    width: 280px !important;
    min-width: 250px !important;
    max-width: 300px !important;
}

.profile-body-grid.founder-3col .timeline-area,
.profile-body-grid:has(.right-founder-wing) .timeline-area {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
}

.profile-body-grid.founder-3col .right-founder-wing,
.profile-body-grid:has(.right-founder-wing) .right-founder-wing {
    flex: 0 0 320px !important;
    width: 320px !important;
    min-width: 290px !important;
    max-width: 340px !important;
}

@media (max-width: 1150px) {
    .profile-body-grid.founder-3col,
    .profile-body-grid:has(.right-founder-wing) {
        gap: 16px !important;
    }
    .profile-body-grid.founder-3col .left-founder-wing,
    .profile-body-grid:has(.right-founder-wing) .left-founder-wing {
        flex: 0 0 240px !important;
        width: 240px !important;
        min-width: 220px !important;
    }
    .profile-body-grid.founder-3col .right-founder-wing,
    .profile-body-grid:has(.right-founder-wing) .right-founder-wing {
        flex: 0 0 280px !important;
        width: 280px !important;
        min-width: 260px !important;
    }
}

@media (max-width: 768px) {
    .profile-body-grid.founder-3col,
    .profile-body-grid:has(.right-founder-wing) {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }
    .profile-body-grid.founder-3col .left-founder-wing,
    .profile-body-grid.founder-3col .timeline-area,
    .profile-body-grid.founder-3col .right-founder-wing,
    .profile-body-grid:has(.right-founder-wing) .left-founder-wing,
    .profile-body-grid:has(.right-founder-wing) .timeline-area,
    .profile-body-grid:has(.right-founder-wing) .right-founder-wing {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    .profile-body-grid {
        grid-template-columns: 1fr;
    }
}

.profile-sidebar-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.profile-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-heading);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.86rem;
}
.detail-label {
    color: var(--text-muted);
    font-weight: 600;
    min-width: 90px;
}
.detail-val {
    color: #fff;
    font-weight: 700;
}

/* ── Mini Gallery Grid ── */
.mini-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.photo-thumb-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 90px;
    background: #1e293b;
}
.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.photo-thumb:hover {
    transform: scale(1.08);
}
.photo-delete-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(225, 29, 72, 0.9);
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.72rem;
    z-index: 10;
}
body.owner-mode-active .photo-delete-badge {
    display: flex;
}

@media (max-width: 900px) {
    .profile-page-wrapper,
    .profile-container,
    .lumina-profile-card,
    .lumina-mobile-viewport {
        margin-top: 0 !important;
        padding-top: 8px !important;
        padding-bottom: 90px !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    .profile-body-grid { grid-template-columns: 1fr; }
    .cover-wrapper,
    .lumina-profile-banner {
        width: 100% !important;
        aspect-ratio: 1782 / 397 !important;
        height: auto !important;
        max-height: 160px !important;
        margin-bottom: 12px !important;
    }
    .cover-photo { object-fit: contain; object-position: center center; }
    .avatar-wrap,
    .lumina-avatar-wrapper {
        width: 90px !important;
        height: 90px !important;
        margin-top: -35px !important;
    }
    .profile-head-card { padding: 16px 14px 20px !important; margin-top: 0 !important; }
    .head-user-name { font-size: 1.38rem; }
}
