/* Work Rating Layout Fix */
.work-rating {
    padding: 40px 0;
    min-height: 100vh;
    background: white;
    background-image: url("/img/bg-blob-left.png"), url("/img/bg-blob-right.png");
    background-repeat: no-repeat;
    background-position: left center, right center;
    background-size: auto 80%, auto 80%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 9998;
}

body.premium .work-rating {
    background: #1D1D1D;
    background-image: url("/img/bg-blob-left.png"), url("/img/bg-blob-right.png");
    background-repeat: no-repeat;
    background-position: left center, right center;
    background-size: auto 80%, auto 80%;
}

.work-rating .container {
    max-width: 1200px;
}

/* Reset col-12 padding for proper alignment */
.work-rating .col-12 {
    padding-left: 0;
    padding-right: 0;
}

/* Main container with two-column layout for rating and text */
.work-rating .rating-text-container {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

/* Left column - Rating points */
.work-rating .rating-column {
    flex: 0 0 auto;
    width: 45%;
}


/* Main flex container - for backward compatibility */
.work-rating .mainFlexReverse {
    display: block;
}

/* Left side - Rating and text details */
.work-rating .leftSide {
    width: 100%;
    max-width: 100%;
}

/* Right side - Images */
.work-rating .rightSide {
    width: 100%;
    margin-top: 40px;
    margin-left: 0;
    margin-right: 0;
}

/* User's own description section */
.work-rating .user-description {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

body.premium .work-rating .user-description {
    background: #312D2D;
}

.work-rating .user-description h3 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #F2D18F;
}

body.premium .work-rating .user-description h3 {
    color: #F2D18F;
}

.work-rating .user-description p {
    line-height: 1.8;
    color: #555;
    margin: 0;
}

body.premium .work-rating .user-description p {
    color: #ddd;
}

/* Image container styling - horizontal layout full width */
.work-rating .work-img-wrapper {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    width: 100%;
}

body.premium .work-rating .work-img-wrapper {
    background: #312D2D;
}

.work-rating .work-img-wrapper img {
    flex: 0 0 auto;
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.work-rating .work-img-wrapper img:hover {
    transform: scale(1.02);
}

.work-rating .work-img-wrapper p {
    display: none; /* Hide title in image wrapper since images are now below */
}

/* Rating points styling */
.work-rating__points {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

body.premium .work-rating__points {
    background: #312D2D;
}

/* Text evaluation container styling */
.work-rating .text-column {
    flex: 1;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
}

body.premium .work-rating .text-column {
    background: #312D2D;
}

.work-rating__points .oneAspect {
    margin-bottom: 25px;
}

.work-rating__points .oneAspect:last-child {
    margin-bottom: 0;
}

.work-rating__points .aspectName {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.premium .work-rating__points .aspectName {
    color: #ccc;
}

.work-rating__points .aspectBottom {
    display: flex;
    align-items: center;
    gap: 15px;
}

.work-rating__points .aspectProgbar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

body.premium .work-rating__points .aspectProgbar {
    background: #494545;
}

.work-rating__points .aspectProgbarLine {
    height: 100%;
    background: linear-gradient(90deg, #FF6B6B 0%, #FF8E53 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.work-rating__points .aspectValue {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    min-width: 60px;
    text-align: right;
}

body.premium .work-rating__points .aspectValue {
    color: #fff;
}

/* Text evaluation styling */
.work-rating h3.h3-m {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    color: #F2D18F;
}

body.premium .work-rating h3.h3-m {
    color: #F2D18F;
}

.work-rating .leftSide p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

body.premium .work-rating .leftSide p {
    color: #ddd;
}

/* Header styling */
.work-rating h3.h1 {
    font-size: 28px;
    margin-bottom: 30px;
}

/* Keep original breadcrumbs style */
.work-rating .breadcrumbs {
    /* Let the original styles from main CSS apply */
}

/* Back button alignment */
.work-rating .btn--transparent-outline {
    margin-top: 30px;
}

/* Close button styling */
.work-rating .close-rating-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: transform 0.2s;
}

.work-rating .close-rating-btn:hover {
    transform: scale(1.1);
}

body.premium .work-rating .close-rating-btn {
    background: transparent;
}

/* Desktop background adjustment */
@media (min-width: 992px) {
    .work-rating {
        background-image: url("/img/bg-blob-left-desktop.png"), url("/img/bg-blob-right-desktop.png");
    }
    
    body.premium .work-rating {
        background-image: url("/img/bg-blob-left-desktop.png"), url("/img/bg-blob-right-desktop.png");
    }
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .work-rating .rating-text-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .work-rating .rating-column {
        width: 100%;
    }
}

/* Mobile responsive design */
@media (max-width: 991px) {
    .work-rating h3.h1 {
        font-size: 24px;
    }
    
    .work-rating .close-rating-btn {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
    
    .work-rating__points {
        padding: 20px;
    }
    
    .work-rating .work-img-wrapper {
        padding: 15px;
        gap: 15px;
    }
    
    .work-rating .work-img-wrapper img {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 575px) {
    .work-rating {
        padding: 20px 0;
    }
    
    .work-rating h3.h1 {
        font-size: 20px;
    }
    
    .work-rating__points {
        padding: 15px;
    }
    
    .work-rating__points .aspectBottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .work-rating__points .aspectProgbar {
        width: 100%;
    }
    
    .work-rating__points .aspectValue {
        text-align: left;
    }
    
    .work-rating .work-img-wrapper img {
        width: 200px;
        height: 200px;
    }
}

/* Image gallery modal for fullscreen view */
.work-rating-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.work-rating-gallery-modal.active {
    display: flex;
}

.work-rating-gallery-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Animation for rating bars */
@keyframes fillBar {
    from {
        width: 0;
    }
}