/* ═══════════════════════════════════════════════════════════
   OTEF 360° PREMIUM MEGA MENU
   Double-column layout: Branding Sidebar + Feature Grid
   ═══════════════════════════════════════════════════════════ */

/* Wrapper for the nav item with dropdown */
.nav-item-360 {
    position: relative;
}

/* Trigger link styling */
.nav-link-360 {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link-360 .dropdown-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

.nav-item-360:hover .dropdown-arrow,
.nav-item-360.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* ═══════════════════════════════════
   PREMIUM MEGA MENU PANEL
   ═══════════════════════════════════ */
.mega-menu {
    position: absolute;
    top: calc(100% + 20px); /* slightly lower for effect */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* start slightly low */
    width: max-content;
    min-width: 700px;
    max-width: 800px;
    background: rgba(15, 12, 30, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.2rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(168, 85, 247, 0.1);
}

/* Show on hover/open */
.nav-item-360:hover .mega-menu,
.nav-item-360.open .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0); /* slide up */
}

/* Double column layout container */
.mega-menu__container {
    display: flex;
    gap: 1.5rem;
}

/* Sidebar Branding Area */
.mega-menu__branding {
    flex: 0 0 240px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.mega-menu__branding::before {
    content: '';
    position: absolute;
    top: -50px; left: -50px;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.mega-menu__branding h4 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 0.8rem;
    font-family: 'Heebo', sans-serif;
    color: #fff;
}

.mega-menu__branding p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 1.5rem;
    font-family: 'Heebo', sans-serif;
    flex-grow: 1;
}

.mega-menu__branding-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fbbf24;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mega-menu__branding-cta:hover {
    color: #fff;
    gap: 10px;
}

/* Features Grid */
.mega-menu__grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    align-content: flex-start;
}

/* Grid Card */
.mega-menu__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 14px;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    position: relative;
}

.mega-menu__card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.mega-menu__card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Icon Colors */
.mega-menu__card-icon.gold { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1)); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.mega-menu__card-icon.purple { background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(139, 92, 246, 0.1)); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }
.mega-menu__card-icon.cyan { background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(8, 145, 178, 0.1)); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.3); }
.mega-menu__card-icon.green { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1)); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.mega-menu__card-icon.rose { background: linear-gradient(135deg, rgba(251, 113, 133, 0.2), rgba(244, 63, 94, 0.1)); color: #fb7185; border: 1px solid rgba(251, 113, 133, 0.3); }
.mega-menu__card-icon.indigo { background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(99, 102, 241, 0.1)); color: #818cf8; border: 1px solid rgba(129, 140, 248, 0.3); }

/* Card Text */
.mega-menu__card-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mega-menu__card-text h4 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Heebo', sans-serif;
}

.mega-menu__card-text p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0;
    font-family: 'Heebo', sans-serif;
    line-height: 1.4;
}

/* ═══════════════════════════════════
   MOBILE — Accordion style stacked list
   ═══════════════════════════════════ */

@media (max-width: 991px) {
    .mega-menu {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        min-width: 100%;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 0;
        margin-top: 5px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-item-360:hover .mega-menu,
    .nav-item-360.open .mega-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: none;
    }

    /* Important: We rely on JS click to add .open on mobile, avoiding annoying hover */
    .nav-item-360:hover .mega-menu {
        display: none;
    }
    .nav-item-360.open .mega-menu {
        display: block;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .mega-menu__container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 0.5rem 1rem 0.5rem;
    }

    /* Hide the large branding sidebar on mobile or heavily minimize it */
    .mega-menu__branding {
        padding: 1rem;
        border-radius: 12px;
        flex: none;
    }
    .mega-menu__branding p {
        display: none; /* Keep it concise entirely on mobile */
    }

    .mega-menu__grid {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .mega-menu__card {
        padding: 0.8rem;
        border-radius: 12px;
        background: rgba(255,255,255,0.02);
        border: 1px solid rgba(255,255,255,0.05);
        margin-bottom: 0.3rem;
    }

    .mega-menu__card-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .mega-menu__card-text h4 { font-size: 0.9rem; }
    .mega-menu__card-text p { font-size: 0.75rem; }
}

/* ═══════════════════════════════════
   EXPLORE SECTION (otef360.html)
   Premium glassmorphism card grid
   ═══════════════════════════════════ */

.explore-section {
    padding: 6rem 24px;
    position: relative;
    overflow: hidden;
}

.explore-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), rgba(245, 158, 11, 0.3), transparent);
}

.explore-section__header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.explore-section__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Heebo', sans-serif;
    margin-bottom: 1.2rem;
}

.explore-section__header h3 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.8rem;
    font-family: 'Heebo', sans-serif;
}

.explore-section__header p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto;
    font-family: 'Heebo', sans-serif;
}

.explore-section__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.explore-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.explore-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, linear-gradient(90deg, #a855f7, #7e22ce));
    opacity: 0;
    transition: opacity 0.4s;
}

.explore-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--card-glow, rgba(168, 85, 247, 0.06)), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.explore-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.explore-card:hover::before {
    opacity: 1;
}

.explore-card:hover::after {
    opacity: 1;
}

.explore-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
}

.explore-card h4 {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Heebo', sans-serif;
}

.explore-card p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    line-height: 1.65;
    margin: 0;
    font-family: 'Heebo', sans-serif;
}

.explore-card .explore-arrow {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.explore-card:hover .explore-arrow {
    color: #fbbf24;
    transform: translateX(-5px);
}

/* Accent variants */
.explore-card--gold { --card-accent: linear-gradient(90deg, #fbbf24, #f59e0b); --card-glow: rgba(245, 158, 11, 0.06); }
.explore-card--purple { --card-accent: linear-gradient(90deg, #a855f7, #7e22ce); --card-glow: rgba(168, 85, 247, 0.06); }
.explore-card--cyan { --card-accent: linear-gradient(90deg, #06b6d4, #0891b2); --card-glow: rgba(6, 182, 212, 0.06); }
.explore-card--green { --card-accent: linear-gradient(90deg, #22c55e, #16a34a); --card-glow: rgba(34, 197, 94, 0.06); }
.explore-card--rose { --card-accent: linear-gradient(90deg, #fb7185, #f43f5e); --card-glow: rgba(251, 113, 133, 0.06); }
.explore-card--indigo { --card-accent: linear-gradient(90deg, #818cf8, #6366f1); --card-glow: rgba(129, 140, 248, 0.06); }

@media (max-width: 768px) {
    .explore-section__grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .explore-card {
        flex-direction: row;
        text-align: right;
        padding: 1.3rem 1.2rem;
        gap: 1rem;
        border-radius: 16px;
    }

    .explore-card__icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
        flex-shrink: 0;
    }

    .explore-card p {
        display: none;
    }

    .explore-card .explore-arrow {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .explore-section__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Legacy class support — hide old explore-more if present */
.explore-more-section { display: none; }
