/* ==========================================
   Google Fonts Import - IBM Plex Sans Arabic
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ==========================================
   Global Styles & Typography
   ========================================== */

:root {
    --primary-color: #0066cc;
    --secondary-color: #00a8e8;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
    font-weight: 400;
}

/* ==========================================
   Navbar Styles
   ========================================== */

.navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.8rem;
    color: var(--secondary-color) !important;
    transition: var(--transition);
    font-weight: 700;
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: #00d4ff !important;
}

.navbar-nav .nav-link {
    color: #fff !important;
    margin: 0 0.5rem;
    position: relative;
    transition: var(--transition);
    font-weight: 500;
}

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

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

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

/* ==========================================
   Wave Animation Header - Advanced WaveEffect
   ========================================== */

.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    position: relative;
    overflow: hidden;
    /* Ensure minimum height for mobile view */
    min-height: 100vh;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px;
    z-index: 1;
    opacity: 0.2;
}

.hero-bg-image {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hero-background {
        gap: 10px;
        padding: 20px;
    }
    
    .hero-bg-image {
        width: 150px;
        height: 150px;
    }
}

.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 600px 100px;
    background-repeat: repeat-x;
}

.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><defs><pattern id="wave" x="0" y="0" width="120" height="120" patternUnits="userSpaceOnUse"><path d="M0,60 Q30,30 60,60 T120,60" stroke="rgba(255,255,255,0.1)" stroke-width="2" fill="none"/></pattern></defs><rect width="100%" height="100%" fill="url(%23wave)"/></svg>');
}

.parallax > use {
    /* Reduced animation duration for smoother performance on some devices */
    animation: scroll 15s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 15s;
}

.parallax > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 16s;
}

.parallax > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 17s;
}

.parallax > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 18s;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(90px);
    }
}

.hero-content {
    position: relative;
    z-index: 20;
    padding-top: 80px; /* Add padding to account for fixed navbar */
}

.hero-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    /* Responsive image container for better mobile layout */
    margin-top: 30px;
    transform: perspective(1000px) rotateY(5deg); /* Subtle 3D effect for modern look */
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(0deg);
}

@media (min-width: 992px) {
    .hero-image {
        margin-top: 0;
    }
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    /* Performance optimization: Use content-visibility for off-screen sections if possible, 
       but for hero image, we'll focus on max-width and display. */
    max-width: 100%;
    height: auto;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* ==========================================
   Section Titles
   ========================================== */

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ==========================================
   About Section
   ========================================== */

.about-image {
    position: relative;
    /* Add margin for mobile spacing */
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .about-image {
        margin-bottom: 0;
    }
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: 0 10px 40px rgba(0, 102, 204, 0.2);
}

.feature-box {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.feature-box i {
    font-size: 1.8rem;
}

.feature-box h5 {
    font-weight: 600;
    margin-top: 10px;
    color: var(--dark-color);
}

/* ==========================================
   Service Cards
   ========================================== */

.service-card {
    padding: 30px 20px;
    background: white;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.3);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.service-card h5 {
    font-weight: 600;
    color: var(--dark-color);
}

/* ==========================================
   Portfolio Cards
   ========================================== */

.portfolio-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.portfolio-content {
    padding: 20px;
}

.portfolio-content h5 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.badge {
    font-weight: 600;
    padding: 5px 10px;
}

/* ==========================================
   Team Cards
   ========================================== */

.team-card {
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.team-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.team-card h5 {
    font-weight: 600;
    color: var(--dark-color);
}

/* ==========================================
   Contact Section
   ========================================== */

.contact-box {
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-box:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-box i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.contact-box h5 {
    font-weight: 600;
    color: white;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.map-container iframe {
    border-radius: 10px;
}

/* ==========================================
   WhatsApp Floating Button
   ========================================== */

.whatsapp-btn {
    position: fixed;
    bottom: 20px; /* Smaller bottom margin for mobile */
    left: 20px; /* Smaller left margin for mobile */
    width: 50px; /* Smaller size for mobile */
    height: 50px; /* Smaller size for mobile */
    background: linear-gradient(135deg, #25D366, #20BA5A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem; /* Smaller icon size */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    z-index: 999;
    text-decoration: none;
}

@media (min-width: 768px) {
    .whatsapp-btn {
        bottom: 30px;
        left: 30px;
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}

.whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

/* ==========================================
   Modal Styles
   ========================================== */

.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px 10px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-weight: 600;
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    padding: 10px 25px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

.btn-outline-light {
    border: 2px solid white;
}

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

/* ==========================================
   Footer
   ========================================== */

footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.social-links a {
    transition: var(--transition);
    font-size: 1.3rem;
}

.social-links a:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-3px);
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }

    .hero-image {
        margin-top: 30px;
    }

    .display-4 {
        font-size: 2rem;
    }

    .whatsapp-btn {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }

    .map-container iframe {
        height: 300px !important;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
    }

    .service-card,
    .portfolio-card,
    .team-card {
        padding: 15px;
    }

    .hero-section {
        min-height: auto;
        padding: 40px 0;
    }

    .contact-box {
        padding: 20px;
    }
}

/* ==========================================
   Animations
   ========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.aos-animate {
    animation-duration: 1s;
}

