/* =========================================
   FMA Premium Mobile Header & Menu
   Theme: Architectural Blue (#2C2E81)
   ========================================= */

/* --- Mobile Header Bar (Visible <= 991px) --- */
.mobile-header-bar {
    display: none;
    /* Hidden by default on desktop */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    height: 70px;
    background-color: transparent;
    /* Transparent for unified sky */
    z-index: 1300;
    /* Ensure this is HIGHER than the menu overlay (1250) */
    padding: 0 24px;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Show only on Mobile/Tablet */
@media screen and (max-width: 991px) {
    .mobile-header-bar {
        display: flex;
    }

    /* Hide Default Desktop Navigation */
    .navigation-wrapper-main {
        display: none !important;
    }
}

/* FMA Logo in Header */
.mobile-brand {
    font-family: 'Helvetica', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1300;
}

/* Architecture Menu Icon (Hamburger) */
.mobile-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1300;
    position: relative;
}

/* Structural Grid Line Animation */
.menu-lines {
    width: 28px;
    height: 18px;
    /* Height of the icon area */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.menu-line.short {
    width: 70%;
    margin-left: auto;
    /* Align right for architectural look */
}

/* Active State (X Transformation) */
.mobile-toggle.open .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    width: 100%;
}

.mobile-toggle.open .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-100%);
}

.mobile-toggle.open .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 100%;
}

/* --- Full Screen Menu Overlay --- */
.mobile-menu-full {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2C2E81;
    /* Same Blue for cohesion */
    z-index: 1250;
    /* MUST be lower than .mobile-header-bar */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 24px 40px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu-full.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Background Pattern (Subtle Architectural Grid) */
.mobile-menu-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Menu Links */
.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2vh;
    position: relative;
    z-index: 1;
    width: 100%;
}

.mobile-nav-link {
    font-size: 3rem;
    /* Big Typography */
    font-weight: 300;
    /* Sleek/Thin */
    color: #fff;
    text-decoration: none;
    text-transform: capitalize;
    display: block;
    /* Full width hit area */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.5s ease;
}

.mobile-nav-link:hover {
    padding-left: 10px;
    /* Slight movement */
    color: #4ade80;
    /* Green accent on hover */
    border-color: rgba(74, 222, 128, 0.3);
}

/* Numbered List Style (Architectural Indexing) */
.mobile-nav-link span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 15px;
    font-family: 'Courier New', monospace;
    vertical-align: middle;
}

/* Active Stagger Animation */
.mobile-menu-full.active .mobile-nav-link {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-full.active .mobile-nav-link:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu-full.active .mobile-nav-link:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu-full.active .mobile-nav-link:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu-full.active .mobile-nav-link:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-menu-full.active .mobile-nav-link:nth-child(5) {
    transition-delay: 0.5s;
}

/* Mobile Footer inside Menu */
.mobile-menu-footer-section {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease 0.6s;
}

.mobile-menu-full.active .mobile-menu-footer-section {
    opacity: 1;
}

.mobile-contact-info a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.mobile-contact-info a:hover {
    color: #fff;
}

.mobile-socials {
    display: flex;
    gap: 15px;
}

.mobile-socials img {
    width: 24px;
    height: 24px;
    /* Forces any image to become white */
    filter: brightness(0) invert(1);
}

/* =========================================
   Utility Overrides for Mobile 
   ========================================= */
@media screen and (max-width: 991px) {

    /* Ensure no double scrolling */
    body.menu-open {
        overflow: hidden;
    }

    /* Fix visibility of critical project elements on mobile */
    .team-name-tag {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }
}