:root {
    --geny_top_bar_height: 80px;
    --geny_bottom_bar_height: 40px;
    
    --sprite_sheet_width: 1000 !important;
    --sprite_sheet_height: 1000 !important;
}

body{
    font-size:16px;
}

.wrapper {
    width: 1200px;
    margin: auto;
    height: 100%;
}

@media screen and (max-width: 1200px) {
    .wrapper {
        width: 100%;
    }
}

i.sprite {
    --sprite_sheet_width: 1000;
    --sprite_sheet_height: 1000;
    
    --x: 0;
    --y: 0;
    
    --sprite_width: 1;
    --sprite_height: 1;
    
    --width: 1;
    --height: 1;
    
    --scale_width: var(--width) / var(--sprite_width);
    --scale_height: var(--height) / var(--sprite_height);
    
    --new_sprite_sheet_width: calc(var(--sprite_sheet_width) * var(--scale_width) * 1px);
    --new_sprite_sheet_height: calc(var(--sprite_sheet_height) * var(--scale_height) * 1px);
    
    --sprite_x: calc(var(--x) * var(--scale_width) * -1px);
    --sprite_y: calc(var(--y) * var(--scale_height) * -1px);

    display: inline-block;

    -webkit-mask-image: url('/static/images/sprites.webp');
    mask-image: url('/static/images/sprites.webp');
    
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    
    -webkit-mask-size: var(--new_sprite_sheet_width) var(--new_sprite_sheet_height);
    mask-size: var(--new_sprite_sheet_width) var(--new_sprite_sheet_height);
    
    -webkit-mask-position: var(--sprite_x) var(--sprite_y);
    mask-position: var(--sprite_x) var(--sprite_y);
    
    background: var(--icon_fill, currentColor);
    
    width: calc(var(--width) * 1px);
    height: calc(var(--height) * 1px);
}

i.sprite.logo {
    display: inline-block;
    --sprite_width: 560;
    --sprite_height: 120;
    --x: 0;
    --y: 0;

    --icon_fill: linear-gradient(90deg, rgba(230, 209, 180, 1) 0%, rgba(255, 243, 224, 1) 50%, rgba(230, 209, 180, 1) 100%);
    --width: 400;
    --height: calc(var(--width) * var(--sprite_height) / var(--sprite_width));
}


/* ========================================= */
/* CSS TOP BAR HOÀN THIỆN                    */
/* ========================================= */

#geny_top_bar {
    background: #4b3528;
}

/* Layout tổng thể */
#geny_top_bar .section_container {
    display: flex;
    align-items: center;
    height: 100%;
    justify-content: space-between;
    padding:0 var(--safe_right) 0 var(--safe_left);
}

/* Logo */
#geny_top_bar .column_logo {
    flex-basis: 200px;
    display: flex;
    align-items: center;
}

#geny_top_bar .column_logo > a {
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

#geny_top_bar .column_logo > a > span {
    display: none;
}

#geny_top_bar .column_logo > a > i.logo {
    --width: 300;
    transition:all 0.5s;
}

#geny_top_bar .column_logo > a:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 0 10px rgba(230, 209, 180, 0.4));
}

/* Khu vực Navigation Menu */
#geny_top_bar nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

#geny_top_bar nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Các Menu Item cấp 1 */
#geny_top_bar nav > ul > li {
    position: relative;
    height: var(--geny_top_bar_height);
    display: flex;
    align-items: center;
}

/* Hỗ trợ cả the a và span cho Menu Item */
#geny_top_bar nav li > a,
#geny_top_bar nav li > span {
    text-decoration: none;
    color: #e6d1b4;
    font-weight: 500;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hiệu ứng gạch dưới sang trọng khi hover Menu Item cấp 1 */
#geny_top_bar nav > ul > li > a::before,
#geny_top_bar nav > ul > li > span::before {
    content: '';
    position: absolute;
    bottom: 22px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e6d1b4, transparent);
    transition: all 0.4s ease;
    transform: translateX(-50%);
    opacity: 0;
}

#geny_top_bar nav > ul > li:hover > a::before,
#geny_top_bar nav > ul > li:hover > span::before {
    width: 70%;
    opacity: 1;
}

#geny_top_bar nav > ul > li:hover > a,
#geny_top_bar nav > ul > li:hover > span {
    color: #fff3e0;
}

/* Biểu tượng mũi tên cho Item có Submenu */
#geny_top_bar nav li:has(ul) > a::after,
#geny_top_bar nav li:has(ul) > span::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid #e6d1b4;
    border-bottom: 2px solid #e6d1b4;
    transform: rotate(45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
    margin-bottom: 2px;
}

#geny_top_bar nav li:has(ul):hover > a::after,
#geny_top_bar nav li:has(ul):hover > span::after {
    transform: rotate(225deg) translateY(-2px);
    border-color: #fff3e0;
}

/* Submenu Layout & Animation */
#geny_top_bar nav ul ul {
    position: absolute;
    top: 100%; /* Canh sát mép dưới Top Bar, không để hở khoảng trống */
    left: 0;
    min-width: 220px;
    background: #4b3528; /* Đồng bộ duy nhất một màu nền với Top Bar */
    border-radius: 0 0 12px 12px; /* Chỉ bo tròn góc dưới để tạo cảm giác liền khối kéo xuống */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 10px 0; /* Thu gọn khoảng cách trên dưới */
    list-style: none;
    
    /* Trạng thái ẩn mặc định */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px); /* Khoảng cách trượt ngắn lại cho nhẹ nhàng */
    transition: all 0.3s ease;
    z-index: 200;
}

/* Hiển thị Submenu khi hover */
#geny_top_bar nav li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#geny_top_bar nav ul ul li {
    width: 100%;
}

#geny_top_bar nav ul ul a,
#geny_top_bar nav ul ul span {
    padding: 10px 24px; /* Thu gọn khoảng cách giữa các chữ */
    width: 100%;
    box-sizing: border-box;
    text-transform: none;
    letter-spacing: normal;
    color: #e6d1b4;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hiệu ứng hover thanh lịch, dứt khoát không thêm lớp nền thừa */
#geny_top_bar nav ul ul a:hover,
#geny_top_bar nav ul ul span:hover {
    color: #fff3e0;
    padding-left: 32px; /* Chỉ dịch nhẹ chữ sang phải để tạo điểm nhấn */
}

/* Khu vực Nút Action & Nút Mở Menu Mobile */
#geny_top_bar .actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Nút Đặt lịch - Hiệu ứng ánh sáng chạy ngang */
#geny_top_bar .actions > a {
    display: inline-block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #4b3528;
    background: linear-gradient(135deg, #e6d1b4 0%, #d4af37 100%);
    padding: 10px 26px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* Tạo thanh ánh sáng */
#geny_top_bar .actions > a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

#geny_top_bar .actions > a:hover {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

/* Ánh sáng chạy qua khi hover */
#geny_top_bar .actions > a:hover::after {
    left: 150%;
}

/* Cài đặt SVG cho nút Hamburger (ẩn trên Desktop) */
#geny_top_bar .actions .open_side_menu {
    display: none;
    cursor: pointer;
    color: #e6d1b4;
    transition: color 0.3s ease;
}

#geny_top_bar .actions .open_side_menu:hover {
    color: #fff3e0;
}

#geny_top_bar .actions .open_side_menu svg {
    width: 32px;
    height: 32px;
    display: block;
}

/* Responsive cơ bản để ẩn menu giữa khi màn hình nhỏ */
@media screen and (max-width: 1000px) {
    :root {
        --geny_top_bar_height: 60px;
    }
    #geny_top_bar .column_logo > a > i.logo{
        --width:250;
    }
    #geny_top_bar nav {
        display: none;
    }
    #geny_top_bar .actions .open_side_menu {
        display: block;
    }
}
@media screen and (max-width: 600px) {
    #geny_top_bar .column_logo > a > i.logo{
        --width:200;
    }
    #geny_top_bar .actions a{
        display:none;
    }
}



/* ========================================= */
/* CSS SIDE MENU (MOBILE) - TỐI ƯU HTML      */
/* ========================================= */

/* Biến #side_menu thành khung Overlay mờ toàn màn hình */
#side_menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    
    /* Trạng thái ẩn mặc định */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Trạng thái mở menu: Hiển thị Overlay */
#side_menu.is_active {
    opacity: 1;
    visibility: visible;
}

/* Biến .section_container thành Sidebar trượt từ trái */
#side_menu .section_container {
    position: absolute;
    top: 0;
    left: -320px; /* Ẩn sidebar ra ngoài màn hình */
    width: 320px;
    max-width: 100vw;
    height: 100%;
    background: #4b3528;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
    
    /* Layout bên trong sidebar */
    padding: 30px 25px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Trạng thái mở menu: Trượt Sidebar vào */
#side_menu.is_active .section_container {
    left: 0;
}

/* Vị trí Nút Close Menu */
#side_menu .close_side_menu {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    color: #e6d1b4;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    z-index: 10;
}

#side_menu .close_side_menu:hover {
    color: #fff3e0;
    transform: scale(1.1) rotate(90deg);
}

#side_menu .close_side_menu svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* --- CÁC PHẦN CSS BÊN TRONG --- */
#side_menu .section_container > a {
    display: flex;
    justify-content: center;
    text-decoration: none;
    margin-top: 10px;
}

#side_menu .section_container > a > span {
    display: none;
}

#side_menu .section_container > a > i.logo {
    --width: 240;
}

#side_menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#side_menu ul li {
    width: 100%;
}

#side_menu ul li > a,
#side_menu ul li > span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    color: #e6d1b4;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border-bottom: 1px solid rgba(230, 209, 180, 0.15);
    cursor: pointer;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

#side_menu ul li > a:active,
#side_menu ul li > span:active {
    color: #fff3e0;
    padding-left: 5px;
}

#side_menu ul li:has(ul) > a::after,
#side_menu ul li:has(ul) > span::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #e6d1b4;
    border-bottom: 2px solid #e6d1b4;
    transform: rotate(45deg);
    margin-right: 5px;
}

#side_menu ul ul {
    padding-left: 15px;
    margin-top: 5px;
    margin-bottom: 10px;
    border-left: 1px dashed rgba(230, 209, 180, 0.2);
}

#side_menu ul ul li > a,
#side_menu ul ul li > span {
    padding: 12px 15px;
    font-size: 15px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    border-bottom: none;
    color: rgba(230, 209, 180, 0.85);
}

#side_menu ul ul li > a:active,
#side_menu ul ul li > span:active {
    color: #fff3e0;
}






/* ========================================= */
/* CSS BOTTOM BAR                            */
/* ========================================= */

#geny_bottom_bar{
    border-top: 1px solid #b49374;
    background: #a7826b;
}
#geny_bottom_bar .section_container{
    display:flex;align-items:center;
    height:100%;
    color:#411905;
    text-align:center;justify-content:center;
}