/* Testimonial Form Styles */
.testimonial-form-container {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(41, 24, 110, 0.15);
    padding: 40px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.testimonial-form-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #29186e, #0192dd, #7cb9e8);
}

#testimonial-form {
    position: relative;
    z-index: 1;
}

#testimonial-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

#testimonial-form .form-group {
    flex: 1;
    margin-bottom: 25px;
    position: relative;
}

#testimonial-form label {
    display: block;
    color: #29186e;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#testimonial-form input[type="text"],
#testimonial-form input[type="email"],
#testimonial-form select,
#testimonial-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-size: 16px;
    transition: all 0.3s ease;
    color: #333;
    font-family: 'Open Sans', sans-serif;
}

#testimonial-form input[type="text"]:focus,
#testimonial-form input[type="email"]:focus,
#testimonial-form select:focus,
#testimonial-form textarea:focus {
    border-color: #7cb9e8;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(1, 146, 221, 0.1);
    outline: none;
}

#testimonial-form input[type="text"]::placeholder,
#testimonial-form input[type="email"]::placeholder,
#testimonial-form textarea::placeholder {
    color: #999;
    opacity: 0.7;
}

#testimonial-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2329186e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

#testimonial-form textarea {
    resize: vertical;
    min-height: 150px;
}

#testimonial-form small {
    display: block;
    color: #777;
    font-size: 13px;
    margin-top: 5px;
}

/* File Upload Styling */
#testimonial-form .file-upload-container {
    position: relative;
    margin-top: 10px;
}

#testimonial-form .custom-file-upload {
    display: inline-block;
    background-color: #f5f5f5;
    color: #29186e;
    border: 2px dashed #7cb9e8;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

#testimonial-form .custom-file-upload:hover {
    background-color: #f0f0f0;
    border-color: #29186e;
}

#testimonial-form .custom-file-upload i {
    font-size: 30px;
    margin-bottom: 10px;
    color: #7cb9e8;
}

#testimonial-form .custom-file-upload .upload-text {
    font-weight: 600;
}

#testimonial-form input[type="file"] {
    display: none;
}

#testimonial-form .file-preview {
    margin-top: 15px;
    text-align: center;
    display: none;
}

#testimonial-form .file-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Star Rating Styling */
#testimonial-form .rating-select {
    padding-top: 10px;
}

#testimonial-form .star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin-top: 10px;
}

#testimonial-form .star-rating input {
    display: none;
}

#testimonial-form .star-rating label {
    cursor: pointer;
    font-size: 30px;
    color: #ddd;
    margin-right: 5px;
    transition: all 0.2s ease;
}

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

/* Submit Button Styling */
#testimonial-form button[type="submit"] {
    display: inline-block;
    background: linear-gradient(90deg, #29186e, #0192dd);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(1, 146, 221, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
}

#testimonial-form button[type="submit"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.3));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

#testimonial-form button[type="submit"]:hover {
    box-shadow: 0 7px 20px rgba(1, 146, 221, 0.5);
    transform: translateY(-2px);
}

#testimonial-form button[type="submit"]:hover::before {
    transform: translateX(100%);
}

/* Animation for form elements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#testimonial-form .form-group {
    animation: fadeIn 0.5s ease forwards;
}

#testimonial-form .form-group:nth-child(1) { animation-delay: 0.1s; }
#testimonial-form .form-group:nth-child(2) { animation-delay: 0.2s; }
#testimonial-form .form-group:nth-child(3) { animation-delay: 0.3s; }
#testimonial-form .form-group:nth-child(4) { animation-delay: 0.4s; }
#testimonial-form .form-group:nth-child(5) { animation-delay: 0.5s; }
#testimonial-form .form-group:nth-child(6) { animation-delay: 0.6s; }

/* Form success and error states */
.form-success-message,
.form-error-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.form-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form validation visual cues */
#testimonial-form input:valid,
#testimonial-form select:valid,
#testimonial-form textarea:valid {
    border-color: #28a745;
}

#testimonial-form input:invalid:focus,
#testimonial-form select:invalid:focus,
#testimonial-form textarea:invalid:focus {
    border-color: #dc3545;
}

/* Required field indicator */
#testimonial-form label.required::after {
    content: " *";
    color: #dc3545;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .testimonial-form-container {
        padding: 25px;
    }

    #testimonial-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    #testimonial-form button[type="submit"] {
        width: 100%;
    }
}

/* Testimonial Cards Grid Layout */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.testimonial-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 35, 90, 0.15);
}

.testimonial-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.testimonial-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #f0f0f0;
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-meta {
    margin-left: 15px;
    flex-grow: 1;
}

.testimonial-meta h3 {
    margin: 0 0 5px;
    font-size: 20px;
    color: #29186e;
    font-weight: 600;
}

.testimonial-meta p {
    margin: 5px 0 8px;
    font-size: 14px;
    color: #666;
}

.testimonial-meta .rating {
    color: #ffc107;
    font-size: 14px;
}

.testimonial-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.testimonial-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    font-style: italic;
}

/* Responsive adjustments for testimonial grid */
@media screen and (max-width: 1200px) {
    .testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media screen and (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    .testimonial-header {
        padding: 15px;
    }

    .testimonial-image {
        width: 60px;
        height: 60px;
    }

    .testimonial-meta h3 {
        font-size: 16px;
    }

    .testimonial-content {
        padding: 15px;
    }
}

/* Video testimonials grid */
.video-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.video-testimonial {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 35, 90, 0.15);
}

.video-container {
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(74, 35, 90, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-button i {
    color: white;
    font-size: 24px;
    margin-left: 4px;
}

.video-testimonial:hover .play-button {
    background-color: #4a235a;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    margin: 0 0 5px;
    font-size: 18px;
    color: #4a235a;
}

.video-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Responsive adjustments for video testimonials */
@media screen and (max-width: 992px) {
    .video-testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .video-testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 20px;
    }

    .play-button {
        width: 50px;
        height: 50px;
    }

    .play-button i {
        font-size: 20px;
    }

    .video-info h3 {
        font-size: 16px;
    }
}

/* Testimonial category filter */
.testimonials-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.filter-item {
    padding: 8px 20px;
    background-color: #f5f5f5;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
}

.filter-item:hover {
    background-color: #e0e0e0;
}

.filter-item.active {
    background-color: #29186e;
    color: white;
}

/* Animation for testimonial cards */
@keyframes cardAppear {
    0% {
        opacity: 0.5;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-card {
    animation: cardAppear 0.5s ease forwards;
}

/* Initially ensure all cards are set to flex */
.testimonial-card {
    display: flex;
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-modal-content {
    background-color: white;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

.video-modal-content.active {
    transform: scale(1);
    opacity: 1;
}

.video-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #29186e;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.video-modal-close:hover {
    color: #0192dd;
}

.video-modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.video-modal-header h3 {
    margin: 0 0 5px;
    font-size: 22px;
    color: #29186e;
}

.video-modal-header p {
    margin: 5px 0 0;
    font-size: 16px;
    color: #666;
}

.video-modal-body {
    padding: 20px;
}

.video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 5px;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video modal responsive styles */
@media screen and (max-width: 768px) {
    .video-modal-content {
        width: 95%;
    }

    .video-modal-header {
        padding: 15px;
    }

    .video-modal-header h3 {
        font-size: 18px;
    }

    .video-modal-body {
        padding: 15px;
    }
}
