/**
 * Hamburger Menu Styles
 * Clean, modern slide-out navigation
 */

/* =========================================
   HAMBURGER BUTTON
   ========================================= */

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: var(--card-bg, white);
    border: 1px solid var(--border-color, #e0e5e8);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.hamburger-btn:hover {
    background: var(--bg-secondary, #f5f5f5);
    transform: scale(1.05);
}

.hamburger-btn.active {
    background: var(--primary-color, #3a9d74);
}

.hamburger-btn.active .hamburger-line {
    background: white;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-color, #333);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   MENU OVERLAY
   ========================================= */

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1998;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   MENU PANEL
   ========================================= */

.hamburger-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--card-bg, white);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1999;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hamburger-menu.open {
    left: 0;
}

/* =========================================
   MENU HEADER - Epic Islamic-Inspired Design
   ========================================= */

.menu-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 24px 24px;
    background: linear-gradient(135deg,
            #1a5c45 0%,
            #2d7a5e 25%,
            #3a9d74 50%,
            #2d8a65 75%,
            #1f6b4f 100%);
    background-size: 200% 200%;
    animation: headerGradientShift 8s ease infinite;
    color: white;
    overflow: hidden;
    border-bottom: 2px solid rgba(212, 175, 55, 0.4);
}

/* Animated gradient shift */
@keyframes headerGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Islamic geometric pattern overlay */
.menu-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='0.5' opacity='0.1'%3E%3Cpath d='M30 0L60 30L30 60L0 30L30 0z'/%3E%3Cpath d='M30 10L50 30L30 50L10 30L30 10z'/%3E%3Ccircle cx='30' cy='30' r='8'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
    animation: patternFloat 20s linear infinite;
}

@keyframes patternFloat {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* Decorative corner ornaments */
.menu-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.6) 20%,
        rgba(212, 175, 55, 0.9) 50%,
        rgba(212, 175, 55, 0.6) 80%,
        transparent 100%);
    animation: goldShimmer 3s ease-in-out infinite;
}

@keyframes goldShimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Floating particles/stars effect */
.menu-header-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.menu-header-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat 4s ease-in-out infinite;
}

.menu-header-particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.menu-header-particles span:nth-child(2) { left: 25%; top: 60%; animation-delay: 1s; }
.menu-header-particles span:nth-child(3) { left: 70%; top: 30%; animation-delay: 2s; }
.menu-header-particles span:nth-child(4) { left: 85%; top: 70%; animation-delay: 0.5s; }
.menu-header-particles span:nth-child(5) { left: 50%; top: 80%; animation-delay: 1.5s; }

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-8px) scale(1.2);
        opacity: 0.8;
    }
}

/* Title container with icon */
.menu-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

/* Crescent moon icon */
.menu-title-icon {
    font-size: 1.4rem;
    color: #d4af37;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.8));
        transform: scale(1.05);
    }
}

.menu-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

/* Subtitle for spiritual touch */
.menu-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Close button with glass morphism */
.menu-close-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.menu-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

/* =========================================
   MENU NAVIGATION
   ========================================= */

.menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.menu-divider {
    height: 1px;
    background: var(--border-color, #e0e5e8);
    margin: 12px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.menu-item:hover {
    background: var(--bg-secondary, #f5f5f5);
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-item.highlight {
    background: linear-gradient(135deg,
            rgba(244, 67, 54, 0.1),
            rgba(233, 30, 99, 0.1));
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.menu-item.highlight:hover {
    background: linear-gradient(135deg,
            rgba(244, 67, 54, 0.15),
            rgba(233, 30, 99, 0.15));
}

.menu-item.highlight .menu-item-icon {
    color: #e91e63;
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--primary-color, #3a9d74);
    flex-shrink: 0;
}

.menu-item-text {
    flex: 1;
    min-width: 0;
}

.menu-item-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color, #333);
    margin-bottom: 2px;
}

.menu-item-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--muted-text, #666);
}

.menu-item-arrow {
    font-size: 0.75rem;
    color: var(--muted-text, #999);
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.menu-item:hover .menu-item-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Menu Item Badge */
.menu-item-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 10px;
    vertical-align: middle;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.menu-item.has-badge .menu-item-icon {
    background: var(--bg-secondary, #f5f5f5);
    color: #22c55e;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 767px) {
    .hamburger-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .hamburger-line {
        width: 18px;
    }

    .hamburger-menu {
        width: 280px;
    }

    .menu-header {
        padding: 16px 20px;
    }

    .menu-nav {
        padding: 12px;
    }

    .menu-item {
        padding: 12px 14px;
    }

    .menu-item-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* =========================================
   DARK MODE
   ========================================= */

body.dark-mode .hamburger-btn {
    background: var(--card-bg-dark, #252a28);
    border-color: var(--border-color-dark, #353d3a);
}

body.dark-mode .hamburger-btn:hover {
    background: var(--bg-secondary-dark, #1e2520);
}

body.dark-mode .hamburger-line {
    background: var(--text-color-dark, #e0e0e0);
}

body.dark-mode .hamburger-menu {
    background: var(--card-bg-dark, #252a28);
}

body.dark-mode .menu-item:hover {
    background: var(--bg-secondary-dark, #1e2520);
}

body.dark-mode .menu-item-icon {
    background: var(--bg-secondary-dark, #1e2520);
}