/* 
   CSS for D.A.E. Classes Results/Success Stories Page
*/

/* Banner Section */
.results-banner {
    background-image: url('../images/results/banner.jpeg');
    background-size: cover;
    background-position: center;
}

/* Achievement Stats Section */
.achievement-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    width: 230px;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(93, 47, 142, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.stat-icon i {
    font-size: 28px;
    color: #5D2F8E;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: #5D2F8E;
    margin-bottom: 5px;
    display: inline-block;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: #5D2F8E;
    display: inline-block;
    margin-left: 2px;
}

.stat-card h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #2C3E50;
}

.stat-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Result Tabs */
.result-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
    margin: 30px 0;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 15px 25px;
    background-color: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #2C3E50;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #5D2F8E;
    transition: width 0.3s ease;
}

.tab-btn:hover {
    color: #5D2F8E;
}

.tab-btn.active {
    color: #5D2F8E;
}

.tab-btn.active:after {
    width: 100%;
}

.result-tab-content {
    display: none;
}

.result-tab-content.active {
    display: block;
}

/* Result Section Header */
.result-section-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-section-header h2 {
    color: #5D2F8E;
    font-size: 2rem;
    margin-bottom: 10px;
}

.result-section-header p {
    color: #2C3E50;
    max-width: 700px;
    margin: 0 auto;
}

/* Result Year Tabs */
.result-year-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.year-tab {
    padding: 8px 20px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2C3E50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-tab:hover {
    background-color: #e0e0e0;
}

.year-tab.active {
    background-color: #5D2F8E;
    color: white;
}

/* Result Cards */
.result-cards {
    display: none;
}

.result-cards.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.result-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.result-student-image {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.result-student-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.result-card:hover .result-student-image img {
    transform: scale(1.05);
}

.result-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #5D2F8E;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-badge.top-rank {
    background-color: #2ECC71;
}

.result-details {
    padding: 20px;
}

.result-details h3 {
    color: #5D2F8E;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.result-rank {
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-college {
    color: #2C3E50;
    font-weight: 600;
    margin-bottom: 15px;
}

.result-testimonial {
    color: #7f8c8d;
    font-style: italic;
    line-height: 1.6;
}

/* Board Exam Results */
.result-board-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.board-tab {
    padding: 10px 25px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    color: #2C3E50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.board-tab:hover {
    background-color: #e0e0e0;
}

.board-tab.active {
    background-color: #5D2F8E;
    color: white;
}

.result-board-content {
    display: none;
}

.result-board-content.active {
    display: block;
}

/* Toppers Grid */
.toppers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.topper-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.topper-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.topper-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.topper-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.topper-card:hover .topper-image img {
    transform: scale(1.05);
}

.topper-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #5D2F8E;
    color: white;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.topper-details {
    padding: 15px;
    text-align: center;
}

.topper-details h3 {
    color: #5D2F8E;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.topper-score {
    color: #e74c3c;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.topper-details p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Olympiad Section */
.olympiad-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.olympiad-tab {
    padding: 8px 20px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2C3E50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.olympiad-tab:hover {
    background-color: #e0e0e0;
}

.olympiad-tab.active {
    background-color: #5D2F8E;
    color: white;
}

.olympiad-content {
    display: none;
}

.olympiad-content.active {
    display: block;
}

.olympiad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.olympiad-card {
    display: flex;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.olympiad-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.olympiad-student-image {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 10px 0 0 10px;
}

.olympiad-student-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.olympiad-details {
    padding: 15px;
    flex: 1;
}

.olympiad-details h3 {
    color: #5D2F8E;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.olympiad-achievement {
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 5px;
}

.olympiad-year {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.olympiad-institute {
    color: #2C3E50;
    font-size: 0.9rem;
}

/* Testimonials Slider */
.testimonials-container {
    max-width: 900px;
    margin: 40px auto 0;
}

.testimonials-slider {
    position: relative;
    margin-bottom: 30px;
    height: 350px; /* Fixed height to prevent layout shifts */
}

.testimonial-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    visibility: hidden;
}

.testimonial-slide.active {
    opacity: 1;
    visibility: visible;
}

.testimonial-content {
    background-color: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
}

.quote-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 30px;
    color: #5D2F8E;
    opacity: 0.2;
}

.testimonial-content p {
    color: #2C3E50;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    color: #5D2F8E;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.author-info p {
    color: #7f8c8d;
    margin: 0;
    font-size: 0.9rem;
    font-style: normal;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-arrow {
    width: 40px;
    height: 40px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #5D2F8E;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background-color: #5D2F8E;
    color: white;
}

.slider-dots {
    display: flex;
    justify-content: center;
    margin: 0 20px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: #5D2F8E;
}

/* Parent Testimonials */
.parent-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.parent-testimonial-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.parent-testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.parent-testimonial-content {
    margin-bottom: 20px;
    position: relative;
    padding-left: 25px;
}

.parent-testimonial-content:before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 0;
    font-size: 40px;
    color: #5D2F8E;
    opacity: 0.2;
    font-family: serif;
}

.parent-testimonial-content p {
    color: #2C3E50;
    font-style: italic;
    line-height: 1.7;
}

.parent-info h4 {
    color: #5D2F8E;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.parent-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Join Success CTA */
.join-success-cta {
    background-color: #5D2F8E;
    padding: 60px 0;
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.cta-buttons .btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.cta-buttons .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Animation for elements */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Counter animation for stats */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .result-section-header h2 {
        font-size: 1.8rem;
    }
    
    .stat-card {
        width: calc(50% - 30px);
        min-width: 200px;
    }
    
    .testimonials-slider {
        height: 400px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media screen and (max-width: 768px) {
    .result-tabs,
    .result-year-tabs,
    .result-board-tabs,
    .olympiad-categories {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tab-btn,
    .year-tab,
    .board-tab,
    .olympiad-tab {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    
    .stat-card {
        width: 100%;
        max-width: 250px;
    }
    
    .result-cards.active {
        grid-template-columns: 1fr;
    }
    
    .olympiad-card {
        flex-direction: column;
    }
    
    .olympiad-student-image {
        width: 100%;
        height: 180px;
        border-radius: 10px 10px 0 0;
    }
    
    .testimonials-slider {
        height: 450px;
    }
    
    .testimonial-content {
        padding: 25px;
    }
}

@media screen and (max-width: 576px) {
    .achievement-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-slider {
        height: 500px;
    }
    
    .parent-testimonials-grid {
        grid-template-columns: 1fr;
    }
}