/**
 * Yakup Stucadoors — mega menu: wit paneel over de volle breedte met een
 * uitgelicht beeld, de diensten, USP's en een CTA. Hoort bij de header.
 */

/* ----------------------------------------------------------- mega menu */

/* Het paneel loopt van rand tot rand onder de header; de inhoud lijnt uit
   op dezelfde wrap als de balk. Zodra het opent wordt de header wit, zodat
   balk en paneel één vlak vormen. */

.yk-header {
    transition: background-color 240ms var(--dc-ease-default);
}

.yk-header.is-mega-open {
    background: #ffffff;
}

@media (min-width: 1024px) {
    /* De balk positioneert niet, zodat het mega menu zich aan de hele
       header (volle breedte) meet in plaats van aan de wrap. */
    .yk-header__bar {
        position: static;
    }
}

.yk-mega {
    --yk-mega-ease: var(--dc-ease-default);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--dc-border-light);
    visibility: hidden;
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    pointer-events: none;
    transition: opacity 260ms var(--yk-mega-ease), clip-path 420ms var(--yk-mega-ease), visibility 0s linear 420ms;
}

/* Brug tussen menu-item en paneel, zodat hover niet wegvalt. */
.yk-mega::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 20px;
}

/* Dimt de pagina onder het paneel. */
.yk-mega::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 100vh;
    background: rgba(var(--dc-title-rgb), 0.28);
    pointer-events: none;
}

@media (hover: hover) {
    .yk-nav__item--mega:hover:not(.is-closed) .yk-mega {
        visibility: visible;
        opacity: 1;
        clip-path: inset(-20px 0 -100vmax 0);
        pointer-events: auto;
        transition-delay: 0s;
    }
}

.yk-nav__item--mega:focus-within:not(.is-closed) .yk-mega,
.yk-nav__item--mega.is-open .yk-mega {
    visibility: visible;
    opacity: 1;
    clip-path: inset(-20px 0 -100vmax 0);
    pointer-events: auto;
    transition-delay: 0s;
}

.yk-mega__panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.7fr) minmax(0, 0.95fr);
    gap: clamp(28px, 3vw, 48px);
    padding-block: 36px 32px;
}

/* Inhoud komt getrapt binnen. */
.yk-mega__media,
.yk-mega__main,
.yk-mega__aside {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 360ms var(--yk-mega-ease), transform 360ms var(--yk-mega-ease);
}

.yk-nav__item--mega:is(.is-open, :focus-within):not(.is-closed) :is(.yk-mega__media, .yk-mega__main, .yk-mega__aside) {
    opacity: 1;
    transform: none;
}

@media (hover: hover) {
    .yk-nav__item--mega:hover:not(.is-closed) :is(.yk-mega__media, .yk-mega__main, .yk-mega__aside) {
        opacity: 1;
        transform: none;
    }
}

.yk-mega__main {
    transition-delay: 60ms;
}

.yk-mega__aside {
    transition-delay: 120ms;
}

.yk-mega__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-family: var(--dc-font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dc-text-light);
}

.yk-mega__mark {
    flex: none;
    width: 24px;
    height: 12px;
    overflow: visible;
}

.yk-mega__mark path {
    fill: none;
    stroke: var(--dc-primary);
    stroke-width: 2.4;
    stroke-linecap: round;
}

/* --- uitgelicht beeld: masker met een stucstreek als onderrand */

.yk-mega__media {
    position: relative;
    align-self: stretch;
    margin: 0;
    min-height: 400px;
    border-radius: var(--dc-radius-xl);
    background: var(--dc-bg-alt);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 125' preserveAspectRatio='none'%3E%3Cpath d='M0 7Q0 0 7 0h86q7 0 7 7v104c-10 7-20-3-33 2s-25 10-37 5-17-8-30-2z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 125' preserveAspectRatio='none'%3E%3Cpath d='M0 7Q0 0 7 0h86q7 0 7 7v104c-10 7-20-3-33 2s-25 10-37 5-17-8-30-2z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.yk-mega__shot {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 420ms var(--yk-mega-ease), transform 900ms var(--yk-mega-ease);
}

.yk-mega__shot.is-active {
    opacity: 1;
    transform: none;
}

.yk-mega__shot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(var(--dc-title-rgb), 0) 45%, rgba(var(--dc-title-rgb), 0.72) 100%);
}

.yk-mega .yk-mega__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yk-mega__caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 15%;
    z-index: 1;
    display: grid;
    gap: 4px;
    color: #ffffff;
}

.yk-mega__count {
    font-family: var(--dc-font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--dc-primary-light);
}

.yk-mega__caption strong {
    font-family: var(--dc-font-heading);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.15;
}

/* --- diensten */

.yk-mega__cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.yk-mega__cat {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 40px 14px 14px;
    border-radius: var(--dc-radius-lg);
    text-decoration: none;
    color: var(--dc-title);
    transition: background-color var(--dc-duration-fast) ease-out;
}

.yk-mega__ico {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px 14px 14px 4px;
    background: var(--dc-bg-alt);
    color: var(--dc-title);
    transition: background-color var(--dc-duration-normal) ease-out, color var(--dc-duration-normal) ease-out, border-radius var(--dc-duration-normal) var(--yk-mega-ease);
}

.yk-mega__text {
    display: grid;
    gap: 4px;
    padding-top: 2px;
}

.yk-mega__text strong {
    font-family: var(--dc-font-heading);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.yk-mega__text span {
    font-size: 13px;
    line-height: 1.5;
    color: var(--dc-text);
}

.yk-mega__go {
    position: absolute;
    top: 50%;
    right: 14px;
    margin-top: -8px;
    color: var(--dc-primary-dark);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--dc-duration-fast) ease-out, transform var(--dc-duration-normal) var(--yk-mega-ease);
}

.yk-mega__cat.is-active,
.yk-mega__cat:focus-visible {
    background: var(--dc-bg-alt);
}

.yk-mega__cat.is-active .yk-mega__ico,
.yk-mega__cat:focus-visible .yk-mega__ico {
    background: var(--dc-title);
    color: var(--dc-primary-light);
    border-radius: 4px 14px 14px 14px;
}

.yk-mega__cat.is-active .yk-mega__go,
.yk-mega__cat:focus-visible .yk-mega__go {
    opacity: 1;
    transform: none;
}

.yk-mega__cat[aria-current="page"] .yk-mega__text strong {
    color: var(--dc-primary-dark);
}

/* --- waarom Yakup + CTA */

.yk-mega__aside {
    display: grid;
    align-content: start;
}

.yk-mega__usps {
    display: grid;
    gap: 12px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.4;
    color: var(--dc-title);
}

.yk-mega__usps li {
    display: flex;
    gap: 12px;
    align-items: center;
}

.yk-mega__usp-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--dc-border);
    border-radius: 50%;
    color: var(--dc-primary-dark);
}

.yk-mega__cta {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 24px 22px 18px;
    border-radius: var(--dc-radius-xl);
    background: var(--dc-bg-alt);
    overflow: hidden;
}

.yk-mega__swipe {
    position: absolute;
    top: 10px;
    right: 8px;
    width: 120px;
    height: auto;
    overflow: visible;
    pointer-events: none;
}

.yk-mega__swipe-line {
    fill: none;
    stroke: var(--dc-primary);
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0.55;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 900ms var(--yk-mega-ease) 200ms;
}

.yk-mega__swipe-tool {
    fill: none;
    stroke: var(--dc-primary-dark);
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
    transform: translate(-70px, 14px) rotate(-8deg);
    transform-box: view-box;
    transition: transform 900ms var(--yk-mega-ease) 200ms;
}

.yk-nav__item--mega:is(.is-open, :focus-within):not(.is-closed) .yk-mega__swipe-line {
    stroke-dashoffset: 0;
}

.yk-nav__item--mega:is(.is-open, :focus-within):not(.is-closed) .yk-mega__swipe-tool {
    transform: none;
}

@media (hover: hover) {
    .yk-nav__item--mega:hover:not(.is-closed) .yk-mega__swipe-line {
        stroke-dashoffset: 0;
    }

    .yk-nav__item--mega:hover:not(.is-closed) .yk-mega__swipe-tool {
        transform: none;
    }
}

.yk-mega__cta-title {
    max-width: 62%;
    margin: 0;
    font-family: var(--dc-font-heading);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--dc-title);
}

.yk-mega__cta-text {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--dc-text);
}

.yk-mega__cta .yk-btn {
    min-height: 48px;
    padding-block: 12px;
}

.yk-mega__phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    font-size: 13px;
    color: var(--dc-text);
    text-decoration: none;
}

.yk-mega__phone strong {
    font-weight: 600;
    color: var(--dc-title);
}

/* --- onderbalk */

.yk-mega__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 56px;
    font-size: 13px;
    color: var(--dc-text);
    /* De rand loopt alleen over de inhoud, niet over de gutter. */
    background: linear-gradient(var(--dc-border-light), var(--dc-border-light)) top / calc(100% - 2 * var(--dc-gutter)) 1px no-repeat;
}

.yk-mega__areas {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.yk-mega__areas .yk-icon {
    color: var(--dc-primary-dark);
}

.yk-mega__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    font-weight: 600;
    color: var(--dc-title);
    text-decoration: none;
}

.yk-mega__all .yk-icon {
    transition: transform var(--dc-duration-normal) var(--yk-mega-ease);
}

@media (hover: hover) {
    .yk-mega__phone:hover strong,
    .yk-mega__all:hover {
        color: var(--dc-primary-dark);
    }

    .yk-mega__all:hover .yk-icon {
        transform: translateX(4px);
    }
}

@media (max-width: 1279px) {
    .yk-mega__panel {
        grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    }

    .yk-mega__media {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yk-mega,
    .yk-mega *,
    .yk-mega *::after {
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}
