/* ===================================
   DIWAN QERAAT — CUSTOM CSS
   =================================== */

@font-face {
    font-family: 'Graphik Arabic';
    src: url('../fonts/graphik-arabic/GraphikArabic-Light.woff2') format('woff2'),
        url('../fonts/graphik-arabic/GraphikArabic-Light.woff') format('woff'),
        url('../fonts/graphik-arabic/GraphikArabic-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik Arabic';
    src: url('../fonts/graphik-arabic/GraphikArabic-Regular.woff2') format('woff2'),
        url('../fonts/graphik-arabic/GraphikArabic-Regular.woff') format('woff'),
        url('../fonts/graphik-arabic/GraphikArabic-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik Arabic';
    src: url('../fonts/graphik-arabic/GraphikArabic-Medium.woff2') format('woff2'),
        url('../fonts/graphik-arabic/GraphikArabic-Medium.woff') format('woff'),
        url('../fonts/graphik-arabic/GraphikArabic-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik Arabic';
    src: url('../fonts/graphik-arabic/GraphikArabic-Semibold.woff2') format('woff2'),
        url('../fonts/graphik-arabic/GraphikArabic-Semibold.woff') format('woff'),
        url('../fonts/graphik-arabic/GraphikArabic-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik Arabic';
    src: url('../fonts/graphik-arabic/GraphikArabic-Bold.woff2') format('woff2'),
        url('../fonts/graphik-arabic/GraphikArabic-Bold.woff') format('woff'),
        url('../fonts/graphik-arabic/GraphikArabic-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik Arabic';
    src: url('../fonts/graphik-arabic/GraphikArabic-Black.woff2') format('woff2'),
        url('../fonts/graphik-arabic/GraphikArabic-Black.woff') format('woff'),
        url('../fonts/graphik-arabic/GraphikArabic-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* --- Preloader / Splash Screen --- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(210 27% 24%);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

.preloader-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid transparent;
    border-top-color: hsl(35 12% 69%);
    border-radius: 50%;
    animation: preloaderSpin 1s linear infinite;
}

@keyframes preloaderSpin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, hsl(210 27% 24%), hsl(35 12% 69%));
    z-index: 9998;
    width: 0%;
    transition: width 0.1s linear;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: hsl(210 27% 24%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 2px solid hsl(35 12% 69% / 0.3);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: hsl(210 27% 24%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* --- Page Transition --- */
.page-transition {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: hsl(210 27% 24%);
    transform: scaleY(0);
    transform-origin: bottom;
    pointer-events: none;
}

.page-transition.active {
    animation: pageTransIn 0.4s ease forwards;
}

@keyframes pageTransIn {
    0% {
        transform: scaleY(0);
        transform-origin: bottom;
    }

    50% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    51% {
        transform-origin: top;
    }

    100% {
        transform: scaleY(0);
        transform-origin: top;
    }
}

/* --- Smooth Scroll --- */
html {
    scroll-behavior: smooth;
}

/* --- Hero Swiper Overrides --- */
.hero-swiper {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
}

@media (max-width: 768px) {
    .hero-swiper {
        min-height: 500px;
        max-height: 700px;
    }
}

.hero-swiper .swiper-slide {
    overflow: hidden;
}

.hero-swiper .slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 6s ease;
}

.hero-swiper .swiper-slide-active .slide-bg {
    transform: scale(1.08);
}

.hero-swiper .slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left,
            rgba(37, 51, 64, 0.92) 0%,
            rgba(37, 51, 64, 0.75) 40%,
            rgba(37, 51, 64, 0.5) 100%);
}

.hero-swiper .slide-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-swiper .slide-text {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease 0.3s;
}

.hero-swiper .swiper-slide-active .slide-text {
    opacity: 1;
    transform: translateY(0);
}

.hero-swiper .swiper-pagination-bullet {
    background: white;
    opacity: 0.4;
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: hsl(35 12% 69%);
    width: 32px;
    border-radius: 6px;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
    font-size: 18px;
}

/* --- Enhanced Card Hover --- */
.card-hover {
    transition: all 0.35s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
}

/* --- Floating Shape Decorations --- */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-15px) rotate(5deg);
    }

    66% {
        transform: translateY(10px) rotate(-3deg);
    }
}

/* --- Counter Animation --- */
.counter-value {
    display: inline-block;
}

/* --- RTL Fixes --- */
[dir="rtl"] .divide-x> :not(:first-child) {
    border-right-width: 1px;
    border-left-width: 0;
}

[dir="rtl"] .divide-x> :first-child {
    border-right-width: 0;
}

/* --- Responsive Typography --- */
@media (max-width: 640px) {
    .text-4xl {
        font-size: 1.75rem;
    }

    .text-5xl {
        font-size: 2rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .text-5xl {
        font-size: 3.25rem;
    }
}

/* --- Glassmorphism Section --- */
.glass-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Text Gradient --- */
.text-gradient {
    background: linear-gradient(135deg, hsl(210 27% 24%), hsl(35 12% 69%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Stagger children animation helper --- */
[data-aos] {
    will-change: transform, opacity;
}