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

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===== Custom Variables ===== */
:root {
    --primary-color: #ff6b35;
    --secondary-color: #1e3a8a;
    --accent-color: #fbbf24;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #fbbf24 100%);
    --gradient-secondary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ===== Navigation ===== */
.navbar {
    background: rgba(31, 41, 55, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(31, 41, 55, 0.98) !important;
    box-shadow: var(--shadow-medium);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color) !important;
}

.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* ===== Hero Section ===== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1f2937 100%);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 41, 55, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: none;
}

.btn-warning {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-outline-light:hover {
    background: white;
    color: var(--dark-color);
    transform: translateY(-2px);
}

/* ===== Floating Elements ===== */
.hero-image {
    position: relative;
    height: 500px;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-icon {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

.floating-icon i {
    font-size: 2rem;
    color: var(--accent-color);
}

.icon-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.icon-2 {
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.icon-3 {
    bottom: 30%;
    left: 30%;
    animation-delay: 4s;
}

.icon-4 {
    top: 40%;
    right: 10%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ===== Section Styles ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 3rem;
}

/* ===== About Section ===== */
#about {
    padding-top: 100px; /* إضافة مساحة من الأعلى لتجنب التداخل مع شريط التنقل */
}

.about-content {
    padding: 2rem 0;
}

.about-content .lead {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.stats-row {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-weight: 500;
}

.about-image {
    position: relative;
    height: 400px;
}

.image-container {
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.tech-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.line-1 {
    width: 200px;
    height: 2px;
    top: 30%;
    left: 10%;
    transform: rotate(15deg);
    animation: pulse 3s ease-in-out infinite;
}

.line-2 {
    width: 150px;
    height: 2px;
    top: 60%;
    right: 15%;
    transform: rotate(-20deg);
    animation: pulse 3s ease-in-out infinite 1s;
}

.line-3 {
    width: 100px;
    height: 2px;
    bottom: 25%;
    left: 20%;
    transform: rotate(45deg);
    animation: pulse 3s ease-in-out infinite 2s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ===== Services Section ===== */
#services {
    padding-top: 80px; /* إضافة مساحة من الأعلى لتجنب التداخل مع شريط التنقل */
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #e5e7eb;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.service-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: #6b7280;
    position: relative;
    padding-right: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ===== Technology Section ===== */
#technology {
    padding-top: 80px; /* إضافة مساحة من الأعلى لتجنب التداخل مع شريط التنقل */
}

.tech-content {
    padding: 2rem 0;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.tech-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.tech-item i {
    font-size: 1.5rem;
    margin-left: 1rem;
    color: var(--primary-color);
}

.tech-visual {
    position: relative;
    height: 400px;
}

.tech-animation {
    position: relative;
    width: 100%;
    height: 100%;
}

.tech-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotate 10s linear infinite;
}

.tech-center i {
    font-size: 2rem;
    color: white;
}

.tech-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    animation: orbit 8s linear infinite;
}

.tech-circle i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.circle-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.circle-2 {
    top: 20%;
    right: 20%;
    animation-delay: 2s;
}

.circle-3 {
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(150px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

/* ===== Contact Section ===== */
#contact {
    padding-top: 80px; /* إضافة مساحة من الأعلى لتجنب التداخل مع شريط التنقل */
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(251, 191, 36, 0.25);
    color: white;
}

.contact-info {
    padding: 1.5rem;
}

.contact-info i {
    color: var(--accent-color);
}

.contact-info h5 {
    margin: 1rem 0;
    color: var(--accent-color);
}

/* ===== Footer ===== */
.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons {
        text-align: center;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .floating-icon {
        width: 60px;
        height: 60px;
    }
    
    .floating-icon i {
        font-size: 1.5rem;
    }
    
    .tech-stack {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* تقليل المساحة المضافة للأقسام على الشاشات الصغيرة */
    #about,
    #services,
    #technology,
    #contact {
        padding-top: 60px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .tech-item {
        padding: 0.75rem;
    }
    
    .tech-item i {
        font-size: 1.2rem;
    }
    
    /* تقليل المساحة أكثر للشاشات الصغيرة جداً */
    #about,
    #services,
    #technology,
    #contact {
        padding-top: 50px;
    }
}

/* ===== Loading Animation ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Scroll to Top Button ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

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

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* ===== Custom Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .hero-buttons,
    .contact-form,
    .scroll-to-top {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section-title::after {
        display: none;
    }
}
