﻿@media (min-width: 992px) {
    .bmf-home-header {
        position: relative; /* Trục tọa độ cho Mega Menu */
    }

    .bmf-home-mega-dropdown {
        position: static !important; /* Bỏ giới hạn của thẻ li để Mega Menu tràn viền giữa header */
    }

    .bmf-home-mega-menu {
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 100%;
        max-width: 900px;
        padding: 30px;
        border: none;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1);
        background-color: var(--bmf-white);
        margin-top: 0 !important; /* Bỏ margin-top mặc định để không tạo khe hở */
        display: block !important;
        opacity: 0;
        visibility: hidden;
        transition: var(--bmf-transition);
        pointer-events: none;
        z-index: 1000;
    }

        /* Thêm "cầu nối" vô hình để giữ hover */
        .bmf-home-mega-menu::before {
            content: "";
            position: absolute;
            top: -30px;
            left: 0;
            width: 100%;
            height: 70px;
            background: transparent;
        }

    .bmf-home-mega-dropdown:hover .bmf-home-mega-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (max-width: 991px) {
    .bmf-home-mega-menu {
        border: none;
        background-color: var(--bmf-accent-color);
        padding: 15px;
        border-radius: 10px;
        margin-top: 10px;
    }
    .btn-forgot a {
        font-size: 13px;
    }
    .offcanvas-body {
        display: flex;
        flex-direction: column;
    }

        .offcanvas-body .navbar-nav {
            margin-bottom: 20px;
            width: 100%;
        }
    .bmf-login-wrapper {
        flex-direction: column;
        margin: 1rem;
        max-width: 500px;
    }

    .bmf-login-banner {
        padding: 15px;
        text-align: center;
        height: -webkit-fill-available;
    }

    .bmf-login-brand {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .bmf-login-quote h2 {
        font-size: 1.8rem;
    }

    .bmf-login-quote p {
        display: none;
    }

    .bmf-social-btn-group {
        flex-direction: row;
    }
}
@media (max-width: 768px) {
    .bmf-about-hero {
        padding: 120px 0 70px 0;
    }
    .bmf-home-animate-fade-up {
        padding-top: 40px;
    }
    .bmf-text-primary {
        text-align: center;
    }
    .bmf-doc-intro-box {
        padding: 20px;
        text-align:justify
    }
}

@media (max-width: 576px) {
    .bmf-action-buttons {
        flex-direction: column;
    }

        .bmf-action-buttons .btn {
            width: 100%;
            justify-content: center;
        }

    .bmf-error-title {
        font-size: 1.5rem;
    }
}