/* General Styling */
* {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hero and About Sections */
.hero-section, .about-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 0;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-section .container, .about-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1, .about-section h2 {
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    transition: text-shadow 0.3s ease;
}

.hero-section p, .about-section p {
    font-size: 1.3rem;
    font-weight: 400;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.btn-pulse {
    background: #D4AF37;
    border: none;
    padding: 10px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    color: #1E3A8A;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #fff;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #fff; }
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background: #F8F9FA;
}

.service-card {
    position: relative;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.service-card:hover .card-overlay {
    opacity: 0;
}

.service-card .card-body {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.service-card:hover .card-body {
    background: rgba(255, 255, 255, 1);
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotate(15deg);
}

/* Dynamic Sections */
.dynamic-section {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 0;
    background-attachment: fixed;
}

/* Navbar Styling */
.navbar {
    min-height: 70px;
    padding: 10px 0;
    background: #1E3A8A; /* Default color */
    transition: background 0.3s ease;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
}

.navbar.scrolled {
    background: #1E3A8A; /* Consistent color on scroll */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar-logo {
    height: 50px;
}

.navbar-brand-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.navbar-brand:hover .navbar-brand-text, .navbar-brand:hover .navbar-logo {
    transform: scale(1.1) rotate(5deg);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.nav-link, .social-icon {
    font-size: 1.1rem;
    color: #fff;
    margin: 0 8px;
    position: relative;
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-link:hover, .social-icon:hover {
    color: #D4AF37 !important;
    transform: scale(1.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #D4AF37;
    transition: width 0.3s ease;
}

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

/* Hamburger Menu Animation */
.navbar-toggler {
    border: none;
    padding: 10px;
    transition: all 0.3s ease;
}

.navbar-toggler-icon {
    background-image: none;
    width: 30px;
    height: 3px;
    background-color: #fff;
    position: relative;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    top: 8px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

.navbar-toggler:hover {
    transform: scale(1.1);
}

/* Search Bar */
.search-bar {
    max-width: 400px;
    margin: 0 auto;
}

.search-icon i {
    font-size: 1.1rem;
}

/* Fixed Contact Icons */
.fixed-contact-icons {
    position: fixed;
    bottom: 20px;
    <?php echo $language == 'ar' ? 'right: 20px;' : 'left: 20px;'; ?>
    z-index: 1000;
}

.contact-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #1E3A8A;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
}

.contact-toggle i {
    font-size: 24px;
    color: #fff;
}

.contact-icons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #1E3A8A;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.contact-icon:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
}

.contact-icon i {
    font-size: 20px;
    color: #fff;
}

/* Social Icons Fix */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.social-icon {
    display: inline-block !important;
    color: #fff;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    color: #D4AF37;
    transform: scale(1.2);
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: #F8F9FA;
}

.form-group {
    position: relative;
    transition: transform 0.3s ease;
}

.form-group:hover {
    transform: translateY(-5px);
}

.form-control {
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.contact-info-frame {
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.contact-info-frame:hover {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.map-border {
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.map-border:hover {
    transform: scale(1.02);
}

/* Footer */
.footer {
    padding: 40px 0;
    background: #1E3A8A;
}

.social-links .social-icon {
    margin: 0 10px;
    color: #fff;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Mobile Responsive Adjustments */
@media (max-width: 576px) {
    .navbar {
        min-height: 50px;
        padding: 5px 0;
    }

    .navbar-logo {
        height: 40px;
    }

    .navbar-brand-text {
        font-size: 1.5rem;
    }

    .nav-link, .social-icon {
        font-size: 0.9rem;
        margin: 0 5px;
    }

    .search-bar {
        max-width: 100%;
        display: none;
    }

    .search-bar.show {
        display: block;
    }

    .hero-section, .about-section {
        min-height: 400px;
        padding: 60px 0;
        background-attachment: scroll;
    }

    .hero-section h1, .about-section h2 {
        font-size: 1.8rem;
    }

    .hero-section p, .about-section p {
        font-size: 0.9rem;
    }

    .services-section {
        padding: 60px 0;
    }

    .service-card .card-body {
        padding: 15px;
    }

    .service-icon {
        font-size: 1.5rem;
    }

    .dynamic-section {
        min-height: 300px;
        padding: 40px 0;
        background-attachment: scroll;
    }

    .contact-section {
        padding: 60px 0;
    }

    .contact-container {
        flex-direction: column;
        gap: 10px;
    }

    .contact-form, .contact-info-frame {
        max-width: 100%;
        margin: 10px 0;
    }

    .map-border iframe {
        height: 300px;
    }

    .footer {
        padding: 30px 0;
    }

    .footer .row {
        flex-direction: column;
        gap: 20px;
    }

    .footer iframe {
        height: 100px;
    }

    /* Floating Contact Button on Mobile */
    .fixed-contact-icons {
        bottom: 20px;
        <?php echo $language == 'ar' ? 'right: 20px;' : 'left: 20px;'; ?>
    }

    .contact-toggle {
        display: flex;
    }

    .contact-icons-list {
        display: none;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        bottom: 60px;
        <?php echo $language == 'ar' ? 'right: 0;' : 'left: 0;'; ?>
        transition: all 0.3s ease;
    }

    .contact-icons-list.active {
        display: flex;
    }

    /* Social Icons on Mobile */
    .social-links {
        display: flex !important;
        justify-content: center;
        gap: 10px;
    }

    .social-icon {
        font-size: 1.5rem !important;
    }
}