/* ==========================================================================
   LUXURY NAVIGATION MENU STYLES - COMPATIBLE WITH ORIGINAL STRUCTURE
   ========================================================================== */

/* Main Menu Container */
#ustaw_menu {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-radius: 0 0 20px 20px;
    padding: 0;
    z-index: 999;
}

#menu {
    margin: 0;
    padding: 0 0 0 33px;
    height: auto;
    position: relative;
    font-size: 10pt;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Menu Table Structure */
#menu1.dmx {
    font-family: 'Inter', sans-serif;
    border-collapse: collapse;
    width: 100%;
    background: transparent;
}

#menu1.dmx td {
    padding: 0;
    position: relative;
}

/* Main Menu Items (.item1) */
#menu1.dmx a.item1 {
    display: block;
    padding: 15px 25px;
    color: #2c2c2c;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

/* Elegant Underline Animation for Main Menu */
#menu1.dmx a.item1::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #c9a96e 0%, #b8956b 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

#menu1.dmx a.item1:hover::after {
    width: 60%;
}

/* Hover Effects for Main Menu */
#menu1.dmx a.item1:hover {
    color: #c9a96e;
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.05) 0%, rgba(201, 169, 110, 0.1) 100%);
    transform: translateY(-2px);
}

/* Dropdown Sections */
#menu1.dmx .section {
    margin-top: 1px;
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 169, 110, 0.1);
    padding: 5px 0;
}

/* Dropdown Menu Items (.item2) */
#menu1.dmx .section a.item2 {
    display: block;
    padding: 12px 20px;
    color: #4a4a4a;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-transform: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    text-decoration: none;
}

#menu1.dmx .section a.item2:last-child {
    border-bottom: none;
}

#menu1.dmx .section a.item2:hover {
    background: linear-gradient(135deg, #c9a96e 0%, #b8956b 100%);
    color: #ffffff;
    padding-left: 30px;
    transform: translateX(5px);
}

/* Remove underline animation for dropdown items */
#menu1.dmx .section a.item2::after {
    display: none;
}

/* Special Styling for External Links */
#menu1.dmx .section a[target="_blank"] {
    position: relative;
    font-weight: 500;
    color: #c9a96e;
}

#menu1.dmx .section a[target="_blank"]::after {
    content: '↗';
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

#menu1.dmx .section a[target="_blank"]:hover {
    background: linear-gradient(135deg, #c9a96e 0%, #b8956b 100%);
    color: #ffffff;
}

/* Submenu Enhancement */
#submenu {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(201, 169, 110, 0.2);
    padding: 1rem 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    height: auto;
    width: 100%;
}

#submenu ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

#submenu ul li {
    display: inline-block;
    margin: 0;
}

#submenu a {
    color: #6a6a6a;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#submenu a:hover {
    color: #c9a96e;
    background: rgba(201, 169, 110, 0.1);
    transform: translateY(-2px);
}

/* Mobile Menu Responsiveness */
@media (max-width: 768px) {
    #menu {
        padding: 0 15px;
    }
    
    #menu1.dmx a.item1 {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    #menu1.dmx .section a.item2 {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    #submenu ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    #submenu {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    #menu {
        padding: 0 10px;
    }
    
    #menu1.dmx a.item1 {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    #menu1.dmx .section a.item2 {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    #ustaw_menu {
        border-radius: 0;
    }
}

/* Advanced Interactions - Work with existing DropMenuX.js */
#menu1.dmx .section {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
}

/* Elegant Loading States */
.menu-loading {
    opacity: 0.7;
    pointer-events: none;
}

.menu-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: menuLoading 1.5s infinite;
}

@keyframes menuLoading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Luxury Menu Icons */
.menu-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#menu1.dmx a:hover .menu-icon {
    opacity: 1;
}

/* Maintain original positioning for legacy elements */
img#menu_left {
    position: absolute;
    top: 0;
    left: 50%;
    margin: 0 0 0 -411px;
}

img#home {
    position: absolute;
    top: 0;
    left: 50%;
    margin: 0 0 0 360px;
}

/* Accessibility Enhancements */
#menu1.dmx a:focus {
    outline: 2px solid #c9a96e;
    outline-offset: 2px;
    background: rgba(201, 169, 110, 0.1);
}

#menu1.dmx .section a.item2:focus {
    outline: 2px solid #c9a96e;
    outline-offset: -2px;
    background: linear-gradient(135deg, #c9a96e 0%, #b8956b 100%);
    color: #ffffff;
}

/* Smooth Dropdown Animation */
@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#menu1.dmx .section.show {
    animation: dropdownSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced luxury feel for original structure */
#menu1.dmx {
    border-collapse: collapse;
    font-family: 'Inter', Verdana, Arial, sans-serif;
}

/* Preserve original functionality while adding luxury styling */
div#menu {
    margin: 0;
    padding: 0 0 0 33px;
    height: 39px;
    position: relative;
    font-size: 10pt;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Override original blue background with luxury gradient */
#menu {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
}