:root {
    --blue: #0d57e7;
    --blue2: #063cb6;
    --purple: #4d22cc;
    --orange: #ff8a00;
    --red: #ef233c;
    --green: #18aa68;
    --ink: #071026;
    --muted: #667085;
    --line: #e7ebf3;
    --shadow: 0 18px 42px rgba(10, 37, 90, .11);
    --r: 22px
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: Inter, system-ui, sans-serif;
    background: linear-gradient(180deg, #fff 0%, #f6f9ff 58%, #fff);
    color: var(--ink);
    overflow-x: hidden
}

a {
    text-decoration: none;
    color: inherit
}

button {
    border: 0;
    font-family: inherit;
    cursor: pointer
}

.home {
    max-width: 1500px;
    margin: auto;
    padding: 0 28px 34px
}

.hero {
    display: grid;
    grid-template-columns: 42% 58%;
    min-height: 430px;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
    background: linear-gradient(90deg, #fff 0%, #fff 38%, #eef4ff 66%, #dce9ff)
}

.hero-copy {
    z-index: 8;
    padding: 58px 0 56px 54px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.hero h1 {
    font-size: clamp(42px, 5vw, 70px);
    line-height: .96;
    letter-spacing: -.055em;
    font-weight: 900
}

.hero h1 span {
    color: var(--blue)
}

.hero p {
    margin-top: 18px;
    font-size: clamp(17px, 1.5vw, 24px);
    line-height: 1.35;
    font-weight: 500
}

.checks {
    list-style: none;
    margin-top: 24px;
    display: grid;
    gap: 12px;
    font-weight: 650
}

.checks li {
    display: flex;
    align-items: center;
    gap: 11px
}

.checks i {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 12px
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-top: 31px;
    flex-wrap: wrap
}

.btn {
    height: 56px;
    border-radius: 12px;
    color: #fff;
    font-weight: 850;
    font-size: 16px;
    padding: 0 30px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 16px 30px rgba(13, 87, 231, .23)
}

.btn:hover {
    transform: translateY(-3px)
}

.btn.blue {
    background: linear-gradient(135deg, var(--blue), var(--blue2))
}

.btn.purple {
    background: linear-gradient(135deg, #6534e6, var(--purple))
}

.hero-visual {
    position: relative;
    min-height: 430px;
    overflow: hidden
}

.hero-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center bottom;
    opacity: 0;
    z-index: 1
}

.hero-layer:nth-child(1) {
    background-image: url('images/students-study.png')
}

.hero-layer:nth-child(2) {
    background-image: url('images/china-flag-city.png')
}

.hero-layer:nth-child(3) {
    background-image: url('images/hero-professional.png')
}

.hero-layer.active {
    opacity: 1;
    z-index: 2
}

.hero-layer.revealing {
    opacity: 1;
    z-index: 3;
    animation: clockWipe 1.25s cubic-bezier(.55, 0, .1, 1) forwards
}

.hero-visual:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 6;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .84) 15%, rgba(255, 255, 255, .18) 39%, transparent 64%);
    pointer-events: none
}

.hero-visual.is-changing:after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62%;
    height: 2px;
    z-index: 7;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), rgba(13, 87, 231, .16));
    transform-origin: left center;
    animation: needle 1.25s cubic-bezier(.55, 0, .1, 1) forwards;
    mix-blend-mode: screen
}

.plane {
    position: absolute;
    right: 5%;
    top: 22%;
    z-index: 8;
    color: #fff;
    font-size: 38px;
    transform: rotate(-18deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .16))
}

.plane:before {
    content: "";
    position: absolute;
    right: 34px;
    top: 18px;
    width: 230px;
    border-top: 2px dotted rgba(255, 255, 255, .72)
}

@keyframes needle {
    from {
        transform: rotate(-90deg)
    }

    to {
        transform: rotate(270deg)
    }
}

@keyframes clockWipe {
    0% {
        clip-path: polygon(50% 50%, 50% 0, 50% 0, 50% 0)
    }

    25% {
        clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 30%, 100% 30%)
    }

    50% {
        clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%)
    }

    75% {
        clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 30%)
    }

    100% {
        clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0)
    }
}

.section {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--r);
    padding: 26px 32px;
    backdrop-filter: blur(12px)
}

.title {
    margin-bottom: 22px
}

.title h2 {
    font-size: 30px;
    letter-spacing: -.035em
}

.title p {
    font-size: 15px;
    color: #1d2939;
    margin-top: 4px;
    font-weight: 500
}

.offers {
    margin-top: -24px;
    position: relative;
    z-index: 10;
    border: 2px solid rgba(175, 45, 45, .72)
}

.offers-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px
}

.cylinder {
    height: 580px;
    position: relative;
    overflow: visible;
    overflow-x: hidden;
    perspective: 1300px;
    padding: 18px 0 24px;
}

.offer-track {
    height: 430px;
    position: relative;
    transform-style: preserve-3d;
}

.offer-card {
    height: auto;
    min-height: 380px;
    position: absolute;
    top: 47px;
    left: 50%;
    width: 260px;
    background: #fff;
    border: 1px solid #edf0f6;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(15, 35, 90, .14);
    transition: transform .8s cubic-bezier(.2, .8, .2, 1), opacity .8s, filter .8s;
    transform-style: preserve-3d;
    transform: scale(0.92);
    transform-origin: center center;
}

/* البطاقة النشطة (الأمامية) */



/* البطاقات العادية */
.offer-card .badge {
    background: var(--red);
}

.offer-card .book {
    background: linear-gradient(135deg, #ef233c, #ff4438);
}
.offer-card.active-card .book {
    background: linear-gradient(135deg, #ffb800, #ff8a00);
}

.offer-card.active-card .badge {
    background: #ffb800;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--red);
    color: white;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 900
}


.offer-img {
    height: 132px;
    background-size: cover;
    background-position: center
}

.offer-logo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: white;
    border: 4px solid #fff;
    box-shadow: 0 8px 18px rgba(15, 35, 90, .16);
    margin: -28px auto 9px;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative
}

.offer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.offer-body {
    text-align: center;
    padding: 0 13px 13px;
    padding-bottom: 15px;
}

.offer-body h3 {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.meta {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
    min-height: 36px
}

.offer-desc {
    font-size: 10px;
    color: #475467;
    white-space: normal;
    /* ← يسمح بالنزول لعدة أسطر */
    overflow: visible;
    /* ← يظهر النص كاملاً */
    text-overflow: unset;
    /* ← يلغي الـ ... */
    margin: 9px 0;
    line-height: 1.4;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff3f3;
    border-radius: 10px;
    padding: 8px 4px;
    margin: 8px 0 11px;
    color: #c4162a
}

.countdown b {
    display: block;
    font-size: 17px
}

.countdown small {
    font-size: 9px;
    color: #667085
}

.book {
    width: 100%;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ef233c, #ff4438);
    color: #fff;
    font-weight: 900;
    font-size: 12px
}

.book.claim {
    background: linear-gradient(135deg, #ff9f16, #ff7a00)
}

.side-ctas {
    display: grid;
    gap: 18px
}

.mini-cta {
    min-height: 150px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    color: #fff;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #075ce6, #063bad)
}

.mini-cta .explore-btn {
    margin-top: 14px;
    background: white;
    color: #123;
    min-width: 145px;
    height: 40px;
    border-radius: 8px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

.mini-cta .explore-btn:hover {
    transform: translateY(-2px);
}

.mini-cta.purple {
    background: linear-gradient(135deg, #4520cc, #25108b)
}

/* خلفية البطاقة الأولى (Study in China) */
.mini-cta.study-bg:before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('images/students-study.png') center/cover;
    opacity: 0.18;
    pointer-events: none;
}

/* خلفية البطاقة الثانية (Work in China) */
.mini-cta.work-bg:before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('images/china-flag-city.png') center/cover;
    opacity: 0.18;
    pointer-events: none;
}

.mini-cta>div {
    position: relative
}

.bubble {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 26px
}

.mini-cta h3 {
    font-size: 24px;
    margin-bottom: 8px
}

.mini-cta p {
    font-size: 13px;
    line-height: 1.35;
    opacity: .92
}

.mini-cta button {
    margin-top: 14px;
    background: white;
    color: #123;
    min-width: 145px;
    height: 40px;
    border-radius: 8px;
    font-weight: 900
}

.universities {
    margin-top: 14px;
    position: relative
}

.uni-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 22px
}

.uni-head h2 {
    font-size: 28px;
    letter-spacing: -.035em
}

.uni-hint {
    font-size: 13px;
    color: var(--muted);
    font-weight: 700
}

.uni-shell {
    position: relative
}

.uni-scroll {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 5px 4px 18px;
    cursor: grab;
    scrollbar-width: none;
    scroll-behavior: smooth
}

.uni-scroll::-webkit-scrollbar {
    display: none
}

.uni-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: var(--blue);
    box-shadow: 0 12px 28px rgba(10, 37, 90, .18);
    border: 1px solid var(--line);
    font-size: 28px;
    font-weight: 800;
    display: grid;
    place-items: center;
    transition: .22s
}

.uni-arrow:hover {
    background: var(--blue);
    color: #fff;
    transform: translateY(-50%) scale(1.08)
}

.uni-arrow.prev {
    left: -22px
}

.uni-arrow.next {
    right: -22px
}

.uni-card {
    flex: 0 0 310px;
    scroll-snap-align: start;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 12px 26px rgba(15, 35, 90, .08);
    transition: .25s;
    text-align: center
}

.uni-card:hover {
    transform: translateY(-5px)
}

.uni-img {
    height: 150px;
    background-size: cover;
    background-position: center
}

.uni-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: 4px solid white;
    box-shadow: 0 8px 18px rgba(15, 35, 90, .14);
    overflow: hidden;
    margin: -32px auto 10px
}

.uni-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.uni-card h3 {
    font-size: 18px
}

.uni-card p {
    font-size: 13px;
    color: #475467;
    line-height: 1.55
}

.uni-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px
}

.pill {
    font-size: 12px;
    font-weight: 850;
    color: #4a5fb7;
    background: #eef2ff;
    border-radius: 999px;
    padding: 7px 12px
}

.rating {
    font-size: 13px;
    font-weight: 800
}

.rating span {
    color: #ffae00
}

.why {
    margin-top: 14px;
    padding: 34px
}

.why-main {
    text-align: center;
    font-size: 32px;
    letter-spacing: -.045em
}

.why-main:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: var(--blue);
    border-radius: 999px;
    margin: 10px auto 0
}

.why-sub {
    text-align: center;
    color: var(--muted);
    margin-top: 10px;
    font-weight: 600
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 28px
}

.why-card {
    background: linear-gradient(180deg, #fff, #fbfcff);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: .25s
}

.why-card:hover {
    transform: translateY(-6px)
}

.why-card:before {
    content: "";
    position: absolute;
    inset: auto -40px -55px;
    height: 90px;
    background: radial-gradient(circle, rgba(13, 87, 231, .12), transparent 65%)
}

.why-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: transparent;
    /* بدون خلفية */
    box-shadow: none;
    overflow: hidden;
}

.why-icon img {
    width: 180%;
    height: 180%;
    object-fit: contain;
    /* تظهر الصورة كاملة بدون قص */
}

.why-card h3 {
    font-size: 18px
}

.why-card p {
    font-size: 13px;
    color: #344054;
    line-height: 1.55;
    margin-top: 9px
}

.testimonials {
    margin-top: 14px
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 28px
}

.quote-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px
}

.quote {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    font-size: 14px;
    line-height: 1.55
}

.quote b {
    font-size: 38px;
    color: var(--purple);
    line-height: 0
}

.quote footer {
    margin-top: 14px;
    font-weight: 800
}

.dot {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: red;
    color: white;
    display: grid;
    place-items: center
}

.final {
    margin-top: 14px;
    border-radius: 16px;
    background: linear-gradient(100deg, #075ce6, #6427dc);
    color: white;
    text-align: center;
    padding: 24px 20px;
    position: relative;
    overflow: hidden
}

.final:before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('images/china-flag-city.png') center/cover;
    opacity: .15
}

.final>* {
    position: relative
}

.final h2 {
    font-size: 30px
}

.final button {
    margin-top: 12px;
    background: #fff;
    color: var(--blue);
    height: 42px;
    border-radius: 10px;
    padding: 0 35px;
    font-weight: 900
}

@media(max-width:1150px) {

    .hero,
    .offers-layout {
        grid-template-columns: 1fr
    }

    .side-ctas {
        grid-template-columns: 1fr 1fr
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:700px) {
    .home {
        padding: 0 12px 20px
    }

    .hero-copy {
        padding: 42px 20px
    }

    .btn {
        width: 100%;
        justify-content: center
    }

    .section {
        padding: 20px 14px
    }

    .offers {
        margin-top: 10px
    }

    .side-ctas,
    .why-grid,
    .quote-grid {
        grid-template-columns: 1fr
    }

    .offer-card {
        width: 238px
    }

    .uni-card {
        flex-basis: 260px
    }
}

/* تنسيق QS Rating الجديد */
.uni-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px;
    gap: 10px;
    flex-wrap: wrap;
}

.qs-rating {
    text-align: center;
    padding: 6px 12px;
    min-width: 70px;
}

.qs-rating i {
    display: block;
    font-size: 22px;
    color: #ffb21c;
    margin-bottom: 4px;
}

.qs-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #0d57e7;
    letter-spacing: 1px;
}

.qs-value {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #071026;
    line-height: 1.2;
}

.uni-view-btn {
    background: linear-gradient(135deg, #0d57e7, #063cb6);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.uni-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(13, 87, 231, 0.3);
}

/* إيقاف التمرير عند hover */
.uni-scroll {
    cursor: grab;
}

.uni-scroll:active {
    cursor: grabbing;
}

.final .apply-now-btn {
    margin-top: 12px;
    background: #fff;
    color: var(--blue);
    height: 42px;
    border-radius: 10px;
    padding: 0 35px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.final .apply-now-btn:hover {
    transform: translateY(-2px);
}
/* إخفاء شعار الجامعة عندما لا يكون موجود */
.offer-logo[style*="display:none"] {
    display: none !important;
}

/* تعديل شكل الزر ليكون كرابط */
.book {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    line-height: 34px;
    width: 100%;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ef233c, #ff4438);
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.book:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}

.offer-card.active-card .book {
    background: linear-gradient(135deg, #ffb800, #ff8a00);
}
/* تثبيت مكان الزر بغض النظر عن إخفاء المحتوى */
.offer-card {
    display: flex;
    flex-direction: column;
    min-height: 430px;
}

.offer-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 13px 13px;
    padding-bottom: 15px;
}

.offer-desc {
    flex: 1;
    margin: 9px 0;
}

.countdown {
    margin-top: auto;
    margin-bottom: 11px;
}

.book {
    margin-top: 0;
    width: 100%;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ef233c, #ff4438);
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    line-height: 34px;
    cursor: pointer;
    transition: transform 0.2s;
}

/* ضبط ارتفاع ثابت لمنطقة اسم الجامعة إذا كانت مخفية */
.offer-body h3 {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 24px;
    /* ارتفاع ثابت حتى لو كان فارغ */
}

/* ضبط ارتفاع ثابت لمنطقة الشعار إذا كانت مخفية */
.offer-logo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: white;
    border: 4px solid #fff;
    box-shadow: 0 8px 18px rgba(15, 35, 90, .16);
    margin: -28px auto 9px;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
}

.offer-logo[style*="display:none"] {
    display: flex !important;
    /* نجبر ظهور div فارغ */
    visibility: hidden;
    /* نخفي المحتوى لكن نحافظ على المساحة */
}