html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}


@media screen and (max-width: 770px) {
    .topbar {
        padding: 10px 16px;
    }
}

.main-container {
    width: 80%;
    padding: 0 0px;
}

@media (max-width: 700px) {
    .main-container {
        width: 100%;
    }
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background: #b51916;
    color: white;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    z-index: 999;
}

.topbar-left .logo {
    height: 40px;
    display: block;
    margin: 0;
    padding: 0;
}

.menu {
    display: flex;
    gap: 5px;
    background-color: #b51916;
    padding: 0px 0px;
    color: white;
    font-family: Arial, sans-serif;
    position: relative;
}

.menu-item {
    position: relative;
    cursor: pointer;
}

.menu-title {
    font-weight: bold;
    padding: 10px 16px;
    transition: background-color 0.2s, color 0.2s;
}

.menu-title.active-hover {
    background-color: white;
    color: #b51916;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 10px 0;
    margin-top: 10px;
    list-style: none;
    overflow: visible;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    width: max-content;
    z-index: 999;
    visibility: hidden;
}

.submenu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: white;
    box-shadow: -1px -1px 4px rgba(0, 0, 0, 0.05);
    z-index: -1;
}

.submenu-arrow {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 10px solid white;
}

.submenu li {
    padding: 10px 20px;
    white-space: nowrap;
    transition: background 0.2s;
    font-size: 13px;
}

.submenu li a {
    color: #333;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    font-size: inherit;
}

.submenu li:hover {
    background-color: #f5f5f5;
}


.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}


.genvita {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    font-size: 14px;
}

/* ==== HAMBURGER ==== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1000;
}

.hamburger span {
    height: 3px;
    width: 25px;
    background: white;
    display: block;
    transition: all 0.3s;
}

/* ==== RESPONSIVE ==== */
@media screen and (max-width: 1190px) {
    .menu {
        display: none;
        flex-direction: column;
        gap: 12px;
        position: absolute;
        top: 44px;
        left: 0;
        width: 100%;
        background-color: #b51916;
        padding: 12px 24px;
        z-index: 998;
    }

    .menu.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .topbar-right {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* liên hệ */
.contact-wrapper {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9999;
}

.contact-panel {
    background: white;
    border-radius: 12px 0 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    position: relative;
    transition: transform 0.3s ease;
    transform: translateX(0);
}

/* Mũi tên toggle */
.contact-toggle {
    position: absolute;
    top: 50%;
    left: -28px;
    /* đẩy ra ngoài khung trắng */
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    font-size: 25px;
    background: transparent;
    border: none;
    color: #656464;
    cursor: pointer;
    z-index: 999;
    display: none;
    /* mặc định ẩn, chỉ hiện ở màn nhỏ */
    transition: transform 0.3s ease;
}

.contact-wrapper:not(.collapsed) .contact-toggle {
    transform: translateY(-50%) rotate(180deg);
}

/* Hiện mũi tên ở màn nhỏ */
@media (max-width: 769px) {
    .contact-toggle {
        display: block;
    }

    .contact-wrapper.collapsed .contact-panel {
        transform: translateX(100%);
    }
}

/* Mặc định luôn mở ở màn lớn */
@media (min-width: 770px) {
    .contact-toggle {
        display: none !important;
    }

    .contact-wrapper .contact-panel {
        transform: translateX(0) !important;
    }
}


/* Icon style */
.contact-section a {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-section img {
    width: 30px;
    height: 30px;
    transition: filter 0.2s ease;
}

/* Thanh cuộn */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}


.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-content {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
    text-align: center;
    max-width: 300px;
    width: 90%;
}

.popup-content h2 {
    margin: 0 0 16px;
    font-size: 20px;
    color: #b51916;
}

.phone-number-display {
    font-size: 22px;
    font-weight: bold;
    color: #222;
    margin-bottom: 20px;
}

.close-button {
    background-color: #b51916;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 11px;
    cursor: pointer;
}

.close-button:hover {
    background-color: #991414;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 4px 12px;
    color: #b51916;
    gap: 8px;
}

.search-bar i {
    margin-right: 8px;
}

.search-bar input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 160px;
}

.search-bar .divider {
    width: 1px;
    height: 20px;
    background: #ccc;
    margin: 0 8px;
}

.search-bar button {
    background: none;
    border: none;
    color: #b51916;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}

.suggestion-wrapper {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    z-index: 9999;
}

.search-suggestions {
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none;
    padding-top: 10px;
    position: relative;
    transform: translateY(-10px);
    opacity: 0;
}

.search-suggestions:not(.hidden) {
    display: block;
}

.suggestion-arrow {
    position: absolute;
    top: -10px;
    left: 40px;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

.search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
}

.search-item:hover {
    background: #f9f9f9;
}

.search-icon-left {
    color: #999;
    margin-right: 8px;
    flex-shrink: 0;
}

.search-text {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-icon-right {
    color: #b51916;
    flex-shrink: 0;
}

.search-item:hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .search-bar {
        padding: 8px;
        border-radius: 0;
        justify-content: flex-start;
        position: relative;
    }

    /* Ẩn mọi thứ trừ icon khi chưa mở */
    .search-bar:not(.expanded) input,
    .search-bar:not(.expanded) .divider,
    .search-bar:not(.expanded) button {
        display: none;
    }

    /* Khi mở: input chiếm toàn bộ chiều ngang */
    .search-bar.expanded {
        width: 100%;
    }

    .search-bar.expanded input {
        flex-grow: 1;
        width: 100%;
        font-size: 16px;
    }

    .search-bar i.search-toggle {
        cursor: pointer;
    }
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    padding: 8px 12px;
    gap: 8px;
    border-bottom: 1px solid #eee;
}

@media (max-width: 1190px) {
    .search-bar {
        display: none;
        /* ẩn mặc định trên mobile */
        flex-direction: row;
        width: 100%;
    }

    .menu.active+.search-bar {
        display: flex;
        /* ✅ hiện khi menu mở */
    }

    .search-bar input {
        flex-grow: 1;
        width: 100%;
        font-size: 16px;
    }
}

.topbar-actions {
    display: none;
    /* desktop ẩn */
    align-items: center;
    gap: 12px;
}

@media (max-width: 1190px) {
    .topbar-actions {
        display: flex;
    }

    .topbar-actions .fa-search,
    .topbar-actions .fa-user-circle {
        font-size: 18px;
        cursor: pointer;
        color: white;
    }

    .divider-vertical {
        width: 1px;
        height: 20px;
        background-color: rgba(255, 255, 255, 0.4);
    }

    .topbar-actions .hamburger {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-left: 8px;
    }

    .topbar-actions .hamburger span {
        width: 20px;
        height: 2px;
        background-color: white;
        display: block;
    }
}

@media (min-width: 1191px) {
    .mobile-search {
        display: none !important;
    }

    .mobile-search-suggestions {
        display: none !important;
    }

    #mobile-search-input {
        display: none !important;
    }
}




@media (min-width: 501px) {
    .mobile-search {
        width: 300px !important;
        left: auto !important;
        right: 40px !important;
        border-radius: 8px;
    }

    .mobile-search-suggestions {
        width: 300px !important;
        left: auto !important;
        right: 40px !important;
        top: 56px !important;
    }

    .search-center {
        flex: unset;
        width: 100%;
    }

    #mobile-search-input {
        width: 100%;
        transform: none;
        left: 0;
        position: relative;
    }
}



.mobile-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 43px;
    background-color: #c62828;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: white;
    z-index: 9999;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-search.hidden {
    display: none;
}

.mobile-search i {
    font-size: 20px;
    cursor: pointer;
}

.search-title {
    font-size: 16px;
    font-weight: 500;
}

.mobile-search-suggestions {
    position: fixed;
    top: 44px;
    left: 0;
    width: 100%;
    background: white;
    z-index: 9998;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mobile-search-suggestions.hidden {
    display: none;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-item:hover {
    background-color: #f5f5f5;
}

.search-icon-left {
    color: #999;
}

.search-icon-right {
    color: #b51916;
    margin-left: auto;
}

.search-center {
    flex: 1;
    text-align: center;
    position: relative;
}

.search-title {
    font-size: 16px;
    font-weight: 500;
}

#mobile-search-input {
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 32px;
    padding: 0 12px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    outline: none;
    display: block;
}







.contact-form-outer {
    width: 100vw;
    background: linear-gradient(to right, #fff 50%, #f8f9fa 50%);
    padding: 60px 16px;
    overflow: hidden;
}

.contact-form-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
}

.contact-info-left {
    flex: 1 1 45%;
}

.contact-info-left h2 {
    font-size: 26px;
    color: #b51916;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.contact-info-left h2 i {
    margin-right: 10px;
}

.contact-info-left p {
    font-size: 16px;
    color: #444;
    margin-bottom: 24px;
}

.contact-info-left ul {
    padding-left: 20px;
    list-style: none;
}

.contact-info-left li {
    font-size: 15px;
    margin-bottom: 10px;
    color: #333;
    display: flex;
    align-items: center;
}

.contact-info-left li i {
    color: #b51916;
    margin-right: 8px;
}

.contact-form-right {
    flex: 1 1 50%;
    padding: 12px;
}

.contact-form-right h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #b51916;
    display: flex;
    align-items: center;
}

.contact-form-right h3 i {
    margin-right: 8px;
}

.contact-form-right input {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    background-color: #fff;
}

.contact-form-right button {
    background: #b51916;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-form-right button:hover {
    background: #930f0f;
}

.status-message {
    margin-top: 10px;
    font-size: 14px;
    color: green;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-form-container {
        flex-direction: column;
    }

    .contact-form-right,
    .contact-info-left {
        flex: 1 1 100%;
    }

    .contact-form-outer {
        background: #fff;
    }
}



#submit-contact-btn {
    background-color: #fff;
    color: #b51916;
    border: 1px solid #b51916;
    padding: 10px 15px;
    border-radius: 16px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.3s ease;
    gap: 0;
    overflow: hidden;
    font-weight: 400;
}

#submit-contact-btn .btn-icon {
    width: 0;
    opacity: 0;
    margin-left: 0;
    transition: all 0.3s ease;
    transform: translateX(-8px);
}

#submit-contact-btn:hover {
    background-color: #b51916;
    color: #fff;
    gap: 0px;
}

#submit-contact-btn:hover .btn-icon {
    opacity: 1;
    width: auto;
    margin-left: 10px;
    transform: translateX(0);
}



.footer-info-container {
    width: 100vw;
    background: linear-gradient(to right, #fff, #fcefe9);
    border-top: 4px solid #b51916;
    color: #333;
    padding: 28px 0;
}

.footer-info-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
}


.footer-info-column {
    flex: 1 1 220px;
    min-width: 200px;
}



.logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
    background-color: #b51916;
    border-radius: 16px;
    filter: contrast(1.1) brightness(1.05);
}

.logo-wrapper img {
    max-width: 180px;
    z-index: 1;
}


.footer-info-column h4 {
    margin-bottom: 16px;
    color: #b51916;
    font-size: 18px;
    font-weight: 700;
    position: relative;
}

.footer-info-column h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 40px;
    height: 3px;
    background: #b51916;
}

.footer-info-column ul {
    list-style: none;
    padding: 0;
}

.footer-info-column li {
    margin-bottom: 10px;
}

.footer-info-column a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-info-column a:hover {
    color: #b51916;
    padding-left: 5px;
}

.footer-info-social a {
    margin-right: 12px;
    font-size: 22px;
    color: #333;
    transition: color 0.3s;
}

.footer-info-social a:hover {
    color: #b51916;
}

.footer-info-bottom {
    width: 100%;
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    color: #777;
    border-top: 1px solid #ccc;
    padding-top: 20px;
}

.footer-info-column iframe {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}



