/* Custom Footer and Header Styles - DigiKala Inspired */

/* Header Styles */
.header-cms-menu {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header-cms-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.header-cms-link {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header-cms-link:hover {
    color: #ef4444;
}

/* DigiKala-Style Mega Menu */
.mega-menu-container {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 1200px;
    margin: 0 auto;
}

.mega-menu-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-item {
    transition: all 0.2s ease;
}

.category-item:hover {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Category animations */
.category-item a {
    display: block;
    transition: all 0.2s ease;
}

.category-item:hover a {
    transform: translateX(4px);
}

/* Subcategory grid animations */
.subcategory-grid > div {
    transition: all 0.2s ease;
}

.subcategory-grid > div:hover {
    transform: translateY(-2px);
}

/* Mega Menu Scrollbar */
.mega-menu-container .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.mega-menu-container .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.mega-menu-container .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.mega-menu-container .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Footer Styles */
.footer-social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.footer-link {
    position: relative;
    transition: all 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, #ef4444, #f97316);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-section-title {
    position: relative;
    padding-bottom: 12px;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 2px;
}

/* Contact Info Icons Animation */
.contact-icon {
    transition: all 0.3s ease;
}

.contact-info:hover .contact-icon {
    transform: scale(1.2);
    color: #f97316 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-social-icon {
        width: 40px;
        height: 40px;
    }
    
    .header-cms-menu {
        margin: 4px 0;
        padding: 8px 12px;
    }

    .mega-menu-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        max-width: none !important;
        max-height: none !important;
        z-index: 9999 !important;
        background: rgba(0, 0, 0, 0.5);
    }

    .mega-menu-container .flex {
        flex-direction: column;
        height: 100vh;
    }

    .mega-menu-container .w-64 {
        width: 100%;
        height: 50vh;
    }
}

/* Loading Animation for Vue Components */
.cms-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ef4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* DigiKala-style Button */
.digi-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.digi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Enhanced Category Hover Effects */
.mega-menu-container .category-item {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.mega-menu-container .category-item:hover,
.mega-menu-container .category-item.bg-white {
    border-left-color: #f97316;
    background: linear-gradient(90deg, #ffffff 0%, #fff7ed 100%);
}

/* Subcategory Link Hover Effects */
.mega-menu-container a[href] {
    position: relative;
    overflow: hidden;
}

.mega-menu-container a[href]:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.1), transparent);
    transition: left 0.5s;
}

.mega-menu-container a[href]:hover:before {
    left: 100%;
}

/* Icon Pulse Animation */
@keyframes pulse-orange {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
    }
}

.mega-menu-container .category-item:hover .w-8 {
    animation: pulse-orange 2s infinite;
}