html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* AOS Optimization */
[data-aos] {
    will-change: transform, opacity;
}

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --primary-color: #0070f3;
    --primary-hover: #005bb5;
    --card-bg: #ffffff;
    --border-color: #eaeaea;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --font-family: 'Outfit', sans-serif;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    max-width: 100%;
    position: relative;
    /* Prevent any width from blowing past viewport */
}

/* Header */
.main-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 5px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .logo {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.main-header .logo-img {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

@media (max-width: 576px) {
    .main-header .logo-img {
        height: 60px;
    }
}

/* Carousel Section */
.hero-carousel-section {
    position: relative;
    /* Allow layout flexibility if needed later */
}

/* Hide hero carousel arrows */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    display: none !important;
}

.carousel-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* Transparent black layer */
    z-index: 5;
}

.carousel-logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-logo-overlay img {
    max-width: 60%;
    max-height: 50%;
    object-fit: contain;
    will-change: transform, opacity;
}

.active .carousel-logo-overlay {
    opacity: 1;
}

/* Smooth popup animation without transform conflicts */
@keyframes smoothPopup {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.active .carousel-logo-overlay img {
    animation: smoothPopup 1s forwards;
}

.carousel-hero-img {
    height: 450px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .carousel-hero-img {
        height: 250px;
    }
}

/* Sliders Section */
.slider-section {
    padding: 40px 0;
}

.alumni-bg {
    background-color: #ffffff;
}

.testimonials-bg {
    background-color: var(--bg-color);
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
}

.alumni-title,
.testimonials-title {
    color: #1a365d;
    /* Dark Blue match with footer */
    text-transform: uppercase;
    position: relative;
    padding: 0 20px;
}

.alumni-title::before,
.alumni-title::after,
.testimonials-title::before,
.testimonials-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background-color: #1a365d;
}

.alumni-title::before,
.testimonials-title::before {
    right: 100%;
    margin-right: 20px;
}

.alumni-title::after,
.testimonials-title::after {
    left: 100%;
    margin-left: 20px;
}

/* Cards */
/* Flex and stretch functionality ensures all cards are the same height */
.swiper-slide {
    height: auto;
    display: flex !important; /* Ensure flex layout is used */
    align-items: stretch !important; /* Force children to stretch vertically */
}

.card-wrapper {
    display: flex;
    width: 100%;
    height: 100% !important; /* Ensure it fills the slide height */
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    /* Important for equal height */
}

/* Specific Alumni Card Overrides - New Sidebar Layout */
.alumni-card-new {
    background-color: #ffffff;
    border: none;
    border-radius: 16px; /* Soft rounded corners matching reference */
    height: 100%;
    min-height: 460px;
    width: 100%;
    max-width: 370px; /* Restored to original 370px width */
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.alumni-sidebar {
    width: 85px;
    background-color: #101a3d; /* Slightly lighter shade of dark blue */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

/* Vertical text red line */
.alumni-sidebar::before {
    content: '';
    display: block;
    width: 2px;
    background-color: #f8ac23; /* Orange */
    flex-grow: 1;
    margin-bottom: 15px;
}

.sidebar-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: #f8ac23; /* Orange */
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    margin-top: 0; 
    margin-bottom: 15px; /* Offset to keep clear of logo */
    z-index: 2;
    padding-bottom: 0;
}

.sidebar-logo-wrapper {
    margin-top: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    z-index: 2;
}

.sidebar-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: rotate(-90deg);
}

.alumni-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    padding: 0;
}

.alumni-company-wrapper {
    width: 100%;
    height: 70px; /* Exactly matched to image height */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align contents to left instead of center */
    padding: 0; 
    text-align: left;
    background-color: #ffffff;
    border-top-right-radius: 16px; /* Blend the top corner with the wrapper */
    overflow: hidden;
}

.company-logo-text {
    color: #0d1b2e;
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
}

.alumni-company-img {
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* Contain guarantees the logo will not be cut off */
    object-position: left; /* Anchors the image to the red line */
    display: block;   
    background-color: #ffffff;
}

/* Red Separators -> Yellow/Orange */
.alumni-separator {
    width: 100%;
    height: 2px;
    background-color: #f8ac23; /* Updated color code */
}

.alumni-photo-wrapper-new {
    width: 100%;
    height: 240px; /* Big photo wrapper based on mock */
    overflow: hidden;
    position: relative;
    background-color: #f8f9fa;
}

.alumni-photo-new {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.alumni-info-new {
    padding: 20px 15px; /* Reduced from 25px to 15px for left-alignment */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.card-name-new {
    font-size: 1.8rem;
    color: #0d1b2e;
    font-weight: 800;
    margin-bottom: 2px;
    line-height: 1.2;
}

.card-course-new {
    font-size: 1.05rem;
    color: #1a365d;
    font-weight: 400;
    margin-bottom: 15px;
}

.info-group {
    margin-bottom: 5px;
    font-size: 1.05rem;
    color: #0d1b2e;
    line-height: 1.3;
}

.inline-group {
    display: flex;
    gap: 8px;
    align-items: center; /* ensures Batch text aligns well */
}

.info-label {
    font-weight: 800;
    color: #0d1b2e;
}

.block-label {
    display: block;
    margin-bottom: 2px;
}

.info-text {
    font-weight: 400;
    color: #0d1b2e;
}

/* Custom Testimonial Card Layout */
.testimonial-swiper {
    padding: 40px 0 80px 0 !important;
    overflow: hidden;
    position: relative;
}

.testimonial-swiper .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important; /* This is the key for equal height slides */
}

.testimonial-card {
    flex-direction: column !important;
    align-items: stretch;
    padding: 0;
    gap: 0;
    height: 100% !important;
    min-height: 350px; 
    /* Slightly more compact as requested */
    /* Ensure equal heights */
    background-color: #ffffff;
    /* White background */
    border-radius: 16px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    transition: all 0.4s ease;
    border: 1px solid #eaeaea;
    position: relative;
    z-index: 1;
}

.testimonial-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 30px 30px 20px 30px;
    background-color: transparent;
    border-radius: 16px 16px 0 0;
}

.testimonial-img-wrapper {
    flex-shrink: 0;
}

.testimonial-img {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    margin: 0 !important;
    border: 4px solid #ffffff;
    /* White border to stand out */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    /* slight shadow popup */
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.testimonial-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.testimonial-name {
    font-size: 1.5rem;
    font-weight: 700;
    /* Bold */
    margin-bottom: 4px;
    color: #000000;
}

.testimonial-course,
.testimonial-batch {
    font-size: 1.1rem;
    font-weight: 400;
    /* Normal */
    margin-bottom: 0px;
    line-height: 1.2;
    color: #666666;
    /* Grayed out slightly to emphasize name */
}

.testimonial-body {
    padding: 30px;
    display: flex;
    flex-direction: column; /* Allows nested elements to participate in flex layout if needed */
    align-items: flex-start;
    justify-content: flex-start;
    background-color: #f8fdfd;
    /* Very subtle cyan/gray tint for inactive */
    flex-grow: 1;
    /* Makes the body take up any remaining vertical space, equalizing heights */
    border-radius: 0 0 16px 16px;
    /* Round bottom corners */
    transition: all 0.4s ease;
}

.testimonial-text {
    font-size: 1.15rem;
    color: #444444;
    margin: 0;
    font-weight: 400;
    /* Normal */
    text-align: left;
    line-height: 1.6;
    transition: all 0.4s ease;
    overflow: hidden;
}

.testimonial-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Show 4 lines by default */
    line-clamp: 4; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    display: inline-block;
    color: #00bcd4;
    background: none;
    border: none;
    padding: 0;
    margin-top: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more-btn:hover {
    color: #008ba3;
    text-decoration: underline;
}

/* --- ACTIVE CARD HIGHLIGHT EFFECTS --- */
.swiper-slide-active .testimonial-card {
    /* Reduced scaling to minimize height discrepancies */
    transform: scale(1.02); 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    /* Deeper shadow */
    border-color: transparent;
    z-index: 10;
}

.swiper-slide-active .testimonial-body {
    background-color: #00bcd4;
    /* Beautiful cyan highlight from reference image */
}

.swiper-slide-active .testimonial-text {
    color: #ffffff;
    /* White text on highlighted background */
}

.swiper-slide-active .read-more-btn {
    color: #ffffff;
    /* Ensure button is visible against cyan background */
}

.swiper-slide-active .read-more-btn:hover {
    color: #f1f1f1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .testimonial-card {
        padding: 20px;
        gap: 20px;
    }

    .testimonial-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .testimonial-info {
        align-items: center;
        text-align: center;
    }

    .testimonial-name {
        font-size: 1.4rem;
    }

    .testimonial-course,
    .testimonial-batch {
        font-size: 1.1rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-img {
        width: 110px !important;
        height: 110px !important;
    }

    .testimonial-body {
        padding: 20px;
        min-height: 120px;
    }
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Pushes bottom elements down if needed */
}

.card-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.card-designation {
    font-size: 0.95rem;
    color: #1a365d;
    /* Dark blue as requested */
    font-weight: 700;
    /* Bold as requested */
    margin-bottom: 15px;
}

.card-text {
    font-size: 1rem;
    color: var(--text-muted);
    /* No flex-grow flex-shrink tricks required for text unless we want specific alignment */
}

.mt-auto {
    margin-top: auto;
}

/* Swiper Customization */
.swiper {
    padding: 20px 0 60px 0 !important;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color) !important;
    background-color: #ffffff;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: var(--primary-color);
    color: #ffffff !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem !important;
    font-weight: bold;
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color) !important;
}

/* Specific Navigation Adjustments */
.alumni-button-next,
.alumni-button-prev,
.testimonial-button-next,
.testimonial-button-prev {
    display: flex !important;
    z-index: 1010;
}

/* Footer */
.main-footer {
    background-color: #1a365d;
    color: #ffffff;
    text-align: center;
    padding: 15px 0;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-footer p {
    margin: 0;
}

/* Back to Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #f7a822;
    /* Yellow */
    color: #1a365d;
    /* Dark Blue Arrow */
    border: none;
    border-radius: 0;
    /* Square shape */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollToTopBtn:hover {
    background-color: #e0961b;
    /* Slightly darker yellow on hover */
    transform: translateY(-5px);
}

/* Responsive Typography & Spacing */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
    }

    .main-header .logo-img {
        height: 50px;
        /* Reduce from 80px to fit on small mobile screens */
    }

    .slider-section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }

    .alumni-title,
    .testimonials-title {
        padding: 0 10px;
    }

    .alumni-title::before,
    .alumni-title::after,
    .testimonials-title::before,
    .testimonials-title::after {
        width: 30px; /* Shorter lines on mobile */
    }

    .alumni-title::before,
    .testimonials-title::before {
        margin-right: 10px;
    }

    .alumni-title::after,
    .testimonials-title::after {
        margin-left: 10px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
        display: none;
        /* Hide arrows on mobile screens, mobile users prefer swiping */
    }

    #scrollToTopBtn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* Alumni Slider Navigation - Bottom Right */
.alumni-navigation-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    padding-right: 15px;
    margin-top: -10px !important;
    /* Shifting arrows up, overriding HTML framework classes */
    position: relative;
    z-index: 10;
}

.slider-nav-btn {
    width: 45px;
    height: 45px;
    background-color: #1a365d;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.slider-nav-btn:hover {
    background-color: #0d1b2e;
    transform: translateY(-2px);
}

.slider-nav-btn i {
    pointer-events: none;
}

@media (max-width: 768px) {
    .main-header .logo-img {
        height: 45px;
    }

    .carousel-logo-overlay img {
        max-width: 90%;
        max-height: 60%;
    }

    .alumni-navigation-wrapper {
        justify-content: center;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .main-header .logo-img {
        height: 35px;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .alumni-title::before,
    .alumni-title::after,
    .testimonials-title::before,
    .testimonials-title::after {
        width: 20px;
        margin-left: 5px;
        margin-right: 5px;
    }
}