.rcm-mega-menu-item {
    position: static;
    display: inline-block;
}

/* Ensure the header/navigation container is NOT the relative anchor for the full-width menu, 
   except for the outermost full-width containers */
header, 
.wp-block-group.alignfull {
    position: relative;
}

.wp-block-navigation,
.wp-block-template-part,
.wp-block-group:not(.alignfull) {

}

.rcm-mega-menu-trigger {
    text-decoration: none;
    color: inherit;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--wp--preset--color--imperial-blue);
}

.rcm-mega-menu-trigger::after {
    content: ''; /* Down arrow */
    font-size: 0.8em;
    background-image: url('data:image/svg+xml,<svg width="9" height="6" viewBox="0 0 9 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.02454 5.79526L0.198343 1.8456C-0.0661144 1.5726 -0.0661144 1.13117 0.198343 0.861084L0.834167 0.204743C1.09862 -0.0682478 1.52626 -0.0682478 1.7879 0.204743L4.5 3.00436L7.2121 0.204743C7.47655 -0.0682478 7.90419 -0.0682478 8.16583 0.204743L8.80166 0.861084C9.06611 1.13408 9.06611 1.57551 8.80166 1.8456L4.97546 5.79526C4.71663 6.06825 4.289 6.06825 4.02454 5.79526Z" fill="%234BB5CD"/></svg>');
    height: .8em;
    width: .8em;
    background-repeat: no-repeat;
    background-position: center;
}

.rcm-mega-menu-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    background: linear-gradient(180deg, #17315A 12.98%, #122748 51.92%, #08162C 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    padding: 40px 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.rcm-mega-menu-item:hover .rcm-mega-menu-content,
.rcm-mega-menu-item:focus-within .rcm-mega-menu-content {
    opacity: 1;
    visibility: visible;
}

.rcm-mega-menu-container {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Base styles for the content inside */
.rcm-mega-menu-container h2, 
.rcm-mega-menu-container h3 {
    margin-top: 0;
    color: #004a99;
}

.rcm-mega-menu-container .wp-block-columns {
    display: flex;
    gap: 40px;
    margin: 0;
}

.rcm-mega-menu-container .wp-block-column {
    flex: 1;
}

/* Adjusting for the specific layout in screenshot */
.rcm-mega-menu-left {
    border-right: 1px solid #004a99;
    padding-right: 40px;
}

.rcm-mega-menu-left h2 {
    margin-bottom: 20px;
    font-weight: 700;
}

.rcm-mega-menu-left h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.rcm-mega-menu-left ul {
    padding-left: 0;
    list-style: none;
}

.rcm-mega-menu-left li {
    margin-bottom: 8px;
    color: #666;
}

.rcm-mega-menu-right {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 20px;
}

/* Specific inner content styling */
.rcm-mega-menu-link-item {
    margin-bottom: 10px;
}

.rcm-mega-menu-link-item h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    font-weight: 600;
}

.rcm-mega-menu-link-item p {
    margin-top: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.about-link-box {
    background: #1A3560;
    border: 1px solid #1A3560;
    border-radius: 8px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: #fff;
}

.about-link-box a h3 {
    color: #fff;
}
.about-link-box a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #fff;
    width: 100%;
}

.about-link-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.about-link-box h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.about-link-box i,
.about-link-box .dashicons {
    font-size: 1.2rem;
    color: #4bb5cd;
    width: auto;
    height: auto;
}

.affiliates-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #4bb5cd;
}

.affiliates-section h6 {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: #1a3360;
    margin-bottom: 20px;
}

.affiliates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.affiliates-grid > p {
    margin: 0;
}

.affiliates-grid a {
    color: #004a99;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.blue-arrow {
    color: #4BB5CD;
    margin-left: 5px;
    font-weight: bold;
}

.rcm-mega-menu-item:hover > .rcm-mega-menu-trigger::after {
    rotate: 180deg;
}
.rcm-mega-menu-item:hover > .rcm-mega-menu-trigger {
    background: #17315A;
    color: #fff;
}
