/* =============================================
   MEGA MENU STYLES
   ============================================= */

/* Dropdown Container */
.mega-menu-dropdown {
    position: fixed;
    top: 100px;
    border-radius: 20px;
    left: 0;
    right: 0;
    width: 100%;
    background: rgb(255 255 255);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(152, 194, 169, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08),
        0 4px 20px rgba(0, 0, 0, 0.04);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 100px 0 30px 0;
    pointer-events: none;
    padding: 50px 0px;
}

.mega-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Chevron rotation */
.mega-menu-trigger:hover .mega-chevron,
.mega-menu-dropdown.active~.logo-menu .mega-chevron {
    transform: rotate(180deg);
}

/* Inner Layout */
.mega-menu-inner {
    display: flex;
    gap: 30px;
    align-items: stretch;
    min-height: 280px;
}

/* Categories Section */
.mega-menu-categories {
    flex: 1;
}

.mega-menu-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #434343;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(152, 194, 169, 0.2);
}

/* Categories Grid */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

/* Category Card */
.mega-menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px 16px;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(152, 194, 169, 0.1);
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.mega-menu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(152, 194, 169, 0.08), rgba(226, 167, 154, 0.08));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mega-menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(152, 194, 169, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(152, 194, 169, 0.25);
}

.mega-menu-card:hover::before {
    opacity: 1;
}

/* Card Icon */
.mega-menu-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.mega-menu-card:hover .mega-menu-card-icon {
    transform: scale(1.08) rotate(-3deg);
}

/* Card Info */
.mega-menu-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.mega-menu-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #434343;
    transition: color 0.3s ease;
}

.mega-menu-card:hover .mega-menu-card-name {
    color: #98C2A9;
}

.mega-menu-card-desc {
    font-size: 11px;
    color: #6E6A66;
    opacity: 0.7;
    line-height: 1.5;
}

/* Featured Section */
.mega-menu-featured {
    width: 260px;
    flex-shrink: 0;
}

.mega-menu-featured-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    height: 100%;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
}

.mega-menu-featured-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #98C2A9, #7db495, #E2A79A);
    background-size: 200% 200%;
    animation: megaGradient 6s ease infinite;
}

@keyframes megaGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.mega-menu-featured-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 70%);
}

.mega-menu-featured-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mega-menu-featured-badge {
    display: inline-block;
    width: fit-content;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.mega-menu-featured-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    margin: 0;
}

.mega-menu-featured-desc {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.6;
    margin: 0;
}

.mega-menu-featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #434343;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 6px;
    width: fit-content;
    transition: all 0.3s ease;
}

.mega-menu-featured-btn:hover {
    background: #434343;
    color: white;
    transform: scale(1.03);
}

/* Decorative elements in featured */
.mega-menu-featured-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 20px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.mega-menu-featured-card::after {
    content: '';
    position: absolute;
    top: 30px;
    left: -20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 12px solid rgba(255, 255, 255, 0.08);
    z-index: 1;
}

/* Staggered animation for cards */
.mega-menu-dropdown.active .mega-menu-card {
    animation: megaCardIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(15px);
}

.mega-menu-dropdown.active .mega-menu-card:nth-child(1) {
    animation-delay: 0.05s;
}

.mega-menu-dropdown.active .mega-menu-card:nth-child(2) {
    animation-delay: 0.1s;
}

.mega-menu-dropdown.active .mega-menu-card:nth-child(3) {
    animation-delay: 0.15s;
}

.mega-menu-dropdown.active .mega-menu-card:nth-child(4) {
    animation-delay: 0.2s;
}

.mega-menu-dropdown.active .mega-menu-card:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes megaCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-menu-dropdown.active .mega-menu-featured {
    animation: megaFeaturedIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards;
    opacity: 0;
    transform: translateX(-20px);
}

@keyframes megaFeaturedIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Overlay behind mega menu */
.mega-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    z-index: 48;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    pointer-events: none;
}

.mega-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 1024px) {

    .mega-menu-dropdown,
    .mega-menu-overlay {
        display: none !important;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .mega-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mega-menu-featured {
        width: 220px;
    }
}