/* Sobky V2 design: shared nav/footer + home page.
   Tokens come from the Figma file (Sobky-V2). */
:root {
    --v2-teal: #3b867a;
    --v2-teal-dark: #22675d;
    --v2-teal-soft: #edfaf7;
    --v2-text: #121217;
    --v2-text-secondary: #6c6c89;
    --v2-border: #ebebef;
    --v2-border-button: #d1d1db;
    --v2-bg: #f5fffd;
    --v2-font: 'thmanyah sans', 'IBM Plex Sans Arabic', 'Alexandria', sans-serif;
}

body.v2-home {
    background: linear-gradient(180deg, #fafffe 0%, #f5fffd 100%);
    background-color: var(--v2-bg);
}

.v2-font,
.v2-nav,
.v2-footer,
.v2-home-main {
    font-family: var(--v2-font);
    color: var(--v2-text);
}

/* ---------- Header / navigation ---------- */
.main-header.v2-header {
    background: transparent;
    box-shadow: none;
    padding: 44px 44px 0;
}

.main-header.v2-header:not(.main-header--home) {
    position: relative;
}

.v2-nav {
    max-width: 1352px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--v2-border);
    border-radius: 128px;
    padding: 24px 44px;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}

.v2-nav__brand {
    display: flex;
    align-items: center;
    gap: 11.333px;
    direction: ltr;
    flex-shrink: 0;
}

.v2-nav__brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2.833px;
}

.v2-logo-crop {
    position: relative;
    overflow: hidden;
    display: block;
}

.v2-logo-crop img {
    position: absolute;
    max-width: none;
}

.v2-logo-crop--1 { width: 47.458px; height: 11.333px; }
.v2-logo-crop--1 img { height: 1118.75%; width: 288.06%; left: -105.97%; top: -787.5%; }
.v2-logo-crop--3 { width: 177.351px; height: 17px; }
.v2-logo-crop--3 img { height: 967.57%; width: 100%; left: 0; top: -767.57%; }
.v2-logo-crop--2 { width: 48.989px; height: 34px; }
.v2-logo-crop--2 img { height: 146.12%; width: 110.29%; left: -8.29%; top: 0; }

.v2-nav__collapse {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.v2-nav__links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0 48px 0 0;
    padding: 0;
}

.v2-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: var(--v2-text);
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.v2-nav__link:hover {
    color: var(--v2-teal);
}

.v2-nav__link.is-active {
    color: var(--v2-teal);
    font-weight: 700;
}

.v2-nav__link--live {
    background: #e5484d;
    color: #fff;
    border-radius: 8px;
    padding: 0 10px;
}

.v2-nav__link--live:hover {
    color: #fff;
}

.v2-nav__chevron {
    width: 24px;
    height: 24px;
}

.v2-nav .dropdown-menu {
    text-align: right;
    border-radius: 12px;
    border-color: var(--v2-border);
    padding: 8px;
    min-width: 290px;
    font-family: var(--v2-font);
}

.v2-nav .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    white-space: normal;
}

.v2-nav .dropdown-item .menu-description {
    display: block;
    font-size: 13px;
    color: var(--v2-text-secondary);
}

.v2-nav__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.v2-nav__toggler {
    display: none;
    background: none;
    border: 1px solid var(--v2-border-button);
    border-radius: 8px;
    padding: 6px 10px;
}

/* ---------- Buttons ---------- */
.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: var(--v2-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.v2-btn--primary {
    background: var(--v2-teal);
    color: #fff;
}

.v2-btn--primary:hover {
    background: var(--v2-teal-dark);
    color: #fff;
}

.v2-btn--outline {
    background: #fff;
    border-color: var(--v2-border-button);
    color: var(--v2-text);
    box-shadow: 0 1px 2px rgba(18, 18, 23, .05);
}

.v2-btn--outline:hover {
    background: #f7f7f9;
    color: var(--v2-text);
}

.v2-btn[disabled],
.v2-btn.is-disabled {
    opacity: .5;
    pointer-events: none;
}

/* ---------- Cards ---------- */
.v2-card {
    background: #fff;
    border: 1px solid var(--v2-border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 0 16px rgba(45, 45, 45, .08);
}

.v2-icon {
    display: block;
    flex-shrink: 0;
    object-fit: cover;
}

.v2-icon--56 { width: 56px; height: 56px; border-radius: 12px; }
.v2-icon--80 { width: 80px; height: 80px; border-radius: 17.143px; }
.v2-icon--40 { width: 40px; height: 40px; border-radius: 8.571px; }

.v2-divider {
    width: 2px;
    height: 28px;
    border-radius: 8px;
    background: var(--v2-teal);
    flex-shrink: 0;
}

/* ---------- Home sections ---------- */
.v2-home-main {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 70px;
    text-align: right;
}

.v2-home-main::before {
    /* white pattern tile from the hero background */
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 660px;
    background: url('../../assets/home/hero-pattern.png') repeat 0 0 / 443px 44px;
    pointer-events: none;
}

.v2-container {
    position: relative;
    max-width: 1352px;
    margin: 0 auto;
}

.v2-section {
    margin-top: 70px;
}

.v2-section-title {
    font-size: 30px;
    font-weight: 500;
    line-height: 32px;
    margin: 0 0 32px;
}

.v2-accent {
    color: var(--v2-teal);
}

/* hero */
.v2-hero {
    position: relative;
    padding-top: 182px;
    min-height: 600px;
}

.v2-hero__inner {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 44px;
}

.v2-hero__kids {
    /* images are exported at Figma size (padded so every slide anchors at left: 44px) */
    position: absolute;
    left: 44px;
    top: -5px;
    width: auto;
    max-width: 58%;
    height: auto;
    pointer-events: none;
    /* fade the bottom so the services text behind it stays readable */
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 150px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 150px), transparent 100%);
}

.v2-hero__content {
    max-width: 779px;
    margin-right: 0;
    margin-left: auto;
}

.v2-hero__title {
    font-size: 32px;
    font-weight: 700;
    line-height: normal;
    margin: 0 0 24px;
}

.v2-hero__text {
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    margin: 0;
}

.v2-hero__tagline {
    font-size: 24px;
    font-weight: 700;
    margin: 60px 0 0;
}

.v2-stats {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.v2-stats__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-stats__text {
    font-size: 16px;
    font-weight: 500;
    line-height: 28px;
    margin: 0;
}

/* hero slider */
.v2-hero__stage {
    display: grid;
}

.v2-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .9s;
}

.v2-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s cubic-bezier(.22, .61, .36, 1) .15s, visibility 0s;
}

.v2-slide .v2-hero__kids {
    opacity: 0;
    transform: translateX(-36px) scale(1.05);
    transition: opacity .9s ease, transform 1.8s cubic-bezier(.22, .61, .36, 1);
}

.v2-slide.is-active .v2-hero__kids {
    opacity: 1;
    transform: none;
    transition-delay: .2s;
}

.v2-reveal {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(6px);
    transition: opacity .8s ease, transform 1.1s cubic-bezier(.22, .61, .36, 1), filter .9s ease;
}

.v2-slide.is-active .v2-reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition-delay: calc(var(--d, 0s) + .35s);
}

.v2-hero__footer {
    margin-top: 16px;
}

.v2-hero__controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.v2-hero__arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--v2-border);
    background: rgba(255, 255, 255, .85);
    color: var(--v2-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(45, 45, 45, .06);
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
}

.v2-hero__arrow:hover {
    background: var(--v2-teal);
    border-color: var(--v2-teal);
    color: #fff;
    transform: scale(1.06);
}

.v2-hero__dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-hero__dot {
    position: relative;
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(59, 134, 122, .25);
    overflow: hidden;
    cursor: pointer;
    transition: width .5s cubic-bezier(.22, .61, .36, 1), background-color .3s ease;
}

.v2-hero__dot span {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--v2-teal);
    transform: scaleX(0);
    transform-origin: right center;
}

.v2-hero__dot.is-active {
    width: 44px;
}

.v2-hero__dot.is-active span {
    animation: v2-progress var(--v2-interval, 7000ms) linear forwards;
}

.v2-hero.is-paused .v2-hero__dot.is-active span {
    animation-play-state: paused;
}

@keyframes v2-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .v2-slide,
    .v2-slide .v2-hero__kids,
    .v2-reveal {
        transition-duration: .01s;
        transition-delay: 0s !important;
        filter: none;
    }
    .v2-hero__dot.is-active span { animation: none; transform: scaleX(1); }
}

/* services marquee */
.v2-services {
    position: relative;
    z-index: 1;
    margin-top: 56px;
    overflow: hidden;
}

.v2-services__track {
    display: flex;
    width: max-content;
    gap: 48px;
    padding-inline: 24px;
    animation: v2-marquee 60s linear infinite;
}

.v2-services:hover .v2-services__track {
    animation-play-state: paused;
}

@keyframes v2-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

.v2-service {
    width: 570px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.v2-service__head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.v2-service__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.v2-service__text {
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    color: var(--v2-text-secondary);
    margin: 0;
}

/* competitions */
.v2-competitions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.v2-competition {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.v2-competition__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.v2-competition__title,
.v2-academy__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
    margin: 0 0 8px;
}

.v2-competition__text,
.v2-academy__text {
    font-size: 16px;
    font-weight: 500;
    line-height: 28px;
    color: var(--v2-text-secondary);
    margin: 0;
}

.v2-competition__text strong {
    font-weight: 700;
}

.v2-competition__actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* activities */
.v2-activities {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.v2-activity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.v2-activity__text {
    font-size: 16px;
    font-weight: 500;
    line-height: 28px;
    margin: 0;
}

/* academies */
.v2-academies-head {
    margin-bottom: 32px;
}

.v2-academies-head h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 40px;
    margin: 0 0 8px;
}

.v2-academies-head p {
    font-size: 18px;
    line-height: 32px;
    color: var(--v2-text-secondary);
    margin: 0;
}

.v2-academies {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.v2-academy {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.v2-academy__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.v2-academy__head .v2-academy__title {
    margin: 0;
}

.v2-tag {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--v2-teal-soft);
    color: var(--v2-teal-dark);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.v2-tag span {
    padding: 0 4px;
}

.v2-tag img {
    width: 16px;
    height: 16px;
}

/* ---------- Footer ---------- */
.v2-footer {
    position: relative;
    width: 100%;
    height: 108px;
    background: var(--v2-teal);
    color: #fff;
    overflow: hidden;
}

.v2-footer::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    height: 87px;
    background: #fff;
    opacity: .9;
    -webkit-mask: url('../../assets/home/aa891.png') repeat-x 0 0 / 442.63px 87px;
    mask: url('../../assets/home/aa891.png') repeat-x 0 0 / 442.63px 87px;
    pointer-events: none;
}

.v2-footer__inner {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 44px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.v2-footer__copy {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 32px;
    color: #fff;
}

.v2-footer__social {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    direction: ltr;
}

.v2-footer__social a {
    display: block;
    width: 24px;
    height: 24px;
}

.v2-footer__social img {
    width: 24px;
    height: 24px;
    display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .v2-nav__links { gap: 20px; margin-right: 24px; }
    .v2-nav { padding: 20px 28px; }
    .v2-activities { flex-wrap: wrap; justify-content: center; }
    .v2-activities .v2-divider { display: none; }
    .v2-activity { flex: 0 0 calc(33.333% - 16px); }
    .v2-competitions { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
    .main-header.v2-header { padding: 16px 16px 0; }

    .v2-nav {
        flex-wrap: wrap;
        border-radius: 32px;
        padding: 16px 20px;
        min-height: 72px;
    }

    .v2-nav__toggler { display: inline-flex; order: 2; }
    .v2-nav__brand { order: 1; }

    .v2-nav__collapse {
        order: 3;
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 16px;
    }

    .v2-nav__collapse.is-open { display: flex; }

    .v2-nav__links {
        flex-direction: column;
        align-items: flex-start;
        margin: 0;
        gap: 12px;
    }

    .v2-nav__actions { flex-wrap: wrap; }

    .v2-hero { padding-top: 130px; min-height: 0; }
    .v2-hero__inner { padding: 0 16px; }
    .v2-hero__kids {
        position: static;
        display: block;
        max-width: 360px;
        width: 80%;
        margin: 24px auto 0;
    }
    .v2-hero__content { margin: 0; max-width: none; }
    .v2-hero__title { font-size: 26px; }
    .v2-hero__text { font-size: 17px; line-height: 28px; }
    .v2-hero__tagline { margin-top: 32px; font-size: 20px; }

    .v2-container { padding: 0 16px; }
    .v2-section { margin-top: 48px; }
    .v2-section-title,
    .v2-academies-head h2 { font-size: 24px; }
    .v2-service { width: 300px; }
    .v2-service__title,
    .v2-service__text { font-size: 16px; line-height: 28px; }
    .v2-service__title { white-space: normal; }
    .v2-academies { grid-template-columns: 1fr; }
    .v2-activity { flex: 0 0 calc(50% - 16px); }

    .v2-footer__inner { padding: 16px; }
    .v2-footer__copy { font-size: 13px; line-height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .v2-services__track { animation: none; }
    .v2-services { overflow-x: auto; }
}

.v2-link { color: inherit; text-decoration: none; }
.v2-link:hover { color: var(--v2-teal); }
