/* Customer Reviews Section */
.reviews-section {
    position: relative;
    overflow: hidden;
}

.reviews-marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
    /* Soft fade on edges */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.reviews-marquee-track {
    display: flex !important;
    gap: 1.5rem;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

.reviews-marquee-track:hover {
    animation-play-state: paused;
}

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

    100% {
        transform: translateX(-50%);
    }
}

.review-card {
    background: rgba(255, 255, 255, 0.05);
    /* Glassmorphism Base */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, background 0.3s;
}

.review-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.review-stars i {
    font-size: 0.9rem;
    color: #ffc107;
}

.review-stars i.text-muted {
    color: rgba(255, 255, 255, 0.2);
}

.review-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.review-content {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    background: transparent;
    /* No inner box background */
    padding: 0;
    border-radius: 0;
}

.review-author {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: right;
}

body.home .home-section-actions #open-review-modal {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 50px;
    padding: 0.82rem 1.25rem;
    border: 1px solid rgba(147, 197, 253, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

/* Force Transparency for Review Page Section */
section.reviews-grid-section,
.reviews-grid-section {
    background: transparent !important;
    background-color: transparent !important;
}

/* Ensure no dark overlay blocks the blobs */
body.page-template-page-reviews {
    background-color: #050505;
    /* Default Dark */
    /* Ensure no other overlay */
}

/* Modal Styles - Glassmorphism */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    /* Glass Effect */
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
}

.modal-close:hover {
    color: #fff;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #fff;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: rgba(0, 0, 0, 0.3);
    /* Dark transparent input */
    color: #fff;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

body.review-modal-open {
    overflow: hidden;
}

.modal-content button[type="submit"]:disabled,
.modal-content input[type="submit"]:disabled {
    cursor: progress;
    opacity: 0.68;
}

.review-form-status {
    margin: 1rem 0 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.5;
}

.review-form-status:empty {
    display: none;
}

.review-form-status[data-type="info"] {
    color: rgba(255, 255, 255, 0.72);
}

.review-form-status[data-type="success"] {
    color: #34d399;
}

.review-form-status[data-type="error"] {
    color: #f87171;
}

html[data-theme="light"] .review-card {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(100, 116, 139, 0.22);
    box-shadow: 0 18px 42px -28px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

html[data-theme="light"] .review-card:hover {
    background: rgba(255, 255, 255, 0.42);
}

html[data-theme="light"] body.home .home-section-actions #open-review-modal {
    background: rgba(255, 255, 255, 0.56);
    border-color: rgba(100, 116, 139, 0.22);
    color: rgba(15, 23, 42, 0.68);
}

html[data-theme="light"] body.home .home-section-actions #open-review-modal:hover,
html[data-theme="light"] body.home .home-section-actions #open-review-modal:focus-visible {
    background: rgba(239, 246, 255, 0.9);
    border-color: rgba(96, 165, 250, 0.44);
    color: #0f172a;
    outline: none;
}

html[data-theme="light"] .review-stars i.text-muted {
    color: rgba(148, 163, 184, 0.5);
}

html[data-theme="light"] .review-date,
html[data-theme="light"] .review-author,
html[data-theme="light"] .modal-close,
html[data-theme="light"] .modal-content p {
    color: rgba(51, 65, 85, 0.72);
}

html[data-theme="light"] .review-content,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .modal-content h3,
html[data-theme="light"] .form-group label {
    color: #0f172a;
}

html[data-theme="light"] body.page-template-page-reviews {
    background-color: #f3f7fc;
}

html[data-theme="light"] .modal-overlay {
    background: rgba(241, 245, 249, 0.82);
}

html[data-theme="light"] .modal-content {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(100, 116, 139, 0.22);
    box-shadow: 0 24px 54px -30px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

html[data-theme="light"] .form-group input[type="text"],
html[data-theme="light"] .form-group textarea {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(100, 116, 139, 0.28);
    color: #0f172a;
}

html[data-theme="light"] .form-group input[type="text"]:focus,
html[data-theme="light"] .form-group textarea:focus {
    background: rgba(255, 255, 255, 0.56);
}

html[data-theme="light"] .review-form-status[data-type="info"] {
    color: rgba(51, 65, 85, 0.72);
}

html[data-theme="light"] .review-form-status[data-type="success"] {
    color: #047857;
}

html[data-theme="light"] .review-form-status[data-type="error"] {
    color: #b91c1c;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.5rem;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.2s;
    margin: 0;
}

.star-rating-input label:hover,
.star-rating-input label:hover~label,
.star-rating-input input:checked~label {
    color: #ffc107;
}

/* Responsive */
@media (max-width: 768px) {
    .review-card {
        width: 260px;
    }
}
