/* ================= Hero Section ================= */
.hero {
    width: 100%;
    height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0 60px;
    box-sizing: border-box;
    top: var(--header-height);
}

.hero__inner {
    display: flex;
    gap: 60px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.hero__left {
    flex: 1;
    max-width: 640px;
    display: flex;
    flex-direction: column;
}

.hero__title {
    font-size: clamp(28px, 4vw, 33px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin: 0 0 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero__subtitle {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 25px;
    padding: 10px;
    max-width: 100%;
}

.hero__ctas {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.hero__ctas .btn-1,
.hero__ctas .btn-2 {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(90deg, var(--primary-2), var(--primary-1));
    color: #fff;
    border: 1px solid #3c2388;
    box-shadow: 0 4px 12px rgba(123, 60, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero__ctas .btn-1:hover {
    background: linear-gradient(9deg, rgba(128, 0, 128, 0), rgba(0, 0, 255, 0.223)120%);
    border: 2px solid #3c2388;
}

.hero__ctas .btn-2:hover {
    background: linear-gradient(0deg, rgba(128, 0, 128, 0), rgba(0, 0, 255, 0.223)120%);
    border: 2px solid #3c2388;
}

.hero__ctas .btn-1:focus-visible,
.hero__ctas .btn-2:focus-visible {
    outline: 2px solid var(--primary-5);
    outline-offset: 3px;
}

.hero__badges {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    list-style: none;
}

.hero__badges li {
    font-size: 13px;
    color: var(--text);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    padding: 10px 18px;
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hero video box with pulse effect */
.hero__media {
    width: 100%;
    max-width: 460px;
    height: 100%;
    min-height: 300px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass);
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(123, 60, 255, 0.25);
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

.hero__media video {
    width: 100%;
    height: fit-content;
    object-fit: cover;
    border-radius: 61px 61px 61px 61px;
    /* border-radius: 75px 75px 24px 24px;
        -webkit-border-radius: 84px 85px 24px 24px;
        -moz-border-radius: 75px 75px 24px 24px;
    display: block; */
    filter: contrast(1.03) saturate(1.05);
}

/* Pulse animation */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 40px rgba(123, 60, 255, 0.25),
            0 0 20px rgba(123, 60, 255, 0.15) inset;
    }

    50% {
        box-shadow: 0 0 60px rgba(123, 60, 255, 0.35),
            0 0 30px rgba(123, 60, 255, 0.25) inset;
    }

    100% {
        box-shadow: 0 0 40px rgba(123, 60, 255, 0.25),
            0 0 20px rgba(123, 60, 255, 0.15) inset;
    }
}

/* ================= Scroll Margin ================= */
section {
    scroll-margin-top: var(--header-height);
}

.hero+section {
    margin-top: 40px;
}

/* ================= Responsive ================= */
@media(max-width:1100px) {
    .hero__right {
        flex: 0 0 360px;
        max-width: 360px;
    }
}

@media(max-width:820px) {
    .hero__inner {
        flex-direction: column-reverse;
        gap: 32px;
    }

    .hero__right {
        width: 100%;
        flex: 1;
    }

    .hero__left {
        max-width: 100%;
    }
}

@media(max-width:480px) {
    .hero__title {
        font-size: 22px;
        white-space: normal;
    }

    .hero__media {
        max-height: 260px;
    }
}

/* ================= Services Scroll Section (v2) ================= */
.services-scroll {
    padding: 120px 0;
    position: relative;
    text-align: center;
    min-height: fit-content;
    overflow: hidden;
}

.section-title-wrapper {
    max-width: 600px;
    margin: 0 auto 70px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section-title-wrapper.show {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
}

.section-sub {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.8;
}

.services-scroll-grid {
    display: flex;
    gap: 36px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.service-scroll-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass);
    border-radius: 0px 100px 20px 20px;
    padding: 28px;
    width: 320px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(.22, .68, .36, 1);
    opacity: 0;
    transform: translateY(70px);
    overflow: hidden;
    isolation: isolate;
}

/* درخشش هنگام hover */
.service-scroll-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    transform: skewX(-20deg);
    transition: all 0.7s ease;
    pointer-events: none;
    opacity: 0;
}

.service-scroll-card:hover::after {
    left: 120%;
    opacity: 1;
}

.service-scroll-card.show {
    opacity: 1;
    transform: translateY(0);
}

.service-scroll-card.selected {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-1);
}

.service-scroll-card:not(.selected) {
    opacity: 0.8;
    transform: scale(0.96);
}

.card-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(100, 70, 255, 0.3);
    animation: floatY 5s ease-in-out infinite;
}

@keyframes floatY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.card-logo img {
    width: 48%;
    height: 48%;
}

.service-scroll-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.divider {
    width: 40px;
    height: 2px;
    background: var(--primary-1);
    margin: 10px auto 14px;
    display: block;
    border-radius: 10px;
}

.service-scroll-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    transition: color 0.3s ease;
}

.service-scroll-card:hover p {
    color: #ddd;
}

.services-scroll-btn-wrapper {
    text-align: center;
    margin-top: 50px;
}

.btn--primary {
    padding: 14px 36px;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--primary-1), var(--primary-2));
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn--primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: scale(0.98);
}

.btn--primary:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(123, 60, 255, 0.4);
}

/* Responsive */
@media(max-width: 1024px) {
    .services-scroll-grid {
        flex-direction: column;
        align-items: center;
    }
}

/* ================= ACADEMY ================= */
.academy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.course-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 16px;
    padding: 14px;
    border: 1px solid var(--glass);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

.course-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.course-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5);
}

.course-banner {
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: #0a0a0d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .92;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.course-title {
    font-size: 16px;
    font-weight: 600;
}

.course-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.course-badges span {
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
}

.course-unfold {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.course-card.open .course-unfold {
    max-height: 350px;
    opacity: 1;
}

/* Responsive */
@media(max-width:1024px) {

    .services-grid,
    .academy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:600px) {

    .services-grid,
    .academy-grid {
        grid-template-columns: 1fr;
    }
}

/* Portfolio grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px
}

.proj-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--glass);
    background: #060608
}

.proj-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block
}

.proj-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 2, 6, 0.0), rgba(2, 2, 6, 0.6));
    display: flex;
    align-items: flex-end;
    padding: 14px;
    opacity: 0;
    transition: opacity .22s
}

.proj-card:hover .proj-overlay {
    opacity: 1
}

.proj-overlay button {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text)
}

/* Testimonials */
.testimonials {
    position: relative
}

.test-list {
    display: flex;
    gap: 14px;
    align-items: center;
    overflow: visible
}

.testimonial {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    padding: 18px;
    border-radius: 14px;
    min-width: 320px;
    border: 1px solid var(--glass)
}

.testimonial .name {
    font-weight: 600
}

.testimonial .role {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px
}

/* Partners marquee */
.marquee {
    margin: 20px 0;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--glass);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.005))
}

.marquee-inner {
    display: flex;
    gap: 28px;
    align-items: center;
    white-space: nowrap;
    animation: marq 18s linear infinite
}

.partner {
    opacity: .6;
    transition: all .18s;
    display: inline-flex;
    align-items: center
}

.partner img {
    height: 40px
}

.partner:hover {
    opacity: 1;
    transform: scale(1.05)
}

@keyframes marq {
    0% {
        transform: translateX(0)
    }

    100% {
        transform: translateX(-50%)
    }
}

/* CTA final */
.cta-final {
    border-radius: 18px;
    padding: 28px;
    background: linear-gradient(90deg, rgba(123, 60, 255, 0.07), rgba(47, 91, 255, 0.02));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.cta-final h3 {
    margin: 0;
    font-size: 20px
}

.cta-final .cta-actions {
    display: flex;
    gap: 12px
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    margin-top: 40px
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 18px
}

.socials {
    display: flex;
    gap: 8px
}

.socials a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.04)
}

/* Responsive */
@media(max-width:1100px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .academy-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .hero__subtitle {
        max-width: 100%
    }

    .hero__right {
        flex: 0 0 360px;
        width: 360px
    }
}

@media(max-width:820px) {
    .main-nav {
        display: none
    }

    .menu-toggle {
        display: inline-block
    }

    .hero__inner {
        flex-direction: column-reverse;
        align-items: flex-start
    }

    .hero__right {
        width: 100%;
        flex: 1
    }

    .hero__left {
        max-width: 100%
    }

    .services-grid {
        grid-template-columns: 1fr
    }

    .academy-grid {
        grid-template-columns: 1fr
    }

    .portfolio-grid {
        grid-template-columns: 1fr
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr
    }

    .marquee-inner {
        animation-duration: 28s
    }
}

/* small devices */
@media(max-width:480px) {
    .brand__academy {
        font-size: 14px
    }

    .brand__name {
        font-size: 11px
    }

    .hero__title {
        font-size: 22px
    }

    .hero__media {
        height: 260px
    }

    .site-header {
        padding: 10px 0
    }
}

/* reduce motion preference */
@media (prefers-reduced-motion: reduce) {

    .marquee-inner,
    .proj-card,
    .testimonial,
    .service-card,
    .hero__media,
    .course-card {
        transition: none;
        animation: none
    }
}