/* Hero Section */
.vs-hero-wrapper {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden; /* Hide slides that are outside the view */
}
@media (max-width: 767px) {
    .vs-hero-wrapper { height: 60vh; min-height: 400px; }
}

    /* Increase text sizes on mobile featured tutor cards */
    .home-page .tutor-slide .team-title a {
        font-size: 24px;
    }

    .home-page .tutor-slide .team-desig {
        font-size: 14px;
    }
.slides-container {
    display: flex;
    height: 100%;
    transition: transform 0.8s ease-in-out;
}

.vs-hero-wrapper .slide {
    position: relative;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.vs-hero-wrapper .slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}
@media (max-width: 767px) {
    .vs-hero-wrapper .slide::before { background-color: rgba(0, 0, 0, 0.85); }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15); /* Frosty glass effect */
    backdrop-filter: blur(8px);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
@media (max-width: 767px) {
    .carousel-btn { width: 40px; height: 40px; font-size: 16px; }
    .prev-btn { left: 15px; } .next-btn { right: 15px; }
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.vs-hero-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.prev-btn { left: 30px; }
.next-btn { right: 30px; }

@media (max-width: 767px) {
    .carousel-dots { bottom: 15px; }
}
.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot:hover,
.dot.active {
    background-color: #fff;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    max-width: 1600px;
    z-index: 2;
}
@media (max-width: 767px) {
    .hero-content { 
        max-width: 90%;
    }
    .hero-content img {
        width: 60px !important;
        height: auto;
    }
    .hero-subtitle { font-size: 18px; }
}

.vs-hero-wrapper .hero-subtitle {
    font-size: 40px;
    font-family: 'Baloo 2', cursive;
    display: block;
    margin-bottom: 10px; /* Removed negative margin for better flow */
    color: var(--accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}
@media (max-width: 767px) {
    .vs-hero-wrapper .hero-subtitle { 
        font-size: 30px; 
        margin-bottom: 5px;
        color: #ffffff; /* Change this to your desired mobile color */
    }
    .vs-hero-wrapper h2.hero-title { 
        font-size: 36px; 
        line-height: 1.2;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    }
}

.vs-hero-wrapper h2.hero-title {
    font-size: 72px; /* Increased font size for more impact */
    font-weight: 900;
    color: #fff;
    font-family: 'Baloo 2', cursive;
    line-height: 1.0;
    margin-bottom: 10px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7); /* Increased shadow for better readability */
}

/* Text Animation for Carousel */
.hero-content > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide.active .hero-content > * {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the animation for each element */
.slide.active .hero-subtitle {
    transition-delay: 0.5s;
}

.slide.active .hero-title {
    transition-delay: 0.7s;
}

.slide.active .vs-btn {
    transition-delay: 0.9s;
}

/* --- Hero Social Icons --- */
.hero-social-links {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    flex-direction: row; /* Align icons horizontally */
    gap: 15px;
}

.hero-social-links .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.5; 
    animation: slideInUp 0.6s ease-out forwards;
}

.hero-social-links .social-icon:nth-child(1) { animation-delay: 1.0s; }
.hero-social-links .social-icon:nth-child(2) { animation-delay: 1.1s; }
.hero-social-links .social-icon:nth-child(3) { animation-delay: 1.2s; }
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;

@media (max-width: 767px) {
    .hero-social-links {
        bottom: 10px; 
        left: 10px;
        gap: 10px;
    }
    .hero-social-links .social-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Features Section */
.features-section {
    padding: 0;
    overflow: hidden; /* Prevent any unwanted scrolling */
}
.features-section .feature-box-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5px 5px;
    background-color: rgba(var(--bg-primary-rgb), 0.6); /* Frosty glass effect, increased color */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--text-primary-rgb, 51, 51, 51), 0.1);
    border-radius: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    min-height: 130px;
}

.features-section .feature-box-wrapper:hover {
    transform: translateY(-15px) scale(1.03);
    background-color: rgba(var(--bg-primary-rgb), 0.8);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    border-color: var(--secondary);
}

body.dark-mode .features-section .feature-box-wrapper:hover {
    background-color: rgba(var(--bg-secondary-rgb, 45, 55, 72), 0.9);
    box-shadow: 0 25px 50px var(--shadow-color);
}

body.dark-mode .features-section .feature-box-wrapper {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .features-section .feature-title {
    color: #ffffff !important;
}
body.dark-mode .features-section .feature-desc {
    color: rgba(255, 255, 255, 0.95) !important;
}

.features-section .feature-icon {
    font-size: 40px;
    color: var(--secondary);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.features-section .feature-title {
    font-family: 'Baloo 2', cursive;
    font-size: 22px;
    color: var(--primary);
    margin-bottom: -5px;
}

.features-section .feature-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.2;
    font-family: 'Baloo 2', cursive;
}

.features-section .feature-text-content {
    opacity: 0; /* Hidden by default */
    position: absolute;
    padding: 0 25px;
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
    transform: translateY(10px);
}

.features-section .feature-box-wrapper:hover .feature-icon {
    opacity: 0;
    transform: translateY(-10px);
}

.features-section .feature-box-wrapper:hover .feature-text-content {
    opacity: 1;
    transform: translateY(0);
}

.features-section .feature-box-wrapper::after {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: 1;
    background: conic-gradient(from var(--angle), transparent 0%, var(--secondary) 30%, transparent 60%);
    border-radius: inherit;
    padding: 2px;
    padding: 2px;
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate-angle 1.5s linear infinite;
    pointer-events: none;
}

.features-section .feature-box-wrapper:hover::after {
    opacity: 1;
}

/* Mobile optimization for Features Section: Show text by default */
@media (max-width: 991px) {
    .features-section .feature-box-wrapper {
        min-height: 100px;
        padding: 0px;
        margin-bottom: 30px;
        width: 100%;
    }
    @supports (animation-timeline: view()) {
        .features-section .feature-box-wrapper {
            opacity: 0;
            animation: liftUpMobile 0.6s ease-out forwards;
            animation-timeline: view();
            animation-range: entry 10% cover 30%;
        }
    }
    .features-section .feature-icon {
        display: none;
    }
    .features-section .feature-text-content {
        opacity: 1;
        position: relative;
        transform: translateY(0);
        padding: 0;
    }
    .features-section .feature-title { font-size: 18px; }
    .features-section .feature-desc { font-size: 14px; }

    /* Tap effect for mobile */
    .features-section .feature-box-wrapper:active {
        border-color: var(--primary);
        background-color: rgba(var(--bg-primary-rgb), 0.8);
        transform: scale(0.98) !important;
    }

    /* Pulse animation overlay */
    .features-section .feature-box-wrapper::after {
        content: '';
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        border-radius: inherit;
        pointer-events: none;
        border: 1px solid rgba(var(--primary-rgb), 0.5);
        box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
        animation: glowPulse 3s infinite ease-in-out;
    }
}

@media (max-width: 767px) {
    /* Reduce size of WhatsApp chat icon on mobile */
    .whatsapp-chat-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
        bottom: 15px; /* Adjust position slightly */
        left: 15px;
    }
    .whatsapp-chat-icon::before { /* Adjust tooltip position for smaller icon */
        left: 60px;
    }
    .whatsapp-chat-icon::after { /* Adjust tooltip arrow position */
        left: 48px;
    }
}

@media (max-width: 767px) {
    /* Reduce size of Back to Top button on mobile to match WhatsApp icon */
    .scroll-to-top {
        width: 45px;
        height: 45px;
        font-size: 22px;
        bottom: 15px; /* Adjust position slightly to match WhatsApp */
        right: 15px;
    }

    /* Reduce height of feature cards on mobile - specifically target features-section only */
    .features-section .feature-box-wrapper {
        padding: 3px 5px !important;
        min-height: 90px !important;
    }
    
    .features-section .feature-icon {
        font-size: 26px !important;
        margin: 0 !important;
    }
    
    .features-section .feature-icon i {
        font-size: 26px !important;
    }

    /* Increase frosty glass effect and text visibility for footer on mobile (all pages) */
    .footer-wrapper {
                    backdrop-filter: blur(20px);
                    background-color: rgba(var(--bg-primary-rgb), 0.95); /* More opaque in light mode */
                }        body.dark-mode .footer-wrapper {
            backdrop-filter: blur(20px);
            background-color: rgba(var(--bg-secondary-rgb), 0.95); /* More opaque in dark mode */
        }
}

@keyframes liftUpMobile {
    from { opacity: 0; transform: translateY(50px); box-shadow: 0 0 0 rgba(0,0,0,0); }
    to { opacity: 1; transform: translateY(0); box-shadow: 0 10px 25px rgba(0,0,0,0.1), 0 0 15px rgba(var(--primary-rgb), 0.2); border-color: rgba(var(--primary-rgb), 0.3); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Apply the shared background directly to the homepage body */
body.home-page {
    position: relative;
    background-image: url('../images/hero-bg-11.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--bg-primary); /* Fallback color */
}

/* Mobile Optimization: Use scroll instead of fixed for better performance */
@media (max-width: 767px) {
    body.home-page {
        background-attachment: scroll;
        /* background-image: url('../images/hero-bg-11-mobile.jpg'); */ /* Uncomment if you have a mobile-specific image */
    }
}

/* New About Us Section with Full BG */
.about-section-full-bg {
    position: relative; /* Keep for z-index context */
}

.about-section-full-bg .container {
    position: relative; /* Ensure container is above the overlay */
    z-index: 2;
}

.about-content-overlay {
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(10px);
    padding: 40px; /* Symmetrical padding */
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; z-index: 1; /* Ensure it's above the body background */
}
@media (max-width: 991px) {
    .about-content-overlay { 
        margin-bottom: 30px;
        height: auto !important; /* Reset height to prevent overlap on mobile */
        padding: 25px; /* Reduce padding to save space */
        align-items: center !important; /* NEW: Center children horizontally */
    }
    .about-content-overlay .benefits-list {
        margin: 10px 0; /* Reduce vertical spacing */
    }
}

/* Make the left box a flex container to control its children's height */
.about-content-overlay {
    display: flex;
    flex-direction: column;
    height: 100%; /* Make the card fill the height of its parent column */
}

/* Increase bottom padding for the "Meet Our Tutors" button */
.about-content-overlay .vs-btn {
    padding-top: 10px;
    padding-bottom: 10px; /* Increased bottom padding */
}

/* New styles for the right-side info boxes */
.about-info-boxes {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.infographics-container,
.benefits-container,
.about-stats-container {
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; z-index: 1; /* Ensure it's above the body background */
}

.infographics-container .vs-btn {
    margin-bottom: 20px; /* Added spacing under the button */
}

.corporate-training-container {
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; z-index: 1; /* Ensure it's above the body background */
}

/* Add extra padding to the bottom of the children's insights box */
.childrens-insights-box {
    padding-bottom: 40px;
}

/* Ensure the right column in the about section is a flex container */
.about-section-full-bg .col-lg-5 {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Replaces the inline margin-top */
}

/* Responsive stacking for About Us columns on mobile */
@media (max-width: 991.98px) {
    .about-section-full-bg .row.align-items-stretch {
        align-items: stretch !important; /* Override inline style to allow stacking */
    }
}

.info-box-title {
    font-family: 'Baloo 2', cursive;
    font-size: 22px;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(var(--text-primary-rgb, 51, 51, 51), 0.1);
}

/* Remove box style for infographics inside corporate training box */
.corporate-training-container .infographics-container {
    background-color: transparent;
    backdrop-filter: none;
    padding: 20px 0 0 0; /* Add top padding only */
    border: none;
    box-shadow: none;
}

/* Remove the box style for infographics when inside the main content overlay */
.about-content-overlay .about-stats-container {
    background-color: transparent;
    backdrop-filter: none;
    padding: 20px 0; /* Add some vertical padding */
    border: none;
    border-top: 1px solid rgba(var(--text-primary-rgb, 51, 51, 51), 0.1); /* Add a separator line */
}

/* Remove box style for benefits and infographics inside the main content overlay */
.about-content-overlay .benefits-container,
.about-content-overlay .infographics-container {
    background-color: transparent;
    backdrop-filter: none;
    padding: 20px 0; /* Add some vertical padding */
    border: none;
    border-top: 1px solid rgba(var(--text-primary-rgb, 51, 51, 51), 0.1); /* Add a separator line */
    box-shadow: none;
}

/* New Benefits List in About Section */
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-primary);
}

.benefits-list li i {
    font-size: 24px;
    display: block;
    text-align: center;
    width: 100%;
    color: var(--accent);
    margin-right: 15px;
    width: 30px; /* Ensure consistent alignment */
    text-align: center;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2); /* Stronger shadow for visibility */
}

/* Add a subtle dark mode adjustment for better contrast */
body.dark-mode .benefits-list li {
    color: var(--text-primary);
}

/* Infographics Section */
.infographics-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Reduced gap */
    /* margin is removed, now part of the box */
}

.infographic-bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-label {
    flex: 0 0 150px; /* Fixed width for labels */
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.bar-wrapper {
    flex-grow: 1;
    height: 12px;
    background-color: rgba(var(--text-primary-rgb), 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill.is-animating {
    animation: fill-and-bounce 2.5s cubic-bezier(0.175, 0.885, 0.32, 1) forwards;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 6px;
    width: 0; /* Start at 0 width */
}

.bar-percentage {
    font-family: 'Baloo 2', cursive;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    min-width: 45px; /* Ensure space for '100%' */
    text-align: right;
}

@media (max-width: 767px) {
    .bar-wrapper {
        display: block !important;
        width: 100% !important;
        height: 12px; /* slightly shorter to allow tighter stacking */
        background-color: rgba(var(--text-primary-rgb), 0.08);
        border-radius: 6px;
     }
    /* Use wrapping flex on mobile: label spans full width, bar + percentage share the row below */
    .infographics-container { gap: 8px; }
    .infographic-bar-item {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 0 8px 0 !important;
        padding: 6px 0 !important;
    }
    .infographic-bar-item .bar-label {
        flex: 0 0 100%; /* label takes full width on its own row */
        font-size: 15px;
        font-weight: 600;
        color: var(--text-primary);
        text-align: center;
        margin: 0;
    }
    .infographic-bar-item .bar-wrapper {
        flex: 1 1 calc(100% - 64px); /* leave room for percentage */
        min-width: 0; /* allow shrinking */
        height: 14px;
        border-radius: 8px;
        background-color: rgba(var(--text-primary-rgb), 0.06);
        overflow: hidden;
    }
    .infographic-bar-item .bar-percentage {
        flex: 0 0 56px;
        width: 56px;
        font-size: 14px;
        font-weight: 700;
        text-align: right;
        color: var(--primary);
        min-width: 40px;
    }
}

@keyframes fill-and-bounce {
    0% {
        width: 0;
    }
    80% {
        /* Overshoot the target width for the bounce effect */
        width: calc(var(--progress-target) * 1.05);
    }
    100% {
        width: var(--progress-target);
    }
}

/* Key Stats in About Section */
.about-stats-container {
    display: flex;
    justify-content: space-around;
    /* margin and padding-top are removed, now part of the box */
    /* border-top is removed, now part of the box */
    padding: 25px; /* Use padding for consistent spacing */
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Baloo 2', cursive;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 5px 0;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    display: block;
    text-align: center;
    width: 100%;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 991px) {
    .about-stats-container,
    .about-content-overlay .about-stats-container {
        flex-direction: column !important;
        gap: 20px;
        align-items: center !important; /* Center align stats on mobile */
        justify-content: center !important;
    }
}


/* About & Why Choose Us Sections */
.about-img img, .why-images img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Why Choose Us Section --- */
.why-section {
    position: relative;
    padding: 100px 0;
    background-color: var(--bg-secondary); /* Use a solid, light background color */
}

/* Modernized Why Choose Us cards/grid */
.why-section .title-area {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 18px;
}

.why-section .why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
    margin-top: 24px;
}

.why-section .advantage-box {
    background: linear-gradient(180deg, rgba(var(--bg-primary-rgb),0.06), rgba(var(--bg-primary-rgb),0.03));
    border: 1px solid rgba(var(--text-primary-rgb), 0.06);
    padding: 28px 20px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.28s cubic-bezier(.2,.9,.3,1), box-shadow 0.28s ease, border-color 0.28s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.why-section .advantage-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 36px rgba(0,0,0,0.12);
    border-color: rgba(var(--primary-rgb), 0.12);
}

.why-section .advantage-icon {
    font-size: 38px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),0.12), rgba(var(--secondary-rgb,255,255,255),0.04));
    color: var(--primary);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.05);
}

.why-section .advantage-title {
    font-family: 'Baloo 2', cursive;
    font-size: 18px;
    margin: 0;
    color: var(--text-primary);
}

.why-section .advantage-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
    flex: 1 1 auto;
}

/* Move all cards up on desktop */
.why-section .row {
    margin-top: -40px;
}

/* CTA alignment tweak inside why-section */
.why-section .join-us-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .why-section { padding: 60px 0; }
    .why-section .why-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .why-section .advantage-box { padding: 15px; border-radius: 12px; }
    .why-section .advantage-icon { width: 50px; height: 50px; font-size: 24px; border-radius: 10px; margin-bottom: 12px; }
}

@media (max-width: 575px) {
    .why-section .why-grid { grid-template-columns: 1fr; gap: 12px; margin-top: -20px; }
    .why-section .title-area { padding-bottom: 12px; }
    .why-section .advantage-box { padding-top: 0; }
    .why-section .row > div:nth-child(1) .advantage-box { margin-top: -50px; }
    .why-section .advantage-title { font-size: 16px; }
    .why-section .advantage-desc { font-size: 13px; }
}

/* Apply the Why Choose Us card visual style to the Get Started / Join Us cards */
.join-us-card {
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 18px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.join-us-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    background-color: rgba(var(--bg-primary-rgb), 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}
.join-us-card:hover .join-us-icon {
    transform: rotate(15deg) scale(1.05);
}

.join-us-icon {
    font-size: 28px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),0.12), rgba(var(--secondary-rgb,255,255,255),0.04));
    color: var(--primary);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.05);
}

/* Decorative outline similar to advantage-box::after */
.join-us-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: 1;
    background: conic-gradient(from var(--angle, 90deg), transparent 0%, var(--secondary) 30%, transparent 60%);
    border-radius: inherit;
    padding: 2px;
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate-angle 1.5s linear infinite;
    pointer-events: none;
}

.join-us-card:hover::after {
    opacity: 1;
}

/* Ensure join-us-card is a positioned element so ::after aligns correctly */
.join-us-card {
    position: relative !important;
    overflow: visible !important;
}

/* Keep card content above the decorative outline */
.join-us-card > * {
    position: relative;
    z-index: 2;
}

@media (max-width: 991px) {
    .join-us-card { padding: 18px; border-radius: 12px; }
    .join-us-icon { width: 56px; height: 56px; font-size: 24px; }
}

/* Scroll-driven background tint */
.why-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--primary);
    opacity: 0;
    pointer-events: none;
}

@supports (animation-timeline: view()) {
    .why-section::before {
        animation: bgTintPulse linear;
        animation-timeline: view();
        animation-range: entry 0% exit 100%;
    }
}

/* Dark mode adjustment for the section background */
body.dark-mode .why-section {
    background-color: var(--bg-primary); /* Use the primary dark background for this section */
}

.home-page .why-section .choose-content h3 {
    font-size: 20px;
    margin-bottom: 5px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-page .choose-content {
    background-color: rgba(var(--bg-primary-rgb), 0.9);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.home-page .why-section .sec-title,
.home-page .why-section .choose-content h3 {
    color: var(--text-primary);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.home-page .why-section .sub-title {
    color: var(--primary); /* Subtitle should be blue */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.why-section .title-area {
    margin-bottom: 60px; /* Increased margin for better spacing */
}

.advantage-box {
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 35px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

/* Dark mode adjustment for the advantage boxes */
body.dark-mode .advantage-box {
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

.advantage-box:hover,
body.dark-mode .advantage-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    background-color: rgba(var(--bg-primary-rgb), 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.advantage-box::after {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: 1;
    background: conic-gradient(from var(--angle), transparent 0%, var(--secondary) 30%, transparent 60%);
    border-radius: inherit;
    padding: 2px;
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate-angle 1.5s linear infinite;
    pointer-events: none;
}

.advantage-box:hover::after {
    opacity: 1;
}

.advantage-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); /* Stronger shadow for better visibility */
    transition: transform 0.3s ease;
}

.advantage-title {
    font-family: 'Baloo 2', cursive;
    font-size: 20px; /* Reduced font size for a better fit */
    color: var(--text-primary);
    margin-bottom: 15px;
}

.advantage-box:hover .advantage-icon {
    transform: rotate(15deg) scale(1.1);
}

.advantage-desc {
    color: var(--text-secondary);
    line-height: 1.5; /* Tighter line height */
    font-size: 15px; /* Slightly smaller font size */
    flex-grow: 1; /* Ensures paragraphs take up space to align boxes */
}

.row.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Increase horizontal spacing specifically for the advantage boxes */
.why-section .row.g-4 {
    --bs-gutter-x: 5.5rem;
    --bs-gutter-y: 0.5rem; /* Add corresponding vertical gutter */
}

/* Animation for Advantage Boxes */
@supports (animation-timeline: view()) {
    .advantage-box {
        opacity: 0;
        animation: slideUpFade 0.6s ease-out forwards;
        animation-timeline: view();
        animation-range: entry 10% cover 30%;
    }
}

@media (max-width: 767px) {
    .why-section .row.g-4 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 2rem;
    }

    .advantage-box {
        padding: 35px 25px 25px 25px;
        max-width: 85%;
        margin-left: auto;
        margin-right: auto;
        min-height: 220px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .advantage-icon {
        font-size: 36px;
        margin-top: 10px;
        margin-bottom: 20px;
    }
    
    .advantage-icon i {
        font-size: 28px !important;
    }
    
    .advantage-title {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    
    .advantage-desc {
        font-size: 15px !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
    }
    
    .home-page .why-section .advantage-box {
        padding: 12px !important;
    }

    /* Animate texts in What We Offer section */
    @supports (animation-timeline: view()) {
        .advantage-title {
            opacity: 0;
            animation: slideUpFade 0.6s ease-out forwards;
            animation-timeline: view();
            animation-range: entry 10% cover 25%;
        }
        .advantage-desc {
            opacity: 0;
            animation: slideUpFade 0.6s ease-out forwards;
            animation-timeline: view();
            animation-range: entry 15% cover 30%;
        }
    }
}

.home-page .why-section .sec-desc,
.home-page .why-section .choose-content p {
    color: var(--text-secondary);
}

.home-page .why-section .sec-desc {
    font-size: 20px; /* Made the text larger */
    max-width: 900px; /* Increased width for better centering */
    color: var(--text-secondary);
    text-shadow: none;
    text-align: center; /* Explicitly center the text */
    margin-left: auto; /* Add this to center the block */
    margin-right: auto; /* Add this to center the block */
}

.home-page .about-content-overlay .sub-title {
    color: var(--primary);
}

/* Increase font size for all subtitles on the home page for better visibility */
.home-page .sub-title {
    display: block; /* Ensure it's a block element for margin control */
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: -20px; /* Brings subtitle 5px closer to title */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3); /* Added shadow for consistency */
}

.home-page .why-section .vs-btn {
    margin-top: 20px;
}
@media (max-width: 991px) {
    .home-page .about-img img, .home-page .why-images img { margin-bottom: 30px; }
    .home-page .why-section { padding: 60px 0; }
    .home-page .text-lg-start { text-align: center !important; }
}

/* Featured Blog Section on Home Page */
.home-page .featured-blog-section {
    position: relative;
    padding: 100px 0;
    background-image: url('../images/blog-section-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    margin-top: -50px !important;
}

.home-page .featured-blog-section .title-area .sub-title {
    color: var(--primary) !important; /* Blue for visibility */
}

.home-page .blog-section .title-area .sub-title {
    color: var(--primary) !important; /* Blue for visibility */
}

.home-page .blog-section {
    margin-top: -50px !important;
}

/* Mobile Optimization: Disable parallax on mobile for performance */
@media (max-width: 767px) {
    .home-page .featured-blog-section {
        background-attachment: scroll;
    }
}

.home-page .featured-blog-section .container {
    position: relative;
    z-index: 2; /* This container needs to be above the section's own BG */
}

.home-page .featured-blog-content-overlay {
    background-color: rgba(var(--bg-primary-rgb), 0.9);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative; z-index: 1; /* Sits above the body background */
}

.home-page .blog-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    margin-top: -10px;
    font-family: 'Baloo 2', cursive;
}

.home-page .blog-meta span { margin-right: 15px; }
.home-page .blog-meta i { margin-right: 5px; color: var(--primary); }

/* Add indentation to all blog post paragraphs for better readability */
.blog-content p,
.featured-blog-content-overlay p {
    text-indent: 2em; /* Indent the first line of each paragraph */
    text-align: justify; /* Justify text for a cleaner look */
}

@media (max-width: 767px) {
    .home-page .featured-blog-section { padding: 60px 0; }
    .home-page .featured-blog-content-overlay { padding: 30px; }
}

.home-page .testimonial-section {
    position: relative; /* Ensure z-index context */
    z-index: 2;
    margin-bottom: 50px; /* Adjust spacing above the footer */
}

.home-page .testimonial-section .title-area {
    margin-bottom: 0px; /* reduced by another 20px; set to zero to avoid negative margin */
}

.home-page .testimonial-section .title-area .sec-title,
.home-page .testimonial-section .title-area .sub-title {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.home-page .testimonial-section .title-area .sec-title {
    color: #fff; /* White text for contrast against the dark background */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7); /* Increased shadow for readability */
}

.home-page .testimonial-section .title-area .sub-title {
    color: var(--primary); /* Use blue color for the subtitle */
}

.home-page .join-us-section .title-area .sec-title {
    color: #fff; /* White text for contrast */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7); /* Increased shadow for readability */
}

.home-page .join-us-section .title-area .sub-title {
    color: var(--primary); /* Use blue color for the subtitle */
}

@media (max-width: 767px) {
    .home-page .testimonial-section .title-area {
        margin-bottom: -20px;
    }
    .home-page .testimonial-section .title-area .sub-title {
        color: var(--primary) !important; /* Change to blue on mobile for visibility */
    }
    .home-page .testimonial-section .title-area .sec-title {
        color: #fff !important;
    }
    .home-page .join-us-section .title-area .sec-title {
        color: #fff !important;
    }
    .home-page .join-us-section .title-area .sub-title {
        color: var(--primary) !important;
    }
}
@media (max-width: 767px) {
    .home-page .testi-box { padding: 25px; }
}

.home-page .testi-box {
    position: relative;
    max-width: 600px; /* Further reduced max-width for a more compact look */
    margin: 0 auto;
    padding: 45px 30px 30px; /* Further reduced padding */
    text-align: center;
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    position: relative; z-index: 1; /* Sits above the body background */
}

@media (max-width: 767px) {
    .home-page .testi-box {
        /* Significantly reduced for compact mobile layout */
        padding: 12px 10px; /* Much smaller padding */
        min-height: 140px; /* Reduced min-height */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }
}

body.dark-mode .home-page .testi-box {
    background-color: rgba(var(--bg-secondary-rgb), 0.6);
}

body.dark-mode .home-page .testi-box {
    background-color: var(--bg-secondary);
    box-shadow: 0 5px 20px var(--shadow-color);
}
@media (max-width: 767px) {
    .home-page .testi-text {
        font-size: 12px; /* Significantly smaller font for mobile */
        margin-bottom: 10px; /* Reduce spacing */
        color: var(--primary) !important; /* Change to blue on mobile for visibility */
        line-height: 1.5; /* Tighter line height */
    }
}

.home-page .testi-text {
    font-size: 15px; /* Smaller text */
    font-style: italic;
    line-height: 1.7; /* Tighter line height */
    color: var(--text-secondary);
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

body.dark-mode .home-page .testi-text {
    color: var(--text-secondary);
}

.home-page .testi-quote-icon {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 70px; /* Smaller quote icon */
    font-family: 'Georgia', serif;
    color: var(--primary);
    opacity: 0.1;
    line-height: 1;
    z-index: 1;
}

@media (max-width: 767px) {
    .home-page .testi-quote-icon {
        font-size: 40px; /* Much smaller quote icon on mobile */
        top: 5px;
        left: 10px;
    }
}

.home-page .testi-author-img {
    width: 60px; /* Smaller author image */
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: -20px auto 15px; /* Adjusted margin */
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    z-index: 3;
}

@media (max-width: 767px) {
    .home-page .testi-author-img {
        width: 45px; /* Smaller image on mobile */
        height: 45px;
        margin: 0 auto 8px; /* Remove negative top margin, reduce bottom margin */
        border-width: 3px;
    }
}

.testi-author-img img {
    width: 100%; height: 100%; object-fit: cover;
}

.testi-author .name {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 3px;
}

.testi-author .desig {
    color: #777;
    font-size: 14px;
}

body.dark-mode .testi-author .desig {
    color: var(--text-secondary);
}

/* Testimonial Slider Styles */
.testimonial-slider-wrapper {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
    overflow: hidden;
    padding-top: 30px;
    padding-bottom: 30px;
    /* Increased horizontal padding to accommodate buttons fully */
    padding-left: 60px; /* Button width (45px) + some extra space */
    padding-right: 60px;
    box-sizing: border-box; /* Ensure padding is included in the total width */
}

.testimonial-slides-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testi-box {
    flex: 0 0 100%; /* Each slide takes full width of the container */
    box-sizing: border-box;
    opacity: 0.5;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
    min-height: 350px; /* Constant height for all slides */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testi-box.active {
    opacity: 1;
    transform: scale(1);
}

/* Navigation Buttons for Testimonial Slider */
/* Set left/right to -10px to stretch buttons by 10px */
.home-page .testi-prev-btn { left: -10px; width: 55px; }
.home-page .testi-next-btn { right: -10px; width: 55px; }

@media (max-width: 991px) {
    .testimonial-slider-wrapper {
        max-width: none; /* Remove max-width on smaller screens */
        padding-left: 50px; /* Adjusted padding for smaller screens */
        padding-right: 50px;
    }
    /* Buttons are already set to left:0/right:0 */
}

@media (max-width: 767px) {
    .testimonial-slider-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding-left: 50px !important;
        padding-right: 50px !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
}

@media (max-width: 767px) {
    .home-page .testi-prev-btn { left: -10px; width: 55px; } /* Stretched by 10px */
    .home-page .testi-next-btn { right: -10px; width: 55px; } /* Stretched by 10px */
    .testi-box { min-height: 300px; } /* Slightly smaller on mobile */
}

@media (max-width: 767px) {
    .home-page .testi-quote-icon {
        font-size: 200px; /* Increased font size as requested */
        opacity: 0.8; /* Adjusted visibility for balance */
        top: 15px; /* Adjusted position */
        left: 15px; /* Adjusted position */
    }
}

/* Dots for Testimonial Slider */
.home-page .testi-carousel-dots {
    text-align: center;
    margin-top: 30px;
}

@media (max-width: 767px) {
    .home-page .testi-carousel-dots {
        display: none !important; /* Force hide on mobile */
    }
}

.home-page .testi-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.home-page .testi-dot.active,
.home-page .testi-dot:hover {
    background-color: var(--primary);
    transform: scale(1.2);
}

/* Responsive Header Styles */
.mobile-menu-toggle {
    display: none; /* Hidden by default */
    background: rgba(var(--primary-rgb), 0.1);
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 10px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle:hover {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary);
    transform: scale(1.05);
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background-color: var(--primary);
    margin: 4px 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px;
}

@media (max-width: 991px) {
    .header-container {
        flex-wrap: nowrap; /* CRITICAL FIX: Prevents items from wrapping to a new line */
        justify-content: flex-start; /* Align items to the left on mobile */
        position: relative;
        gap: 15px; /* Add space between logo, toggle, and theme switch */
    }

    .header-button {
        display: none;
    }

    .mobile-only-btn {
        display: block;
    }
    .mobile-only-btn a {
        color: var(--primary) !important; /* Highlight the button in the mobile menu */
        font-weight: 700;
    }

    .main-menu {
        display: none; /* Hide menu and button on mobile */
        position: absolute;
        top: calc(100% + 10px);
        right: 10px;
        width: 70%;
        text-align: left; /* Align mobile menu items to the left */
        background-color: rgba(var(--bg-primary-rgb), 0.96); /* More opaque for better visibility below hero */
        backdrop-filter: blur(60px); /* Stronger frosted glass effect */
        -webkit-backdrop-filter: blur(60px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        padding: 12px;
        border-radius: 16px;
        border: 1px solid rgba(var(--primary-rgb), 0.2);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .header-right-items {
        display: flex; /* CRITICAL FIX: Ensures this group is treated as a flex item */
        align-items: center;
        order: 2; /* Position this group last on the main bar */
    }

    .main-menu a {
        display: block;
        padding: 12px 16px;
        margin: 4px 0;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--text-primary);
        background: rgba(var(--bg-secondary-rgb), 0.3);
        border: 1px solid transparent;
        position: relative;
        overflow: hidden;
    }

    .main-menu a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background: var(--primary);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .main-menu a:hover,
    .main-menu a:active {
        background-color: rgba(var(--primary-rgb), 0.15);
        color: var(--primary);
        border-color: rgba(var(--primary-rgb), 0.3);
        transform: translateX(5px);
    }

    .main-menu a:hover::before,
    .main-menu a:active::before {
        transform: scaleY(1);
    }

    body.dark-mode .main-menu { background-color: rgba(20, 20, 20, 0.95); }
    body.dark-mode .main-menu a {
        color: #ffffff !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Show menu when active */
    .main-menu.active {
        display: block; /* Show when active */
        animation: menuSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    @keyframes menuSlideOut {
        from {
            opacity: 0;
            transform: translateX(150%);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .mobile-menu-toggle {
        display: block; /* Show the hamburger button */
        order: 1; /* Position hamburger after the logo */
    }

    /* Animation for hamburger to 'X' */
    .mobile-menu-toggle.active {
        background: rgba(var(--primary-rgb), 0.2);
        transform: rotate(0deg);
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* Adjust hero section for smaller screens */
    .home-page .hero-title {
        font-size: 36px;
    }
    .home-page .hero-subtitle {
        font-size: 20px;
    }
}
@media (max-width: 575px) {
    .home-page .hero-title { font-size: 28px; }
}

/* Slide-in animations for About Us section */
.slide-in-left,
.slide-in-right { /* Corrected typo: was .slide-in-left, should be .slide-in-right */
    opacity: 0; /* Start hidden */
    transition: opacity 1s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Default to Slide Up (Mobile First) */
.slide-in-left {
    transform: translateY(50px);
}

.slide-in-left.is-visible,
.slide-in-right.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-right {
    transform: translateY(50px);
    transition-delay: 0.2s; /* Stagger the animation slightly */
}

/* Desktop: Slide from sides */
@media (min-width: 992px) {
    .slide-in-left {
        transform: translateX(-50px);
    }
    .slide-in-right {
        transform: translateX(50px);
    }
    .slide-in-left.is-visible,
    .slide-in-right.is-visible {
        transform: translateX(0);
    }
}

/* Force Mobile Slide Up (Definitive Fix) */
@media (max-width: 991px) {
    .slide-in-left,
    .slide-in-right {
        transform: translateY(50px) !important;
    }
    .slide-in-left.is-visible,
    .slide-in-right.is-visible {
        transform: translateY(0) !important;
    }
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Featured Tutors Carousel */
.home-page .featured-tutors-section {
    position: relative; }

.home-page .featured-tutors-section .title-area {
    position: relative; /* Ensure z-index works */
    z-index: 2;
}

@media (max-width: 767px) {
    .home-page .featured-tutors-section {
        margin-top: -40px;
    }
}

.home-page .featured-tutors-section .title-area .sec-title,
.home-page .featured-tutors-section .title-area .sub-title {
    color: #fff; /* White text for contrast against the dark background */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7); /* Increased shadow for readability */
}

.home-page .featured-tutors-section .title-area .sub-title {
    color: var(--primary); /* Use blue color for the subtitle "Our Experts" */
}

.home-page .tutor-carousel-wrapper {
    position: relative;    
    overflow: hidden;
    padding-top: 15px; /* Add space for the card's hover transform (translateY) */
}

.home-page .tutor-slides-container {
    display: flex;
    padding-bottom: 10px; /* Add space for hover box-shadow */
    /* Definitive Fix: Use the offset percentage calculated by JavaScript */
    transform: translateX(var(--slide-offset, 0%));
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.home-page .tutor-slide {
    flex: 0 0 25%; /* Show 4 cards on large screens */
    max-width: 25%;
    box-sizing: border-box;
    padding: 0 15px; /* Mimic Bootstrap column gutter */
}

/* Ensure the card inside the slide has no extra bottom margin */
.home-page .tutor-slide .team-box-wrapper,
.home-page .tutor-slide .team-box {
    margin-bottom: 0;
    width: 100%; /* Ensure the card fills the slide width */
    opacity: 0.92; /* Match page footer opacity */
}

/* Responsive adjustments for the carousel slides */
@media (max-width: 1200px) {
    .home-page .tutor-slide { flex-basis: 33.333%; max-width: 33.333%; } /* Show 3 */
}
@media (max-width: 991px) {
    .home-page .tutor-slide { flex-basis: 50%; max-width: 50%; } /* Show 2 */
}
@media (max-width: 767px) {
    /* Show 1 card on mobile */
    .home-page .tutor-slide {
        flex-basis: 100%;
        max-width: 100%;
        padding: 0 10px;
        /* NEW: Make it a flex container and center its content */
        display: flex !important; /* Make the slide itself a flex container */
        flex-direction: column !important; /* Stack content vertically */
        align-items: center !important; /* Center children horizontally */
        justify-content: center !important; /* Center children vertically (if height allows) */
    }

    /* Carousel wrapper for mobile */
    .home-page .tutor-carousel-wrapper {
        overflow: hidden;
    }

    /* Make cards much smaller and more compact on mobile */
    .home-page .tutor-slide .team-box-wrapper,
    .home-page .tutor-slide .team-box {
        padding: 4px 3px;
    }
}
/* Carousel Navigation Buttons */
.home-page .tutor-carousel-btn {
    position: absolute;
    /* Adjust top position to account for the 10px padding-bottom on the slides container */
    top: calc(50% - 5px);
    transform: translateY(-50%);
    background-color: rgba(var(--bg-primary-rgb), 0.3); /* Frosty glass effect */
        background-color: rgba(var(--bg-primary-rgb), 0.95); /* Match footer in light mode */
    border: 1px solid var(--border-color);
    body.dark-mode .home-page .tutor-slide .team-box {
        background-color: rgba(var(--bg-secondary-rgb), 0.95); /* Match footer in dark mode */
    }
    color: var(--text-secondary);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.4s ease;
}

.home-page .tutor-carousel-btn:hover {
    background-color: rgba(var(--primary-rgb), 0.7);
    transform: translateY(-50%) scale(1.05);
    color: #fff;
    border-color: var(--primary);
}

.home-page .tutor-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%); /* Reset hover transform */
}

.home-page .tutor-prev-btn { left: 20px; } /* Position buttons inside the viewport */
.home-page .tutor-next-btn { right: 20px; }
@media (max-width: 575px) {
    .vs-hero-wrapper h2.hero-title { font-size: 32px; }
}

/* Frosty Glass Effect for Homepage Footer */
.home-page .footer-wrapper {
    background-color: rgba(var(--bg-primary-rgb), 0.8); /* Semi-transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari compatibility */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative; /* Ensures proper stacking context */
    z-index: 2; /* Make sure it's above the background image */
    margin-top: 0; /* Remove default margin if any to sit flush against content */
    padding: 60px 0 0; /* Adjust padding as needed */
}

/* --- Blog Post Styles --- */

/* Style for the "Back to Blog" link */
.back-to-blog-link {
    display: inline-block;
    font-size: 22px; /* Made the link larger for better visibility */
    font-weight: 700; /* Bolder text */
    color: var(--primary); /* Use the primary theme color */
    text-decoration: none;
    margin-bottom: 30px; /* Space below the link */
    transition: all 0.3s ease;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); /* Added subtle shadow for visibility */
}

.back-to-blog-link i {
    margin-right: 8px; /* Space between arrow and text */
    transition: transform 0.3s ease;
}

.back-to-blog-link:hover {
    color: var(--accent); /* Change color on hover for feedback */    
}

/* Animate "Read More" buttons on the blog page on hover */
/* This targets the button on blog cards */
.blog-card .vs-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card .vs-btn:hover {
    transform: translateY(-5px); /* "Lift" effect */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.back-to-blog-link:hover i {
    transform: translateX(-5px);
}

/* Base state for the icon inside the blog card button */
.blog-card .vs-btn i {
    position: relative; /* CRITICAL: Isolates the icon's transform context */
    display: inline-block; /* Ensures transform can be applied */
    transform: translateX(0); /* CRITICAL: Establish a base transform value */
    transition: transform 0.3s ease;
}

/* On button hover, apply the "pointing" animation to the icon */
.blog-card .vs-btn:hover i {
    transform: translateX(5px); /* "Pointing" effect */
}

/* Ensure Back to Top button stays above other content */
.scrollToTop {
    z-index: 9999 !important;
}

/* Apply slide up effect to all sections on mobile */
@media (max-width: 991px) {
    @supports (animation-timeline: view()) {
        .about-content-overlay,
        .about-info-boxes,
        .featured-blog-content-overlay,
        .testimonial-slider-wrapper,
        .tutor-carousel-wrapper,
        .why-section .title-area,
        .featured-tutors-section .title-area,
        .testimonial-section .title-area {
            opacity: 0;
            animation: slideUpFade 0.8s ease-out forwards;
            animation-timeline: view();
            animation-range: entry 10% cover 25%;
        }
    }
}

@keyframes bgTintPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.08; }
}

/* Ensure About read-more button is centered on all viewports for uniformity */
.about-read-more-btn {
    display: inline-block;
    margin: 24px auto 0 auto; /* center horizontally */
    text-align: center;
}

/* Force centering regardless of parent layout */
.about-content .about-read-more-btn {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* --- Mobile & Tablet Alignment Fixes --- */

/* Apply to tablet and mobile viewports */
@media (max-width: 991px) {
    /*
     * This rule targets the container for the "More About Us" tab content.
     * It ensures the content is centered and does not overflow its container.
     */
    #about .about-content {
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    /*
     * This ensures that the 'benefits' container within the 'about' tab
     * does not exceed the width of the screen, fixing a potential overflow.
     * The max-width is set to 100% instead of a fixed pixel value.
     */
    #about .about-content .benefits-container {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important; /* Was 760px, causing overflow */
        margin: 0 auto !important;
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Center various text elements within the 'about' tab */
    #about .about-content .benefits-container .info-box-title,
    #about .about-content .benefits-container .sec-title,
    #about .about-content .benefits-container .sec-desc,
    #about .about-content .benefits-container p {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Reduce title size on mobile for the about tab */
    #about .about-content .benefits-container .sec-title {
        font-size: 1.8rem !important;
    }

    /* Stack and center the benefits list items */
    #about .about-content .benefits-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    #about .about-content .benefits-list li {
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 450px; /* Constrain list item width for readability */
        justify-content: center !important; /* Align content to the center */
    }

    #about .about-content .benefits-list li i {
        min-width: 36px !important;
        text-align: center !important;
        font-size: 20px !important;
    }

    /* Center CTAs in the 'about' tab */
    #about .about-content .impact-cta-container,
    #about .about-content .about-read-more-btn {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Move the button higher on mobile */
    #about .about-content .about-read-more-btn {
        margin-top: -30px !important;
    }
}

    /* Apply specifically to mobile viewports */
@media (max-width: 767px) {
    /*
     * This is the main fix. It targets all major sections from "About Us"
     * to the footer, ensuring they are full-width, have consistent padding,
     * and do not overflow the viewport.
     */
    .home-page .about-section-full-bg,
    .home-page .why-section,
    .home-page .featured-blog-section,
    .home-page .testimonial-section,
    .home-page .footer-wrapper,
    .home-page .about-content,
    .home-page .container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Ensure testimonial slider wrapper fits within parent on mobile */
    .home-page .testimonial-slider-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding-left: 50px !important;
        padding-right: 50px !important;
    }

    /*
     * The body itself should not have horizontal padding, as it's handled
     * by the section containers now. This prevents double padding.
     */
    body.home-page {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden; /* Fallback to prevent horizontal scroll */
    }

    /*
     * Since the parent sections now have padding, we can remove the
     * redundant padding from the inner 'title-area' elements.
     */
    .home-page .title-area,
    .home-page .why-section .title-area,
    .home-page .featured-tutors-section .title-area,
    .home-page .testimonial-section .title-area {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Reduce section title sizes on mobile */
    .home-page .sec-title,
    .home-page .title-area .sec-title {
        font-size: 1.55rem !important;
        padding-top: 2px;
    }

    /* Reduce section subtitle sizes on mobile */
    .home-page .sub-title {
        font-size: 20px !important;
        margin-bottom: -25px !important; /* Bring 5px closer to title */
    }

    /* Move tabbed section up on mobile */
    .tabbed-section {
        margin-top: -15px !important;
    }

    /* Make tabbed section title black on mobile for better visibility */
    .tabbed-section .title-area .sec-title {
        color: #000000 !important;
    }

    /*
     * This rule ensures that any content within a tabbed interface on mobile
     * wraps correctly and does not cause overflow.
     */
    .tabbed-section .tab-content .tab-pane,
    .tabbed-section .tab-content .tab-pane * {
        box-sizing: border-box !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        text-align: center !important; /* NEW: Force center text alignment */
    }
    .tabbed-section .tab-content .tab-pane > * { /* NEW: Center block-level direct children */
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Make images and embedded media responsive within tabs */
    .tabbed-section .tab-content .tab-pane img,
    .tabbed-section .tab-content .tab-pane iframe,
    .tabbed-section .tab-content .tab-pane video {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Style adjustments for the "Impact" tab on mobile */
    #impact .info-box-title {
        font-size: 28px !important; /* Adjust font size for mobile */
        font-weight: 800 !important;
        line-height: 1.1 !important;
        margin-bottom: 12px !important;
        text-align: center !important;
    }

    #impact .corporate-training-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Styling for Footer Social Links to match Hero Social Links */
.footer-wrapper .social-links {
    display: flex;
    gap: 15px; /* Matches hero desktop gap */
    justify-content: flex-start; /* Aligns to start, like hero */
    margin-top: 20px; /* Keep existing margin-top if desired */
    flex-wrap: wrap; /* Allow wrapping on smaller screens if many icons */
}

.footer-wrapper .social-icon {
    /* Override conflicting styles from styles.css */
    margin-right: 0 !important; /* Remove margin-right to use gap */
    animation: none !important; /* Remove bounce animation */
    /* Remove specific hover background colors (will be handled by general hover) */

    /* Apply styles from .hero-social-links .social-icon */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    /* Brand colors will be applied via specific classes below */
}

/* Brand colors for footer social icons */
.footer-wrapper .social-icon.facebook { 
    background: rgba(24, 119, 242, 0.2); 
    border-color: rgba(24, 119, 242, 0.3); 
    color: #1877F2;
}
.footer-wrapper .social-icon.instagram { 
    background: rgba(225, 48, 108, 0.2); 
    border-color: rgba(225, 48, 108, 0.3); 
    color: #E1306C;
}
.footer-wrapper .social-icon.linkedin { 
    background: rgba(0, 119, 181, 0.2); 
    border-color: rgba(0, 119, 181, 0.3); 
    color: #0077B5;
}

/* Hover effect for footer social icons matching hero */
.footer-wrapper .social-icon:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.footer-wrapper .social-icon.facebook:hover { 
    background: rgba(24, 119, 242, 0.7); 
    border-color: rgba(24, 119, 242, 0.9); 
    color: #fff;
}
.footer-wrapper .social-icon.instagram:hover { 
    background: rgba(225, 48, 108, 0.7); 
    border-color: rgba(225, 48, 108, 0.9); 
    color: #fff;
}
.footer-wrapper .social-icon.linkedin:hover { 
    background: rgba(0, 119, 181, 0.7); 
    border-color: rgba(0, 119, 181, 0.9); 
    color: #fff;
}

/* Mobile adjustments for footer social links to match hero */
@media (max-width: 767px) {
    .footer-wrapper .social-links {
        gap: 10px; /* Matches hero mobile gap */
        justify-content: center; /* Center on mobile for better appearance */
    }
    .footer-wrapper .social-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Apply the home footer styling to all pages on mobile */
@media (max-width: 767px) {
    .footer-wrapper {
        background-color: rgba(var(--bg-primary-rgb), 0.8) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 60px !important;
        box-sizing: border-box !important;
        margin-top: 0 !important;
    }
}

.tabbed-section .title-area .sec-title,
.tabbed-section .title-area .sub-title {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.tabbed-section .title-area .sec-title {
    color: var(--primary); /* Blue color on desktop */
}

.tabbed-section .title-area .sub-title {
    color: #fff; /* White color on desktop */
}

/* Frosty Glass Effect for Tabbed Section */
.tabbed-section .tab-btn {
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    font-weight: 600;
}

.tabbed-section .tab-btn:hover {
    background-color: rgba(var(--bg-primary-rgb), 0.9);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.tabbed-section .tab-btn.active {
    background-color: rgba(var(--primary-rgb), 0.8);
    color: #fff;
    border-color: rgba(var(--primary-rgb), 0.6);
    box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.3);
    transform: translateY(-2px) scale(1.02);
}

.tabbed-section .tab-pane {
    background-color: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px 60px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
    animation: fadeIn 0.4s ease-in-out;
}

.tabbed-section .tab-pane.active {
    display: block;
}

.tabbed-section .tab-pane:not(.active) {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .tabbed-section .tab-pane {
        padding: 20px 15px;
    }
}