/* Responsive Styles */

/* LG - Desktops */
@media (max-width: 1199.98px) {
    .hero-text {
        font-size: 18px;
    }
}

/* Tablet & iPad ngang (menu vẫn ở dạng thanh ngang)
   Band 992–1199.98px: .container Bootstrap chỉ tối đa 960px trong khi
   brand dài + 6 mục menu + switcher VN/EN cần ~1100px → header bị chật/tràn.
   Giải pháp: header dùng hết bề ngang + siết cỡ chữ brand/menu để luôn 1 dòng. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .header>.container {
        max-width: 100%;
    }

    .navbar-brand {
        gap: 8px;
    }

    .navbar-brand .brand-logo {
        width: 42px;
    }

    .navbar-brand .brand-name {
        font-size: 15px;
        letter-spacing: 0;
    }

    /* Thu font + khoảng cách để menu giữ 1 dòng trên màn 992–1199px */
    .nav-link {
        font-size: 12.5px;
        letter-spacing: 0.2px;
        padding: 8px 7px !important;
    }

    .lang-switcher {
        gap: 2px !important;
    }

    .header .lang-switcher .btn {
        /* padding: 3px 8px; */
        font-size: 12px;
    }
}

/* Laptop nhỏ 1200–1399px: siết nhẹ nav-link để không tràn 2 dòng (Hình 11) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .nav-link {
        font-size: 14px;
        letter-spacing: 0.5px;
        padding: 10px 11px !important;
    }
}

/* MD - Tablets */
@media (max-width: 991.98px) {
    .header {
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    /* Nền teal áp dụng cho cả 2 trạng thái, đồng bộ với desktop */
    .header.sticky {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    /* Khi menu đang mở, header lấy nền teal để liền khối với panel menu bên dưới */
    .header:has(#navbarNav.show),
    .header:has(#navbarNav.collapsing) {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    }

    /* Trên điện thoại/tablet dọc chỉ hiển thị logo, bỏ hẳn tên thương hiệu */
    .navbar-brand .brand-name {
        display: none;
    }

    .navbar-brand,
    .nav-link {
        color: var(--bg-white) !important;
    }

    .nav-link.active {
        color: var(--secondary-color) !important;
    }

    .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.65);
        background-color: rgba(255, 255, 255, 0.12);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Panel menu xổ ra: nền teal đặc để luôn đọc rõ dù header đang trong suốt */
    #navbarNav {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        border-radius: 10px;
        margin: 10px 0 12px;
        padding: 6px 16px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }

    .nav-link {
        padding: 10px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }

    /* Dropdown trên mobile: inline, không floating */
    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        pointer-events: auto !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 0 0 16px !important;
        margin: 0 !important;
        background: transparent !important;
        display: none;
    }

    .dropdown-menu::before {
        display: none;
    }

    .nav-item.dropdown.show>.dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding: 8px 16px !important;
        font-size: 13px !important;
        color: rgba(255, 255, 255, 0.92) !important;
        background: transparent;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0 !important;
    }

    .dropdown-item::before {
        display: none;
    }

    .dropdown-item:hover,
    .dropdown-item.active {
        padding-left: 20px !important;
        color: var(--secondary-color) !important;
        background: rgba(255, 255, 255, 0.08) !important;
    }

    .nav-link.dropdown-toggle::after {
        float: right;
        margin-top: 6px;
    }

    .hero-slider,
    .hero-slider .carousel-item {
        height: auto;
        min-height: 400px;
        max-height: 600px;
    }

    .hero-glass-box,
    .hero-text-box {
        padding: 24px 28px;
        max-width: 500px;
    }

    .hero-glass-title {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .hero-glass-desc {
        font-size: 15.5px;
    }

    .hero-text {
        font-size: 17px;
    }

    .section-padding {
        padding: 60px 0;
    }
}

/* SM - Large Phones */
@media (max-width: 767.98px) {

    .hero-glass-box,
    .hero-text-box {
        padding: 20px 22px;
        max-width: 100%;
        border-radius: 14px;
    }

    .hero-glass-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .hero-glass-desc {
        font-size: 14px;
        line-height: 1.5;
    }

    .hero-text {
        font-size: 15px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .page-banner {
        padding: 120px 0 80px;
    }

    .page-banner h1 {
        font-size: 36px;
    }

    .floating-contact {
        left: 15px;
        bottom: 15px;
    }

    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }

    /* Icon ~56% đường kính nút để khoảng thở quanh icon đồng đều */
    .floating-btn svg {
        width: 22px;
        height: 22px;
    }

    .floating-btn.zalo svg {
        width: 25px;
        height: 25px;
    }
}

/* XS - Small Phones */
@media (max-width: 575.98px) {
    .hero-slider {
        min-height: 300px;
        max-height: 450px;
    }

    .hero-glass-box,
    .hero-text-box {
        padding: 15px 16px;
        border-radius: 12px;
    }

    .hero-glass-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .hero-glass-desc {
        font-size: 13px;
        line-height: 1.45;
    }

    .hero-text {
        font-size: 14px;
    }

    .service-card {
        padding: 30px 15px;
    }

    .footer {
        padding: 40px 0 0;
    }

    .footer-widget {
        text-align: center;
        margin-bottom: 20px;
    }

    .footer-widget ul li {
        justify-content: center;
    }

    .footer-bottom {
        margin-top: 20px;
    }
}