/* ================== Hero Section ================== */
.hero {
    padding: 10rem 0 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, var(--primary-light) 0%, var(--bg-white) 50%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    padding: 0.35rem 1.2rem 0.35rem 0.35rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-badge .badge-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.hero-badge span {
    letter-spacing: 0.02em;
}

.hero-badge strong {
    font-weight: 700;
    color: var(--navy-dark);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-trust {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-trust:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.12);
}

.hero-trust .stars {
    display: flex;
    gap: 0.2rem;
    color: #f59e0b;
    font-size: 1.1rem;
}

.hero-trust p {
    font-size: 0.95rem;
    color: var(--navy-dark);
    margin: 0;
}

.hero-trust strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Hero Marquee */
.hero-visual {
    position: relative;
    overflow: hidden;
    height: 600px;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
}

.marquee-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.marquee-track {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    animation: scroll-x 20s linear infinite;
    width: max-content;
}


.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-card {
    position: relative;
    width: 350px;
    height: 500px;
    border-radius: 1rem;
    overflow: hidden;
    flex-shrink: 0;
}

.marquee-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.marquee-card:hover img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    color: white;
}

.marquee-controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

@keyframes scroll-x {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 0.5rem));
    }
}

/* ================== Achievements Section ================== */
.achievements {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.stat-number {
    font-size: 2.5rem;
    margin-right: 2px;
}

.stat-info span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    width: 100%;
    color: var(--text-muted);
    font-weight: 500;
}

/* ================== About Us Section ================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.founder-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.founder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.founder-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.founder-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.founder-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-title {
    flex-grow: 1;
}

.founder-name {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--navy-dark);
}

.founder-role {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.founder-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.founder-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: white;
    color: var(--text-main);
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    cursor: default;
}

.founder-badge i {
    color: var(--primary-color);
    background: var(--primary-light);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.founder-badge:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.founder-badge:hover i {
    background: var(--primary-color);
    color: white;
}

.founder-message {
    position: relative;
    background: white;
    padding: 1.5rem 1.5rem 1.5rem 3rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--navy-light);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

.quote-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.5rem;
    color: rgba(37, 99, 235, 0.2);
}

.institute-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: stretch;
}

/* Custom Social & Portfolio Buttons */
.btn-youtube {
    background-color: #ff0000;
    color: #ffffff !important;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-youtube::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-youtube:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.3);
    color: #ffffff !important;
}

.btn-youtube:hover::before {
    width: 100%;
}

.btn-portfolio {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff !important;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-portfolio::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-portfolio:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.4);
    color: #ffffff !important;
}

.btn-portfolio:hover::after {
    left: 100%;
}

.info-card {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    align-items: flex-start;
}

.info-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.1);
}

.info-icon {
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--primary-light), white);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover .info-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--navy-dark));
    color: white;
    transform: rotate(5deg) scale(1.05);
}

.info-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--navy-dark);
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ================== Success Stories Section ================== */
.success-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.student-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 1rem auto 1.5rem;
    border: 3px solid var(--bg-offwhite);
}

.success-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.exam-name {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.success-metric {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ================== Courses Section ================== */
.courses-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-offwhite);
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--navy-dark);
    color: white;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-subjects {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--navy-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ================== Gallery Section ================== */
.gallery-marquee-wrapper {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1280px;
    margin: 0 auto 1.5rem;
}

.gallery-marquee {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    padding: 0 1rem;
    /* JS will handle the transform to allow both auto-loop and button clicks */
}

.gallery-nav {
    display: flex;
    gap: 1rem;
}

.gallery-nav .btn-icon {
    box-shadow: var(--shadow-sm);
}

.gallery-item {
    height: 320px;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    background-color: var(--bg-white);
    flex-shrink: 0;
}

.gallery-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.video-item {
    cursor: pointer;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: auto;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-slow);
}

.video-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-item:hover {
    transform: translateY(-4px);
}

.video-item:hover img {
    transform: scale(1.05);
}

.video-item.hidden {
    display: none;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    transition: all var(--transition-normal);
}

.video-item:hover .play-btn {
    background: var(--primary-color);
    color: white;
    transform: translate(-50%, -50%) scale(1.1);
}

/* ================== Testimonials Section ================== */
.testimonials-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    padding: 1rem;
}

.testimonial-controls {
    position: absolute;
    top: 50%;
    left: 1rem;
    right: 1rem;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .testimonial-controls {
        left: 0.5rem;
        right: 0.5rem;
    }
}

.testimonial-controls .btn-icon {
    pointer-events: auto;
    box-shadow: var(--shadow-md);
    transform: none;
}

.testimonial-controls .review-next {
    transform: none;
}

.testimonial-marquee {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease;
}

.reviewer-type {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.rating {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.review-text {
    font-style: italic;
    color: var(--text-main);
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

.review-text-content {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.testimonial-card.expanded .review-text-content {
    -webkit-line-clamp: none;
    line-clamp: none;
    display: block;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.read-more-btn:hover {
    color: var(--navy-dark);
}

/* ================== CTA Section ================== */
.cta {
    padding-bottom: 6rem;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--navy-dark) 100%);
    border-radius: 2rem;
    padding: 5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-content p {
    color: #cbd5e1;
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cta-buttons .btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.cta-buttons .btn-primary:hover {
    background: var(--bg-offwhite);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.cta-outline {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(5px);
}

.cta-outline:hover {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.cta-decoration {
    position: absolute;
    top: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

/* Home Page Media Queries */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-description {
        margin: 0 auto 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-trust {
        justify-content: center;
    }

    .hero {
        padding-top: 8rem;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .founder-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .founder-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .founder-badges {
        justify-content: center;
    }

    .success-grid,
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .cta-card {
        padding: 3rem 2rem;
    }

    .cta-content h2 {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .achievements-grid,
    .success-grid,
    .courses-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .founder-card {
        padding: 1.5rem;
    }

    .gallery-item {
        height: 220px;
        width: auto;
    }
}

/* ================== Dev Advertisement Overlay ================== */
.dev-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.dev-ad-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.dev-ad-card {
    background: var(--bg-white);
    border-radius: 1.5rem;
    overflow: visible;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 50px;
}

.dev-ad-overlay.show .dev-ad-card {
    transform: scale(1) translateY(0);
}

.dev-ad-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-dark);
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dev-ad-close:hover {
    background: var(--bg-light);
    color: var(--danger-color);
    transform: rotate(90deg);
}

.dev-ad-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    margin: -60px auto 1rem auto;
    border: 5px solid var(--bg-white);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
    z-index: 10;
    background: var(--bg-white);
}

.dev-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.dev-ad-content {
    padding: 0 2rem 2rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.dev-ad-badge {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(var(--primary-rgb), 0.1);
}

.dev-ad-content h2 {
    font-size: 1.8rem;
    color: var(--navy-dark);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.dev-ad-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.dev-ad-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.highlight-item {
    background: var(--bg-offwhite);
    color: var(--navy-dark);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--border-color);
}

.highlight-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.dev-ad-actions {
    margin-bottom: 1.25rem;
}

.dev-ad-actions .btn {
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    padding: 0.8rem 2rem;
    font-size: 1.05rem;
}

.dev-ad-actions .btn:hover {
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
    transform: translateY(-2px);
}

.dev-ad-timer {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}