/* Mobile Menu Styles & Global Fixes (v2) */

/* -------------------------------------------------------------
   GLOBAL VISIBILITY FIX
   Ensures that elements with 'appear' and 'in-view' are actually visible.
   This fixes the issue where content is hidden on mobile devices.
   ------------------------------------------------------------- */
.appear.in-view {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(0) scale(1) !important;
}

/* Ensure mobile specific sections are actually displayed if they are in view */
@media screen and (max-width: 976px) {
    .sd[class*="phone"].in-view {
        opacity: 1 !important;
        display: flex !important;
    }
    .sd.top-tab_phone-content {
        display: flex !important;
    }
}


/* -------------------------------------------------------------
   MOBILE MENU STYLES (Green Theme)
   ------------------------------------------------------------- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: #4edca1; /* CrossVision Green */
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px; 
    
    /* Hiding state */
    opacity: 0 !important; 
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(100%); /* Slide out */
    
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(0);
}

/* Header area inside menu */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 60px;
}

.mobile-menu-home-link {
    margin: 0;
}
.mobile-menu-home-link img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1); /* Make logo white */
}

/* Close button */
.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}
.mobile-menu-close i {
    font-size: 32px;
    color: #fff !important;
}

/* Links Container - 2 COLUMNS GRID */
.mobile-menu-links {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 equal columns */
    column-gap: 20px;
    row-gap: 40px;
    width: 100%;
    margin-bottom: 60px;
}

/* Individual Link Items */
.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: #fff !important; /* Force white on A tag */
    opacity: 1 !important; 
}
/* Force white on internal P tags to override style.css */
.mobile-menu-item p {
    color: #fff !important;
    margin: 0;
}
.mobile-menu-item .en-text {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 4px;
    line-height: 1.2;
}
.mobile-menu-item .ja-text {
    font-size: 13px;
    font-weight: normal;
    opacity: 0.9;
    font-family: 'Noto Sans JP', sans-serif;
}

/* Contact Button (White Pill) - WIDTH 100% */
.mobile-menu-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important; /* Force full width */
    max-width: none !important;
    box-sizing: border-box;
    background-color: #fff;
    color: #4edca1 !important;
    text-decoration: none;
    padding: 16px 24px;
    border-radius: 50px;
    margin-bottom: 40px;
    font-weight: bold;
    gap: 8px;
    transition: background-color 0.2s;
    opacity: 1 !important;
}
.mobile-menu-contact-btn:hover {
    background-color: #f0f0f0;
}
.mobile-menu-contact-btn i {
    font-size: 20px;
    color: #4edca1 !important;
}
.mobile-menu-contact-btn p {
    color: #4edca1 !important;
    font-size: 14px;
    margin: 0;
}

/* Privacy Policy */
.mobile-menu-privacy {
    font-size: 12px;
    color: #fff !important;
    margin-bottom: 24px;
    opacity: 0.8 !important;
    cursor: pointer;
}

/* Social Icons */
.mobile-menu-social {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.mobile-menu-social .icon {
    font-size: 24px;
    color: #fff !important;
}

/* Mobile adjustments */
@media screen and (max-width: 540px) {
    .mobile-menu-overlay {
        padding: 24px;
    }
}
