/* Responsive styles for hero section */
@media (max-width: 992px) {
    .adroit-logo {
        max-width: 640px;
        height: auto;
    }
    ul.top-right {
        display: none;
    }
}

/* Progress Bar Styles */
.progress-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.progress-segment {
    flex: 1 1 18%;
    padding: 10px 8px;
    color: #000;
    font-weight: 600;
    text-align: center;
    border-radius: 15px;
    font-size: 14px;
    min-width: 120px;
    box-sizing: border-box;
}

.segment1 {
    background-color: #f4a89a; /* Light red */
    color: #4a1a12;
}

.segment2 {
    background-color: #8ca68c; /* Light green */
    color: #2f3e2f;
}

.segment3 {
    background-color: #8bb9d9; /* Light blue */
    color: #1f3a5a;
}

.segment4 {
    background-color: #c89ac9; /* Light purple */
    color: #4a2a4a;
}

.segment5 {
    background-color: #a3c48a; /* Light green */
    color: #2f3e2f;
}

.progress-arrow {
    width: 0;
    height: 20px;
    margin-top: 10px;
    position: relative;
    transition: width 2s ease-in-out;
}

.progress-arrow.animate {
    width: var(--target-width, 39%);
}

.progress-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background-color: #3a7d44; /* Dark green */
    border-radius: 4px;
    transform: translateY(-50%);
}

.progress-arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -5px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 20px solid #3a7d44; /* Dark green arrowhead */
    transform: translateY(-50%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-bar-container {
        justify-content: center;
    }
    .progress-segment {
        flex: 1 1 40%;
        min-width: 140px;
        font-size: 13px;
        margin-bottom: 10px;
    }
    .progress-arrow {
        height: 15px;
    }
    .progress-arrow::before {
        height: 6px;
    }
    .progress-arrow::after {
        border-top: 7px solid transparent;
        border-bottom: 7px solid transparent;
        border-left: 14px solid #3a7d44;
    }
}

@media (max-width: 480px) {
    .progress-segment {
        flex: 1 1 100%;
        min-width: 100%;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .navbar {
        display:none;
    }
    h1 {
        font-size: 28px;
    }
    .lead {
        font-size: 18px;
    }
    .more {
        bottom: 20px;
        font-size: 10px;
    }
    .adroit-logo {
        max-width: 460px;
        height: auto;
    }
    
    /* Global vertical stacker for pipelines (mobile) */
    .pipeline {
        flex-direction: column;
    }

    .pipeline::before {
        top: 0;
        left: 50%;
        right: auto;
        width: 6px;
        height: 100%;
        transform: translateX(-50%);
    }

    .stage {
        width: 80%;
        margin: 20px auto;
    }

    /* Products page keeps a horizontal stepper on mobile */
    #products .pipeline {
        flex-direction: row !important;
    }
    #products .pipeline::before {
        top: 16px; left: 0; right: 0; width: auto; height: 6px; transform: none;
    }
    #products .stage {
        width: auto; margin: 0; padding-top: 28px;
    }
    
    /* Contact Section */
    #contact {
        color:#010101;
        background: #EEEEEE;
        background: linear-gradient(113deg,rgba(238, 238, 238, 1) 0%, rgba(143, 143, 143, 1) 100%);
        padding: 80px 0;
    }
    #contact h3 {
        text-align: center;
    }
    #contact .contact-item {
        margin-left: 0px;
        width: 95%;
        margin: 0 auto;
    }
    #contact .contact-item + .contact-item {
        margin-left: 0px;
        width: 95%;
        margin: 0 auto;
    }

    /* Footer Section */
    #footer {
        padding:80px 0 0 0;
        color: #ccc;
    }
    .footer-logo{
        text-align: center;
    }
    .footer-logo img {
        max-width: 80%;
    }
    #backToTop {
        display: none; /* Hidden by default */
        position: fixed;
        bottom: 40px;
        right: 15px;
        z-index: 9999;
        font-size: 24px;
        background-color: #117CFF;
        color: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        cursor: pointer;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        transition: background-color 0.3s ease;
    }
      
    #backToTop:hover {
        background-color: #0a5ecf;
    }
}

@media (max-width: 480px) {
    .navbar {
        display:none;
    }
    h1 {
        font-size: 28px;
    }
    .lead {
        font-size: 16px;
    }
    .more {
        bottom: 15px;
        font-size: 9px;
    }
    .splash {
        padding: 0 10px;
    }
    .adroit-logo {
        max-width: 320px;
        height: auto;
    }

    /* Footer Section */
    #footer {
        padding:80px 0 0 0;
        color: #ccc;
    }
    .footer-logo{
        text-align: center;
    }
    .footer-logo img {
        max-width: 80%;
    }
    #backToTop {
        display: none; /* Hidden by default */
        position: fixed;
        bottom: 40px;
        right: 15px;
        z-index: 9999;
        font-size: 24px;
        background-color: #117CFF;
        color: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        cursor: pointer;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        transition: background-color 0.3s ease;
    }
      
    #backToTop:hover {
        background-color: #0a5ecf;
    }
}

/* Mobile logo */
.mobile-logo {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1001;
}

.mobile-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    position: absolute;
    top: 30px;
    right: 25px;
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 0;
}

.mobile-menu-toggle .hamburger {
    display: block;
    width: 100%;
    height: 4px;
    background-color: #4197FF;
    border-radius: 2px;
}

/* Show toggle button and logo below 992px */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }
    .mobile-logo {
        display: block;
    }
    .navbar {
        display:none;
    }
}

/* Mobile full screen overlay menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.95);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1010;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu ul li {
    margin: 20px 0;
}

.mobile-menu ul li a {
    color: white;
    font-size: 2rem;
    text-decoration: none;
}

/* Show mobile menu when active */
.mobile-menu.active {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.95);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Logo inside mobile menu */
.mobile-menu-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1010;
}

.mobile-menu-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* Responsive adjustments for progress arrows */
@media (max-width: 768px) {
    .progress-arrow-small {
        width: 39%;
    }
    .progress-arrow-large {
        width: 66%;
    }
}

@media (max-width: 480px) {
    .progress-arrow-small{
        width:66%
    }
    .progress-arrow-large {
        width: 39%;
    }
}
