
/* --- CSS Variables --- */
:root {
    --primary-blue: #1e3a5f;
    --primary-blue-light: #2563eb;
    --primary-red: #dc2626;
    --primary-red-dark: #b91c1c;
    --gray-dark: #374151;
    --gray-medium: #6b7280;
    --gray-light: #f3f4f6;
    --white: #ffffff;
    --gold-accent: #d4a843;
}

/* --- Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue-light);
}

/* --- Navbar --- */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    background: rgba(30, 58, 95, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.92) 0%, rgba(15, 30, 50, 0.85) 50%, rgba(220, 38, 38, 0.3) 100%);
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    z-index: 2;
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

/* Floating shapes */
.floating-shape {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.floating-shape:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.floating-shape:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

/* --- Stats Counter --- */
.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.4s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    border-color: var(--primary-red);
}

/* --- Section Titles --- */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue));
    border-radius: 2px;
}

.section-subtitle {
    position: relative;
    display: inline-block;
}

.section-subtitle::before {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--primary-red);
    border-radius: 50%;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-red), var(--primary-blue));
    transition: height 0.5s ease;
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(30, 58, 95, 0.15);
    border-color: transparent;
}

.service-card .service-icon {
    transition: all 0.5s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotateY(180deg);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-red));
    color: white;
}

/* --- Project Cards --- */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
}

.project-card .project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(30, 58, 95, 0.95) 0%, rgba(30, 58, 95, 0.4) 50%, transparent 100%);
    opacity: 0;
    transition: all 0.5s ease;
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Feature Cards --- */
.feature-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--primary-red);
    transition: width 0.4s ease;
}

.feature-card:hover::after {
    width: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Old team card styles removed - using .staff-card now */

.team-card:hover .team-overlay {
    opacity: 1;
}

/* --- Equipment Section --- */
.equipment-item {
    transition: all 0.3s ease;
}

.equipment-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Equipment Cards (Horizontal) --- */
.equip-card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.equip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(30,58,95,0.1), 0 4px 12px rgba(0,0,0,0.04);
    border-color: rgba(30,58,95,0.12);
}

.equip-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: right 0.8s ease;
    z-index: 1;
    pointer-events: none;
}

.equip-card:hover::before {
    right: 120%;
}

/* --- Staff Clean Cards --- */
.staff-clean-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    cursor: default;
}
.staff-clean-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06), 0 8px 16px rgba(0,0,0,0.04);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    position: relative;
    transition: all 0.4s ease;
}

.testimonial-card::before {
    content: '\201D';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 80px;
    color: rgba(220, 38, 38, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* --- Contact Form --- */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
    outline: none;
}

/* --- Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    transition: right 0.4s ease;
    z-index: 0;
}

.btn-primary:hover::before {
    right: 0;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.btn-outline {
    border: 2px solid white;
    color: white;
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.4s ease;
    display: inline-block;
    cursor: pointer;
    background: transparent;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-blue));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* --- Loading Spinner --- */
.loader {
    position: fixed;
    inset: 0;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* --- Counter Animation --- */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Divider --- */
.section-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-red), var(--primary-blue), transparent);
    border: none;
    margin: 0;
}

/* --- Mobile Menu --- */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* --- Parallax --- */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* --- Pulse Animation for CTA --- */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.pulse-animation {
    animation: pulse-red 2s infinite;
}

/* --- Marquee for partners --- */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-track {
    animation: marquee 20s linear infinite;
}

/* --- Filter Buttons --- */
.filter-btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-blue);
    color: white;
}

/* --- Responsive Fixes --- */
@media (max-width: 640px) {
    .hero-section {
        min-height: 100svh;
    }

    .section-title {
        font-size: 1.75rem;
    }
}
