/* Mobile Navigation Overrides */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-collapse {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 1050;
        overflow-y: auto;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .dropdown-menu {
        position: static !important;
        border: none;
        box-shadow: none;
        margin-left: 1rem;
    }

    .nav-link {
        padding: 1rem !important;
        border-bottom: 1px solid #eee;
    }

    .dropdown-toggle::after {
        float: right;
        margin-top: 0.5rem;
    }
}

/* Touch Targets */
.nav-link,
.dropdown-item {
    min-height: 48px;
    display: flex !important;
    align-items: center;
}

/* Logo Scaling */
.mobile-logo {
    max-height: 40px;
    transition: all 0.3s ease;
}

@media (max-width: 575.98px) {
    .mobile-logo {
        max-height: 35px;
    }
}

/* Mobile Navigation Links */
.nav-link-mobile {
    @apply py-3 px-4 rounded-lg transition-colors duration-200;
    @apply text-gray-700 hover:bg-gray-50 hover:text-gray-900;
}

/* Touch Target Sizing */
@media (pointer: coarse) {
    .nav-link-mobile {
        @apply py-4;
        min-height: 56px;
    }
    
    button[aria-label="Toggle navigation"] {
        @apply p-3;
        min-width: 48px;
        min-height: 48px;
    }
}

/* Prevent Horizontal Scrolling */
html {
    @apply overflow-x-hidden;
}

body {
    @apply relative;
}

/* Desktop Apply Button */
.cta-primary {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(163, 22, 45, 0.3);
}

/* Mobile Apply Button */
@media (max-width: 1023px) {
    .cta-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Mobile Menu Fixes */
#mobile-menu {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

[x-cloak] {
    display: none !important;
}

.nav-link-mobile {
    padding: 1rem;
    font-size: 1.1rem;
    color: #374151;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link-mobile:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* Z-index Hierarchy */
header {
    z-index: 1000;
}

#mobile-menu {
    z-index: 999;
}