/* ==========================================
   BITL Custom Styles
   ========================================== */

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #fff !important;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* Ensure the widget icon is centered properly */
.whatsapp-float i {
    margin: 0;
}

/* ==========================================================================
   Header and Banner Overlapping / Z-Index Fix
   ========================================================================== */
header {
    z-index: 1050 !important;
    /* Keeps header on top of interactive canvas, images, and text */
}

/* Desktop and Laptop screens (>= 1200px) */
@media (min-width: 1200px) {
    .main-banner-style06 {
        padding-top: 140px !important;
    }

    .main-banner-style06 .min-vh-100 {
        min-height: calc(100vh - 140px) !important;
    }
}

/* Smaller desktops / Tablet landscape (992px – 1199px):
   Header is still position:absolute at this breakpoint, so banner needs extra top padding */
@media (min-width: 992px) and (max-width: 1199px) {
    .main-banner-style06 {
        padding-top: 160px !important;
    }

    .main-banner-style06 .min-vh-100 {
        min-height: calc(100vh - 160px) !important;
    }
}

/* ==========================================================================
   Header and Banner Overlapping Fix for Mobile & Tablet Devices (<= 991px)
   ========================================================================== */
@media (max-width: 991px) {

    /* 1. Force header into normal document flow on mobile/tablets */
    header.sm-position-relative {
        position: relative !important;
        background-color: #061836 !important;
        /* Premium dark background */
        z-index: 1000 !important;
    }

    /* 2. Ensure logo has high contrast on the dark mobile header background */
    header.sm-position-relative #logo {
        filter: brightness(0) invert(1);
    }

    /* 3. Reset negative margin pull on banner/sections with class header-position */
    .header-position {
        margin-top: 0 !important;
    }

    /* 4. Optimize main banner height and padding for mobile */
    .main-banner-style06 {
        min-height: auto !important;
        padding: 40px 15px !important;
    }

    .main-banner-style06 .min-vh-100 {
        min-height: auto !important;
    }

    /* 5. Hide the ::before SVG background curve that overlays the text with poor contrast.
       The banner already has the solid #292dc2 background, so removing the curve overlay
       ensures the text remains fully readable on mobile. */
    .main-banner-style06:before {
        display: none !important;
    }

    /* 6. Move the illustration BELOW the text content so text is visible above the fold.
       The theme default makes .stratup-image position:relative and renders it first,
       pushing the text content below the fold. We use order to fix this. */
    .main-banner-style06 .stratup-image {
        order: 2 !important;
        margin: 30px auto 20px auto !important;
        max-width: 60% !important;
    }

    .main-banner-style06 .container {
        order: 1 !important;
    }

    /* 7. Make the banner section a flex column so order properties work */
    .main-banner-style06 {
        display: flex !important;
        flex-direction: column !important;
    }

    /* 8. Ensure banner text is fully readable with proper contrast on dark blue bg */
    .main-banner-style06 .col-lg-6 {
        color: #fff;
    }

    .main-banner-style06 h3,
    .main-banner-style06 h2,
    .main-banner-style06 h1 {
        color: #fff !important;
    }

    .main-banner-style06 p {
        color: rgba(255, 255, 255, 0.85) !important;
    }

    /* Make the "AHMED AMIN GROUP SUBSIDIARY" subtitle visible on dark bg */
    .main-banner-style06 .text-primary {
        color: #7dd3fc !important;
        /* Light sky blue for contrast on dark blue */
    }

    /* Make badges readable on dark bg */
    .main-banner-style06 .badge-primary-soft {
        background-color: rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
    }

    /* Make outline/secondary buttons visible */
    .main-banner-style06 .butn.style-one:not(.fill) {
        border-color: #fff !important;
        color: #fff !important;
    }

    /* 9. Ensure the corner shape doesn't interfere */
    .main-banner-style06 .right-bottom-bg {
        display: none !important;
    }

    /* 10. Optimize page title sections for inner pages on mobile devices */
    .page-title-section {
        padding: 50px 0 !important;
    }
}

/* Small mobile devices */
@media (max-width: 575px) {
    .main-banner-style06 .stratup-image {
        max-width: 75% !important;
        margin: 20px auto 10px auto !important;
    }

    .main-banner-style06 {
        padding: 30px 15px !important;
    }

    .main-banner-style06 h3 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
}

/* ==========================================================================
   Particles.js Banner Canvas
   ========================================================================== */
#tsparticles-banner {
    pointer-events: auto;
}

#tsparticles-banner canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================================================
   Header and Footer Color Customization (#0d6efd)
   ========================================================================== */


footer {
    background-color: #292dc2 !important;
    background: #292dc2 !important;
}

/* ==========================================================================
   Custom History and Milestones Timeline
   ========================================================================== */
.custom-timeline {
    position: relative;
    max-width: 1000px;
    margin: 40px auto 0 auto;
    padding: 20px 0;
}

.custom-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #292dc2;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 15px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-icon {
    position: absolute;
    top: 25px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #292dc2;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(41, 45, 194, 0.3);
    transition: all 0.3s ease;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.left .timeline-icon {
    right: -23px;
}

.timeline-item.right .timeline-icon {
    left: -23px;
}

.timeline-content {
    padding: 25px 30px;
    background-color: #ffffff;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(41, 45, 194, 0.15);
    border-color: rgba(41, 45, 194, 0.25);
}

.timeline-content:hover .timeline-icon {
    background-color: #1d184a;
}

.timeline-year {
    font-size: 1.6rem;
    font-weight: 700;
    color: #292dc2;
    margin-bottom: 5px;
    display: block;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d184a;
    margin-bottom: 12px;
}

.timeline-desc {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6f6f6f;
}

@media screen and (max-width: 767px) {
    .custom-timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 15px;
    }
    .timeline-item.left, .timeline-item.right {
        left: 0;
    }
    .timeline-item.left .timeline-icon, .timeline-item.right .timeline-icon {
        left: 8px;
        right: auto;
    }
}