.homecare-reviews {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}


/* No Data/Reviews Messages */
.homecare-no-reviews,
.homecare-no-data {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
}
.homecare-review-relationship {
    font-weight: 500;
    opacity: 0.8;
}

/* Carousel Styles */
.homecare-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    border: 1px solid #e0e0e0;
}

.homecare-carousel-header {
    background: #bf4a92;
    color: white;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.homecare-carousel-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.homecare-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.homecare-carousel-header .homecare-stars {
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
}

.homecare-stars {
    color: #ffd700;
    font-size: 1.1rem;
}

.homecare-carousel-container {
    position: relative;
    overflow: hidden;
}

.homecare-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
}

.homecare-review-slide {
    min-width: 100%;
    padding: 30px;
    background: white;
    box-sizing: border-box;
}

.homecare-review-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.homecare-review-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.homecare-review-author {
    font-weight: 600;
    color: #bf4a92;
    font-size: 1rem;
}

.homecare-carousel-dots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
}

.homecare-dots-container {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.homecare-carousel-nav {
    background: #bf4a92;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(191, 74, 146, 0.3);
    position: relative;
    overflow: hidden;
}

.homecare-carousel-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #bf4a92;
    transition: left 0.5s ease;
}

.homecare-carousel-nav:hover {
    transform: none; /* No movement on hover */
    box-shadow: 0 6px 25px rgba(191, 74, 146, 0.4);
}

.homecare-carousel-nav:hover::before {
    left: 100%;
}

.homecare-carousel-nav:active {
    transform: none;
    box-shadow: 0 2px 10px rgba(191, 74, 146, 0.3);
}

.homecare-carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 10px rgba(191, 74, 146, 0.2);
}

.homecare-carousel-nav:disabled:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(191, 74, 146, 0.2);
}

.homecare-carousel-nav:disabled::before {
    display: none;
}

/* Custom arrow icons */
.homecare-carousel-prev::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 10px solid white;
    margin-left: -2px;
}

.homecare-carousel-next::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid white;
    margin-right: -2px;
}

.homecare-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.homecare-carousel-dot:hover {
    background: rgba(191, 74, 146, 0.6);
    transform: scale(1.2);
}

.homecare-carousel-dot.active {
    background: #bf4a92;
    transform: scale(1.3);
}

/* Simple Widget Styles */
.homecare-simple-widget {
    border-radius: 50px;
    padding: 20px 30px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 300px;
}

.homecare-simple-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* Pink background version */
.homecare-simple-pink {
    background: #bf4a92;
    color: white;
}

.homecare-simple-pink .homecare-simple-name {
    color: white;
}

.homecare-simple-pink .homecare-simple-source {
    color: rgba(255, 255, 255, 0.9);
}

.homecare-simple-pink .homecare-simple-score-circle {
    background: white;
    color: #bf4a92;
}

/* White background version */
.homecare-simple-white {
    background: white;
    color: #333;
    border: 2px solid #bf4a92;
}

.homecare-simple-white .homecare-simple-name {
    color: #333;
}

.homecare-simple-white .homecare-simple-source {
    color: #666;
}

.homecare-simple-white .homecare-simple-score-circle {
    background: #bf4a92;
    color: white;
}

.homecare-simple-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.homecare-simple-info {
    flex: 1;
}

.homecare-simple-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.homecare-simple-source {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

.homecare-simple-score-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.homecare-simple-score {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: -2px;
}

.homecare-simple-out-of {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.8;
    line-height: 1;
}
/* Ensure the header content stays in a row on all screen sizes */
.homecare-carousel-header .homecare-simple-content {
    flex-direction: row !important; /* Keep horizontal layout everywhere */
    justify-content: space-between; /* Optional: distribute space nicely */
    align-items: center; /* Keep vertically centered */
}

/* On very small screens, optionally adjust sizes for better fit */
@media(max-width: 480px){
    .homecare-simple-score-circle {
        width: 60px;
        height: 60px;
    }
    .homecare-simple-score {
        font-size: 1.2rem;
    }
    .homecare-simple-out-of {
        font-size: 0.65rem;
    }
}
/* Masonry Styles */
.homecare-masonry-top-header {
    display: flex;
    justify-content: center; /* Center the pill header */
    margin-bottom: 20px; /* Space between pill and grid */
}

.homecare-masonry-header-pill {
    /* Mimic homecare-simple-pink styling */
    border-radius: 50px;
    padding: 20px 30px;
    display: inline-flex; /* Use inline-flex to shrink-wrap content and enable flex properties */
    background: #bf4a92;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 300px; /* Keep minimum width consistent */
    /* Remove margin: 0 auto; as parent is handling centering */
    transform: translateY(0); /* Ensure no unwanted movement */
}

.homecare-masonry-header-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* Re-apply simple widget content styles inside the pill */
.homecare-masonry-header-pill .homecare-simple-content {
    width: auto; /* Allow content to dictate width */
}

.homecare-masonry-header-pill .homecare-simple-name {
    font-size: 1.2rem; /* Revert to simple widget size */
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.homecare-masonry-header-pill .homecare-simple-source {
    font-size: 0.85rem; /* Revert to simple widget size */
    color: rgba(255, 255, 255, 0.9);
}

.homecare-masonry-header-pill .homecare-simple-score-circle {
    background: white;
    color: #bf4a92;
    width: 70px;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.homecare-masonry-header-pill .homecare-simple-score {
    font-size: 1.4rem;
}
.homecare-masonry-header-pill .homecare-simple-out-of {
    font-size: 0.75rem;
}


.homecare-masonry-wrapper {
    border-radius: 8px; /* Overall border radius for the grid section */
    background: none;
    overflow: hidden; /* Contains children border radius */
}

.homecare-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0px; /* Padding for the grid items within the wrapper */
    background: none;
}

.homecare-masonry-item {
    background: white;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e8e8e8;
    transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: block; /* Ensure it respects display: none from JS for lazy loading */
}

.homecare-masonry-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(191, 74, 146, 0.2); /* Pink tint shadow */
    border-color: #bf4a92; /* Border turns pink */
}

.homecare-masonry-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}
.homecare-masonry-text {
    color: #444;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.15rem;
}

.homecare-text-content.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.homecare-read-more {
    color: #bf4a92;
    cursor: pointer;
    font-weight: 500;
    text-decoration: underline;
    display: inline-block;
    margin-top: 8px;
}

.homecare-masonry-author {
    font-weight: 600;
    color: #602276;
    font-size: 0.95rem;
}

.homecare-load-more {
    text-align: center;
    padding-bottom: 20px; /* Pad inside the wrapper */
}

.homecare-load-more-btn {
    background: #bf4a92;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.homecare-load-more-btn:hover {
    background: #602276;
    transform: translateY(-2px);
}

.homecare-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.homecare-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(96, 34, 118, 0.8);
    animation: fadeIn 0.3s ease;
}

.homecare-modal-content {
    background: white;
    margin: 8% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 75vh;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(96, 34, 118, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent content from breaking out */
}

.homecare-modal-body {
    padding: 40px;
    position: relative;
    overflow-y: auto; /* Add vertical scrolling */
    flex: 1; /* Allow body to grow and shrink */
}


.homecare-modal-quote-left {
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 3rem;
    color: rgba(191, 74, 146, 0.15);
    z-index: 1;
}

.homecare-modal-quote-right {
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 3rem;
    color: rgba(191, 74, 146, 0.15);
    z-index: 1;
}

.homecare-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.homecare-modal-close:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

.homecare-modal-rating {
    margin-bottom: 25px;
    text-align: center;
    z-index: 2;
    position: relative;
}

.homecare-modal-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 25px;
    text-align: left;
    z-index: 2;
    position: relative;
    padding: 0 20px;
}

.homecare-modal-author {
    text-align: right;
    font-weight: 600;
    color: #bf4a92;
    font-size: 1.1rem;
    z-index: 2;
    position: relative;
    padding-right: 20px;
}

/* Star Ratings */
.star.full {
    color: #ffd700;
}

.star.half {
    color: #ffd700;
}

.star.empty {
    color: #ddd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .homecare-carousel-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .homecare-carousel-header h3 {
        font-size: 1.2rem;
    }
    
    .homecare-rating {
        font-size: 1.1rem;
        gap: 10px;
    }
    
    .homecare-carousel-header .homecare-stars {
        font-size: 1.2rem;
    }
    
    .homecare-carousel-dots {
        padding: 15px 20px;
    }
    
    .homecare-carousel-nav {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    
    .homecare-carousel-prev::after {
        border-top: 5px solid transparent;
        border-bottom: 5px solid transparent;
        border-right: 8px solid white;
    }
    
    .homecare-carousel-next::after {
        border-top: 5px solid transparent;
        border-bottom: 5px solid transparent;
        border-left: 8px solid white;
    }
    
    .homecare-review-slide {
        padding: 20px;
    }
    
    .homecare-simple-widget {
        min-width: 280px;
        padding: 18px 25px;
    }
    
    .homecare-simple-content {
        gap: 15px;
    }
    
    .homecare-simple-name {
        font-size: 1.1rem;
    }
    
    .homecare-simple-source {
        font-size: 0.8rem;
    }
    
    .homecare-simple-score-circle {
        width: 60px;
        height: 60px;
    }
    
    .homecare-simple-score {
        font-size: 1.2rem;
    }
    
    .homecare-simple-out-of {
        font-size: 0.7rem;
    }
    
    /* Masonry Responsive */
    .homecare-masonry-top-header {
        margin-bottom: 15px; /* Adjust spacing for mobile */
    }

    .homecare-masonry-header-pill {
        min-width: unset; /* Allow it to shrink more on small screens */
        padding: 15px 20px;
        flex-direction: column; /* Stack name/source and score */
        gap: 10px;
    }

    .homecare-masonry-header-pill .homecare-simple-name {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    .homecare-masonry-header-pill .homecare-simple-source {
        font-size: 0.8rem;
    }
    .homecare-masonry-header-pill .homecare-simple-score-circle {
        width: 60px;
        height: 60px;
    }
    .homecare-masonry-header-pill .homecare-simple-score {
        font-size: 1.2rem;
    }
    .homecare-masonry-header-pill .homecare-simple-out-of {
        font-size: 0.7rem;
    }
    
    .homecare-masonry-text {
        font-size: 1.05rem; /* Slightly smaller for mobile */
    }

    .homecare-masonry {
        padding: 15px;
        gap: 15px;
        grid-template-columns: 1fr;
    }
    
    .homecare-modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 85vh; /* Increase height on mobile */
        border-radius: 15px;
    }

    
    .homecare-modal-body {
        padding: 30px 20px;
        max-height: calc(85vh - 40px); /* Account for padding */
    }
    
    .homecare-modal-quote-left {
        font-size: 2rem;
        top: 15px;
        left: 20px;
    }
    
    .homecare-modal-quote-right {
        font-size: 2rem;
        bottom: 15px;
        right: 20px;
    }
    
    .homecare-modal-text {
        font-size: 1.1rem;
        padding: 0 10px;
    }
    
    .homecare-modal-author {
        padding-right: 10px;
    }
}

@media (max-width: 480px) {
    .homecare-carousel-nav {
        width: 35px;
        height: 35px;
        border-radius: 8px;
    }
    
    .homecare-carousel-prev::after {
        border-top: 4px solid transparent;
        border-bottom: 4px solid transparent;
        border-right: 7px solid white;
    }
    
    .homecare-carousel-next::after {
        border-top: 4px solid transparent;
        border-bottom: 4px solid transparent;
        border-left: 7px solid white;
    }
    
    .homecare-simple-widget {
        min-width: 250px;
        padding: 15px 20px;
    }
    
    .homecare-simple-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .homecare-simple-score-circle {
        width: 55px;
        height: 55px;
    }

.homecare-modal-content {
        margin: 2% auto;
        width: 98%;
        max-height: 95vh; /* Almost full height on small screens */
        border-radius: 10px;
    }
    
    .homecare-modal-body {
        padding: 25px 15px;
        max-height: calc(95vh - 30px);
    }
    
    .homecare-modal-text {
        font-size: 1.1rem;
        padding: 0 5px; /* Reduce horizontal padding */
        line-height: 1.6;
    }
    
    .homecare-modal-author {
        padding-right: 5px;
        font-size: 1rem;
    }
    
    .homecare-modal-quote-left {
        font-size: 2rem;
        top: 10px;
        left: 15px;
    }
    
    .homecare-modal-quote-right {
        font-size: 2rem;
        bottom: 10px;
        right: 15px;
    }
    
    .homecare-modal-close {
        right: 15px;
        top: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

}

/* Accessibility */
.homecare-reviews button:focus,
.homecare-reviews .homecare-read-more:focus {
    outline: 2px solid #bf4a92;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.homecare-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.homecare-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    border-top-color: #bf4a92;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Additional utility classes */
.homecare-text-center {
    text-align: center;
}

.homecare-mt-20 {
    margin-top: 20px;
}

.homecare-mb-20 {
    margin-bottom: 20px;
}

/* Custom scrollbar for webkit browsers */
.homecare-modal-body::-webkit-scrollbar {
    width: 6px;
}

.homecare-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.homecare-modal-body::-webkit-scrollbar-thumb {
    background: #bf4a92;
    border-radius: 3px;
}

.homecare-modal-body::-webkit-scrollbar-thumb:hover {
    background: #602276;
}

/* For Firefox */
.homecare-modal-body {
    scrollbar-width: thin;
    scrollbar-color: #bf4a92 #f1f1f1;
}

/* Masonry Header Styles - center the simple widget header */
.homecare-masonry-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.homecare-masonry-header .homecare-simple-widget {
    display: inline-block;
    margin: 0 auto;
}

/* Remove the old masonry header styles that are no longer needed */
.homecare-masonry-header h3 {
    display: none;
}

.homecare-masonry-header .homecare-rating {
    display: none;
}