/* ============================================
   General Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #00a8ff;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --text-color: #333;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #0066cc 0%, #00a8ff 100%);
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    direction: rtl;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   Preloader
   ============================================ */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.logo-animation {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
}

.preloader-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 102, 204, 0.6));
}

.circuit-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.line {
    position: absolute;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 0.8;
    animation: circuitFlow 2s ease-in-out infinite;
}

.line-1 {
    width: 60px;
    height: 3px;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.line-2 {
    width: 60px;
    height: 3px;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.5s;
}

.line-3 {
    width: 3px;
    height: 60px;
    top: 50%;
    right: 20%;
    transform: translateY(-50%);
    animation-delay: 1s;
}

.line-4 {
    width: 3px;
    height: 60px;
    top: 50%;
    left: 20%;
    transform: translateY(-50%);
    animation-delay: 1.5s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes circuitFlow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.loading-text {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    animation: fadeInOut 1.5s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 1) !important;
    padding: 12px 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-2px);
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 5px rgba(0, 102, 204, 0.2));
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 10px rgba(0, 102, 204, 0.3));
}

.brand-text {
    color: var(--primary-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

.navbar-brand:hover .brand-text {
    color: var(--secondary-color);
}

.navbar-nav .nav-link {
    color: var(--primary-color) !important;
    font-weight: 600;
    margin: 0 8px;
    padding: 10px 18px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 18px;
    width: 0;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(0, 102, 204, 0.05);
    border-radius: 8px;
    transition: width 0.3s ease;
    z-index: -1;
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: calc(100% - 36px);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
    background: rgba(0, 102, 204, 0.08);
}

.navbar-toggler {
    border: 2px solid var(--primary-color);
    padding: 8px 12px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 102, 204, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(0, 102, 204, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: slideInDown 1s ease;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-color);
    animation: slideInUp 1s ease 0.3s both;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInUp 1s ease 0.6s both;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary {
    background: var(--gradient);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.6);
    background: linear-gradient(135deg, #0052a3 0%, #0099e6 100%);
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    animation: float 6s ease-in-out infinite;
}

.icon-1 {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.icon-2 {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.icon-3 {
    top: 40%;
    left: 10%;
    animation-delay: 2s;
}

.icon-4 {
    bottom: 20%;
    right: 20%;
    animation-delay: 1.5s;
}

.icon-5 {
    top: 30%;
    left: 20%;
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.6;
    }
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    right: 20px;
}

.carousel-control-next {
    left: 20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
}

.title-underline {
    width: 80px;
    height: 3px;
    background: var(--gradient);
    margin: 0 auto;
    border-radius: 2px;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    background: var(--light-color);
    padding: 120px 0;
    margin: 80px 0;
    position: relative;
}

.about-section::before,
.about-section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--white);
    z-index: 0;
}

.about-section::before {
    top: -100px;
}

.about-section::after {
    bottom: -100px;
}

.about-section .container {
    background: var(--white);
    padding: 70px 50px;
    border-radius: 20px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.06);
    margin: 40px auto;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.about-card {
    background: var(--white);
    padding: 50px 45px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

/* بطاقة حول الشركة الرئيسية */
.about-card-main {
    padding: 50px 45px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(240, 247, 255, 1) 100%);
    border: 2px solid rgba(0, 102, 204, 0.15);
}

.about-logo-wrapper {
    position: relative;
    display: inline-block;
    padding: 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.15);
    transition: all 0.3s ease;
}

.about-logo-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 102, 204, 0.25);
}

.about-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 102, 204, 0.2));
}

.about-logo-wrapper:hover .about-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 15px rgba(0, 102, 204, 0.3));
}

.about-content {
    text-align: right;
}

.about-card-main .icon-wrapper {
    margin: 0 0 25px 0;
    width: 80px;
    height: 80px;
    display: inline-flex;
}

.about-card-main h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: right;
}

.about-card-main p {
    font-size: 1.1rem;
    line-height: 2;
    color: #555;
    text-align: right;
}

/* البطاقات الفرعية (الرؤية، الرسالة، الهدف) */
.about-card-sub {
    text-align: center;
    padding: 40px 35px;
    border-top: 4px solid transparent;
    transition: all 0.4s ease;
}

.about-card-sub::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.about-card-sub:hover::before {
    transform: scaleX(1);
}

.about-card-sub .icon-wrapper {
    margin: 0 auto 25px;
    width: 70px;
    height: 70px;
}

.about-card-sub h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.about-card-sub p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #666;
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.3);
}

.about-card-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 102, 204, 0.2);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    animation: iconPulse 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.icon-wrapper i {
    font-size: 2rem;
    color: var(--white);
}

.about-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.about-card p {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

/* ============================================
   Services Section
   ============================================ */
.services-section {
    background: var(--white);
}

.service-main-card {
    background: var(--gradient);
    color: var(--white);
    padding: 50px 40px;
    border-radius: 18px;
    text-align: center;
    margin-bottom: 50px;
    box-shadow: 0 8px 35px rgba(0, 102, 204, 0.25);
    position: relative;
    overflow: hidden;
}

.service-main-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.service-icon-large {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.service-main-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.service-main-card p {
    font-size: 1.2rem;
    line-height: 1.8;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 102, 204, 0.1);
    margin-bottom: 30px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.2);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

.service-icon i {
    font-size: 2rem;
    color: var(--white);
}

.service-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    line-height: 1.8;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    background: var(--light-color);
}

.contact-info-card,
.contact-form-card {
    background: var(--white);
    padding: 45px 40px;
    border-radius: 18px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    height: 100%;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.contact-info-card h3,
.contact-form-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(-10px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.2);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
    flex-shrink: 0;
    animation: iconRotate 4s ease-in-out infinite;
}

@keyframes iconRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.contact-icon i {
    font-size: 1.3rem;
    color: var(--white);
}

.contact-details h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.contact-details p {
    color: #666;
    margin: 0;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.4);
    color: var(--white);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    outline: none;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark-color);
    color: var(--white);
}

.footer-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.6);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-section {
        padding: 80px 0;
        margin: 40px 0;
    }
    
    .about-section .container {
        padding: 50px 30px;
    }
    
    .about-card-main {
        padding: 40px 30px;
    }
    
    .about-logo-wrapper {
        margin-bottom: 30px;
        padding: 15px;
    }
    
    .about-logo {
        width: 120px;
        height: 120px;
    }
    
    .about-content {
        text-align: center;
    }
    
    .about-card-main .icon-wrapper {
        margin: 0 auto 20px;
        width: 70px;
        height: 70px;
    }
    
    .about-card-main h3 {
        font-size: 1.6rem;
        text-align: center;
    }
    
    .about-card-main p {
        font-size: 1rem;
        text-align: center;
    }
    
    .about-card-sub {
        padding: 35px 25px;
        margin-bottom: 25px;
    }
    
    .about-card-sub .icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .about-card-sub h3 {
        font-size: 1.2rem;
    }
    
    .contact-info-card,
    .contact-form-card {
        padding: 30px 20px;
    }
    
    .service-main-card {
        padding: 40px 20px;
    }
    
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .floating-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .service-icon-large {
        font-size: 3rem;
    }
    
    .service-main-card h3 {
        font-size: 1.5rem;
    }
    
    .service-main-card p {
        font-size: 1rem;
    }
    
    .about-card-main {
        padding: 30px 20px;
    }
    
    .about-logo-wrapper {
        padding: 12px;
    }
    
    .about-logo {
        width: 100px;
        height: 100px;
    }
    
    .about-card-main h3 {
        font-size: 1.4rem;
    }
    
    .about-card-main p {
        font-size: 0.95rem;
        line-height: 1.8;
    }
}

