/* ===== TESTIMONIALS CSS - MOBILE TILT, DESKTOP STRAIGHT ===== */

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px; /* Reduced from -15px */
}

.col-12, .col-md-6, .col-lg-5 {
    padding: 0 10px; /* Reduced from 15px */
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Flexbox utilities */
.d-flex {
    display: flex !important;
}

.align-items-start {
    align-items: flex-start !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.me-3 {
    margin-right: 1rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

/* Main container - reduced padding */
.main-container {
    position: relative;
    z-index: 1;
    padding: 40px 0; /* Reduced from 40px */
}

/* Testimonial cards - DEFAULT: NO TILT (for desktop) */
.new-testimonial-card {
    background: white !important;
    border-radius: 20px !important;
    padding: 20px !important; /* Reduced from 25px */
    margin-bottom: 20px !important; /* Reduced from 30px */
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
    border: none !important;
    position: relative !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    /* DEFAULT: NO ROTATION for desktop */
}

/* Desktop hover effects - NO TILT */
.new-testimonial-card:hover {
    transform: translateY(-5px) rotate(1.5deg) !important;
    box-shadow: 0 12px 35px rgba(0,0,0,0.15) !important;
}

/* Profile images */
.profile-img {
    width: 60px !important; /* Reduced from 70px */
    height: 60px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #f8f9fa !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    flex-shrink: 0;
}

/* Quote marks */
.quote-mark {
    font-size: 22px !important; /* Reduced from 24px */
    color: #4824ff !important;
    font-weight: bold !important;
    line-height: 1 !important;
    position: absolute !important;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.quote-mark.opening {
    top: 12px !important; /* Reduced from 15px */
    right: 18px !important;
}

.quote-mark.closing {
    bottom: 12px !important;
    left: 18px !important;
}

.new-testimonial-card:hover .quote-mark {
    opacity: 1;
}

/* Testimonial text */
.new-testimonial-text {
    font-size: 16px !important; /* Reduced from 16px */
    line-height: 1.5 !important; /* Reduced from 1.6 */
    color: #333 !important;
    margin: 10px 0 !important; /* Reduced from 15px */
    font-style: italic !important;
    flex-grow: 1;
}

/* Testimonial name */
.new-testimonial-name {
    font-size: 15px !important;
    font-weight: bold !important;
    color: #666 !important;
    margin-top: 8px !important; /* Reduced from 10px */
    margin-bottom: 3px !important; /* Reduced from 5px */
    text-align: right !important;
}

/* Testimonial institute */
.new-testimonial-institute {
    font-size: 12px !important;
    color: #888 !important;
    text-align: right !important;
    margin: 0 !important;
    font-weight: normal !important;
}

/* Section header styles - reduced spacing */
.section-header {
    text-align: center;
    margin-bottom: 2rem; /* Reduced from 3rem */
}

.testcontainer {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 55px;
}

.badge-text {
    font-size: 1.8rem !important; /* Reduced from 2rem */
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

.section-title {
    font-size: 2.2rem !important; /* Reduced from 2.5rem */
    font-weight: 700 !important;
    color: #333 !important;
    margin: 0.8rem 0 !important; /* Reduced from 1rem */
}

.pillarsection-description {
    color: #666 !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

/* DESKTOP: Keep cards straight, reduce spacing */
@media (min-width: 768px) {
    .row {
        margin-left: -1rem; /* Reduced from -2rem */
        margin-right: -1rem;
    }
    
    .row > * {
        padding-left: 1rem; /* Reduced from 2rem */
        padding-right: 1rem;
    }
    
    .new-testimonial-card {
        height: auto !important;
        min-height: 180px !important; /* Reduced from 200px */
        margin-bottom: 40px !important; /* Reduced from 80px */
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        /* IMPORTANT: NO TILT on desktop */
        transform: none !important;
    }
    
    .new-testimonial-card:hover {
        transform: translateY(-5px) !important; /* Only vertical movement */
    }
}

/* MOBILE: Apply tilts here */
@media (max-width: 767px) {
    .main-container {
        padding: 15px 0; /* Reduced from 20px */
    }
    
    .new-testimonial-card {
        margin-bottom: 30px !important; /* Reduced from 50px */
        padding: 18px !important; /* Reduced from 20px */
        min-height: auto !important;
    }
    
    /* MOBILE TILTS - Apply alternating tilt pattern */
    .new-testimonial-card.card-1 { transform: rotate(2.5deg) !important; }
    .new-testimonial-card.card-2 { transform: rotate(-2deg) !important; }
    .new-testimonial-card.card-3 { transform: rotate(1.8deg) !important; }
    .new-testimonial-card.card-4 { transform: rotate(-1.5deg) !important; }
    .new-testimonial-card.card-5 { transform: rotate(1.8deg) !important; }
    
    .profile-img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .new-testimonial-text {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    .quote-mark {
        font-size: 18px !important; /* Reduced from 20px */
    }
}

/* Animation for cards on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px); /* Reduced from 30px */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-testimonial-card {
    animation: fadeInUp 0.5s ease-out; /* Reduced from 0.6s */
}

/* Reduced background gradient effect */
.new-testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.01) 0%, rgba(118, 75, 162, 0.01) 100%);
    border-radius: 20px;
    pointer-events: none;
}

/* Smooth transitions */
* {
    transition: all 0.25s ease; /* Reduced from 0.3s */
}

/* Compact spacing */
.new-testimonial-card p {
    margin-bottom: 0.3rem; /* Reduced from 0.5rem */
}

.new-testimonial-card .me-3 {
    margin-right: 0.8rem !important; /* Reduced from 1rem */
}

.new-testimonial-card .mb-2 {
    margin-bottom: 0.3rem !important; /* Reduced from 0.5rem */
}