/* Ensure the header menu container is relatively positioned */
#cstn-header-menu-container {
    position: relative;
    z-index: 1030;
}

/* Dropdown menu styles (override static positioning from external CSS) */
#cstn-header-menu-container .navbar-nav .dropdown .dropdown-menu {
    position: absolute !important; /* Override .navbar-nav .dropdown-menu { position: static; } */
    top: 100%; /* Position directly below the parent nav item */
    left: 0;
    right: auto;
    width: max-content;
    border-radius: 0;
    padding: 0;
    z-index: 1020;
    display: none; /* Hidden by default until .show is added */
}

/* When dropdown is shown, ensure it displays correctly */
#cstn-header-menu-container .navbar-nav .dropdown-menu.show {
    display: block;
}

/* Reset the left and transform for right-aligned dropdowns */
#cstn-header-menu-container .navbar-nav .dropdown-menu.show.dropdown-menu-end {
    left: auto;
    right: 0;
    transform: none;
}

/* Adjust mega menu content */
.mega-menu-content {
    padding: 20px;
    background-color: var(--light-color);
}

/* Container inside the mega menu */
.mega-menu-content .container-fluid {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Ensure columns are aligned properly */
.mega-menu-content .row {
    display: flex;
    flex-wrap: wrap;
}

.mega-menu-content .col-lg-4,
.mega-menu-content .col-md-6 {
    flex: 0 0 auto;
    width: 100%;
    max-width: 33.333333%;
}

/* Header styles */
.mega-menu-content h5 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* List styles */
.mega-menu-content ul {
    padding-left: 0;
    list-style: none;
}

.mega-menu-content ul li {
    margin-bottom: 5px;
}

/* Link styles */
.mega-menu-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.mega-menu-content a:hover {
    text-decoration: underline;
}

/* Image styles */
.mega-menu-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

/* Paragraph styles */
.mega-menu-content p {
    margin-bottom: 0;
    white-space: normal;
}

/* Specific Style (commented out as in original) */
/*.mega-menu-content img.card-img-top {
    max-height: 220px;
}*/

/* Animation styles */
.fadeInDown {
    animation-name: fadeInDown;
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

.fadeOutUp {
    animation-name: fadeOutUp;
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}