/* ========== Freelancer Details Page - V2 Styles ========== */

/* Main Profile Card */
.job-post-card {
    background-color: var(--whiteColor, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.theme-dark .job-post-card {
    background-color: var(--bgColor);
    border-color: #3a3a4a;
    box-shadow: none;
}
.job-post-card .job-post-img {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    flex: 0 0 auto;
}
.job-post-card .job-post-img img {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
}
.job-post-card .freelancer-basic-info h3 {
    font-size: 22px;
    color: var(--titleColor);
}
.job-post-card .freelancer-basic-info p {
    color: var(--bodyColor);
}
.title-wrapper {
    display: flex;
    align-items: center;
}
.title-wrapper h3 {
    margin-bottom: 0;
}
.freelancer-basic-info .rating span {
    font-size: 15px;
    color: var(--bodyColor);
    margin-right: 8px;
}
.freelancer-basic-info .rating i {
    color: #FEA014;
    font-size: 18px;
    margin-left: 2px;
}

/* Common Section Styles */
.candidates-details-content h3 {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}
.candidates-details-content h3 .text-main {
    color: var(--mainColor);
    margin-left: 10px;
    font-size: 26px;
}
.theme-dark .candidates-details-content h3 {
    border-color: #3a3a4a;
}
.candidates-details-content .experience-card {
    padding-right: 0; /* Override existing style */
    display: flex;
    align-items: center;
    gap: 20px;
}
.candidates-details-content .experience-card img {
    position: static;
    transform: none;
    flex-shrink: 0;
}
.candidates-details-content .experience-card h4 {
    margin-bottom: 2px;
    font-size: 18px;
}
.candidates-details-content .experience-card span {
    font-size: 14px;
}
.candidates-details-content .experience-card p {
    font-size: 15px;
    margin-bottom: 0;
}

/* Sidebar Styles */
.candidates-details-right.sticky-top {
    top: 100px; /* Adjust based on your sticky navbar height */
}
.profile-action-buttons {
    padding: 20px;
    border-bottom: 1px solid #e0ebe8;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.profile-action-buttons .default-btn,
.profile-action-buttons .btn-secondary-custom,
.profile-action-buttons .btn-favorite {
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-secondary-custom {
    background-color: #f8f8f8;
    color: var(--bodyColor);
    border: 1px solid #e0e0e0;
}
.btn-secondary-custom:hover {
    background-color: #e9ecef;
    color: var(--titleColor);
}
.btn-favorite {
    background: transparent;
    color: var(--bodyColor);
}
.btn-favorite:hover {
    color: #e91e63;
}
.btn-favorite i {
    font-size: 18px;
    vertical-align: middle;
    margin-left: 5px;
}
.sidebar-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.sidebar-info-list li:last-child {
    border-bottom: none;
}
.sidebar-info-list li strong {
    color: var(--titleColor);
    font-weight: 500;
}
.sidebar-info-list li span {
    color: var(--bodyColor);
    text-align: left;
}
.content-info h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.content-info h3 i {
    color: var(--mainColor);
}
.theme-dark .sidebar-info-list li {
    border-color: #3a3a4a;
}
.theme-dark .btn-secondary-custom {
    background-color: var(--bgColor);
    border-color: #3a3a4a;
}

/* Review Item Styles */
.review-item {
    padding: 15px;
    border-bottom: 1px solid #eef0f2;
}
.review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.review-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}
.review-info {
    flex-grow: 1;
}
.freelancer-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.freelancer-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--titleColor);
    margin-bottom: 8px;
}
.project-title {
    font-size: 0.85rem;
    color: #6c757d;
}
.project-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    color: var(--titleColor);
}
.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}
.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.reviewer-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
.reviewer-info h5 {
    margin-bottom: 2px;
    font-size: 17px;
}
.reviewer-info span {
    font-size: 14px;
    color: var(--bodyColor);
}
.review-rating {
    color: #ffc107;
    font-size: 0.9rem;
    display: flex;
    gap: 2px;
    white-space: nowrap;
}
.review-body p {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.7;
}
.review-date {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    text-align: left;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 14px;
}
.status-badge span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 8px;
    display: inline-block;
}
.status-badge.online {
    background-color: #E5FAF5;
    color: #00ca99;
}
.status-badge.offline {
    background-color: #eeeeee;
    color: #8f8f8f;
}
.status-badge.online span {
    background-color: #00ca99;
    animation: pulseGlow 2s ease-in-out infinite;
}
.status-badge.offline span {
    background-color: #a3a3a3;
    animation: pulseGlowOffline 2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(0, 202, 153, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 202, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 202, 153, 0); }
}
@keyframes pulseGlowOffline {
    0% { box-shadow: 0 0 0 0 #a3a3a3; }
    70% { box-shadow: 0 0 0 10px rgba(0, 202, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 202, 153, 0); }
  }

/* Responsive RTL Adjustments */
[dir="rtl"] .sidebar-info-list li span {
    text-align: right;
}
[dir="rtl"] .candidates-details-content .experience-card {
    gap: 20px;
}
[dir="rtl"] .btn-favorite i {
    margin-right: 5px;
    margin-left: 0;
}
/* Portfolio Styles */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 250px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #000000bf 0%, rgb(0 0 0 / 86%) 100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    width: 100%;
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}
.review-text {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0 0 8px;
    padding-right: 60px;
}

.portfolio-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.portfolio-category {
    font-size: 14px;
    color: #e0e0e0;
    margin-bottom: 15px;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.portfolio-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.portfolio-details span {
    font-size: 13px;
    color: #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-details i {
    font-size: 14px;
    color: var(--mainColor);
}

.portfolio-actions {
    display: flex;
    gap: 10px;
}

.btn-view,
.btn-demo {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-view {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    backdrop-filter: blur(10px);
}

.btn-view:hover {
    background: white;
    color: var(--mainColor);
    transform: scale(1.05);
}

.btn-demo {
    background: rgba(var(--mainColorRGB), 0.9);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-demo:hover {
    background: var(--mainColor);
    transform: scale(1.05);
}

.theme-dark .portfolio-item {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.theme-dark .portfolio-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.theme-dark .btn-view {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.theme-dark .btn-view:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--mainColor);
}

/* RTL Adjustments for Portfolio */
[dir="rtl"] .portfolio-details span {
    flex-direction: row-reverse;
}

[dir="rtl"] .portfolio-actions {
    justify-content: flex-start;
}

@media (max-width: 767px) {
    .review-rating {
        font-size: 0.8rem;
        gap: 1px;
    }

    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-overlay {
        padding: 15px;
    }
    
    .portfolio-info h4 {
        font-size: 16px;
    }
    
    .portfolio-details {
        gap: 6px;
    }
    
    .portfolio-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-view,
    .btn-demo {
        justify-content: center;
        padding: 10px 16px;
    }
}

/* Experience & Education Timeline */
.candidates-details-experience,
.candidates-education {
    position: relative;
}

/* RTL: timeline line on the right */
[dir="rtl"] .candidates-details-experience,
[dir="rtl"] .candidates-education {
    padding-right: 28px;
}
[dir="rtl"] .candidates-details-experience::before,
[dir="rtl"] .candidates-education::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    right: 10px;
    width: 2px;
    background: linear-gradient(180deg, rgba(var(--mainColorRGB), 0.25), rgba(0,0,0,0));
}

/* LTR fallback */
[dir="ltr"] .candidates-details-experience,
[dir="ltr"] .candidates-education {
    padding-left: 28px;
}
[dir="ltr"] .candidates-details-experience::before,
[dir="ltr"] .candidates-education::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 10px;
    width: 2px;
    background: linear-gradient(180deg, rgba(var(--mainColorRGB), 0.25), rgba(0,0,0,0));
}

.candidates-details-experience .experience-card,
.candidates-education .experience-card {
    display: block;
    position: relative;
    background-color: var(--whiteColor, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.candidates-details-experience .experience-card:hover,
.candidates-education .experience-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
    border-color: rgba(var(--mainColorRGB), 0.35);
}

/* Marker dot for each item (RTL) */
[dir="rtl"] .candidates-details-experience .experience-card::before,
[dir="rtl"] .candidates-education .experience-card::before {
    content: "";
    position: absolute;
    top: 22px;
    right: -23px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--whiteColor, #ffffff);
    border: 3px solid var(--mainColor);
    box-shadow: 0 0 0 4px rgba(var(--mainColorRGB), 0.15);
}

/* Marker dot for LTR */
[dir="ltr"] .candidates-details-experience .experience-card::before,
[dir="ltr"] .candidates-education .experience-card::before {
    content: "";
    position: absolute;
    top: 22px;
    left: -23px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--whiteColor, #ffffff);
    border: 3px solid var(--mainColor);
    box-shadow: 0 0 0 4px rgba(var(--mainColorRGB), 0.15);
}

.candidates-details-experience .experience-card h4,
.candidates-education .experience-card h4 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--titleColor);
}

.candidates-details-experience .experience-card span,
.candidates-education .experience-card span {
    display: inline-block;
    font-size: 14px;
    color: var(--bodyColor);
    margin-bottom: 6px;
}

.candidates-details-experience .experience-card p,
.candidates-education .experience-card p {
    font-size: 15px;
    color: var(--bodyColor);
    margin: 0;
}

.candidates-details-content hr.my-4 {
    border-top: 1px dashed #e3e7eb;
    opacity: 1;
}

.theme-dark .candidates-details-experience .experience-card,
.theme-dark .candidates-education .experience-card {
    background-color: var(--bgColor);
    border-color: #3a3a4a;
    box-shadow: none;
}

.theme-dark [dir="rtl"] .candidates-details-experience .experience-card::before,
.theme-dark [dir="rtl"] .candidates-education .experience-card::before,
.theme-dark [dir="ltr"] .candidates-details-experience .experience-card::before,
.theme-dark [dir="ltr"] .candidates-education .experience-card::before {
    background-color: var(--bgColor);
    box-shadow: 0 0 0 4px rgba(var(--mainColorRGB), 0.12);
}

.theme-dark .candidates-details-content hr.my-4 {
    border-top-color: #3a3a4a;
}

@media (max-width: 575.98px) {
    [dir="rtl"] .candidates-details-experience,
    [dir="rtl"] .candidates-education {
        padding-right: 24px;
    }
    [dir="ltr"] .candidates-details-experience,
    [dir="ltr"] .candidates-education {
        padding-left: 24px;
    }
    .candidates-details-experience .experience-card,
    .candidates-education .experience-card {
        padding: 14px 16px;
    }
    [dir="rtl"] .candidates-details-experience .experience-card::before,
    [dir="rtl"] .candidates-education .experience-card::before {
        right: -20px;
    }
    [dir="ltr"] .candidates-details-experience .experience-card::before,
    [dir="ltr"] .candidates-education .experience-card::before {
        left: -20px;
    }
}