/* Additional fixes for mobile devices */

/* iPhone notch and dynamic island safe area */
@supports (padding-top: env(safe-area-inset-top)) {
    header {
        padding-top: env(safe-area-inset-top);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .mobile-menu {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Ensure all three lines of hamburger are visible */
.hamburger span:nth-child(1),
.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
    background-color: var(--gray-800);
    height: 2px;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
}

/* More specific positioning for hamburger lines */
.hamburger span:nth-child(1) {
    top: 4px;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
    bottom: 4px;
}

/* Fix for small screens on Android devices */
@media screen and (max-width: 375px) {
    .logo span {
        font-size: 20px;
    }
    
    .hamburger {
        width: 20px;
        height: 20px;
    }
    
    .auth-container {
        width: 100%;
        max-width: 95%;
        padding: 15px;
    }
}

/* Enhanced active state for hamburger button */
.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 9px;
}

/* Additional fixes from fixed-header-mobile-fix.css */
@media (max-width: 768px) {
    /* Make the mobile menu appear below the fixed header */
    .mobile-menu {
        position: fixed;
        top: 65px;
        height: calc(100vh - 65px);
        overflow-y: auto;
    }
    
    /* Ensure hamburger menu is visible */
    .mobile-menu-toggle {
        z-index: 1010;
    }
    
    /* Adjust dropdown position when header is fixed */
    .user-dropdown-menu {
        position: absolute;
        top: 100%;
    }
    
    /* Add bottom margin to logo text to improve alignment */
    .logo span {
        margin-bottom: 0;
    }

    /* Adjust auth buttons for better fit in header */
    .auth-buttons .btn {
        padding: 0.3rem 0.9rem;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
    }
}

/* Ensure sections start at appropriate positions with fixed header */
.section-divider:first-of-type,
section.hero {
    margin-top: 0;
}
