/* ============================================= */
/* BASE STYLES & RESETS                          */
/* ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: #1e40af;
    color: #fff;
}

/* ============================================= */
/* HERO SECTION                                  */
/* ============================================= */
.hero-pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

/* ============================================= */
/* ANIMATIONS                                    */
/* ============================================= */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes phone-ring {
    0% { transform: rotate(0) scale(1); }
    10% { transform: rotate(-15deg) scale(1.1); }
    20% { transform: rotate(15deg) scale(1.1); }
    30% { transform: rotate(-15deg) scale(1.1); }
    40% { transform: rotate(15deg) scale(1.1); }
    50% { transform: rotate(0) scale(1); }
    100% { transform: rotate(0) scale(1); }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(30, 64, 175, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 64, 175, 0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

.floating-badge {
    animation: float 4s ease-in-out infinite;
}

.floating-badge-delay {
    animation: float-delay 4s ease-in-out infinite;
    animation-delay: 1s;
}

.phone-ring {
    animation: phone-ring 3s ease-in-out infinite, pulse-ring 2s ease-out infinite;
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-100 { transition-delay: 0.1s; }
.animate-on-scroll.delay-200 { transition-delay: 0.2s; }
.animate-on-scroll.delay-300 { transition-delay: 0.3s; }
.animate-on-scroll.delay-400 { transition-delay: 0.4s; }
.animate-on-scroll.delay-500 { transition-delay: 0.5s; }

/* ============================================= */
/* HEADER                                        */
/* ============================================= */
#header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.98);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: #f59e0b;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================= -->
/* SERVICE CARDS                                 */
/* ============================================= */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* ============================================= */
/* FEATURE CARDS                                 */
/* ============================================= */
.feature-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* ============================================= */
/* FAQ ACCORDION                                 */
/* ============================================= */
.faq-item {
    transition: border-color 0.3s ease;
}

.faq-item.active {
    border-color: #1e40af;
    background-color: #f0f7ff;
}

.faq-btn {
    cursor: pointer;
}

.faq-item.active .faq-btn i {
    transform: rotate(180deg);
}

.faq-content {
    animation: fade-in-up 0.3s ease-out;
}

/* ============================================= */
/* STAT COUNTER                                  */
/* ============================================= */
.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

/* ============================================= */
/* BRAND ITEMS                                   */
/* ============================================= */
.brand-item {
    transition: all 0.3s ease;
}

.brand-item:hover {
    transform: scale(1.1);
}

/* ============================================= */
/* FORM STYLES                                   */
/* ============================================= */
input:focus,
select:focus,
textarea:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* ============================================= */
/* SCROLLBAR                                     */
/* ============================================= */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* ============================================= */
/* RESPONSIVE                                    */
/* ============================================= */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card [data-count] {
        font-size: 1.5rem;
    }
}

/* ============================================= */
/* PRINT STYLES (for SEO - accessibility)        */
/* ============================================= */
@media print {
    header, footer,
    .phone-ring,
    #back-to-top,
    .fixed {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    a[href^="tel:"]::after {
        content: " (" attr(href) ")";
    }
}

/* ============================================= */
/* ACCESSIBILITY                                 */
/* ============================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #1e40af;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
