/**
 * Mega Menu Styles - ALTIJD GECENTREERD
 * Transtoyou Theme
 */

/* ===========================
   Base Structure
   =========================== */
.tty-nav-menu {
    position: relative;
    z-index: 100;
}

.tty-nav-categories {
    position: relative;
}

/* ===========================
   Dropdown Indicators
   =========================== */
.tty-dropdown-indicator {
    font-size: 12px;
    margin-left: 1px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.has-mega-menu:hover .tty-dropdown-indicator {
    transform: rotate(180deg);
    color: var(--tty-secondary);
}


/* ===========================
 4 columns layout voor General Health
    =========================== */
    
.tty-mega-menu-columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 40px;
    width: 100%;
}

/* Optioneel: maak de columns iets smaller voor 4 kolommen */
.tty-mega-menu-columns-4 .tty-mega-column {
    min-width: 200px;
}

/* Voor kleinere schermen, schakel terug naar 2x2 grid */
@media (max-width: 1200px) {
    .tty-mega-menu-columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* ===========================
   MEGA MENU - ALTIJD MIDDEN VAN PAGINA
   =========================== */
.tty-mega-menu {
    position: fixed !important; /* Fixed positioning ten opzichte van viewport */
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: var(--tty-bg-primary);
    box-shadow: 0 10px 40px rgba(0, 95, 95, 0.15);
    border-top: 3px solid var(--tty-primary);
    border-bottom: 1px solid rgba(0, 95, 95, 0.06);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    width: 1360px;
    max-width: calc(100vw - 40px);
    padding: 0 20px;
    border-radius: 0px 0px 30px 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fcfc 100%);
}

/* All Categories - rekening houdend met header hoogte */
.tty-all-categories-wrapper .tty-mega-menu {
    top: 49px !important;
}

/* Regular Menu Items */
.tty-nav-links > li > .tty-mega-menu {
    top: 50px !important;
}

/* Parent elements */
.tty-all-categories-wrapper {
    position: relative;
}

.tty-nav-links > li {
    position: relative;
    font-size: 16px;
    margin: 0px;
}

/* ===========================
   Hover States
   =========================== */
/* Hover states worden nu via JavaScript gecontroleerd voor delay
.tty-all-categories-wrapper:hover .tty-mega-menu,
.has-mega-menu:hover > .tty-mega-menu {
    opacity: 1;
    visibility: visible;
}
*/

/* Active state via JavaScript */
.tty-all-categories-wrapper.mega-menu-active .tty-mega-menu,
.has-mega-menu.mega-menu-active > .tty-mega-menu {
    opacity: 1;
    visibility: visible;
}


/* ===========================
   Container & Grid
   =========================== */
.tty-mega-menu-container {
    padding: 10px 40px 20px 40px;
    width: 100%;
}

/* 4 columns for All Categories */
.tty-mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    width: 100%;
}

/* 3 columns for regular menus */
.tty-mega-menu-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    width: 100%;
}

/* Column styles */
.tty-mega-column {
    min-height: 100%;
}

/* ===========================
   Typography & Headers
   =========================== */
.tty-mega-title,
.tty-mega-column-title,
.menu-header-txt {
    font-size: 18px;
    font-weight: 600;
    color: var(--tty-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tty-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tty-mega-title i,
.menu-header-txt i {
    font-size: 20px;
    color: var(--tty-secondary);
}

/* ===========================
   Lists & Links
   =========================== */
.tty-mega-list,
.tty-mega-column-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tty-mega-list li,
.tty-mega-column-list li {
    margin-bottom: 12px;
}

/* Link styles */
.tty-mega-list a,
.tty-mega-column-list a,
.menu-header-link {
    color: var(--tty-text-secondary);
    text-decoration: none;
    font-size: 15px;
    display: inline-block !important;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.tty-mega-list a:hover,
.tty-mega-column-list a:hover,
.menu-header-link:hover {
    color: var(--tty-primary);
}

/* Underline effect */
.tty-mega-list a::before,
.tty-mega-column-list a::before,
.menu-header-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--tty-secondary);
    transition: width 0.3s ease;
}

.tty-mega-list a:hover::after,
.tty-mega-column-list a:hover::after,
.menu-header-link:hover::after {
    width: 100%;
    left: 0;
}


.tty-mega-list a:hover::before,
.tty-mega-column-list a:hover::before,
.menu-header-link:hover::before {
    width: 100%;
}

/* ===========================
   Featured Section
   =========================== */
.tty-mega-featured {
    grid-column: 1 / -1;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--tty-border-light);
}

.tty-featured-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.tty-featured-item i {
    color: var(--tty-secondary);
}

.tty-featured-item a {
    color: var(--tty-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.tty-featured-item a:hover {
    color: var(--tty-secondary);
}

.tty-divider {
    color: var(--tty-text-muted);
    margin: 0 10px;
}

/* ===========================
   Animations
   =========================== */
.tty-mega-menu-grid > *,
.tty-mega-menu-columns > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
}

.tty-mega-menu-grid > *:nth-child(1),
.tty-mega-menu-columns > *:nth-child(1) {
    animation-delay: 0.05s;
}

.tty-mega-menu-grid > *:nth-child(2),
.tty-mega-menu-columns > *:nth-child(2) {
    animation-delay: 0.1s;
}

.tty-mega-menu-grid > *:nth-child(3),
.tty-mega-menu-columns > *:nth-child(3) {
    animation-delay: 0.15s;
}

.tty-mega-menu-grid > *:nth-child(4) {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Dark Mode Support
   =========================== */
[data-theme="dark"] .tty-mega-menu {
    background: var(--tty-bg-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tty-mega-list a,
[data-theme="dark"] .tty-mega-column-list a,
[data-theme="dark"] .menu-header-link {
    color: var(--tty-text-secondary);
}

[data-theme="dark"] .tty-mega-list a:hover,
[data-theme="dark"] .tty-mega-column-list a:hover,
[data-theme="dark"] .menu-header-link:hover {
    color: var(--tty-primary-light);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
    .tty-mega-menu,
    .tty-dropdown-indicator {
        display: none;
    }
}

/* ===========================
   Video Preview in Mega Menu
   =========================== */
.tty-mega-video-preview {
    margin-top: 20px;
}

.tty-video-trigger {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
}

.tty-video-thumbnail {
    position: relative;
    width: 100%;
    max-width: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 95, 95, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tty-video-trigger:hover .tty-video-thumbnail {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 95, 95, 0.25);
}

.tty-video-thumbnail video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    pointer-events: none;
}

.tty-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 95, 95, 0.3);
    transition: background 0.3s ease;
}

.tty-video-trigger:hover .tty-video-play-overlay {
    background: rgba(0, 95, 95, 0.5);
}

.tty-video-play-overlay i {
    font-size: 48px;
    color: var(--tty-text-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.tty-video-trigger:hover .tty-video-play-overlay i {
    transform: scale(1.15);
}

.tty-video-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--tty-primary);
    transition: color 0.3s ease;
}

.tty-video-trigger:hover .tty-video-label {
    color: var(--tty-secondary);
}

/* ===========================
   Video Modal
   =========================== */
.tty-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tty-video-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.tty-video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.6);
}

.tty-video-modal-content {
    position: relative;
    width: 90%;
    background-color: var(--tty-bg-primary, #ffffff);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border-radius: 38px;
    max-width: 850px;
}

.tty-video-modal[aria-hidden="false"] .tty-video-modal-content {
    transform: scale(1);
}

.tty-video-modal-content video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 30px;
}

.tty-popup-close i {
    pointer-events: none;
}

/* Dark mode support */
[data-theme="dark"] .tty-mega-video-preview {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ===========================
   Video Preview in Mega Menu
   =========================== */
.tty-mega-video-preview {
    margin-top: 20px;
}

.tty-video-trigger {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
}

.tty-video-thumbnail {
    position: relative;
    width: 100%;
    max-width: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 95, 95, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tty-video-trigger:hover .tty-video-thumbnail {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 95, 95, 0.25);
}

.tty-video-thumbnail video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    pointer-events: none;
}

.tty-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 95, 95, 0.3);
    transition: background 0.3s ease;
}

.tty-video-trigger:hover .tty-video-play-overlay {
    background: rgba(0, 95, 95, 0.5);
}

.tty-video-play-overlay i {
    font-size: 48px;
    color: var(--tty-text-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.tty-video-trigger:hover .tty-video-play-overlay i {
    transform: scale(1.15);
}

.tty-video-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--tty-primary);
    transition: color 0.3s ease;
}

.tty-video-trigger:hover .tty-video-label {
    color: var(--tty-secondary);
}

/* Mega menu toggle button styling */
.has-mega-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.has-mega-menu > a {
    flex: 1;
}

.tty-mega-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0.5rem;
    color: inherit;
    transition: transform 0.2s ease;
}

.tty-mega-menu-toggle:hover,
.tty-mega-menu-toggle:focus {
    color: var(--tty-primary-color, #0073aa);
}

.tty-mega-menu-toggle[aria-expanded="true"] .tty-dropdown-indicator {
    transform: rotate(180deg);
}
