﻿/* 
* Responsive styles
* Website Mica Group
*/

/* Reset toàn bộ khoảng trống và đặt lại header */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

header {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
}

/* Desktop Styles (min-width: 992px) */
@media (min-width: 992px) {
    .mobile-menu {
        width: 350px; /* Menu rộng nhất định trên desktop */
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
        opacity: 0;
    }
    
    .mobile-menu.active {
        opacity: 1;
    }
    
    /* Hiệu ứng mượt mà hơn cho desktop */
    .menu-toggle span {
        transition: all 0.2s ease-in-out;
    }
    
    .menu-toggle:hover span {
        background-color: #990000;
    }
    
    /* Hiệu ứng hover cho menu item trên desktop */
    .mobile-nav a:hover {
        background-color: rgba(255,255,255,0.1);
    }
}

/* Tablet styles (max-width: 992px) */
@media (max-width: 992px) {
    .mobile-menu {
        width: 100%;
    }
    
    /* Menu mobile custom */
    #navbarNav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #cc0000;
        z-index: 9999;
        padding: 0 !important;
        margin: 0 !important;
        overflow-y: auto;
    }
    
    #navbarNav > div {
        padding: 0 !important;
        margin: 0 !important;
        font-size: 0; /* Loại bỏ khoảng trống */
    }
    
    .language-selector {
        margin: 0 !important;
        padding: 10px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-top: 50px !important; /* Để có chỗ cho nút đóng */
        font-size: 16px; /* Khôi phục kích thước font */
        line-height: 1.2;
        display: block !important;
        height: auto !important;
    }
    
    .navbar-nav {
        margin: 0 !important;
        padding: 0 !important;
        border-top: none !important;
        font-size: 16px; /* Khôi phục kích thước font */
        line-height: 1.2;
        position: relative !important;
        display: block !important;
        height: auto !important;
    }
    
    .navbar-nav li:first-child {
        margin-top: 0 !important;
        border-top: none !important;
    }
    
    .navbar-nav .nav-item:first-child {
        border-top: none !important;
    }
    
    .navbar-nav .nav-item:first-child a {
        border-top: none !important;
    }
    
    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease; /* Thêm transition cho phần tử con */
        position: relative;
    }
    
    .navbar-nav .nav-link {
        padding: 15px 10px !important;
        color: white !important;
        margin: 0 !important;
    }
    
    /* Styling cho mobile submenu wrapper */
    .mobile-submenu-wrapper {
        height: 0;
        background-color: #9e0000;
        overflow: hidden;
        transition: height 0.3s ease !important;
        display: block !important;
        width: 100%;
        position: relative;
    }
    
    .mobile-submenu-wrapper.active {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-submenu-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-submenu-list .nav-item {
        border-bottom: none !important;
    }
    
    .mobile-submenu-list .nav-item:last-child {
        border-bottom: none;
    }
    
    .mobile-submenu-list .nav-link {
        padding-left: 30px !important;
        font-size: 14px;
    }
    
    /* Submenu arrow */
    .submenu-toggle .fa-chevron-down {
        transition: transform 0.3s ease;
    }
    
    .submenu-toggle.active .fa-chevron-down {
        transform: rotate(180deg);
    }
    
    /* Footer trong mobile menu */
    .sidebar-footer {
        padding: 15px !important;
        color: white !important;
        text-align: center;
        font-size: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transition: transform 0.3s ease !important;
    }
    
    .submenu {
        position: static;
        background-color: #9e0000;
    }
    
    .nav-item.has-submenu {
        position: relative;
    }
    
    /* Fix cho khoảng cách giữa language-selector và navbar-nav */
    .language-selector {
        margin: 0 !important;
        padding: 10px !important;
        padding-bottom: 0 !important;
    }
    
    .navbar-nav {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .nav-item:first-child {
        margin-top: 0 !important;
    }
    
    .nav-item:first-child .nav-link {
        border-top: none !important;
    }
    
    /* Loại bỏ các khoảng trống Bootstrap */
    .navbar-nav, .navbar-nav * {
        box-sizing: border-box !important;
    }
    
    #navbarNav > div {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Section tiêu đề */
    .section-title .mica-title {
        font-size: 90%;
    }
    
    .section-title .line-title {
        font-size: 90%;
    }
    
    /* Hero Banner */
    .hero-banner {
        min-height: 600px;
    }
    
    #main-logo {
        width: 300px;
    }
    
    /* Company intro */
    .about-title {
        font-size: 90px !important;
        padding-left: 30px !important;
        min-height: 150px !important;
        margin-top: 50px !important;
    }
    
    .company-image {
        height: 250px !important;
    }
    
    /* Business cards */
    .business-card {
        height: 450px;
    }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    body {
        padding-top: 0 !important;
    }
    
    header {
        position: relative !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    
    .navbar {
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }
    
    .navbar-brand {
        padding: 5px 0 !important;
        margin: 0 !important;
    }
    
    .custom-toggler {
        top: 15px !important;
        margin: 0 !important;
    }

    .dropdown-menu {
        background-color: transparent;
        box-shadow: none;
        border-left: 2px solid rgba(204, 0, 0, 0.3);
        padding-left: 1rem;
        margin-left: 1rem;
    }

    .dropdown-item {
        color: #e3e3e3;
        padding: 0.3rem 1rem;
    }

    .dropdown-item:hover, .dropdown-item:focus {
        background-color: transparent;
        color: #ffffff;
    }
    
    /* Section tiêu đề */
    .section-title {
        font-size: 45px !important;
        line-height: 40px !important;
        text-align: center !important;
    }
    
    /* Hero Banner */
    .hero-banner {
        min-height: 500px;
    }
    
    .scroll-down-btn p {
        font-size: 16px;
        line-height: 22px;
        padding: 0 15px;
    }
    
    .scroll-down-btn img {
        width: 30px;
        height: 30px;
    }
    
    #main-logo {
        width: 250px;
    }
    
    .header-container {
        padding: 4px 18px;
        margin: 0 !important;
        margin-left: 20px !important;
    }
    
    /* About section */
    .about-title {
        font-size: 70px !important;
        padding-left: 20px !important;
        min-height: 120px !important;
    }
    
    .fly-up-element {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .counter-number {
        font-size: 60px !important;
    }
    
    /* News section */
    .news-card, .side-news-item {
        width: 100% !important;
        max-width: 384px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .side-news-list {
        margin-top: 20px;
    }
    
    /* Business cards */
    .business-card {
        height: 400px;
    }
    
    .business-title h4 {
        font-size: 20px !important;
    }
}

/* Small Mobile Styles (max-width: 576px) */
@media (max-width: 576px) {
    /* Section tiêu đề */
    .section-title {
        font-size: 35px !important;
        line-height: 35px !important;
        margin-top: 40px !important;
    }
    
    .section-title .mica-title {
        font-size: 80%;
    }
    
    .section-title .line-title {
        font-size: 80%;
    }
    
    /* Hero Banner */
    #main-logo {
        width: 200px;
    }
    
    /* About section */
    .about-title {
        font-size: 50px !important;
        padding-left: 15px !important;
        min-height: 100px !important;
    }
    
    .fly-up-element {
        padding-left: 15px !important;
    }
    
    .counter-number {
        font-size: 50px !important;
        line-height: 40px !important;
    }
    
    /* News section */
    .news-card {
        height: 420px !important;
    }
    
    .news-card h3 {
        font-size: 16px !important;
    }
    
    .news-card p {
        font-size: 14px !important;
    }
    
    /* Business cards */
    .business-card {
        height: 350px;
    }
    
    .business-title h4 {
        font-size: 18px !important;
    }
    
    /* Footer */
    .footer img {
        width: 200px !important;
    }
    
    .footer .col-auto {
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 14px;
    }
} 
