/* Custom styles extracted from index.html for high speed & zero inline CSS */

:root {
    --primary: #59358C;
    --secondary: #CC581F;
    --primary-dark: #43266b;
}

body {
    font-family: Cairo, system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #2c3e50;
    overflow-x: hidden;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.hero {
    position: relative;
    padding: 180px 0 80px;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-video,
.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    object-fit: cover;
    z-index: 0;
    filter: none !important;
}

.hero-overlay {
    display: none !important;
}

.hero-title {
    color: #0f172a !important;
}

.hero-desc {
    color: #334155 !important;
}

.hero-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: right;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 1.5rem;
    min-height: 100px;
}

.services {
    padding: 80px 0;
    background: #f8fafc;
    min-height: 500px;
}

.partners-section {
    min-height: 150px;
    overflow: hidden;
}

.testimonial-stars {
    color: #FFB800;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    gap: 0.3rem;
    justify-content: flex-start;
}

.testimonial-card {
    text-align: right;
    direction: rtl;
}

.client-info {
    justify-content: flex-start;
}

.testimonial-text {
    text-align: right;
    margin-bottom: 1.5rem !important;
}

#heroVideo {
    opacity: 0;
    transition: opacity 1s;
}

#heroVideo.loaded {
    opacity: 1;
}

/* About Section Styles */
.about-section {
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content {
    text-align: right;
}

.about-video-container {
    position: relative;
}

.about-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(89, 53, 140, 0.1);
    background: #000;
}

/* Stabilize Cairo Swap */
@font-face {
    font-family: "Cairo Regular Fallback";
    src: local("Arial");
    ascent-override: 95%;
    descent-override: 25%;
    line-gap-override: 0%;
    size-adjust: 100%;
}

body {
    font-family: "Cairo", "Cairo Regular Fallback", sans-serif;
}

/* Mobile Tap Targets & Accessibility */
@media(max-width:768px) {
    .hero {
        padding: 140px 0 60px;
        min-height: 500px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-bg-video {
        display: none !important;
    }

    .float-btn,
    .social-links a,
    .btn,
    .nav-link {
        min-width: 44px;
        min-height: 44px;
    }

    .navbar .nav-list {
        gap: 1.5rem;
    }

    .testimonials .subtitle {
        color: #a84717 !important;
    }

    .testimonials .client-details span {
        color: #475569 !important;
    }

    .testimonials .testimonial-text {
        color: #1e293b !important;
    }

    .preloader {
        transition: opacity 0.2s ease !important;
    }

    .hero {
        background-image: url('../images/hero-bg-mobile.png') !important;
        background-size: cover;
        background-position: center;
    }
}

/* Advertisement Modal Styles */
.ad-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
    perspective: 1200px;
}

.ad-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ad-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.45), 0 0 50px rgba(89, 53, 140, 0.25);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.65);
    opacity: 0;
    transform-origin: center center;
}

.ad-modal-overlay.active .ad-modal-container {
    animation: adSmoothElasticPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes adSmoothElasticPop {
    0% {
        opacity: 0;
        transform: scale(0.65);
    }
    60% {
        opacity: 1;
        transform: scale(1.03);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.ad-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ad-modal-close:hover {
    background: #ef4444;
    color: #fff;
    transform: rotate(90deg) scale(1.1);
    border-color: #ef4444;
}

.ad-modal-body {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.ad-image-wrapper {
    width: 100%;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-modal-img {
    width: 100%;
    height: auto;
    max-height: 65vh;
    object-fit: contain;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ad-modal-overlay.active .ad-modal-img {
    animation: adImgZoom 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes adImgZoom {
    0% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.ad-modal-footer {
    padding: 16px 20px 20px;
    background: #ffffff;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.ad-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 14px 24px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
    transition: all 0.3s ease;
}

.ad-whatsapp-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.45);
    background: linear-gradient(135deg, #20bd5a 0%, #0e7065 100%);
}

.ad-whatsapp-btn i {
    font-size: 1.5rem;
}

@media (max-width: 576px) {
    .ad-modal-container {
        max-width: 92%;
        border-radius: 20px;
    }

    .ad-whatsapp-btn {
        font-size: 1rem;
        padding: 12px 18px;
    }
}
