.mega-menu {
    display: flex;
    align-items: flex-end;
    position: relative;
    height: 100%;
    min-width: 0;
}

.mega-menu__heads {
    display: flex;
    align-items: flex-end;
    gap: 0.2rem;
    height: 100%;
    padding-top: 8px;
    min-width: 0;
}

.mega-menu__head {
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
    padding: 10px 20px;
    margin: 0.2rem 0;
    background: transparent;
    border: 0 solid transparent;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    color: #696969;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mega-menu__head-label {
    font-weight: 700;
    color: inherit;
}

.mega-menu__head-arrow {
    display: inline-block;
    font-size: 0.8em;
    line-height: 1;
    color: inherit;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mega-menu__head:hover {
    background: #d2e0e5;
    color: #00555d;
    border-color: transparent;
}

.mega-menu__head[aria-expanded="true"] {
    background: #00555d;
    color: #ffffff;
    border-color: #00555d;
}

.mega-menu__head[aria-expanded="true"] .mega-menu__head-label,
.mega-menu__head[aria-expanded="true"] .mega-menu__head-arrow {
    color: #ffffff;
}

.mega-menu__head[aria-expanded="true"] .mega-menu__head-arrow {
    transform: rotate(180deg);
}

.mega-menu__panels {
    position: absolute;
    left: -125px;
    right: -125px;
    top: 100%;
    z-index: 2000;
}

.mega-menu__panel[hidden] {
    display: none !important;
}

.mega-menu__panel {
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 1.75rem 2rem 2rem;
}

.mega-menu__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 2rem;
    align-items: start;
}

.mega-menu__column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
    min-width: 0;
}

.mega-menu__item {
    min-width: 0;
}

.mega-menu__item-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: #696969;
    fill: #696969;
    padding: 10px;
    border-radius: 10px;
    transition: background-color 0.2s ease, color 0.2s ease, fill 0.2s ease;
}

.mega-menu__item-link:hover {
    background: #d2e0e5;
    color: #00555d;
    fill: #00555d;
    text-decoration: none;
}

.mega-menu__item-link:hover .mega-menu__item-title {
    color: #00555d;
}

.mega-menu__item-link > * {
    margin: 0;
}

.mega-menu__item-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.25;
    color: #00555d;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.mega-menu__item-description {
    font-size: 13.5px;
    line-height: 1.4;
    color: #777;
}

.mega-menu__subitems {
    margin-top: 0.35rem;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mega-menu__subitem {
    display: block;
    text-decoration: none;
    color: #555555;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.18rem 0.4rem 0.18rem 10px;
    border-radius: 0.4rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mega-menu__subitem:hover {
    background: #d2e0e5;
    color: #006068;
}

.mega-menu__ad {
    box-sizing: border-box;
    max-width: 100%;
    margin-top: 0.75rem;
}

.mega-menu__ad-link {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: #f3f7f8;
    color: #696969;
    text-decoration: none;
    overflow: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mega-menu__ad-link:hover {
    background: #d2e0e5;
    color: #00555d;
    text-decoration: none;
}

.mega-menu__ad-image {
    flex: 0 0 auto;
    max-width: 120px;
}

.mega-menu__ad-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.mega-menu__ad-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.mega-menu__ad-headline {
    font-size: 16px;
    font-weight: 700;
    color: #00555d;
}

.mega-menu__ad-teaser {
    font-size: 13px;
    line-height: 1.3;
    color: #696969;
}

.mega-menu__ad-button {
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    background: #f28c00;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .mega-menu__ad-link {
        align-items: flex-start;
        flex-direction: column;
    }

    .mega-menu__ad-image {
        flex-basis: auto;
        max-width: 120px;
    }
}
