:root {
    --p: #7132b4;
    --ink: #16131b;
    --muted: #6f6977;
    --soft: #f7f5fa
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: Cairo, Arial, sans-serif;
    color: var(--ink);
    line-height: 1.75
}

body.en {
    font-family: Arial, sans-serif;
    direction: ltr
}

a {
    text-decoration: none;
    color: inherit
}

.container {
    width: min(1160px, calc(100% - 36px));
    margin: auto
}

.nav {
    padding: 14px 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 5
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800
}

.brand img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover
}

.links {
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-weight: 700
}

.links a:hover,
.active {
    color: var(--p)
}

button {
    font: inherit
}

.lang {
    border: 1px solid #ddd;
    border-radius: 99px;
    padding: 8px 13px;
    background: #fff;
    font-weight: 800;
    cursor: pointer
}

.hero {
    padding: 95px 0 75px;
    color: #fff;
    background: linear-gradient(120deg, #0d0714, #1b0d2a 45%, #4a1f7a);
    position: relative;
    overflow: hidden
}

.hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(155, 92, 224, .35), transparent 55%), radial-gradient(circle at 85% 75%, rgba(113, 50, 180, .3), transparent 50%)
}

.hero .container {
    position: relative
}

.hero h1 {
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.1;
    margin: 0 0 16px
}

.hero p {
    max-width: 680px;
    font-size: 18px;
    color: #f4eefa
}

.btn {
    display: inline-block;
    padding: 13px 22px;
    border-radius: 99px;
    background: var(--p);
    color: #fff;
    font-weight: 800;
    border: 0;
    cursor: pointer
}

.btn.light {
    background: #fff;
    color: #21162d
}

.section {
    padding: 78px 0
}

.eyebrow {
    color: var(--p);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .1em
}

.title {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.15;
    margin: 10px 0 18px
}

.copy {
    color: var(--muted);
    max-width: 700px
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 35px
}

.card {
    border: 1px solid #e7e2eb;
    border-radius: 22px;
    padding: 27px;
    background: #fff
}

.card h3 {
    margin: 8px 0
}

.card p {
    margin: 0;
    color: var(--muted)
}

.number {
    color: var(--p);
    font-weight: 800
}

.gallery {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 16px;
    margin-top: 35px
}

.gallery img {
    width: 100%;
    height: 290px;
    object-fit: cover;
    border-radius: 22px
}

.gallery img:first-child {
    height: 596px;
    grid-row: span 2
}

.contact {
    background: var(--soft)
}

.contact-box {
    padding: 38px;
    border-radius: 28px;
    background: #251238;
    color: #fff
}

.contact-box p {
    color: #ded3e6
}

.client-logo-wall {
    margin-top: 35px;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4dfe8;
    box-shadow: 0 15px 40px rgba(38, 20, 57, .08)
}

.client-logo-wall img {
    display: block;
    width: 100%;
    height: 470px;
    object-fit: cover;
    object-position: center 61%
}

.request-form {
    max-width: 800px;
    padding: 32px;
    border: 1px solid #e7e2eb;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 15px 45px rgba(38, 20, 57, .07)
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.field {
    display: grid;
    gap: 7px;
    font-weight: 700;
    font-size: 14px
}

.field.full {
    grid-column: 1/-1
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ddd7e4;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 400;
    outline: 0
}

.field textarea {
    min-height: 130px;
    resize: vertical
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--p);
    box-shadow: 0 0 0 3px rgba(113, 50, 180, .12)
}

.form-note {
    font-size: 13px;
    color: var(--muted);
    margin: 16px 0 0
}

.footer {
    padding: 30px 0;
    background: #111;
    color: #fff
}

.footer p {
    margin: 0;
    color: #aaa
}

@media(max-width:760px) {
    .links {
        display: none
    }

    .grid,
    .gallery,
    .form-grid {
        grid-template-columns: 1fr
    }

    .gallery img:first-child {
        height: 290px;
        grid-row: auto
    }

    .client-logo-wall img {
        height: 280px;
        object-position: center 61%
    }

    .nav .container {
        gap: 8px
    }

    .brand {
        font-size: 13px
    }

    .hero {
        padding: 70px 0
    }

    .section {
        padding: 58px 0
    }

    .request-form {
        padding: 22px
    }
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 34px
}

.partner-logo {
    height: 130px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #fff;
    border: 1px solid #e6e1eb;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(38, 20, 57, .06);
    transition: .25s
}

.partner-logo:hover {
    transform: translateY(-4px);
    border-color: #b78cde
}

.partner-logo img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain
}

@media(max-width:760px) {
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px
    }

    .partner-logo {
        height: 105px;
        padding: 11px
    }
}

.page-animate {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s ease, transform .65s ease
}

.page-animate.show {
    opacity: 1;
    transform: none
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
    line-height: 1.35 !important;
    letter-spacing: 0 !important
}

html[lang="ar"] .hero h1 {
    line-height: 1.22 !important
}

.card,
.partner-logo,
.request-form,
.contact-box {
    transition: transform .3s ease, box-shadow .3s ease
}

.card:hover,
.partner-logo:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(38, 20, 57, .13)
}

.partner-grid .partner-logo:nth-last-child(-n+7) img {
    transform: scale(1.35)
}

.books-hero {
    padding: 85px 0 55px;
    background: linear-gradient(135deg, #f0e8fa, #fff)
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 35px
}

.book-card {
    background: #fff;
    border: 1px solid #e6dfee;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 36px rgba(38, 20, 57, .08);
    transition: .3s
}

.book-card:hover {
    transform: translateY(-9px) rotate(-1deg)
}

.book-cover {
    min-height: 280px;
    padding: 27px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    position: relative;
    overflow: hidden
}

.book-cover:after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    left: -80px;
    bottom: -85px
}

.book-cover b,
.book-cover h3,
.book-cover small {
    position: relative;
    z-index: 1
}

.book-cover h3 {
    font-size: 31px;
    line-height: 1.3;
    margin: 0
}

.cover-ar {
    background: linear-gradient(140deg, #7132b4, #bb79e8)
}

.cover-science {
    background: linear-gradient(140deg, #087f78, #2cbda9)
}

.cover-math {
    background: linear-gradient(140deg, #f08a34, #f1b54d)
}

.book-info {
    padding: 20px
}

.book-info p {
    margin: 0;
    color: var(--muted);
    font-size: 14px
}

@media(max-width:760px) {
    .book-grid {
        grid-template-columns: 1fr
    }

    .books-hero {
        padding: 58px 0 35px
    }
}

.footer-full {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 35px;
    padding-bottom: 28px
}

.footer-full p,
.footer-full a {
    color: #aaa;
    font-size: 14px
}

.footer-full h4 {
    margin: 0 0 12px;
    color: #fff
}

.footer-links {
    display: grid;
    gap: 7px
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 25px;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 12px
}

.contact-banner {
    width: 100%;
    height: 240px;
    display: block;
    object-fit: cover;
    border-radius: 26px 26px 0 0
}

.contact .contact-box {
    border-radius: 0 0 26px 26px
}

.location-card {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 22px;
    border-radius: 18px;
    background: #241239;
    color: #fff
}

.location-card span {
    color: #d7c7e7;
    font-size: 14px
}

.services-page .card {
    position: relative;
    overflow: hidden;
    padding-top: 185px;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    color: #fff
}

.services-page .card:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(20, 9, 34, .88), rgba(20, 9, 34, .12))
}

.services-page .card>* {
    position: relative;
    z-index: 1
}

.services-page .card p {
    color: #eee
}

.services-page .number {
    display: none
}

.services-page .card:nth-child(3n+1) {
    background-image: url('assets/project-blue-1.jpg')
}

.services-page .card:nth-child(3n+2) {
    background-image: url('assets/project-green-1.jpg')
}

.services-page .card:nth-child(3n) {
    background-image: url('assets/project-blue-2.jpg')
}

@media(max-width:760px) {
    .footer-full {
        grid-template-columns: 1fr 1fr;
        gap: 22px
    }

    .footer-bottom {
        display: block
    }

    .footer-bottom span {
        display: block;
        margin-top: 6px
    }
}

.request-form .btn {
    margin-top: 22px;
    padding: 11px 20px;
    font-size: 14px;
    display: block;
    width: fit-content
}

.location-card {
    position: relative;
    z-index: 1
}

body {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .32s ease, transform .32s ease
}

body.page-ready {
    opacity: 1;
    transform: none
}

body.page-leaving {
    opacity: 1;
    transform: none;
    pointer-events: none
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease
}

.page-loader.show {
    opacity: 1
}

.page-loader img {
    width: 112px;
    height: 112px;
    object-fit: contain;
    background: none;
    filter: drop-shadow(0 12px 22px rgba(79, 37, 119, .25));
    animation: logo-spin 1s linear infinite
}

@keyframes logo-spin {
    to {
        transform: rotate(360deg)
    }
}

.whatsapp {
    position: fixed;
    z-index: 40;
    bottom: 24px;
    left: 24px;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 12px 30px rgba(37, 211, 102, .35);
    transition: .25s
}

.whatsapp svg {
    width: 30px;
    height: 30px
}

.whatsapp:hover {
    transform: translateY(-4px) scale(1.04)
}

body.en .whatsapp {
    left: auto;
    right: 24px
}

.service-block {
    margin-top: 46px;
    padding-top: 38px;
    border-top: 1px solid #eee2f2
}

.service-block:first-of-type {
    margin-top: 38px;
    padding-top: 0;
    border-top: 0
}

.service-block h3 {
    font-size: 26px;
    margin: 0 0 18px
}

.service-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px
}

.slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: 22px;
    flex: 1
}

.slider-track::-webkit-scrollbar {
    display: none
}

.slider-track {
    scrollbar-width: none
}

.slider-track img,
.slider-track video {
    scroll-snap-align: start;
    flex: 0 0 min(360px, 80%);
    height: 260px;
    object-fit: cover;
    border-radius: 20px;
    background: #0d0714
}

.slider-arrow {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #ddd7e4;
    background: #fff;
    color: var(--p);
    font-size: 22px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: .25s
}

.slider-arrow:hover {
    background: var(--p);
    color: #fff;
    border-color: var(--p)
}

@media(max-width:760px) {
    .slider-track img,
    .slider-track video {
        flex-basis: 88%;
        height: 200px
    }

    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 18px
    }
}

.service-visual {
    scroll-snap-align: start;
    flex: 0 0 min(360px, 80%);
    height: 260px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .92)
}

.service-visual svg {
    width: 78%;
    height: auto;
    opacity: .95
}

.service-visual .sv-cap {
    position: absolute;
    left: 18px;
    bottom: 16px;
    font-weight: 800;
    font-size: 14px;
    color: #fff
}

body.en .service-visual .sv-cap {
    left: auto;
    right: 18px
}

.service-visual:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 6, 16, .55), transparent 55%)
}

.g-screen-1 {
    background: linear-gradient(140deg, #1b0d2a, #7132b4)
}

.g-screen-2 {
    background: linear-gradient(140deg, #3a1c5c, #9b5ce0)
}

.g-screen-3 {
    background: linear-gradient(140deg, #241239, #5b2a95)
}

.g-light-1 {
    background: linear-gradient(140deg, #7132b4, #e0679a)
}

.g-light-2 {
    background: linear-gradient(140deg, #4a1866, #c895ff)
}

.g-light-3 {
    background: linear-gradient(140deg, #2a0f45, #8b4bd0)
}

.g-print-1 {
    background: linear-gradient(140deg, #087f78, #2cbda9)
}

.g-print-2 {
    background: linear-gradient(140deg, #0c5c6e, #3fa9a0)
}

.g-print-3 {
    background: linear-gradient(140deg, #124a52, #5fc6b8)
}

.g-event-1 {
    background: linear-gradient(140deg, #7132b4, #f08a34)
}

.g-event-2 {
    background: linear-gradient(140deg, #c2410c, #7132b4)
}

.g-event-3 {
    background: linear-gradient(140deg, #4b1a63, #f1b54d)
}

.g-stage-1 {
    background: linear-gradient(140deg, #0d0d11, #7132b4)
}

.g-stage-2 {
    background: linear-gradient(140deg, #1b0d2a, #c9a227)
}

.g-stage-3 {
    background: linear-gradient(140deg, #241239, #8b4bd0)
}

.g-cam-1 {
    background: linear-gradient(140deg, #087f78, #7132b4)
}

.g-cam-2 {
    background: linear-gradient(140deg, #0f5c46, #2cbda9)
}

.g-cam-3 {
    background: linear-gradient(140deg, #1c3f2e, #7132b4)
}

@media(max-width:760px) {
    .service-visual {
        flex-basis: 88%;
        height: 200px
    }

    .service-visual svg {
        width: 22%
    }
}

.portfolio-hero {
    padding: 95px 0 70px;
    color: #fff;
    text-align: center;
    background: linear-gradient(120deg, #0d0714, #1b0d2a 45%, #4a1f7a);
    position: relative;
    overflow: hidden
}

.portfolio-hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(155, 92, 224, .35), transparent 55%), radial-gradient(circle at 80% 80%, rgba(113, 50, 180, .3), transparent 50%)
}

.portfolio-hero .container {
    position: relative
}

.portfolio-hero .eyebrow {
    justify-content: center;
    color: #dec3fb
}

.portfolio-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    margin: 14px 0 16px
}

.portfolio-hero p {
    max-width: 620px;
    margin: 0 auto;
    color: #ecdcfb
}

.portfolio-stats {
    display: flex;
    justify-content: center;
    gap: 46px;
    margin-top: 40px;
    flex-wrap: wrap
}

.portfolio-stats div {
    text-align: center
}

.portfolio-stats strong {
    display: block;
    font-size: 34px;
    font-weight: 800;
    color: #c895ff
}

.portfolio-stats span {
    font-size: 13px;
    color: #cbb8dd
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 38px 0 30px
}

.filter-pill {
    border: 1px solid #ddd3e8;
    background: #fff;
    color: var(--ink);
    padding: 10px 20px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: .25s
}

.filter-pill:hover {
    border-color: var(--p)
}

.filter-pill.active {
    background: var(--p);
    border-color: var(--p);
    color: #fff
}

.masonry {
    columns: 4 220px;
    column-gap: 14px
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 14px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
    display: block;
    transition: transform .3s ease, box-shadow .3s ease
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(38, 20, 57, .18)
}

.masonry-item img {
    width: 100%;
    display: block
}

.masonry-item .service-visual {
    width: 100%;
    height: 210px;
    border-radius: 0
}

.masonry-item .mi-tag {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: rgba(15, 8, 24, .6);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 99px;
    backdrop-filter: blur(6px);
    z-index: 2
}

.masonry-item.hide {
    display: none
}

.masonry-item.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease
}

.masonry-item.reveal.in {
    opacity: 1;
    transform: translateY(0)
}

.lightbox-counter {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .75);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(8, 4, 13, .92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px
}

.lightbox.open {
    display: flex
}

.lightbox img,
.lightbox .service-visual {
    max-width: min(920px, 92vw);
    max-height: 82vh;
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .5)
}

.lightbox .service-visual {
    width: min(920px, 92vw);
    height: 60vh
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 20px;
    cursor: pointer;
    transition: .2s
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: var(--p);
    border-color: var(--p)
}

.lightbox-close {
    top: 22px;
    right: 22px
}

.lightbox-nav.prev {
    left: 22px;
    top: 50%;
    transform: translateY(-50%)
}

.lightbox-nav.next {
    right: 22px;
    top: 50%;
    transform: translateY(-50%)
}

@media(max-width:760px) {
    .masonry {
        columns: 2 150px
    }

    .portfolio-stats {
        gap: 26px
    }

    .lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 16px
    }
}
.masonry-item .mi-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(15, 8, 24, .65);
    color: #fff;
    font-size: 18px;
    z-index: 2;
    backdrop-filter: blur(6px)
}

.lightbox video {
    max-width: min(920px, 92vw);
    max-height: 82vh;
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
    background: #000
}

/* ---- Molds showcase: full object on clean white cards ---- */
.molds-block .slider-track {
    gap: 18px;
    padding: 10px 6px 30px;
    border-radius: 0
}

.molds-block .slider-track img {
    flex: 0 0 auto;
    width: min(300px, 72%);
    min-width: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eee2f2;
    border-radius: 24px;
    box-shadow: 0 8px 20px rgba(38, 20, 57, .07);
    transition: transform .35s ease, box-shadow .35s ease
}

.molds-block .slider-track img:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(74, 31, 122, .18)
}

.masonry-item[data-cat="molds"] {
    background: #fff;
    border: 1px solid #eee2f2
}

@media (max-width: 760px) {
    .molds-block .slider-track img {
        width: 78%
    }
}
