/* General styling for the header */
header {
    position: fixed; /* Make the header fixed */
    top: 0; /* Align it to the top */
    left: 0;
    width: 100%; /* Full width */
    z-index: 1000; /* Ensure it stays on top */
    background: linear-gradient(90deg, #005f87, #0077b6);
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: padding 0.3s ease, background-color 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    max-width: 1200px;
    margin: auto;
}

header .logo h1 {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    margin: 0;
    white-space: nowrap; /* Ensure the logo stays on one line */
    transition: transform 0.3s ease;
}

.logo {
    text-decoration: none; /* Removes underline */
    color: inherit; /* Ensures the color matches existing styles */
    display: flex; /* Ensures the layout remains consistent */
    align-items: center; /* Center-aligns content if needed */
}

header .logo h1:hover {
    transform: scale(1.05);
    color: #ffb703;
}

/* Desktop Navigation */
.desktop-nav ul {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    gap: 20px;
    padding-left: 20px; /* Align menu with logo */
    margin: 0;
}

.desktop-nav ul li {
    list-style: none;
}

.desktop-nav ul li a {
    color: white;
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 25px;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap; /* Ensure menu items stay on one line */
}

.desktop-nav ul li a:hover,
.desktop-nav ul li a:focus {
    background-color: #ffb703;
    color: #333;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
    outline: none;
}

/* Call to action button styling within nav */
.cta-button-container {
    list-style: none;
}

.cta-button {
    background-color: #ffb703;
    color: #333;
    font-size: 1em;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
    white-space: nowrap; /* Ensure the button stays on one line */
}

.cta-button:hover,
.cta-button:focus {
    background-color: #ff8c00;
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
    outline: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}


.hamburger:focus {
    outline: none;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Drawer Navigation Styling */
.drawer-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: #005f87;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    transition: right 0.3s ease;
    z-index: 1050;
    padding-top: 60px; /* Space for header */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.drawer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.drawer-nav ul li {
    margin: 15px 0;
    text-align: center;
}

.drawer-nav ul li a {
    color: white;
    font-size: 1.1em;
    text-decoration: none;
    padding: 10px 0;
    display: block;
    transition: color 0.3s;
}

.drawer-nav ul li a:hover,
.drawer-nav ul li a:focus {
    color: #ffb703;
    outline: none;
}

/* Drawer CTA Button */
.drawer-nav ul li.cta-button-container {
    margin-top: auto;
    padding-bottom: 30px;
}

.drawer-nav ul li.cta-button-container a.cta-button {
    width: 80%;
    text-align: center;
    margin: 0 auto;
}

/* Drawer Overlay Styling */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

/* Active State for Drawer */
.drawer-nav.active {
    right: 0;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hamburger Animation when active */
.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Delivery Motor Animation */
.delivery-motor {
    margin-top: 30px;
    text-align: center;
    position: relative; /* Allows absolute positioning of the icon */
    overflow: hidden; /* Hides the motorcycle when it moves out of bounds */
    height: 300px; /* Sets a fixed height for the animation container */
}

.delivery-motor i {
    color: #ffb703;
    font-size: 15em; /* Increases the size of the motorcycle icon */
    position: absolute;
    top: 0;
    left: -100px; /* Starts the motorcycle off-screen to the left */
    animation: rideMotorcycle 6s linear infinite; /* Applies the riding animation */
}

/* Keyframes for riding effect */
@keyframes rideMotorcycle {
    0% {
        left: -100px;
        transform: rotate(0deg);
    }
    25% {
        left: 25%;
        transform: rotate(10deg);
    }
    50% {
        left: 50%;
        transform: rotate(-10deg);
    }
    75% {
        left: 75%;
        transform: rotate(10deg);
    }
    100% {
        left: 100%;
        transform: rotate(0deg);
    }
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    header .container {
        flex-direction: row-reverse; /* Moves hamburger to the right */
    }

    .logo {
        z-index:    20000;
        margin-left: 100px;

    }

    .hamburger {
        margin-left: auto; /* Align hamburger to the right */
    }
}

@media (max-width: 768px) {
    /* Hide Desktop Navigation */
    .desktop-nav {
        display: none;
    }

    /* Show Hamburger Button */
    .hamburger {
        display: flex;
    }

    /* Adjust Container Padding */
    header .container {
        padding: 0 15px;
    }

    /* Adjust Drawer Navigation */
    .drawer-nav {
        width: 100%;
        max-width: none;
    }

    .drawer-nav ul li a {
        font-size: 1.2em;
        padding: 12px 0;
    }

    .drawer-nav ul li.cta-button-container a.cta-button {
        width: 90%;
        padding: 10px 0;
    }

    /* Adjust Overlay */
    .drawer-overlay.active {
        background-color: rgba(0,0,0,0.6);
    }
}
