/* Professional Reviews System */

/* Main Reviews Section */
.reviews-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.reviews-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(247, 183, 49, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(51, 102, 255, 0.04) 0%, transparent 50%);
    z-index: 0;
}

/* Professional Tabs */
.reviews-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.tab {
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-radius: 25px;
    margin: 0 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(247, 183, 49, 0.1) 0%, rgba(51, 102, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab:hover {
    transform: translateY(-3px);
    border-color: rgba(247, 183, 49, 0.3);
    box-shadow: 0 8px 25px rgba(247, 183, 49, 0.15);
}

.tab:hover::before {
    opacity: 1;
}

.tab.active {
    background: linear-gradient(135deg, #f7b731 0%, #f97316 100%);
    color: white;
    border-color: #f7b731;
    box-shadow: 0 8px 25px rgba(247, 183, 49, 0.3);
    transform: translateY(-3px);
}

/* Enhanced Container */
.reviews-container,
.qa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Professional Headers */
.reviews-header,
.qa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reviews-header h2,
.qa-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1a202c 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Professional Action Buttons */
.write-review,
.ask-question-btn,
.primary-btn {
    background: linear-gradient(135deg, #f7b731 0%, #f97316 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(247, 183, 49, 0.2);
    position: relative;
    overflow: hidden;
}

.write-review::before,
.ask-question-btn::before,
.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.write-review:hover,
.ask-question-btn:hover,
.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(247, 183, 49, 0.3);
}

.write-review:hover::before,
.ask-question-btn:hover::before,
.primary-btn:hover::before {
    left: 100%;
}

/* Enhanced Reviews Overview */
.reviews-overview {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rating-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
}

.rating-score {
    font-size: 4rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rating-details {
    text-align: center;
}

.rating-stars {
    font-size: 1.5rem;
    color: #f7b731;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(247, 183, 49, 0.3));
}

.review-count {
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 500;
}

.rating-breakdown {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.rating-bar span:first-child {
    min-width: 80px;
    font-weight: 500;
    color: #374151;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #f7b731 0%, #f97316 100%);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

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

.rating-bar span:last-child {
    min-width: 30px;
    text-align: right;
    font-weight: 600;
    color: #374151;
}

/* Professional Controls */
.reviews-controls,
.qa-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
}

.search-input,
.qa-search {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.search-input:focus,
.qa-search:focus {
    outline: none;
    border-color: #f7b731;
    box-shadow: 0 0 0 3px rgba(247, 183, 49, 0.1);
}

.controls-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: #f7b731;
    background: rgba(247, 183, 49, 0.1);
    color: #f97316;
}

.sort-select {
    padding: 0.6rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #f7b731;
}

/* Professional Review Items */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.review-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(247, 183, 49, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.review-item:hover::before {
    opacity: 1;
}

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

.reviewer-info h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.reviewer-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.location {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

.verified-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.review-date {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
}

.review-rating {
    margin-bottom: 1.5rem;
}

.review-rating .rating-stars {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.review-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.4;
}

.review-content p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1.05rem;
    margin: 0;
}

.review-photos {
    margin: 1.5rem 0;
}

.review-photo {
    max-width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.review-photo:hover {
    transform: scale(1.05);
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.review-tags {
    display: flex;
    gap: 0.5rem;
}

.review-tag {
    background: linear-gradient(135deg, rgba(247, 183, 49, 0.1) 0%, rgba(51, 102, 255, 0.05) 100%);
    color: #f97316;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(247, 183, 49, 0.2);
}

.helpful-btn {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #64748b;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.helpful-btn:hover,
.helpful-btn.active {
    border-color: #f7b731;
    background: rgba(247, 183, 49, 0.1);
    color: #f97316;
    transform: translateY(-2px);
}

/* Professional Loading & States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    color: #64748b;
}

.spinner-logo {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: 1rem;
}

.spinner-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.spinner-overlay {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px solid transparent;
    border-top-color: #f7b731;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-weight: 500;
    color: #64748b;
}

.load-more-btn {
    display: block;
    margin: 3rem auto 0;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, rgba(247, 183, 49, 0.1) 0%, rgba(51, 102, 255, 0.05) 100%);
    border: 2px solid rgba(247, 183, 49, 0.3);
    color: #f97316;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #f7b731 0%, #f97316 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(247, 183, 49, 0.2);
}

/* Professional Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(8px);
    padding: 1rem;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease-out;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Modal Open State */
.modal.modal-open {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 20px;
    padding: 2rem;
    max-width: 650px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(230, 230, 230, 0.8);
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
    margin: auto;
}

/* Prevent Body Scroll When Modal is Open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Modal Animation Keyframes */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

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

/* Ensure Close Button is Always Visible */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
    min-height: 50px;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
    flex: 1;
    padding-right: 1rem;
    line-height: 1.3;
}

/* Enhanced Close Button with Better Mobile Visibility */
.close-modal {
    background: #ef4444;
    border: 2px solid #dc2626;
    font-size: 1.5rem;
    color: #ffffff;
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    line-height: 1;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 1000000;
    outline: none;
    font-family: Arial, sans-serif;
}

.close-modal::after {
    content: '×';
    display: block;
    font-size: inherit;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    background: #dc2626;
    border-color: #b91c1c;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.close-modal:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Professional Forms */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    color: #1f2937;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #f7b731;
    box-shadow: 0 0 0 3px rgba(247, 183, 49, 0.1);
    background: #ffffff;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 3rem;
}

/* Enhanced Star Rating */
.star-rating {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: none;
    position: relative;
}

.star-rating label::before {
    content: '★';
}

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #fbbf24;
    transform: scale(1.1);
}

.star-rating input:checked ~ label {
    color: #f7b731;
    transform: scale(1.05);
}

/* Character Count */
.char-count {
    position: absolute;
    bottom: -1.5rem;
    right: 0;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.form-group input[data-max-length]:focus + .char-count,
.form-group textarea[data-max-length]:focus + .char-count {
    color: #f7b731;
    font-weight: 600;
}

/* Photo Preview */
.photo-preview {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.photo-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.photo-preview img:hover {
    border-color: #f7b731;
    transform: scale(1.05);
}

/* Checkbox Styling */
.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-group.checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
    accent-color: #f7b731;
}

.form-group.checkbox label {
    margin: 0;
    font-weight: 500;
    color: #64748b;
}

/* Enhanced Submit Button */
.primary-btn {
    background: linear-gradient(135deg, #f7b731 0%, #f39c12 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 12px rgba(247, 183, 49, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 183, 49, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(247, 183, 49, 0.3);
}

/* Enhanced Responsive Design with More Breakpoints */

/* Large Desktop */
@media (max-width: 1440px) {
    .modal-content {
        max-width: 600px;
        padding: 2.8rem;
    }
}

/* Standard Desktop */
@media (max-width: 1200px) {
    .modal-content {
        max-width: 550px;
        padding: 2.5rem;
    }
    
    .modal-header h3 {
        font-size: 2.1rem;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    .modal-content {
        max-width: 85%;
        padding: 2.2rem;
    }
    
    .modal-header h3 {
        font-size: 2rem;
    }
    
    .close-modal {
        width: 48px;
        height: 48px;
        font-size: 1.7rem;
    }
}

/* Tablet Portrait */
@media (max-width: 834px) {
    .modal {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .modal-content {
        max-width: 95%;
        padding: 2rem;
        border-radius: 20px;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header {
        margin-bottom: 2rem;
        padding-bottom: 1.2rem;
    }
    
    .modal-header h3 {
        font-size: 1.9rem;
        padding-right: 0.8rem;
    }
    
    .close-modal {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .modal {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 1rem;
    }
    
    .modal-content {
        background: #ffffff;
        padding: 1.5rem;
        margin: 0;
        max-width: 100%;
        border-radius: 16px;
        max-height: calc(100vh - 1rem);
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.15),
            0 3px 10px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e7eb;
    }
    
    .modal-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        align-items: center;
        gap: 1rem;
        flex-wrap: nowrap;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
        color: #1a202c;
        flex: 1;
        min-width: 0;
        padding-right: 0.5rem;
    }
    
    .close-modal {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        background: #ef4444;
        color: #ffffff;
        position: relative;
        top: 0;
        right: 0;
        margin: 0;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
        color: #374151;
        margin-bottom: 0.4rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem;
        font-size: 1rem;
        border-radius: 10px;
        border-color: #d1d5db;
        background: #ffffff;
        color: #1f2937;
    }
    
    .star-rating {
        gap: 0.3rem;
        padding: 0.8rem;
        background: #f9fafb;
    }
    
    .star-rating label {
        font-size: 1.8rem;
        color: #d1d5db;
    }
    
    .char-count {
        color: #6b7280;
        font-size: 0.85rem;
    }
}

/* Large Mobile */
@media (max-width: 640px) {
    .modal {
        padding: 0.3rem;
        padding-top: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        border-radius: 16px;
        max-height: calc(100vh - 0.6rem);
    }
    
    .modal-header h3 {
        font-size: 1.6rem;
    }
    
    .close-modal {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
    
    .star-rating label {
        font-size: 2rem;
    }
}

/* Standard Mobile */
@media (max-width: 480px) {
    .modal {
        padding: 0.25rem;
        padding-top: 0.5rem;
        background: rgba(0, 0, 0, 0.4);
    }
    
    .modal-content {
        padding: 1.2rem;
        border-radius: 14px;
        max-height: calc(100vh - 0.5rem);
        background: #ffffff;
    }
    
    .modal-header {
        margin-bottom: 1.5rem;
        padding-bottom: 0.8rem;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
        color: #1a202c;
    }
    
    .close-modal {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        background: #ef4444;
        color: #ffffff;
    }
    
    .star-rating {
        gap: 0.2rem;
        padding: 0.7rem;
    }
    
    .star-rating label {
        font-size: 1.6rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.7rem;
        font-size: 0.95rem;
        background: #ffffff;
        color: #1f2937;
    }
    
    .primary-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .photo-preview img {
        width: 75px;
        height: 75px;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    .modal-content {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.4rem;
    }
    
    .close-modal {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .star-rating label {
        font-size: 1.6rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 320px) {
    .modal {
        padding: 0.1rem;
        padding-top: 0.2rem;
    }
    
    .modal-content {
        padding: 0.8rem;
        border-radius: 12px;
        max-height: calc(100vh - 0.2rem);
    }
    
    .modal-header {
        margin-bottom: 1.2rem;
        padding-bottom: 0.6rem;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
        line-height: 1.1;
    }
    
    .close-modal {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
        padding: 0.4rem;
    }
    
    .star-rating {
        gap: 0.1rem;
        padding: 0.5rem;
    }
    
    .star-rating label {
        font-size: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.7rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .photo-preview img {
        width: 65px;
        height: 65px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .close-modal {
        /* Larger touch target for mobile */
        min-width: 44px;
        min-height: 44px;
        padding: 0.8rem;
    }
    
    .close-modal:hover {
        /* Remove hover effects on touch devices */
        transform: none;
        background: rgba(239, 68, 68, 0.15);
    }
    
    .close-modal:active {
        transform: scale(0.95);
        background: rgba(239, 68, 68, 0.3);
    }
    
    .star-rating label {
        /* Larger touch targets for stars */
        padding: 0.3rem;
        margin: 0.1rem;
    }
    
    .primary-btn {
        /* Better touch target */
        min-height: 48px;
        padding: 1rem 2rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .close-modal {
        border-width: 1.5px;
    }
    
    .modal-content {
        border-width: 0.5px;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .modal {
        align-items: flex-start;
        padding-top: 0.5rem;
    }
    
    .modal-content {
        max-height: calc(100vh - 1rem);
        padding: 1.5rem;
    }
    
    .modal-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.6rem;
    }
    
    .star-rating {
        padding: 0.8rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modal {
        background: rgba(0, 0, 0, 0.85);
    }
    
    .modal-content {
        background: rgba(30, 30, 30, 0.98);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .modal-header h3 {
        color: #f8fafc;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .form-group label {
        color: #e2e8f0;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: rgba(45, 45, 45, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
        color: #f8fafc;
    }
}

/* FAQ Categories */
.faq-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.faq-category-filter {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 20px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.faq-category-filter:hover,
.faq-category-filter.active {
    border-color: #f7b731;
    background: rgba(247, 183, 49, 0.1);
    color: #f97316;
}

/* Q&A Items */
.qa-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.qa-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.question h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.question-meta {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.answer p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

.question-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .reviews-overview {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .reviews-controls,
    .qa-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .reviews-section {
        padding: 4rem 0;
    }
    
    .reviews-container,
    .qa-container {
        padding: 0 1.5rem;
    }
    
    .reviews-header,
    .qa-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .reviews-header h2,
    .qa-header h2 {
        font-size: 2rem;
    }
    
    .review-item {
        padding: 1.5rem;
    }
    
    .review-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .review-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .modal-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .reviews-section {
        padding: 3rem 0;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .review-item {
        padding: 1rem;
    }
    
    .reviews-header h2,
    .qa-header h2 {
        font-size: 1.8rem;
    }
}

/* Additional Mobile-Specific Improvements */
@media (max-width: 768px) {
    .modal-header {
        align-items: center;
        gap: 1rem;
        flex-wrap: nowrap;
    }
    
    .modal-header h3 {
        flex: 1;
        min-width: 0;
        padding-right: 0.5rem;
    }
    
    .close-modal {
        position: relative;
        top: 0;
        right: 0;
        margin: 0;
    }
}

/* Ultra-wide screen support */
@media (min-width: 1920px) {
    .modal-content {
        max-width: 800px;
        padding: 4rem;
    }
    
    .modal-header h3 {
        font-size: 2.5rem;
    }
    
    .close-modal {
        width: 55px;
        height: 55px;
        font-size: 2rem;
    }
}

/* Print Media - Hide Modals */
@media print {
    .modal {
        display: none !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-content,
    .close-modal {
        animation: none;
        transition: opacity 0.2s ease;
    }
    
    .close-modal:hover {
        transform: none;
    }
}

/* Ensure Modal Works on iOS Safari */
@supports (-webkit-touch-callout: none) {
    .modal {
        position: fixed;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Override Dark Mode for Mobile - Force Light Theme */
@media (max-width: 768px) {
    .modal {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .modal-content {
        background: #ffffff !important;
        color: #1f2937 !important;
        border-color: #e5e7eb !important;
    }
    
    .modal-header h3 {
        color: #1a202c !important;
    }
    
    .form-group label {
        color: #374151 !important;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: #ffffff !important;
        border-color: #d1d5db !important;
        color: #1f2937 !important;
    }
    
    .star-rating {
        background: #f9fafb !important;
        border-color: #e5e7eb !important;
    }
    
    .star-rating label {
        color: #d1d5db !important;
    }
    
    .star-rating label:hover,
    .star-rating input:checked ~ label {
        color: #f7b731 !important;
    }
    
    .close-modal {
        background: #ef4444 !important;
        color: #ffffff !important;
        border-color: #dc2626 !important;
    }
}

/* Prevent Dark Mode Issues */
@media (prefers-color-scheme: dark) and (min-width: 769px) {
    /* Only apply dark mode on larger screens */
    .modal {
        background: rgba(0, 0, 0, 0.85);
    }
    
    .modal-content {
        background: rgba(30, 30, 30, 0.98);
        border-color: rgba(255, 255, 255, 0.1);
        color: #f8fafc;
    }
    
    .modal-header h3 {
        color: #f8fafc;
    }
    
    .form-group label {
        color: #e2e8f0;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: rgba(45, 45, 45, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
        color: #f8fafc;
    }
}

/* Additional Mobile Safety Rules - Force Visibility */
@media (max-width: 768px) {
    /* Ensure modal is always visible */
    .modal, .modal.modal-open {
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(4px) !important;
    }
    
    /* Force white background on modal content */
    .modal-content {
        background: #ffffff !important;
        color: #1f2937 !important;
        border: 2px solid #e5e7eb !important;
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.2) !important,
            0 3px 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Ensure close button is always red and visible */
    .close-modal {
        background: #ef4444 !important;
        color: #ffffff !important;
        border: 2px solid #dc2626 !important;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
        font-weight: 900 !important;
        z-index: 999999 !important;
    }
    
    .close-modal:hover,
    .close-modal:focus,
    .close-modal:active {
        background: #dc2626 !important;
        color: #ffffff !important;
        border-color: #b91c1c !important;
    }
    
    /* Force text visibility */
    .modal-header h3 {
        color: #1a202c !important;
        text-shadow: none !important;
    }
    
    .form-group label {
        color: #374151 !important;
        text-shadow: none !important;
    }
    
    /* Force form controls to be white */
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: #ffffff !important;
        color: #1f2937 !important;
        border: 2px solid #d1d5db !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }
    
    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: #f7b731 !important;
        background: #ffffff !important;
        color: #1f2937 !important;
        box-shadow: 0 0 0 3px rgba(247, 183, 49, 0.1) !important;
    }
    
    /* Star rating visibility */
    .star-rating {
        background: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
    }
    
    .star-rating label {
        color: #d1d5db !important;
        text-shadow: none !important;
    }
    
    .star-rating label:hover,
    .star-rating input:checked ~ label {
        color: #f7b731 !important;
    }
    
    /* Character counter */
    .char-count {
        color: #6b7280 !important;
    }
    
    /* Primary button */
    .primary-btn {
        background: linear-gradient(135deg, #f7b731 0%, #f39c12 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 4px 12px rgba(247, 183, 49, 0.3) !important;
    }
    
    .primary-btn:hover {
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
        color: #ffffff !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .close-modal {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.4rem !important;
        background: #ef4444 !important;
        color: #ffffff !important;
        border: 2px solid #dc2626 !important;
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .close-modal:hover,
    .close-modal:focus,
    .close-modal:active {
        background: #dc2626 !important;
        color: #ffffff !important;
        transform: scale(0.95) !important;
    }
    
    /* Better tap targets for mobile */
    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 44px !important;
        padding: 0.8rem !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .primary-btn {
        min-height: 48px !important;
        padding: 1rem 2rem !important;
        font-size: 16px !important;
    }
    
    .star-rating label {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modal-content {
        border: 3px solid #000000 !important;
        background: #ffffff !important;
    }
    
    .close-modal {
        background: #000000 !important;
        color: #ffffff !important;
        border: 2px solid #000000 !important;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        border: 2px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
} 