/**
 * Mobile Testimonials and Certificates Fix
 * Improves mobile experience for testimonials and certificate sections
 */

/* ========================================
   TESTIMONIALS MOBILE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Remove purple dots (carousel dots) */
    .carousel-dots {
        display: none !important;
    }
    
    /* Make testimonials full width and properly spaced */
    .testimonials-carousel-container {
        padding: 0 20px;
        margin: 0 auto;
    }
    
    .testimonials-track {
        gap: 0; /* Remove gap since we show one card at a time */
    }
    
    .testimonial-card {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 2rem;
        margin: 0;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        min-height: 280px; /* Ensure consistent height */
        display: flex;
        flex-direction: column;
    }
    
    .testimonial-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        height: 100%;
        justify-content: space-between;
    }
    
    /* Improve avatar styling */
    .parent-avatar {
        width: 80px;
        height: 80px;
        border: 3px solid rgba(168, 85, 247, 0.6);
        box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
        align-self: center;
        margin-bottom: 1rem;
    }
    
    /* Better text styling */
    .testimonial-content blockquote {
        font-size: 1.1rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.9);
        text-align: center;
        padding: 0 1rem;
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .testimonial-info {
        text-align: center;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: auto;
    }
    
    .testimonial-info .name {
        font-size: 1.2rem;
        font-weight: 600;
        color: #fff;
        margin-bottom: 0.5rem;
    }
    
    .testimonial-info .course {
        font-size: 1rem;
        color: rgba(168, 85, 247, 0.8);
        font-weight: 500;
    }
    
    /* Improve carousel arrows for mobile */
    .carousel-arrow {
        width: 50px;
        height: 50px;
        background: rgba(168, 85, 247, 0.8);
        border: 2px solid rgba(168, 85, 247, 1);
        backdrop-filter: blur(15px);
        box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    }
    
    .carousel-arrow:hover,
    .carousel-arrow:active {
        background: rgba(168, 85, 247, 1);
        transform: translateY(-50%) scale(1.05);
    }
    
    .carousel-arrow svg {
        width: 24px;
        height: 24px;
        color: white;
    }
    
    .carousel-arrow-left {
        left: 10px;
    }
    
    .carousel-arrow-right {
        right: 10px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .testimonials-carousel-container {
        padding: 0 15px;
    }
    
    .testimonial-card {
        padding: 1.5rem;
        min-height: 260px;
    }
    
    .parent-avatar {
        width: 70px;
        height: 70px;
    }
    
    .testimonial-content blockquote {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    .testimonial-info .name {
        font-size: 1.1rem;
    }
    
    .testimonial-info .course {
        font-size: 0.9rem;
    }
    
    .carousel-arrow {
        width: 45px;
        height: 45px;
    }
    
    .carousel-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .carousel-arrow-left {
        left: 5px;
    }
    
    .carousel-arrow-right {
        right: 5px;
    }
}

/* ========================================
   CERTIFICATE SECTION MOBILE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Make certificate section more prominent */
    .certificate-visual {
        gap: 15px;
        padding: 1rem 0;
    }
    
    .certificate-carousel {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        border: 2px solid rgba(168, 85, 247, 0.3);
    }
    
    .certificate-image {
        min-width: 100%;
        width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
        background: white;
        padding: 10px; /* Add padding so certificate content is visible */
    }
    
    /* Larger, more prominent certificate arrows */
    .certificate-arrow {
        width: 50px;
        height: 50px;
        min-width: 50px;
        background: rgba(168, 85, 247, 0.9);
        border: 2px solid rgba(168, 85, 247, 1);
        backdrop-filter: blur(15px);
        box-shadow: 0 4px 15px rgba(168, 85, 247, 0.5);
    }
    
    .certificate-arrow:hover,
    .certificate-arrow:active {
        background: rgba(168, 85, 247, 1);
        border-color: rgba(168, 85, 247, 1);
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
    }
    
    .certificate-arrow svg {
        width: 24px;
        height: 24px;
        color: white;
    }
    
    /* Improve certificate section text */
    .feature-text h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .feature-text p {
        font-size: 1.1rem;
        line-height: 1.6;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .certificate-features {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        list-style: none;
        padding: 0;
        margin: 1rem 0;
    }
    
    .certificate-features li {
        background: rgba(168, 85, 247, 0.2);
        padding: 0.5rem 1rem;
        border-radius: 20px;
        border: 1px solid rgba(168, 85, 247, 0.4);
        font-size: 0.9rem;
        font-weight: 500;
    }
}

/* Very small screens for certificates */
@media (max-width: 480px) {
    .certificate-visual {
        gap: 10px;
        padding: 0.5rem 0;
    }
    
    .certificate-arrow {
        width: 45px;
        height: 45px;
        min-width: 45px;
    }
    
    .certificate-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .certificate-image {
        padding: 8px;
    }
    
    .feature-text h3 {
        font-size: 1.3rem;
    }
    
    .feature-text p {
        font-size: 1rem;
    }
    
    .certificate-features li {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ========================================
   DESKTOP IMPROVEMENTS
   ======================================== */

@media (min-width: 769px) {
    /* Ensure testimonials look good on desktop too */
    .testimonial-card {
        min-height: 300px;
    }
    
    .testimonial-content blockquote {
        font-size: 1.1rem;
        line-height: 1.7;
    }
    
    /* Certificate improvements for desktop */
    .certificate-image {
        max-height: 400px;
        object-fit: contain;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Better focus states */
.carousel-arrow:focus,
.certificate-arrow:focus {
    outline: 3px solid rgba(168, 85, 247, 0.8);
    outline-offset: 3px;
}

/* Touch feedback */
@media (hover: none) and (pointer: coarse) {
    .carousel-arrow:active,
    .certificate-arrow:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* ========================================
   ANIMATION IMPROVEMENTS
   ======================================== */

.testimonial-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.certificate-carousel {
    transition: all 0.3s ease;
}

/* Smooth entrance animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-card,
.certificate-visual {
    animation: slideInUp 0.6s ease-out;
}

/* ========================================
   REDUCED MOTION SUPPORT
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .testimonial-card,
    .certificate-visual,
    .carousel-arrow,
    .certificate-arrow {
        animation: none !important;
        transition: none !important;
    }
    
    .carousel-arrow:hover,
    .certificate-arrow:hover {
        transform: none !important;
    }
}