body {
    position: relative;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Sticky navbar */
nav.navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: white;
    box-shadow: 0 0 20spx 0px black;
}

/* Nav link hover sliding text effect */
.navbar-nav .nav-link {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    margin-top: .5rem;
}

.navbar-nav .nav-link span {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    line-height: 1.5em;
    user-select: none;
    color: black !important;
}

.navbar-nav .nav-link span.top-text {
    color: white;
}

.navbar-nav .nav-link span.bottom-text {
    color: #ff6347 !important;
    position: absolute;
    top: 32px;
    left: 10px;
    width: 100%;
    transform: translateY(0);
    opacity: 0;
}

.navbar-nav .nav-link:hover span.top-text {
    transform: translateY(-100%);
    opacity: 0;
}

.navbar-nav .nav-link:hover span.bottom-text {
    transform: translateY(-100%);
    opacity: 1;
}

/* Active nav link style */
.navbar-nav .nav-link.active span.top-text {
    color: #ff6347;
    font-weight: 600;
    border-bottom: 3px solid #ff6347;
}

@media (max-width: 768px) {
    .navbar-nav .nav-link span.bottom-text {
        position: static;
        transform: none !important;
        opacity: 1 !important;
    }

    .navbar-nav .nav-link span.top-text {
        transform: none !important;
        opacity: 1 !important;
    }

    .navbar-nav .nav-link:hover span.top-text,
    .navbar-nav .nav-link:hover span.bottom-text {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ====================== SMALL SCREEN CUSTOM TOGGLER & SIDEBAR ======================= */

/* Hide default toggler */
.navbar-toggler {
    border: none;
    background: transparent;
    display: none;
    position: relative;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1050;
}

/* Hamburger bars */
.navbar-toggler .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: black;
    margin: 5px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Sidebar container */
#sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: whitesmoke;
    transition: left 0.3s ease;
    z-index: 1040;
    padding-top: 70px;
    overflow: auto;
}

/* Sidebar visible */
#sidebar.active {
    left: 0;
}

/* Sidebar nav links vertical */
#sidebar .navbar-nav {
    flex-direction: column;
    padding-left: 1rem;
}

#sidebar .nav-link {
    color: black !important;
    font-size: 1.2rem;
    padding: 0.75rem 0;
    position: relative;
}

/* Preserve your sliding text effect in sidebar */
#sidebar .nav-link span.top-text {
    color: black;
}

#sidebar .nav-link span.bottom-text {
    color: #ff6347 !important;
    top: 28px;
    left: 0;
}

/* Sidebar close button (arrow) */
#sidebarCloseBtn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1055;
    color: black;
}

.navbar-toggler.active .bar {
    opacity: 0;
}

.navbar-toggler.active .arrow {
    display: inline-block;
    transform: rotate(134deg);
    position: absolute;
    top: 52%;
    left: 50%;
    margin-top: -2px;
    margin-left: -10px;
}

.navbar-toggler .arrow {
    display: none;
    /* hidden by default */
}

element.style {
    width: 250px;
    height: 70px;
    margin-left: -23px;
}

/* Show toggler only on small devices */
@media (max-width: 991.98px) {
    nav.navbar {
        position: fixed;
        top: -5px;
        left: 0;
        right: 0;
    }

    .nav-logo {
        width: 200px !important;
        height: 50px !important;
        margin-left: -3.6rem !important;
    }

    .navbar-toggler {
        display: block;
    }

    /* Hide the default navbar links in navbar on small screens */
    .navbar-collapse {
        display: none !important;
    }
}

/* Show sidebar nav links with your effect on small screens */
@media (max-width: 991.98px) {
    #sidebar {
        width: 100vw;
        left: -100vw;
    }

    #sidebar.active {
        left: 0;
    }

    #sidebar .nav-link span.top-text:hover {
        transform: translateY(-100%);
        opacity: 0;
    }

    #sidebar .nav-link span.bottom-text:hover {
        transform: translateY(-100%);
        opacity: 1;
    }
}

/* On bigger screens, sidebar hidden, navbar links normal */
@media (min-width: 992px) {
    #sidebar {
        display: none;
    }

    .navbar-collapse {
        display: flex !important;
    }
}

/* Desktop contact form (slide from right) */
.contact-form-wrapper {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -400px;
    width: 400px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.4s ease;
    z-index: 999;
    padding: 1.5rem;
    display: none;
    color: black;
}

.contact-form-wrapper.active {
    right: 0;
}

@media (min-width: 992px) {
    .contact-form-wrapper {
        display: block;
    }

    .floating-btn {
        display: flex !important;
    }
}

@media (max-width: 991px) {
    .navbar-brand img {
        height: 70px;
        width: 70px;
        margin-left: -2rem;
    }

    .contact-form-wrapper,
    #contactToggleBtnMain {
        display: none !important;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.icon {
    width: 30px;
    height: 30px;
}

.floating-btn {
    background-color: #f4511e;
    border: 2px solid black;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.floating-btn .bar {
    width: 20px;
    height: 2px;
    background: #fff;
    margin: 3px 0;
    transition: 0.4s;
}

#contactToggleBtnSidebar {
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 10px;
    z-index: 1050;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #f4511e;
}

.contact-form-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    color: black;
}

.contact-form-content {
    background: #fff;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}

.close-form-btn-mobile {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 20px;
    color: #333;
}

/* Hide overlay by default, positioned off-screen to the right */
#contactFormOverlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
}

/* When active, slide in (translateX to 0) */
#contactFormOverlay.active {
    transform: translateX(0);
}


/* Close button styling */
.close-form-btn-mobile {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
    background: transparent;
    border: none;
}

/* Optional: prevent body scroll when form is open */
body.form-open {
    overflow: hidden;
}

/* Common Dropdown Menu Styles */
.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    padding: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    border-radius: 0;
    min-width: 200px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.08);
}

.dropdown-menu-custom li {
    list-style: none;
}

.dropdown-menu-custom li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    background: transparent;
}

.dropdown-menu-custom li a:hover {
    background-color: #f5f5f5;
}

/* Desktop: Show on Hover */
.nav-item.dropdown:hover .dropdown-menu-custom {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Mobile override: sidebar dropdown */
#sidebar .dropdown-menu-custom {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    display: none;
    background: transparent;
    box-shadow: none;
    padding-left: 10px;
}

#sidebar .dropdown-menu-custom li a {
    padding: 8px 10px;
}

/* When visible via JS */
#sidebar .dropdown-menu-custom.show {
    display: block;
}


/* --------------- Header Pop Up ------------------ */
/* Hidden by default */
.info-popup {
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    background-color: #2e2c64;
    color: white;
    padding: 1rem;
    border-radius: 0 0 10px 10px;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: top 0.5s ease;
}

/* Slide down when targeted */
.info-popup:target {
    top: 0;
}

/* Close button */
.info-popup .close-btn {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 2rem;
    color: white;
    text-decoration: none;
}