/**
 * Mobile Menu Styles - Matching Mega Menu Design
 */

/* Mobile menu backdrop */
#mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

#mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile menu container - positioned directly under header */
#mobile-menu {
    position: fixed;
    top: var(--header-height, 88px);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height, 88px));
    background: #262626;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

#mobile-menu.active {
    transform: translateX(0);
}

/* Close button - modern floating style */
.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #f5f5f0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover,
.mobile-menu-close:active {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Menu content wrapper */
#mobile-menu-content {
    padding: 1.5rem;
    min-height: 100%;
}

/* Navigation */
#mobile-menu-content nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Menu items - styled like mega menu columns */
#mobile-menu-content nav ul li {
    list-style: none;
}

#mobile-menu-content nav ul li a {
    display: block;
    padding: 1rem 1.25rem;
    color: #f5f5f0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

#mobile-menu-content nav ul li a:hover,
#mobile-menu-content nav ul li a:active {
    background: rgba(255, 255, 255, 0.1);
}

#mobile-menu-content nav ul li.current-menu-item a,
#mobile-menu-content nav ul li.current_page_item a {
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* Promotional Card - Mobile Version (matching mega menu card) */
.mobile-menu-card {
    margin-top: 1rem;
}

.mobile-promo-card {
    background: #171717;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

/* Banner with infinite slide (matching mega menu) */
.mobile-card-banner {
    background: #f5f5f0;
    padding: 0.5rem 0;
    overflow: hidden;
    position: relative;
    transform: rotate(-2deg);
    transform-origin: top left;
    margin: -0.5rem 0 1rem -0.5rem;
    width: calc(100% + 1rem);
}

.mobile-banner-content {
    display: flex;
    align-items: center;
    animation: infiniteSlide 15s linear infinite;
    will-change: transform;
}

.mobile-banner-text {
    color: #1a4a8a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    white-space: nowrap;
    padding-right: 2rem;
}

@keyframes infiniteSlide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Card inner content */
.mobile-card-inner {
    padding: 1.5rem;
}

/* Card image */
.mobile-card-image {
    width: 100%;
    height: 10rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.mobile-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card title with mixed fonts */
.mobile-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f5f5f0;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

.mobile-card-title .font-heading {
    font-family: 'Helvetica Now Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
}

.mobile-card-title .font-denton {
    font-family: 'Denton', Georgia, serif;
    font-style: italic;
    font-weight: 400;
}

/* Card description */
.mobile-card-description {
    color: rgba(245, 245, 240, 0.7);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1.25rem 0;
}

/* Card link/button */
.mobile-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f5f5f0;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-card-link:hover,
.mobile-card-link:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.mobile-card-arrow {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.mobile-card-link:hover .mobile-card-arrow {
    transform: translateX(4px);
}

/* Fade-in animations when menu opens */
#mobile-menu.active #mobile-menu-content nav ul li {
    animation: fadeInUp 0.4s ease forwards;
}

#mobile-menu.active #mobile-menu-content nav ul li:nth-child(1) {
    animation-delay: 0.1s;
}

#mobile-menu.active #mobile-menu-content nav ul li:nth-child(2) {
    animation-delay: 0.15s;
}

#mobile-menu.active #mobile-menu-content nav ul li:nth-child(3) {
    animation-delay: 0.2s;
}

#mobile-menu.active #mobile-menu-content nav ul li:nth-child(4) {
    animation-delay: 0.25s;
}

#mobile-menu.active #mobile-menu-content nav ul li:nth-child(5) {
    animation-delay: 0.3s;
}

#mobile-menu.active #mobile-menu-content nav ul li:nth-child(6) {
    animation-delay: 0.35s;
}

#mobile-menu.active #mobile-menu-content nav ul li:nth-child(7) {
    animation-delay: 0.4s;
}

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

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Smooth scrollbar */
#mobile-menu::-webkit-scrollbar {
    width: 4px;
}

#mobile-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#mobile-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

#mobile-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
