.nds-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.nds-carousel {
    width: 100%;
    position: relative;
}

.nds-carousel-heading {
    text-align: center;
    margin-bottom: 20px;
}

.logo-track-container {
    width: 100%;
    overflow: hidden;
}

.logo-track {
    display: flex;
    animation: scroll var(--duration) linear infinite;
    gap: var(--logo-gap);
}

.logo-item {
    flex: 0 0 auto;
    height: var(--logo-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-item img {
    max-height: var(--logo-height) !important;
    max-width: 200px !important;
    width: auto !important;
    height: 120px !important;
    object-fit: contain;
    display: block;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.nds-carousel-title-and-link {
    text-align: center;
    margin-bottom: 30px;
}

.nds-carousel-title {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.nds-all-reviews-link {
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nds-star {
    color: #FFD700; /* Yellow color for stars */
    font-size: 20px;
}

.nds-star.on {
    color: #FFD700;
}

.nds-star.half {
    position: relative;
    color: #FFD700;
}

.nds-star.half:after {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #FFD700;
}

.nds-review-count {
    color: #ffffff;
    margin-left: 10px;
}

/* Review text styles */
.nds-review-content {
    color: #ffffff;
    text-align: left;
    margin: 15px 0;
}

.nds-review-author {
    color: #ffffff;
    font-style: italic;
}

.nds-review-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

/* Force full width in block editor and theme */
.alignfull .nds-carousel-wrapper,
.alignwide .nds-carousel-wrapper,
.wp-block-group.alignfull .nds-carousel-wrapper,
.wp-block-group.alignwide .nds-carousel-wrapper,
.wp-site-blocks .nds-carousel-wrapper,
.entry-content .nds-carousel-wrapper,
.wp-block-column .nds-carousel-wrapper,
.wp-block[data-align=full] .nds-carousel-wrapper,
.wp-block[data-align=wide] .nds-carousel-wrapper,
[class*="wp-container"] .nds-carousel-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nds-carousel-heading,
    .nds-carousel-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .nds-carousel {
        --logo-height: 80px;
        padding: 30px 0;
    }

    .logo-item {
        min-width: 120px;
        padding: 0 10px;
    }

    .nds-star {
        font-size: 16px;
    }
}

/* Override Judge.me styles with higher specificity */
body .jdgm-carousel-wrapper,
html body .jdgm-carousel-wrapper {
    color: #ffffff;
}

body .jdgm-carousel-title,
html body .jdgm-carousel-title {
    text-align: center;
    margin: 0;
    color: white !important;
}

body .jdgm-all-reviews-rating-wrapper,
html body .jdgm-all-reviews-rating-wrapper {
    color: #ffffff !important;
    text-decoration: none;
}

body .jdgm-star,
html body .jdgm-star {
    color: #FFD700 !important; /* Yellow color for stars */
}

body .jdgm-star.jdgm--on,
html body .jdgm-star.jdgm--on {
    color: #FFD700 !important;
}

body .jdgm-star.jdgm--half,
html body .jdgm-star.jdgm--half {
    color: #FFD700 !important;
}

body .jdgm-carousel-item__reviewer-name,
html body .jdgm-carousel-item__reviewer-name {
    color: #ffffff !important;
}

body .jdgm-carousel-item__review-title,
html body .jdgm-carousel-item__review-title {
    color: #ffffff !important;
}

body .jdgm-carousel-item__review-body,
html body .jdgm-carousel-item__review-body {
    color: #ffffff !important;
}

body .jdgm-carousel-item__review-rating,
html body .jdgm-carousel-item__review-rating {
    color: #FFD700 !important;
}

/* Make sure all review text is white with highest specificity */
body .jdgm-carousel-item__review-content *,
html body .jdgm-carousel-item__review-content * {
    color: #ffffff !important;
}

/* Ensure links in reviews are white */
body .jdgm-carousel a,
html body .jdgm-carousel a {
    color: #ffffff !important;
}

/* Style the review count text */
.jdgm-all-reviews-rating-wrapper {
    color: #ffffff !important;
}

/* YouTube Grid Styles */
.nds-youtube-feed {
    position: relative !important;
    background: #000 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.nds-youtube-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.nds-youtube-item {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 56.25% !important;
    background: #000 !important;
    overflow: hidden !important;
    box-shadow: 0 0 15px rgba(0,0,0,0.5) !important;
    border-radius: 4px !important;
}

.nds-youtube-feed .nds-youtube-grid .nds-youtube-item {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 56.25% !important; /* 16:9 Aspect Ratio */
    background: #000 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.5) !important;
    margin: 0 !important;
    display: block !important;
    float: none !important;
}

.nds-youtube-feed .nds-youtube-grid .nds-youtube-item .nds-youtube-link {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
}

.nds-youtube-feed .nds-youtube-grid .nds-youtube-item .nds-youtube-thumbnail {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

.nds-youtube-feed .nds-youtube-grid .nds-youtube-item .nds-youtube-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

/* Reset any potential flex or float styles from theme */
.nds-youtube-feed *,
.nds-youtube-feed *:before,
.nds-youtube-feed *:after {
    box-sizing: border-box !important;
}

.nds-youtube-feed .nds-youtube-grid {
    display: grid !important;
    flex: none !important;
    float: none !important;
    grid-template-columns: 1fr !important;
}

.nds-youtube-feed .nds-youtube-grid > * {
    flex: none !important;
    float: none !important;
}

/* Force grid layout */
@supports (display: grid) {
    .nds-youtube-feed .nds-youtube-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .nds-youtube-feed {
        padding: 15px !important;
    }
    .nds-youtube-grid {
        padding: 0 15px !important;
    }
}

@media (max-width: 640px) {
    .nds-youtube-feed {
        padding: 10px !important;
    }
    .nds-youtube-grid {
        padding: 0 10px !important;
    }
}

/* Judge.me Review Image Fixes */
.jdgm-carousel-wrapper {
    min-height: 400px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
}

.jdgm-rev-widg__body {
    min-height: 350px !important;
}

.jdgm-carousel__item-wrapper {
    height: auto !important;
    min-height: 300px !important;
    width: 33.333% !important; /* Force equal widths */
    flex: 0 0 33.333% !important; /* Prevent flex growing */
}

.jdgm-carousel__item {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.jdgm-rev {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.jdgm-rev__pics {
    width: 100% !important;
    margin: 10px 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: flex-start !important; /* Align images to the left */
    max-height: none !important; /* Remove max-height constraint */
    overflow: visible !important; /* Prevent clipping */
}

.jdgm-rev__pic-link {
    width: calc(33.333% - 7px) !important; /* Account for gap */
    height: auto !important;
    margin: 0 !important;
    position: relative !important;
    padding-bottom: calc(33.333% - 7px) !important; /* Maintain aspect ratio */
}

.jdgm-rev__pic-link img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 4px !important;
}

/* Ensure review content is properly spaced */
.jdgm-rev__content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 15px !important;
}

.jdgm-rev__body {
    flex: 1 !important;
    margin: 10px 0 !important;
}

/* Make sure the stars and header are properly aligned */
.jdgm-rev__header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    margin-bottom: 10px !important;
}

.jdgm-rev__rating {
    margin-bottom: 5px !important;
}

/* Ensure consistent spacing between reviews */
.jdgm-carousel__item-container {
    padding: 20px !important;
}

/* Fix any overflow issues */
.jdgm-carousel {
    overflow: visible !important;
}

/* Ensure arrows are visible */
.jdgm-carousel__arrows {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Responsive styles for the review grid */
@media (max-width: 1024px) {
    .jdgm-carousel__item-wrapper {
        width: 50% !important;
        flex: 0 0 50% !important;
    }
    
    .jdgm-rev__pic-link {
        width: calc(50% - 5px) !important;
        padding-bottom: calc(50% - 5px) !important;
    }
}

@media (max-width: 640px) {
    .jdgm-carousel__item-wrapper {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .jdgm-rev__pic-link {
        width: calc(50% - 5px) !important;
        padding-bottom: calc(50% - 5px) !important;
    }
    
    .jdgm-carousel-wrapper {
        padding: 0 20px !important;
    }
} 