/* Clickable title and description links */
.freelance-name-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

.freelance-name-link:hover {
    text-decoration: none;
    color: inherit;
}

.freelance-name-link:hover .freelance-name {
    color: #ff4c4b;
    transform: translateY(-1px);
}

.freelance-description-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

.freelance-description-link:hover {
    text-decoration: none;
    color: inherit;
}

.freelance-description-link:hover .description-text {
    color: #ff4c4b;
}

/* Fix horizontal scroll issues */
.freelance-widget {
    width: 100%;
    position: relative;
    margin-bottom: 30px;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    height: fit-content;
    box-sizing: border-box;
}

/* Three Column Grid Layout Styles */
.freelance-header-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 15px;
    gap: 18px;
    width: 100%;
}

.freelance-avatar-grid {
    width: 30%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.freelance-avatar-grid img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.freelance-info-grid {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.freelance-info-grid .freelance-name {
    font-family: "Roboto", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    text-align: left;
    text-transform: capitalize;
    color: #1f2937;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.freelance-info-grid .freelance-price {
    font-family: "Inter", sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    color: white;
    background: linear-gradient(135deg, #ff4c4b 0%, #ff6b6b 100%);
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid #ff4c4b;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
    display: inline-block;
    margin: 0;
}

.freelance-zoom-grid {
    width: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.freelance-zoom-grid .freelance-zoom-btn {
    height: 36px;
    background: #ffffff;
    border: 2px solid #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    padding-inline: 4px;
}

.freelance-zoom-grid .freelance-zoom-btn:hover {
    border-color: #ff4c4b;
    background: #fff5f5;
    box-shadow: 0 4px 8px rgba(255, 76, 75, 0.2);
}

.freelance-zoom-grid .freelance-zoom-btn .zoom-icon {
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.freelance-zoom-grid .freelance-zoom-btn .zoom-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.freelance-widget:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.freelance-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px auto 15px;
    border-radius: 60px;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.freelance-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.freelance-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
    flex: 1;
    gap: 8px;
    text-align: center;
}

.freelance-name {
    width: 100%;
    font-family: "Roboto", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    text-align: center;
    text-transform: capitalize;
    color: #1f2937;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.freelance-price {
    font-family: "Inter", sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    color: #059669;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
    margin-bottom: 8px;
    display: inline-block;
}

.freelance-price-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.freelance-rating-display {
    font-family: "Inter", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
    color: gray;
    background: linear-gradient(135deg, #e5e5e5 0%, #d1d5db 100%);
    padding: 4px 12px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
    display: inline-block;
}

.freelance-description {
    margin-bottom: 12px;
    padding: 0 16px;
    width: 100%;
}

.description-text {
    font-family: "Inter", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    hyphens: auto;
}
.description-text:hover {
    color: #6b7280 !important;
}

.freelance-category {
    margin-bottom: 16px;
    padding: 0 16px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.subcategory-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    color: #6b7280;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    text-transform: capitalize;
    border: 1px solid #e5e7eb;
}

.freelance-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
    width: 100%;
    background: linear-gradient(135deg, #f7f7f7f7 0%, #f1f5f9 100%);
    border-top: 1px solid #f7f7f7f7;
    margin-top: auto;
}

.freelance-zoom-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.freelance-zoom-btn:hover {
    border-color: #ff4c4b;
    background: #fff5f5;
    box-shadow: 0 4px 8px rgba(255, 76, 75, 0.2);
}

.freelance-zoom-btn .zoom-icon {
    transition: transform 0.3s ease;
}

.freelance-zoom-btn:hover .zoom-icon {
    transform: scale(1.1);
}

.freelance-profile-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff4c4b 0%, #ff6b6b 100%);
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 76, 75, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    min-height: 40px;
}

.freelance-profile-btn:hover {
    background: linear-gradient(135deg, #ff3333 0%, #ff5252 100%);
    box-shadow: 0 6px 12px rgba(255, 76, 75, 0.35);
}

.freelance-profile-btn span {
    font-family: "DM Sans", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: capitalize;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive styles for mobile devices */
@media (max-width: 767px) {
    .freelance-widget {
        width: 100%;
        max-width: none;
        height: auto;
        margin-bottom: 20px;
        border-radius: 12px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .freelance-header-grid {
        padding: 15px 12px 10px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .freelance-avatar-grid {
        width: 25%;
        min-width: 50px;
    }

    .freelance-avatar-grid img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .freelance-info-grid {
        width: 55%;
        min-width: 0;
        flex: 1;
    }

    .freelance-info-grid .freelance-name {
        font-size: 14px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .freelance-zoom-grid {
        width: 20%;
        min-width: 40px;
    }

    .freelance-zoom-grid .freelance-zoom-btn {
        height: 30px;
        padding-inline: 4px;
    }

    .freelance-zoom-grid .freelance-zoom-btn .zoom-icon {
        width: 12px;
        height: 12px;
    }

    .freelance-avatar {
        width: 80px;
        height: 80px;
        border-radius: 40px;
        margin: 15px auto 10px;
        border: 3px solid #ffffff;
    }

    .freelance-info {
        padding: 0 12px;
        gap: 6px;
    }

    .freelance-name {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .freelance-price {
        font-size: 12px;
        padding: 4px 12px;
        margin-bottom: 6px;
    }

    .freelance-price-rating {
        gap: 8px;
        margin-bottom: 6px;
        flex-wrap: wrap;
    }

    .freelance-rating-display {
        font-size: 11px;
        padding: 3px 10px;
    }

    .description-text {
        font-size: 12px;
        line-height: 1.3;
    }

    .subcategory-badge {
        font-size: 10px;
        padding: 3px 8px;
        border-radius: 4px;
    }

    .freelance-actions {
        padding: 10px;
        gap: 8px;
    }

    .freelance-zoom-btn {
        width: 36px;
        height: 36px;
    }

    .freelance-zoom-grid .freelance-zoom-btn {
        height: 25px;
        padding-inline: 4px;
    }

    .freelance-zoom-grid .freelance-zoom-btn .zoom-icon {
        width: 11px;
        height: 11px;
    }

    .freelance-zoom-grid {
        top: -12px;
        left: 0px;
        position: relative;
    }

    .freelance-info-grid .freelance-price {
        font-family: "Inter", sans-serif;
        font-style: normal;
        font-weight: 700;
        font-size: 10px;
        line-height: 1.2;
        color: white;
        background: linear-gradient(135deg, #ff4c4b 0%, #ff6b6b 100%);
        padding: 4px 6px;
        border-radius: 16px;
        border: 1px solid #ff4c4b;
        box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
        display: inline-block;
        margin: 0;
    }

    .freelance-profile-btn {
        padding: 10px 20px;
        min-height: 36px;
    }

    .freelance-profile-btn span {
        font-size: 13px;
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 575px) {
    .freelance-widget {
        margin-bottom: 15px;
        border-radius: 10px;
        box-sizing: border-box;
        overflow: hidden;
        width: 100%;
    }

    .freelance-header-grid {
        padding: 12px 10px 8px;
        gap: 4px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .freelance-avatar-grid {
        width: 22%;
        min-width: 45px;
    }

    .freelance-avatar-grid img {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #ffffff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .freelance-info-grid {
        width: 58%;
        min-width: 0;
        flex: 1;
    }

    .freelance-info-grid .freelance-name {
        font-size: 13px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .freelance-zoom-grid {
        width: 20%;
        min-width: 35px;
    }

    .freelance-zoom-grid .freelance-zoom-btn {
        height: 28px;
        padding-inline: 4px;
    }

    .freelance-zoom-grid .freelance-zoom-btn .zoom-icon {
        width: 10px;
        height: 10px;
    }

    .freelance-avatar {
        width: 70px;
        height: 70px;
        border-radius: 35px;
        margin: 12px auto 8px;
        border: 2px solid #ffffff;
    }

    .freelance-info {
        padding: 0 10px;
        gap: 4px;
    }

    .freelance-name {
        font-size: 15px;
    }

    .freelance-price {
        font-size: 11px;
        padding: 3px 10px;
    }

    .freelance-price-rating {
        gap: 6px;
        margin-bottom: 4px;
        flex-wrap: wrap;
    }

    .freelance-rating-display {
        font-size: 10px;
        padding: 2px 8px;
    }

    .description-text {
        font-size: 11px;
        line-height: 1.2;
    }

    .subcategory-badge {
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 3px;
    }

    .freelance-actions {
        padding: 10px;
    }

    .freelance-zoom-btn {
        width: 32px;
        height: 32px;
    }

    .freelance-zoom-grid .freelance-zoom-btn {
        height: 25px;
        padding-inline: 4px;
    }

    .freelance-zoom-grid .freelance-zoom-btn .zoom-icon {
        width: 11px;
        height: 11px;
    }

    .freelance-zoom-grid {
        top: -12px;
        left: 0px;
        position: relative;
    }

    .freelance-info-grid .freelance-price {
        font-family: "Inter", sans-serif;
        font-style: normal;
        font-weight: 700;
        font-size: 10px;
        line-height: 1.2;
        color: white;
        background: linear-gradient(135deg, #ff4c4b 0%, #ff6b6b 100%);
        padding: 4px 6px;
        border-radius: 16px;
        border: 1px solid #ff4c4b;
        box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
        display: inline-block;
        margin: 0;
    }

    .freelance-profile-btn {
        padding: 8px 16px;
        min-height: 32px;
    }

    .freelance-profile-btn span {
        font-size: 12px;
    }
}
