/* Modern Glassmorphism Navigation */
.navbar-default {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
    will-change: auto;
}

.navbar-default .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    padding: 10px 16px;
    margin: 0 2px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    font-size: 0.9em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    transform: translateZ(0);
    will-change: auto;
}

.navbar-default .navbar-nav > li > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.navbar-default .navbar-nav > li > a:hover::before {
    left: 100%;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.navbar-default .navbar-brand {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 700;
    font-size: 1.3em;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateZ(0);
    will-change: auto;
}

.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
    color: #fff !important;
    transform: scale(1.05);
}

.navbar-default .navbar-toggle {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-default .navbar-toggle .icon-bar {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Special styling for contact link */
.navbar-default .navbar-nav > li > a.contact-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-weight: 600;
    padding: 10px 16px;
    margin: 0 2px;
    font-size: 0.9em;
}

.navbar-default .navbar-nav > li > a.contact-link:hover,
.navbar-default .navbar-nav > li > a.contact-link:focus {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    border: none;
}

/* Remove any borders from the li containing contact button */
.navbar-default .navbar-nav > li:last-child {
    border: none !important;
}

.navbar-default .navbar-nav > li:last-child > a {
    border: none !important;
}

/* Modern button styling for main page */
.buttons .btn {
    display: inline-block;
    padding: 16px 28px;
    margin: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.buttons .btn:hover::before {
    left: 100%;
}

.buttons .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* Special contact-style button */
.buttons .btn.contact-style {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-weight: 600;
}

.buttons .btn.contact-style:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* Fix for splash image jumping/flashing during scroll */
.maximage-slider {
    will-change: auto !important;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

.maximage-slider img {
    will-change: auto !important;
    transform: translateZ(0);
    backface-visibility: hidden;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    object-fit: cover !important;
}

/* Prevent any dynamic height changes */
#maximage {
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
}

/* Fix for any wrapper elements that might be causing jumps */
#wrapper {
    overflow: hidden !important;
}

#home {
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

/* Allow sticky-wrapper to expand for mobile menu */
.sticky-wrapper {
    min-height: 10px;
}

/* Ensure navbar doesn't interfere with background animations */
.navbar-default {
    will-change: auto !important;
    transform: translateZ(0);
}

.navbar-collapse {
    margin-top: 10px;
}

/* Smooth scrolling and modern animations */
* {
    scroll-behavior: smooth;
}

/* Override Spirito theme's nav ul hiding - CRITICAL FIX */
nav.navbar ul,
nav.navbar ul.navbar-nav,
.navbar ul.navbar-nav {
    display: block !important;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    /* Override Spirito's display:none on nav ul at mobile - THIS IS THE KEY FIX */
    nav.navbar ul,
    nav.navbar ul.navbar-nav,
    .navbar ul.navbar-nav,
    .navbar-default .navbar-nav {
        display: block !important;
        margin: 0 !important;
        float: none !important;
        width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
    }
    
    .navbar-collapse {
        background: rgba(30, 30, 30, 0.95) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 0 !important;
        padding: 15px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        max-height: none !important;
        overflow: visible !important;
    }
    
    .navbar-default .navbar-nav.navbar-right {
        float: none !important;
    }
    
    .navbar-default .navbar-nav > li {
        float: none !important;
        display: block !important;
        width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .navbar-default .navbar-nav > li > a {
        margin: 4px 0 !important;
        padding: 12px 16px !important;
        display: block !important;
        width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        height: auto !important;
        max-height: none !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        color: rgba(255, 255, 255, 0.95) !important;
    }
    
    .buttons .btn {
        margin: 8px;
        padding: 14px 24px;
        font-size: 0.95em;
    }
}
