/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --heading-font: 'Nunito', sans-serif;
    --body-font: 'Poppins', sans-serif;
    --accent-font: 'Montserrat', sans-serif;
}

@media (max-width: 823px) {
    header nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 0;
        background: #ffffff;
        overflow: hidden;
        transition: height 0.3s ease, opacity 0.3s ease;
        opacity: 0;
        z-index: 999;
    }

    header nav.active {
        display: block;
        height: 100vh;
        opacity: 1;
        padding: 80px 20px 20px;
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    header nav ul li {
        margin: 15px 0;
    }

    header nav ul li a {
        font-size: 1.2rem;
    }
}

/* Testimonial Tabs Styling */
.testimonials.tab-content {
    display: none;
}
.testimonials.tab-content.active {
    display: block;
}

/* Tab Navigation */
.testimonial-tabs {
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(162, 74, 163, 0.05), rgba(0, 0, 0, 0.05));
}

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab-button {
    font-family: var(--accent-font);
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-radius: 30px;
    font-size: 1rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tab-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tab-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(162, 74, 163, 0.3);
    color: #000000;
}

.tab-button.active {
    background: #000000;
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(162, 74, 163, 0.4);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
    display: block;
}

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

/* Parent Card Specific Styling */
.parent-card .testimonial-author span {
    font-size: 0.85rem;
    line-height: 1.4;
    display: block;
    margin-top: 0.3rem;
}

.parent-contact {
    margin-top: 1rem;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    background-color: #25D366;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Video Testimonials */
.video-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.video-testimonial-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.video-testimonial-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(162, 74, 163, 0.3);
}

.video-testimonial-card:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 2px solid transparent;
    background: linear-gradient(45deg, #a24aa3, #000000) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 1;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: transparent;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.video-testimonial-card:hover .video-container video {
    transform: scale(1.05); 
}

.video-overlay1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.video-container.playing .video-overlay1 {
    opacity: 0;
    pointer-events: none;
}

.video-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.video-controls:hover {
    background: rgba(0, 0, 0, 0.7);
}

.play-pause-btn, .fullscreen-btn, .volume-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-pause-btn:hover, .fullscreen-btn:hover, .volume-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.play-pause-btn i, .fullscreen-btn i, .volume-btn i {
    color: white;
    font-size: 1.2rem;
}

.fullscreen-btn, .volume-btn {
    width: 35px;
    height: 35px;
}

.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.video-progress-bar {
    height: 100%;
    width: 0;
    background: #a24aa3;
    transition: width 0.1s linear;
}

.video-testimonial-info {
    padding: 1.5rem;
    background: linear-gradient(180deg, #f9f9f9, #ffffff);
}

.video-testimonial-info h3 {
    font-family: var(--heading-font);
    margin: 0 0 0.5rem;
    color: #222;
    font-size: 1.3rem;
    font-weight: 600;
}

.video-testimonial-info p {
    font-family: var(--body-font);
    color: #555;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.video-meta {
    font-family: var(--accent-font);
    display: block;
    font-size: 0.9rem;
    color: #a24aa3;
    font-weight: 600;
    text-transform: uppercase;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .video-controls {
        padding: 6px 10px;
    }

    .play-pause-btn, .fullscreen-btn, .volume-btn {
        width: 35px;
        height: 35px;
    }

    .play-pause-btn i, .fullscreen-btn i, .volume-btn i {
        font-size: 1rem;
    }

    .fullscreen-btn, .volume-btn {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .video-testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, #000000, #a24aa3);
    padding: 4rem 0;
    color: white;
    text-align: center;
    margin-top: 3rem;
}

.cta-content h2 {
    font-family: var(--heading-font);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-family: var(--body-font);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.cta-content .btn-primary {
    font-family: var(--accent-font);
    background: white;
    color: #a24aa3;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-content .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Testimonial Card Styling */
.testimonial-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(162, 74, 163, 0.2);
}

.testimonial-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    background: #f5f5f5;
}

.testimonial-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    margin: 0;
}

.testimonial-card:hover .testimonial-image img {
    transform: none;
}

.testimonial-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rating {
    margin-bottom: 1rem;
}

.rating i {
    color: #ffc107;
    margin-right: 2px;
}

.testimonial-content p {
    font-family: var(--body-font);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.testimonial-author {
    margin-top: auto;
}

.testimonial-author h4 {
    font-family: var(--heading-font);
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.testimonial-author span {
    font-family: var(--body-font);
    font-size: 0.85rem;
    color: #a24aa3;
    display: block;
    margin-top: 0.2rem;
}

/* Testimonials Page Specific Styles */

/* Page Banner */
.page-banner {
    background: linear-gradient(135deg, #a24aa3, #000000);
    color: #fff;
    padding: 120px 0 60px;
    text-align: center;
}

.page-banner h1 {
    font-family: var(--heading-font);
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease-out;
}

.page-banner p {
    font-family: var(--body-font);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    animation: fadeInUp 1.2s ease-out;
}

/* Testimonials Overview */
.testimonials-overview {
    padding: 60px 0;
    background: #f9f9f9;
}

.overview-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
}

.stat-item {
    padding: 20px;
    min-width: 200px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(162, 74, 163, 0.1);
}

.stat-number {
    font-family: var(--heading-font);
    font-size: 2.5rem;
    font-weight: 700;
    color: #a24aa3;
    margin-bottom: 10px;
}

.star-rating {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* Featured Testimonials */
.testimonials {
    padding: 30px 0;
    background: #fff;
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Project Showcase */
.project-showcase {
    padding: 80px 0;
    background: #f9f9f9;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: -30px auto 40px;
    color: #666;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.05);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    font-family: var(--heading-font);
    margin-bottom: 5px;
    color: #333;
}

.project-content p {
    font-family: var(--body-font);
    margin-bottom: 10px;
    color: #666;
}

.project-tag {
    font-family: var(--accent-font);
    display: inline-block;
    background: #f0e6f6;
    color: #a24aa3;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Leave a Testimonial */
.leave-testimonial {
    padding: 80px 0;
    background: #fff;
}

.testimonial-form {
    max-width: 800px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-family: var(--body-font);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    font-family: var(--body-font);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.rating-input {
    display: flex;
    gap: 5px;
    font-size: 1.5rem;
    color: #ccc;
}

.rating-input i {
    cursor: pointer;
    transition: color 0.3s ease;
}

.rating-input i:hover,
.rating-input i.active {
    color: #ffc107;
}

.photo-upload input {
    padding: 10px 0;
    border: none;
}

.form-submit {
    text-align: center;
    margin-top: 10px;
}

.form-submit button {
    background: #a24aa3;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-submit button:hover {
    background: #000000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(162, 74, 163, 0.3);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .testimonials-slider {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .page-banner h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .page-banner {
        padding: 100px 0 40px;
        min-height: 10vh;
        height: 10vh;
    }
    
    .page-banner h1 {
        font-size: 1.8rem;
    }
    
    .page-banner p {
        font-size: 1rem;
    }
    
    .stat-item {
        width: 100%;
        max-width: 250px;
    }
    
    .testimonial-form {
        padding: 25px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .testimonial-image {
        width: 120px;
        height: 120px;
        margin: 0 auto 15px;
        border-radius: 50%;
        overflow: hidden;
        display: block;
    }

    .testimonial-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .testimonial-content p {
        font-size: 0.9rem;
    }
    
    .project-image {
        height: 180px;
    }
}

/* JavaScript Integration Styles */
.testimonial-card.active {
    animation: fadeIn 0.5s ease forwards;
}

/* Star Rating Animation */
@keyframes starPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.rating i:hover {
    animation: starPulse 0.5s ease;
}

/* Responsive Image Class */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix for image loading issues */
img[src=""], img:not([src]) {
    opacity: 0;
    background-color: #f0f0f0;
}

/* Improve mobile experience */
@media (max-width: 480px) {
    .testimonial-card, .project-card {
        margin: 0 auto 20px;
        width: 100%;
    }
    
    .testimonial-image {
        width: 100px;
        height: 100px;
        margin: 0 auto 15px;
        border-radius: 50%;
        overflow: hidden;
        display: block;
    }

    .testimonial-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .testimonial-content p {
        font-size: 0.85rem;
    }
}