/* Premium mega menu — Ege Vitalis */

nav.navbar.sticky-top {
    z-index: 1060;
}

body.mega-open {
    overflow: hidden;
}

.navbar-wrapper {
    gap: 12px;
    flex-wrap: nowrap !important;
}

@media (min-width: 1200px) {
    .navbar-brand img {
        height: 68px !important;
        width: auto !important;
    }

    .top-nav {
        order: 0;
        flex: 1 1 auto;
        border-top: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    .top-link {
        font-size: 13.5px;
        padding: 8px 9px;
    }
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
    display: none;
}

.top-link {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #14302f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1;
    padding: 10px 11px;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.top-link .fa-chevron-down {
    font-size: 9px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.top-link:hover,
.top-link:focus-visible,
.top-link.is-open,
.top-link[aria-current="page"] {
    color: #006666;
    background: rgba(0, 102, 102, 0.08);
}

.top-link.is-open .fa-chevron-down {
    transform: rotate(180deg);
}

.navbar-contact {
    flex: none;
}

.mega-trigger {
    display: none !important;
    border: 0;
    background: transparent;
    padding: 0;
    margin-left: 8px;
    cursor: pointer;
    color: inherit;
}

.mega-trigger:hover {
    background: rgba(0, 102, 102, 0.08);
}

.mega-trigger .navbar-toggler-icon::before,
.mega-trigger .navbar-toggler-icon::after,
.mega-trigger .navbar-toggler-icon div {
    transition: transform 0.35s ease, top 0.35s ease, opacity 0.25s ease;
}

.mega-trigger.is-open .navbar-toggler-icon::before {
    top: 1.05rem;
    transform: rotate(45deg);
}

.mega-trigger.is-open .navbar-toggler-icon div {
    opacity: 0;
}

.mega-trigger.is-open .navbar-toggler-icon::after {
    top: 1.05rem;
    transform: rotate(-45deg);
}

.mega-menu[hidden] {
    display: none !important;
}

.mega-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1055;
    display: block;
}

.mega-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 28, 28, 0.48);
    backdrop-filter: blur(7px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mega-menu.is-open .mega-backdrop {
    opacity: 1;
}

.mega-panel {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    width: min(1240px, calc(100% - 28px));
    height: auto;
    max-height: calc(100% - 16px);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(900px 280px at 100% 0%, rgba(0, 163, 163, 0.08), transparent 55%),
        linear-gradient(180deg, #fbf8f3 0%, #f3efe8 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(8, 30, 30, 0.28);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.48s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.mega-menu.is-open .mega-panel {
    opacity: 1;
    transform: none;
}

.mega-head {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 3;
    padding: 0;
    border: 0;
}

.mega-head > div {
    display: none;
}

.mega-head,
.mega-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mega-foot {
    padding: 14px 22px;
}

.navbar-brand {
    flex: none;
}

.mega-kicker {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #006666;
    font-weight: 700;
}

.mega-head-title {
    margin: 2px 0 0;
    font-family: Palatino, "Palatino Linotype", Georgia, serif;
    font-size: 28px;
    line-height: 1;
    color: #14302f;
    font-weight: 500;
}

.mega-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(0, 102, 102, 0.18);
    background: #fff;
    color: #14302f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.mega-close:hover {
    background: #006666;
    color: #fff;
    transform: rotate(90deg);
}

.mega-layout {
    flex: 1;
    min-height: 420px;
    display: block;
    padding: 18px 18px 8px;
}

.mega-rail,
.mega-inline {
    display: none !important;
}

.mega-item {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16px;
    gap: 12px;
    align-items: center;
    text-align: left;
    text-decoration: none;
    color: #173332;
    background: transparent;
    border: 0;
    border-radius: 16px;
    padding: 7px;
    cursor: pointer;
    transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.mega-menu img:not([src]) {
    background: #e4eeed;
}

.mega-item strong {
    display: block;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.mega-item small {
    display: block;
    margin-top: 3px;
    color: #5e7372;
    font-size: 12px;
    line-height: 1.3;
}

.mega-arrow {
    color: #006666;
    font-size: 12px;
    opacity: 0.55;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.mega-item:hover,
.mega-item.is-current {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(12, 48, 48, 0.07);
}

.mega-item.is-current strong {
    color: #006666;
}

.mega-item.is-current .mega-arrow,
.mega-item:hover .mega-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.mega-stage {
    position: relative;
    min-height: 420px;
    height: 420px;
}

.mega-preview,
.mega-cards {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(26px);
    transition: opacity 0.42s ease, transform 0.5s cubic-bezier(0.22, 0.8, 0.24, 1), visibility 0.42s;
}

.mega-preview.is-active,
.mega-cards.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.mega-preview {
    border-radius: 20px;
    overflow: hidden;
    background: #102826;
}

.mega-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    transition: transform 0.8s ease;
}

.mega-preview.is-active img {
    transform: scale(1);
}

.mega-preview-copy {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 18px 18px 16px;
    border-radius: 16px;
    background: rgba(255, 251, 246, 0.94);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.mega-preview-title {
    margin: 6px 0 8px;
    font-family: Palatino, "Palatino Linotype", Georgia, serif;
    font-size: 32px;
    line-height: 1.05;
    color: #14302f;
    font-weight: 500;
}

.mega-preview-text {
    margin: 0;
    color: #3d5554;
    font-size: 14.5px;
    line-height: 1.5;
    max-width: 46ch;
}

.mega-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: #fff;
    background: #006666;
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 650;
    transition: background 0.3s ease, transform 0.3s ease;
}

.mega-preview-link:hover {
    background: #004f4f;
    color: #fff;
    transform: translateY(-1px);
}

.mega-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.mega-cards-kicker {
    margin: 0;
    font-family: Palatino, "Palatino Linotype", Georgia, serif;
    font-size: 26px;
    color: #14302f;
    font-weight: 500;
}

.mega-card-grid,
.mega-inline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
}

.mega-card-grid {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
    padding-bottom: 4px;
}

.mega-card {
    position: relative;
    display: block;
    min-height: 118px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background: #14302f;
    isolation: isolate;
}

.mega-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transform: scale(1.02);
    transition: transform 0.6s ease;
}

.mega-card-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: 36px 12px 11px;
    background: linear-gradient(180deg, transparent, rgba(8, 24, 24, 0.82));
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.mega-card:hover img {
    transform: scale(1.08);
}

.mega-card:hover .mega-card-label {
    color: #fff;
}

.mega-inline {
    display: none;
}

.mega-foot {
    flex: none;
    position: relative;
    z-index: 2;
    background: #f4f1eb;
    border-top: 1px solid rgba(0, 102, 102, 0.1);
    color: #3e5655;
    font-size: 13px;
}

.mega-foot p {
    margin: 0;
}

.mega-phones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #14302f;
    font-weight: 650;
}

.mega-social {
    display: flex;
    gap: 8px;
}

.mega-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #006666;
    background: #fff;
    border: 1px solid rgba(0, 102, 102, 0.16);
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.mega-social a:hover {
    background: #006666;
    color: #fff;
}

.mega-trigger:focus-visible,
.mega-item:focus-visible,
.mega-card:focus-visible,
.mega-close:focus-visible,
.mega-preview-link:focus-visible {
    outline: 2px solid #006666;
    outline-offset: 3px;
}

@media (max-width: 1199.98px) {
    .navbar-wrapper {
        flex-wrap: nowrap !important;
    }

    .top-nav {
        display: none !important;
    }

    .mega-trigger {
        display: inline-flex !important;
        width: 46px;
        height: 46px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        flex: none;
    }

    .mega-panel {
        width: calc(100% - 16px);
        height: calc(100% - 16px);
        max-height: calc(100% - 16px);
        margin: 8px auto;
        border-radius: 22px;
    }

    .mega-head {
        position: static;
        padding: 14px 16px;
        border-bottom: 1px solid rgba(0, 102, 102, 0.1);
    }

    .mega-head > div {
        display: block;
    }

    .mega-layout {
        min-height: 0;
        height: auto;
        overflow: auto;
        padding: 10px 12px 14px;
    }

    .mega-rail {
        display: flex !important;
        width: auto;
        overflow: visible;
        flex-direction: column;
        gap: 4px;
    }

    .mega-stage {
        display: none !important;
    }

    .mega-inline.is-active {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 2px;
        margin: 0 0 8px;
    }

    .mega-inline .mega-card {
        min-height: 0;
        background: transparent;
        color: #173332;
        border-radius: 12px;
    }

    .mega-inline .mega-card-label {
        position: static;
        padding: 8px 12px 8px 8px;
        background: none;
        color: #173332;
        font-size: 14px;
        font-weight: 600;
    }
}

@media (max-width: 991.98px) {
    .mega-panel {
        width: calc(100% - 16px);
        margin: 0 auto;
        border-radius: 0 0 20px 20px;
    }

    .mega-layout {
        min-height: 0;
        overflow: auto;
        padding: 12px 12px 8px;
    }

    .mega-card-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mega-head-title {
        font-size: 24px;
    }

    .mega-foot {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .mega-card {
        min-height: 104px;
    }
}

@media (max-width: 640px) {
    .mega-card-grid,
    .mega-inline.is-active {
        grid-template-columns: 1fr;
    }

    .mega-phones {
        flex-direction: column;
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mega-backdrop,
    .mega-panel,
    .mega-preview,
    .mega-cards,
    .mega-card img,
    .mega-preview img,
    .mega-item,
    .mega-close,
    .mega-trigger .navbar-toggler-icon::before,
    .mega-trigger .navbar-toggler-icon::after,
    .mega-trigger .navbar-toggler-icon div {
        transition: none !important;
    }
}
