/* Member Profile Section */
.member-profile-section {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, var(--dark), var(--DARKER)); /* خلفية متدرجة */
    position: relative;
    overflow: hidden;
}

/* خلفية ديناميكية */
.member-profile-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(110, 69, 226, 0.15) 0%, transparent 50%);
    animation: gradientShift 15s ease-in-out infinite alternate;
}

/* عناصر عائمة */
.member-profile-section .floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.member-profile-section .floating-element:nth-child(1) {
    width: 150px;
    height: 150px;
    top: 20%;
    left: 10%;
    animation: float 20s ease-in-out infinite;
}

.member-profile-section .floating-element:nth-child(2) {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 15%;
    animation: float 18s ease-in-out infinite reverse;
}

.profile-image-wrapper {
    width: 250px;
    height: 250px;
    margin: 0 auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid var(--primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* انتقال سلس */
}

.profile-image:hover {
    transform: scale(1.1); /* تكبير طفيف */
    box-shadow: 0 0 15px rgba(110, 69, 226, 0.5); /* ظل متوهج */
}

.member-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--light);
}

.member-title {
    font-size: 1.5rem;
    color: var(--primary);
}

.member-bio {
    font-size: 1.1rem;
    color: var(--off-light);
}

.section-subheader {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 1.5rem;
}

.skills-list li {
    font-size: 1.1rem;
    color: var(--off-light);
    margin-bottom: 0.5rem;
}

.contact-list li {
    font-size: 1.1rem;
    color: var(--off-light);
    margin-bottom: 0.75rem;
}

.contact-list i {
    color: var(--primary);
}

.timeline-item {
    margin-bottom: 1.5rem;
}

.timeline-item h5 {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.timeline-item h6 {
    font-size: 1.2rem;
    color: var(--light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    font-size: 1rem;
    color: var(--off-light);
}

/* Comments & Ratings Section */
.section-comments {
    padding: 100px 0;
}

.rating-display {
    background: var(--glass);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.rating-score {
    font-size: 2rem;
    color: var(--primary);
}

.star-rating i {
    color: var(--primary);
    font-size: 1.5rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.star-rating i:hover {
    transform: scale(1.2); /* تكبير النجمة */
    color: var(--primary-light); /* لون أفتح */
}

.star-rating i.active {
    color: var(--primary-light); /* لون مميز للنجوم المحددة */
    text-shadow: 0 0 5px rgba(110, 69, 226, 0.5); /* توهج خفيف */
}

.rating-count {
    font-size: 0.9rem;
    color: var(--off-light);
}

.comment-form .form-control,
.comment-form .form-select {
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.comment-form .form-control:focus,
.comment-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(110, 69, 226, 0.3);
}

.comment-form .btn-post-comment {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.comment-form .btn-post-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(110, 69, 226, 0.3);
}

.comment-form .char-counter {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    text-align: right;
}

.comment-form textarea:focus ~ .char-counter {
    color: var(--primary-light);
}

.comments-list {
    max-width: 800px;
    margin: 0 auto;
}

.comment-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    position: relative; /* لتأثير السهم */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comment-item:hover {
    transform: translateY(-5px); /* رفع طفيف */
    box-shadow: 0 8px 20px rgba(110, 69, 226, 0.2); /* ظل ديناميكي */
}

.comment-item::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -10px;
    border: 5px solid transparent;
    border-right-color: var(--glass); /* لون السهم يتطابق مع الخلفية */
}

.comment-item.creator-comment {
    border-color: var(--primary);
    background: rgba(110, 69, 226, 0.1);
}

.comment-item.creator-comment::before {
    border-right-color: rgba(110, 69, 226, 0.1); /* لون السهم لتعليقات المالك */
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author h5 {
    font-size: 1.1rem;
    color: var(--light);
    margin: 0;
}

.creator-badge {
    font-size: 0.8rem;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

.comment-rating i {
    color: var(--primary);
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.9rem;
    color: var(--off-light);
}

.comment-text {
    font-size: 1rem;
    color: var(--off-light);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .member-profile-section {
        padding: 120px 0 80px;
    }

    .profile-image-wrapper {
        width: 200px;
        height: 200px;
    }

    .member-name {
        font-size: 2rem;
    }

    .member-title {
        font-size: 1.2rem;
    }

    .section-comments {
        padding: 80px 0;
    }

    .rating-score {
        font-size: 1.5rem;
    }

    .star-rating i {
        font-size: 1.2rem;
    }

    /* Scope to profile section only — global .container breaks the fixed navbar */
    .member-profile-section > .container {
        display: flex;
        flex-direction: column;
    }

    .comment-form .btn-post-comment {
        width: 100%; /* زر بعرض كامل */
        padding: 0.5rem;
    }

    .comment-item::before {
        left: -8px; /* تصغير السهم */
        border-width: 4px;
    }
}


/* Glass Bar Container */
.glass-bar {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* تعديلات لضمان التوافق مع المحتوى */
.profile-image-wrapper {
    width: 200px; /* تصغير الصورة قليلاً لتناسب الحاوية */
    height: 200px;
    margin: 0 auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid var(--primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(110, 69, 226, 0.5);
}

.member-name {
    font-size: 2rem; /* تصغير طفيف لتناسب الحاوية */
    font-weight: 700;
    color: var(--light);
}

.member-title {
    font-size: 1.3rem; /* تصغير طفيف */
    color: var(--primary);
}

.connect-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-glow {
    padding: 0.5rem 1.5rem;
}

.member-bio {
    font-size: 1rem;
    color: var(--off-light);
}

.skills-section .section-subheader,
.portfolio-stats .section-subheader {
    font-size: 1.3rem;
}

.skills-list li,
.portfolio-stats li {
    font-size: 0.95rem;
}

.endorsement-count {
    font-size: 0.85rem;
    color: var(--primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .glass-bar {
        padding: 1.5rem; /* تقليل الحشوة */
        border-radius: 8px; /* زوايا أصغر قليلاً */
    }

    .profile-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .member-name {
        font-size: 1.8rem;
    }

    .member-title {
        font-size: 1.1rem;
    }

    .connect-btn,
    .btn-glow {
        width: 100%; /* أزرار بعرض كامل */
        margin-bottom: 0.5rem;
    }

    .skills-section .section-subheader,
    .portfolio-stats .section-subheader {
        font-size: 1.2rem;
    }

    .skills-list li,
    .portfolio-stats li {
        font-size: 0.9rem;
    }
}

.glass-card {
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(110, 69, 226, 0.2);
    border-color: rgba(110, 69, 226, 0.3);
}

.glass-card,
.glass-bar {
    background: rgba(255, 255, 255, 0.05); /* more transparent */
    backdrop-filter: blur(6px);            /* less blur */
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-card:hover,
.glass-bar:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(102, 196, 240, 0.484),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(137, 207, 240, 0.15);
}