/* ============ HERO SECTION ============ */
.hero {
    padding: 60px 0;
    background-color: var(--bg-light);
}


.hero-content {
    display: grid;
    grid-template-columns: 35% calc(65% - 100px);
    gap: 100px;
    align-items: center;
}

.hero-title {
    font-size: 44px;
    line-height: 55px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 16px;
}

h1.hero-title span {
    color: #9473B3;
    font-size: 100px;
}

.hero-description {
    font-size: 16px;
    line-height: 26px;
    color: var(--black);
    margin-bottom: 50px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-images {
    display: flex;
    justify-content: flex-end;
}

.hero-img-small {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.hero-img-1 {
    top: 0;
    left: 0;
}

.hero-img-large {
    position: absolute;
    top: 40px;
    right: 0;
    width: 280px;
    height: 280px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.hero-img-2 {
    bottom: 0;
    right: 60px;
}

.hero-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background-color: #FFD700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-accent {
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: 80px;
    height: 80px;
    background-color: #FF6B35;
    border-radius: 4px;
    opacity: 0.8;
}

/* ============ CATEGORIES SECTION ============ */
.categories {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.category-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.category-green {
    background-color: var(--primary-green);
}

.category-blue {
    background-color: var(--primary-blue);
}

.category-orange {
    background-color: var(--primary-orange);
}

.category-light-blue {
    background-color: var(--primary-light-blue);
}

.category-light-blue.full-width {
    grid-column: 1 / -1;
}

.category-title {
    font-size: 30px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 30px;
    line-height: 38px;
}

.category-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    padding: 10px;
    background-color: #fff;
    font-size: 16px;
    color: var(--black);
    transition: background-color 0.3s ease;
    line-height: 20px;
    display: flex;
    gap: 10px;
    width: fit-content;
    font-weight: 500;
}

.card-parent {
    display: flex;
    flex-direction: column;
    gap: 30px;
    justify-content: space-between;
}

.category-icon {
    display: flex;
    margin-bottom: -18px;
    margin-left: auto;
    width: 125px;
    height: 125px;
    align-items: center;
    justify-content: center;
}

.category-link {
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
    display: flex;
    margin-top: -27px;
}

.category-link:hover {
    color: var(--primary-purple);
}

.category-description {
    font-size: 16px;
    line-height: 26px;
    color: var(--black);
    margin-bottom: 16px;
}

/* ============ FEATURED COURSES SECTION ============ */
.featured-courses {
    padding: 60px 0;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: 36px;
    line-height: 45px;
    font-weight: 600;
    color: var(--black);
}

.btn-desktop {
    display: block;
}

.btn-mobile {
    display: none;
    width: 100%;
    margin-top: 24px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.course-card {
    background-color: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 10px;
    border: solid 1px #E0E0E0;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.course-badge {
    /* position: absolute; */
    top: 12px;
    right: 12px;
    background-color: #FF6B35;
    color: var(--white);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.course-image {
    height: 160px;
    background-color: var(--primary-blue);
    background-size: cover;
    background-position: center;
}

.course-content {
    padding: 30px 10px 10px;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    line-height: 23px;
    max-width: 200px;
}

.course-description {
    font-size: 14px;
    color: var(--black);
    margin-top: 15px;
    line-height: 18px;
}

.course-meta {
    display: flex;
    font-size: 14px;
    color: var(--black);
    margin-top: 20px;
    gap: 20px;
    line-height: 18px;
}

/* ============ MOBILE APP SECTION ============ */
.mobile-app {
    padding: 60px 0 0;
    background-color: var(--bg-light);
}

.app-content {
    display: grid;
    grid-template-columns: 39.5% calc(60.5% - 170px);
    gap: 170px;
    align-items: center;
    padding: 70px 100px 0;
    background-color: var(--white);
    border: solid 1px #E0E0E0;
}

.app-content .section-title {
    font-size: 44px;
    line-height: 55px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 16px;
}

.app-left {
    flex: 1;
}

.section-description {
    font-size: 16px;
    line-height: 26px;
    color: var(--black);
    margin-bottom: 50px;
}

.app-buttons {
    display: flex;
    gap: 10px;
}

.app-buttons a {
    display: flex;
}

.app-buttons a img {
    width: 185px;
}

.app-right {
    display: flex;
    justify-content: center;
}

.app-mockup {
    overflow: hidden;
    display: flex;
}

.app-mockup img {
    width: 100%;
    margin-bottom: -230px;
}
/* Bottom Cards */
.bottom-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.bottom-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 28px;
    min-height: 170px;
}

.nursing-card {
    background: #FADADD;
}

.iti-card {
    background: #E6E6FA;
}

.bottom-card-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.bottom-card-icon img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.bottom-card h3 {
    font-size: 38px;
    line-height: 1.2;
    font-weight: 600;
    color: #1C1B1F;
    margin: 0;
}

.bottom-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 767px) {
    .bottom-cards {
        grid-template-columns: 1fr;
    }

    .bottom-card {
        padding: 24px 20px;
        min-height: auto;
    }

    .bottom-card h3 {
        font-size: 28px;
    }

    .bottom-card-left {
        gap: 16px;
    }

    .bottom-card-icon img {
        width: 46px;
        height: 46px;
    }
}
/* ============ COMMUNITY SECTION ============ */
section.community {
    padding: 0 0 100px;
}

.community-content {
    display: grid;
    grid-template-columns: 37.5% calc(62.5% - 137px);
    gap: 137px;
    align-items: flex-start;
    padding: 70px 100px 287px;
    background-color: var(--primary-light-green);
}

.community-left {
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: flex-start;
}

.community-stats {
    display: flex;
    flex-wrap: wrap;
}

.stat-card {
    width: 50%;
}

.stat-number {
    font-size: 60px;
    font-weight: 700;
    color: var(--black);
    line-height: 76px;
}

.stat-label {
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
    color: var(--black);
    margin: 10px 0 0;
}

.mostPractical {
    width: 100%;
    padding: 10px 20px;
    background-color: var(--white);
    margin: 50px 0 0;
    font-size: 20px;
    line-height: 30px;
    font-weight: 300;
}

/* ============ VIDEO SECTION ============ */

.video-container {
    position: relative;
    height: 500px;
    background-color: #ccc;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 970px;
    margin: -217px auto 0;
    background-size: cover;
    padding: 50px;
    display: flex;
    align-items: flex-end;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.video-content {
    max-width: 297px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
}

.video-title {
    font-size: 30px;
    font-weight: 600;
    line-height: 38px;
    color: #fff;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============ RESPONSIVE DESIGN ============ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 36px;
        line-height: 45px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-parent {
        gap: 20px;
    }

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

    .hero {
        padding: 40px 0 20px;
    }

    .btn-desktop {
        display: none;
    }

    .btn-mobile {
        display: block;
    }

    .app-content {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 20px;
    }

    .app-content .section-title {
        font-size: 32px;
        line-height: 42px;
        margin: 0 0 16px;
    }

    .section-description {
        margin-bottom: 32px;
    }

    .community-content {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 20px 20px 220px;
    }

    .community-left {
        gap: 24px;
    }

    section.community {
        padding: 0 0 40px;
    }

    .featured-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 30px;
    }

    .mobile-app {
        padding: 20px 0 0;
    }

    .section-title {
        font-size: 32px;
        line-height: 38px;
    }

    .hero-description {
        margin-bottom: 24px;
    }

    .categories {
        padding: 20px 0;
    }

    .category-card {
        padding: 20px;
    }

    .category-title {
        font-size: 26px;
        margin-bottom: 20px;
        line-height: 34px;
    }

    .category-item {
        padding: 8px;
        font-size: 14px;
        line-height: 18px;
        gap: 8px;
    }

    .featured-courses {
        padding: 20px 0;
    }

    .stat-number {
        font-size: 42px;
        line-height: 54px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {

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

    .app-buttons a img {
        width: 140px;
    }

    .community-stats {
        grid-template-columns: 1fr;
    }

    .mostPractical {
        padding: 8px 12px;
        margin: 24px 0 0;
        font-size: 16px;
        line-height: 24px;
    }

    .video-container {
        height: 340px;
        max-width: 85%;
        margin: -200px auto 0;
        padding: 20px;
    }
}

/* dynamic course fetch css */

.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-content {
    display: flex;
    flex-direction: column;
    flex: 1; 
}

.course-title {
    margin: 0 0 8px 0;
}

.course-description {
    margin: 0 0 12px 0;
    flex: 0 0 auto;
}

.course-meta {
    margin-top: auto; 
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
}

.course-description {
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    /* height fix rakhne ke liye (2 lines * line-height) */
    min-height: calc(1.5em * 2);
}

/* ============ BUTTON HOVER EFFECTS ============ */

.btn-primary,
.btn-secondary,
.btn-login,
.btn-signup,
.btn-signup-mobile,
.btn-video,
.btn-dark {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

@media (hover: hover) {

    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-login:hover,
    .btn-signup:hover,
    .btn-signup-mobile:hover,
    .btn-video:hover,
    .btn-dark:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
        filter: brightness(1.07);
    }

    .btn-primary:active,
    .btn-secondary:active,
    .btn-login:active,
    .btn-signup:active,
    .btn-signup-mobile:active,
    .btn-video:active,
    .btn-dark:active {
        transform: translateY(0);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    }

    /* Watch Demo ka play icon thoda bada ho */
    .btn-video img {
        transition: transform 0.25s ease;
    }

    .btn-video:hover img {
        transform: scale(1.15);
    }
}

/* ============ CATEGORY CARDS - BUTTON HOVER EFFECTS ============ */

/* Card ke andar ke items (Digital Marketing, Healthcare, Graduation, PhD etc.) */
.category-item {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

@media (hover: hover) {
    .category-item:hover {
        transform: translateX(5px);
        background-color: #EFE9F7;
    }

    .category-item:active {
        transform: translateX(2px);
    }
}

/* Arrow buttons (Language Courses, Professional Development, Nursing, ITI) */
.category-link svg,
.bottom-card-arrow svg {
    transition: transform 0.3s ease;
}

.category-link,
.bottom-card-arrow {
    transition: transform 0.3s ease, color 0.3s ease;
}

@media (hover: hover) {

    .category-link:hover svg,
    .bottom-card-arrow:hover svg,
    .category-card:hover .category-link svg,
    .bottom-card:hover .bottom-card-arrow svg {
        transform: translateX(10px);
    }

    .category-link:hover svg path,
    .bottom-card-arrow:hover svg path {
        fill: var(--primary-purple, #9473B3);
    }
}

/* Poore category card pe halka lift effect */
.category-card,
.bottom-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {

    .category-card:hover,
    .bottom-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    }
}

/* ============ SCROLL REVEAL ANIMATIONS ============ */
/*
 * Animation `translate` / `scale` properties use karti hai (transform nahi),
 * isliye cards ka hover `transform` effect animation ke baad bhi kaam karta rahega.
 * Classes home.js (initScrollReveal / registerReveal) lagata hai.
 */
.reveal-ready .reveal {
    opacity: 0;
}

.reveal-ready .reveal.is-visible {
    animation: reveal-up 0.8s cubic-bezier(0.22, 0.8, 0.24, 1) var(--reveal-delay, 0s) both;
}

.reveal-ready .reveal-up-sm.is-visible {
    animation-name: reveal-up-sm;
    animation-duration: 0.6s;
}

.reveal-ready .reveal-from-left.is-visible {
    animation-name: reveal-from-left;
}

.reveal-ready .reveal-from-right.is-visible {
    animation-name: reveal-from-right;
}

.reveal-ready .reveal-zoom.is-visible {
    animation-name: reveal-zoom;
    animation-duration: 0.9s;
}

/* System me "reduce motion" on ho to movement nahi, sirf fade-in */
.reveal-fade-only .reveal.is-visible {
    animation-name: reveal-fade !important;
    animation-duration: 0.7s !important;
}

@keyframes reveal-up {
    from { opacity: 0; translate: 0 70px; }
    to   { opacity: 1; translate: 0 0; }
}

@keyframes reveal-up-sm {
    from { opacity: 0; translate: 0 20px; }
    to   { opacity: 1; translate: 0 0; }
}

@keyframes reveal-from-left {
    from { opacity: 0; translate: -80px 0; }
    to   { opacity: 1; translate: 0 0; }
}

@keyframes reveal-from-right {
    from { opacity: 0; translate: 80px 0; }
    to   { opacity: 1; translate: 0 0; }
}

@keyframes reveal-zoom {
    from { opacity: 0; scale: 0.85; }
    to   { opacity: 1; scale: 1; }
}

@keyframes reveal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Side se aane wale elements se horizontal scrollbar na bane */
.hero,
.mobile-app,
.community {
    overflow-x: clip;
}

/* Count-up ke time number ki width hile nahi */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ============ HERO IMAGE SLIDER ============ */
.hero-slider {
    position: relative;
    max-width: 100%;
    cursor: pointer;
}

.hero-slide {
    opacity: 0;
    transform: rotate(5deg) scale(0.9);
    transform-origin: 60% 60%;
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.8, 0.24, 1);
    will-change: opacity, transform;
}

/* Pehli image slider ka size decide karti hai, baaki uske upar stack hoti hain */
.hero-slide:first-child {
    position: relative;
}

.hero-slide:not(:first-child) {
    position: absolute;
    inset: 0;
}

.hero-slide img {
    display: block;
    max-width: 100%;
    height: auto;
}

.hero-slide:not(:first-child) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Aane wali image: rotate + zoom se seedhi ho kar dikhe */
.hero-slide.is-active {
    opacity: 1;
    transform: none;
    z-index: 2;
}

/* Jaane wali image: ulti taraf rotate ho kar fade out */
.hero-slide.is-leaving {
    opacity: 0;
    transform: rotate(-5deg) scale(1.05);
    z-index: 1;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    translate: -50% 0;
    z-index: 3;
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.hero-dot.is-active {
    width: 22px;
    background-color: var(--primary-purple, #9473B3);
}

/* Motion kam pasand karne wale users ke liye: sirf fade */
@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slide.is-leaving {
        transform: none;
        transition: opacity 0.4s ease;
    }
}

/* ============ HERO HEADING ANIMATION ============ */
/* home.js (initHeroTitle) words ko loop me ek-ek karke dikhata hai:
   .is-in = aa raha / dikh raha, .is-out = ja raha */

/* Upar wala "h1.hero-title span" rule (purple, 100px) sirf dot pe lage, baaki wrappers pe nahi */
h1.hero-title .ht-sr,
h1.hero-title .ht-stage,
h1.hero-title .ht-word,
h1.hero-title .ht-inner {
    color: inherit;
    font-size: inherit;
}

/* Poora text screen reader ke liye — dikhta nahi */
.hero-title .ht-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Teeno words ek hi jagah stack — width/height sabse bade word jitni, layout nahi hilega */
.hero-title .ht-stage {
    display: grid;
    justify-items: start;
}

.hero-title .ht-word {
    grid-area: 1 / 1;
    display: inline-block;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

.hero-title .ht-inner,
.hero-title .ht-dot {
    display: inline-block;
}

.hero-title .ht-inner {
    transform-origin: 0 100%;
    transition: color 0.3s ease;
}

.hero-title .ht-dot {
    transform-origin: 50% 70%;
}

/* Aana: word neeche se tilt + blur se seedha hota hai, phir purple dots pop */
.hero-title .ht-word.is-in {
    opacity: 1;
    pointer-events: auto;
}

.hero-title .ht-word.is-in .ht-inner {
    animation: ht-word-in 0.8s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

/* Teeno dots ek-ek karke pop (--d = 0, 1, 2 home.js lagata hai) */
.hero-title .ht-word.is-in .ht-dot {
    animation: ht-dot-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.45s + var(--d, 0) * 0.15s) both;
}

/* Jaana: poora word upar uthke blur hokar gayab (timing = HT_LEAVE_MS in home.js) */
.hero-title .ht-word.is-out {
    animation: ht-word-out 0.5s cubic-bezier(0.55, 0, 0.75, 0.2) both;
}

/* Desktop pe word hover karo to purple */
@media (hover: hover) {
    .hero-title .ht-word:hover .ht-inner {
        color: var(--primary-purple, #9473B3);
    }
}

@keyframes ht-word-in {
    from { opacity: 0; translate: 0 0.7em; rotate: 8deg; filter: blur(8px); }
    to   { opacity: 1; translate: 0 0;     rotate: 0deg; filter: blur(0); }
}

@keyframes ht-dot-pop {
    0%   { opacity: 0; scale: 0; }
    60%  { opacity: 1; scale: 1.4; }
    100% { opacity: 1; scale: 1; }
}

@keyframes ht-word-out {
    from { opacity: 1; translate: 0 0;       filter: blur(0); }
    to   { opacity: 0; translate: 0 -0.45em; filter: blur(6px); }
}

@keyframes ht-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Reduce motion on ho to words badalte rahenge, par sirf fade se — koi movement nahi */
.reveal-fade-only .hero-title .ht-word.is-in .ht-inner,
.reveal-fade-only .hero-title .ht-word.is-in .ht-dot {
    animation: reveal-fade 0.5s ease both;
}

.reveal-fade-only .hero-title .ht-word.is-out {
    animation: ht-fade-out 0.5s ease both;
}
