/**
 * Mega Menu Styles
 *
 * Hardcodiertes Mega-Menü-System mit 7 Hauptmenüpunkten.
 * Alle CSS-Klassen verwenden .fkfl- Präfix.
 * CWV-optimiert: visibility/opacity statt JS show/hide.
 *
 * @package 4kfilmliste
 * @since 2.0
 */

/* ==========================================
   MEGA MENU CONTAINER & NAVIGATION
   ========================================== */

.fkfl-mega-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: center;
}

/* ==========================================
   MENU ITEMS
   ========================================== */

.fkfl-mega-menu-item {
    position: relative;
    margin: 0;
    padding: 0;
}

.fkfl-mega-menu-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 18px;
    color: var(--fkfl-text-dark, #333);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.fkfl-mega-menu-link:hover {
    color: var(--fkfl-primary, #0066cc);
    background-color: rgba(0, 102, 204, 0.05);
}

.fkfl-menu-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.fkfl-mega-menu-item:hover .fkfl-menu-arrow {
    transform: rotate(180deg);
}

/* ==========================================
   MEGA DROPDOWN
   ========================================== */

.fkfl-mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 800px;
    max-width: 1000px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-top: 3px solid var(--fkfl-primary, #0066cc);
    border-radius: 0 0 8px 8px;
    padding: 30px;
    z-index: 1000;

    /* CWV-optimiert: visibility/opacity statt display */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.fkfl-has-mega:hover .fkfl-mega-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Popup-Ausrichtung: Linker Rand für erste Menüpunkte */
.fkfl-align-left .fkfl-mega-dropdown {
    left: 0;
    transform: translateX(0) translateY(-10px);
}

.fkfl-align-left:hover .fkfl-mega-dropdown {
    transform: translateX(0) translateY(0);
}

/* Popup-Ausrichtung: Rechter Rand für letzte Menüpunkte */
.fkfl-align-right .fkfl-mega-dropdown {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(-10px);
}

.fkfl-align-right:hover .fkfl-mega-dropdown {
    transform: translateX(0) translateY(0);
}

.fkfl-mega-dropdown-inner {
    width: 100%;
}

/* ==========================================
   GRID LAYOUTS
   ========================================== */

.fkfl-mega-dropdown-grid {
    display: grid;
    gap: 30px;
}

.fkfl-grid-2col {
    grid-template-columns: repeat(2, 1fr);
}

.fkfl-grid-3col {
    grid-template-columns: repeat(3, 1fr);
}

.fkfl-grid-4col {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================
   DROPDOWN COLUMNS
   ========================================== */

.fkfl-mega-dropdown-column h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--fkfl-primary, #0066cc);
    margin: 0 0 12px 0;
    letter-spacing: 0.5px;
}

/* ==========================================
   LINK LISTS
   ========================================== */

.fkfl-mega-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fkfl-mega-link-list li {
    margin-bottom: 10px;
}

.fkfl-mega-link-list li:last-child {
    margin-bottom: 0;
}

.fkfl-mega-link-list a {
    color: var(--fkfl-text-dark, #333);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.fkfl-mega-link-list a:hover {
    color: var(--fkfl-primary, #0066cc);
    padding-left: 4px;
}

/* ==========================================
   VISUAL CARDS
   ========================================== */

.fkfl-mega-card {
    display: block;
    text-align: center;
    text-decoration: none;
    color: var(--fkfl-text-dark, #333);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
}

.fkfl-mega-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.fkfl-mega-card--soon {
    opacity: .55; cursor: default; pointer-events: none;
}
.fkfl-mega-card--soon:hover { transform: none; box-shadow: none; }
.fkfl-mega-link-soon {
    color: #94a3b8; cursor: default; pointer-events: none;
}
.fkfl-mega-soon-badge {
    display: inline-block; font-size: 10px; font-weight: 600;
    letter-spacing: .05em; color: #64748b;
    background: #f1f5f9; border-radius: 10px;
    padding: 1px 6px; margin-left: 4px; vertical-align: middle;
}

.fkfl-mega-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.fkfl-mega-card-image {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f5f5f5;
    transition: transform 0.2s ease;
}

.fkfl-mega-card:hover .fkfl-mega-card-image {
    transform: scale(1.05);
}

.fkfl-mega-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0 4px 0;
    color: var(--fkfl-text-dark, #333);
}

.fkfl-mega-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0 4px 0;
    color: var(--fkfl-text-dark, #333);
}

.fkfl-mega-card-count {
    font-size: 12px;
    color: #999;
    margin: 0 0 8px 0;
}

.fkfl-mega-card-description {
    font-size: 12px;
    color: #666;
    margin: 0 0 8px 0;
}

/* Brand Logo Text */
.fkfl-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* ==========================================
   NEWS CARD BACKGROUNDS
   ========================================== */

.fkfl-card-specials .fkfl-mega-card-image {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.fkfl-card-deals .fkfl-mega-card-image {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

/* ==========================================
   HDR & BILD CARD BACKGROUNDS
   ========================================== */

.fkfl-card-dolby-vision .fkfl-mega-card-image {
    background: repeating-linear-gradient(
        45deg,
        #000 0px,
        #000 10px,
        #fff 10px,
        #fff 20px
    );
}

.fkfl-card-hdr10-plus .fkfl-mega-card-image {
    background: conic-gradient(
        from 0deg,
        #ff0000,
        #ffff00,
        #00ff00,
        #00ffff,
        #0000ff,
        #ff00ff,
        #ff0000
    );
}

.fkfl-card-hdr10 .fkfl-mega-card-image {
    background: radial-gradient(circle, #4a90e2 0%, #1a5490 100%);
}

.fkfl-card-kalibrierung .fkfl-mega-card-image {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* ==========================================
   AUDIO CARD BACKGROUNDS
   ========================================== */

.fkfl-card-dolby-atmos .fkfl-mega-card-image {
    background: linear-gradient(135deg, #0a2342 0%, #2980b9 100%);
}

.fkfl-card-dts-x .fkfl-mega-card-image {
    background: linear-gradient(135deg, #006064 0%, #00acc1 100%);
}

.fkfl-card-auro-3d .fkfl-mega-card-image {
    background: linear-gradient(135deg, #c62828 0%, #e57373 100%);
}

.fkfl-card-audio-setup .fkfl-mega-card-image {
    background: linear-gradient(135deg, #455a64 0%, #607d8b 100%);
}

/* ==========================================
   PACKAGING TYPE BACKGROUNDS
   ========================================== */

.fkfl-packaging-mediabook {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
}

.fkfl-packaging-steelbook {
    background: linear-gradient(135deg, #37474f 0%, #78909c 100%);
}

.fkfl-packaging-collectors-edition {
    background: linear-gradient(135deg, #bf360c 0%, #ff5722 100%);
}

.fkfl-packaging-digipak {
    background: linear-gradient(135deg, #1b5e20 0%, #4caf50 100%);
}

.fkfl-packaging-digibook {
    background: linear-gradient(135deg, #4a148c 0%, #9c27b0 100%);
}

.fkfl-packaging-futurepak {
    background: linear-gradient(135deg, #006064 0%, #00bcd4 100%);
}

.fkfl-packaging-hartbox {
    background: linear-gradient(135deg, #b71c1c 0%, #ef5350 100%);
}

/* ==========================================
   HERSTELLER/BRAND BACKGROUNDS
   ========================================== */

.fkfl-brand-panasonic .fkfl-mega-card-image {
    background: #000000;
}

.fkfl-brand-sony .fkfl-mega-card-image {
    background: #1a1a1a;
}

.fkfl-brand-lg-electronics .fkfl-mega-card-image {
    background: linear-gradient(135deg, #a50034 0%, #d62353 100%);
}

.fkfl-brand-samsung .fkfl-mega-card-image {
    background: #1428a0;
}

.fkfl-brand-oppo .fkfl-mega-card-image {
    background: #00b0f0;
}

.fkfl-brand-philips .fkfl-mega-card-image {
    background: #0e4194;
}

.fkfl-brand-pioneer .fkfl-mega-card-image {
    background: linear-gradient(135deg, #8b0000 0%, #dc143c 100%);
}

.fkfl-brand-cambridge-audio .fkfl-mega-card-image {
    background: #2c3e50;
}

.fkfl-brand-magnetar .fkfl-mega-card-image {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
}

.fkfl-brand-audioblock .fkfl-mega-card-image {
    background: linear-gradient(135deg, #263238 0%, #546e7a 100%);
}

.fkfl-card-recorder .fkfl-mega-card-image {
    background: linear-gradient(135deg, #424242 0%, #757575 100%);
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */

@media (max-width: 768px) {
    /* Hide desktop mega menu on mobile */
    .fkfl-mega-menu {
        display: none;
    }
}

/* ==========================================
   DROPDOWN SIZE VARIATIONS
   ========================================== */

/* Kleineres Dropdown für News (2-spaltig) */
.fkfl-align-left .fkfl-mega-dropdown .fkfl-grid-2col {
    min-width: 400px;
}

.fkfl-align-left .fkfl-mega-dropdown {
    min-width: 400px;
}

/* Normales Dropdown für Filme & Serien (4-spaltig) */
.fkfl-mega-dropdown .fkfl-grid-4col {
    min-width: 900px;
}

/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .fkfl-mega-dropdown {
        min-width: 700px;
        max-width: 90vw;
    }

    .fkfl-align-left .fkfl-mega-dropdown {
        min-width: 350px;
    }

    .fkfl-mega-menu-link {
        padding: 18px 14px;
        font-size: 13px;
    }

    .fkfl-grid-4col {
        grid-template-columns: repeat(3, 1fr);
    }

    .fkfl-grid-2col {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   RESPONSIVE - LARGE DESKTOP
   ========================================== */

@media (min-width: 1400px) {
    .fkfl-mega-dropdown {
        min-width: 1000px;
    }

    .fkfl-mega-menu-link {
        padding: 20px 22px;
        font-size: 15px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.fkfl-mega-menu-link:focus,
.fkfl-mega-link-list a:focus,
.fkfl-mega-card:focus {
    outline: 2px solid var(--fkfl-primary, #0066cc);
    outline-offset: 2px;
}

/* Screen reader only text */
.fkfl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================
   LOADING STATE (Optional)
   ========================================== */

.fkfl-mega-dropdown.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.fkfl-mega-dropdown.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(0, 102, 204, 0.2);
    border-top-color: var(--fkfl-primary, #0066cc);
    border-radius: 50%;
    animation: fkfl-spin 0.8s linear infinite;
}

@keyframes fkfl-spin {
    to {
        transform: rotate(360deg);
    }
}
