/* Full-width light civic shell + responsive */
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap");

:root {
    --site-blue: #1a6bb5;
    --site-blue-deep: #0f4f8a;
    --site-sky: #e8f3fc;
    --site-line: #d0e0ef;
    --site-text: #243447;
    --site-muted: #5a6f82;
    --site-font: "Be Vietnam Pro", "Segoe UI", Tahoma, sans-serif;
    --site-pad: clamp(16px, 3vw, 40px);
    --site-max: 1280px;
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    background: #f3f7fb !important;
    font-family: var(--site-font) !important;
    margin: 0;
    overflow-x: hidden;
    min-height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ASP.NET form must stretch so footer can pin to viewport bottom on short pages */
form#form1 {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    min-height: 100vh;
}

/* Full-bleed page shell */
.main_main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    border: 0;
    overflow: visible;
    flex: 1 0 auto;
    display: flex !important;
    flex-direction: column;
    min-height: 100%;
    min-height: 100vh;
}

/* Utility bar — exam pages only */
.top {
    background: #fff !important;
    border-bottom: 1px solid var(--site-line) !important;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    padding: 0 !important;
    position: relative !important;
    top: auto !important;
    z-index: 20;
    min-height: 0;
    margin: 0 !important;
}

.top .head {
    width: 100% !important;
    max-width: var(--site-max);
    margin: 0 auto !important;
    padding: 8px var(--site-pad) !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-height: 0;
    box-sizing: border-box;
}

.hotline {
    display: none !important;
}

.user_HeaderGo {
    float: none !important;
    flex-shrink: 0;
    position: relative;
}

.user_HeaderGo a {
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 14px !important;
    background: var(--site-blue) !important;
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.user_HeaderGo a div {
    float: none !important;
    display: inline !important;
    background: none !important;
    padding: 0 !important;
}

.user {
    background: var(--site-sky) !important;
    color: var(--site-blue-deep) !important;
    border-radius: 6px !important;
    padding: 8px 14px !important;
    cursor: pointer;
}

/* Banner flush to nav */
.banner {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-top: 0 !important;
    overflow: hidden;
    background: var(--site-sky);
    aspect-ratio: auto !important;
    line-height: 0;
    font-size: 0;
}

.banner > img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    display: block;
    vertical-align: top;
}

/* Nav flush under banner */
.menu {
    width: 100% !important;
    background: #fff !important;
    border-radius: 0 !important;
    overflow: visible;
    box-shadow: none;
    border-top: 0 !important;
    border-bottom: 1px solid var(--site-line);
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

.menu-inner {
    display: flex;
    align-items: stretch;
    gap: 28px;
    width: 100%;
    max-width: var(--site-max);
    margin: 0 auto;
    padding: 0 var(--site-pad);
    box-sizing: border-box;
    min-height: 52px;
}

.menu-drawer {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: stretch;
}

.menu-drawer-head {
    display: none;
}

.menu-backdrop {
    display: none;
}

.menu-actions {
    flex-shrink: 0;
    position: relative;
    margin-left: 0;
    padding: 8px 0 8px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid var(--site-line);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    font-family: var(--site-font);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-btn-login {
    background: #fff;
    color: var(--site-blue-deep) !important;
    border: 1px solid var(--site-line);
}

.nav-btn-login:hover {
    background: var(--site-sky);
    border-color: var(--site-blue);
}

.nav-btn-register {
    background: var(--site-blue);
    color: #fff !important;
    border: 1px solid var(--site-blue);
}

.nav-btn-register:hover {
    background: var(--site-blue-deep);
    border-color: var(--site-blue-deep);
}

.menu-toggle {
    display: none;
    width: calc(100% - (var(--site-pad) * 2));
    margin: 10px var(--site-pad) 0;
    padding: 12px 16px;
    border: 1px solid var(--site-line);
    border-radius: 8px;
    background: var(--site-sky);
    color: var(--site-blue-deep);
    font-family: var(--site-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.menu-toggle i {
    margin-right: 8px;
}

.menu-toggle-label {
    font-weight: 700;
}

.menu ul {
    display: flex !important;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    flex: 1 1 auto;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    margin-right: auto !important;
    padding: 0 !important;
    list-style: none !important;
    box-sizing: border-box;
    align-self: stretch;
}

.menu ul li {
    flex: 1 1 0;
    text-align: center;
    padding: 0 !important;
    white-space: nowrap;
    font-size: 14px;
    float: none !important;
    width: auto !important;
    color: var(--site-blue-deep) !important;
    display: flex !important;
    position: relative;
    align-self: stretch;
}

.menu ul li a {
    text-decoration: none;
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 48px;
}

.menu > ul > li > div,
.menu ul li > div:not(.content) {
    display: none !important;
}

.menu ul li a .content,
.menu .content {
    float: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 100% !important;
    min-height: 48px;
    white-space: nowrap;
    font-family: var(--site-font);
    font-weight: 600;
    letter-spacing: 0;
    border-radius: 0 !important;
    padding: 0 10px !important;
    color: var(--site-blue-deep) !important;
    background: transparent !important;
    transition: background 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}

.menu .content:hover {
    background: var(--site-sky) !important;
    color: var(--site-blue) !important;
}

.menu a.active .content {
    background: var(--site-blue) !important;
    color: #fff !important;
}

.menu-actions .downinfo,
.top .downinfo {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--site-line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 79, 138, 0.12);
    padding: 6px 0;
    color: var(--site-blue-deep);
}

.menu-actions .downinfo ul,
.top .downinfo ul {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.menu-actions .downinfo li,
.top .downinfo li {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
}

.menu-actions .downinfo a,
.top .downinfo a {
    display: block;
    padding: 10px 14px;
    color: var(--site-blue-deep) !important;
    text-decoration: none;
    font-weight: 600;
}

.menu-actions .downinfo a:hover,
.top .downinfo a:hover {
    background: var(--site-sky);
}

.chuchay {
    display: none !important;
}

.main {
    width: 100% !important;
    max-width: var(--site-max);
    margin: 0 auto !important;
    margin-top: 0 !important;
    padding: 8px var(--site-pad) 32px;
    overflow: visible;
    display: block !important;
    float: none !important;
    flex: 1 0 auto;
}

/* Spacer before footer — keep height, do not steal flex growth */
.main_main > .clear10 {
    flex: 0 0 10px;
}

.main_main > .footer,
.main_main > .footer_details {
    flex-shrink: 0;
}

.main > .items {
    margin-top: 10px !important;
}

.main > .left,
.main > .right {
    width: 100% !important;
    float: none !important;
}

.footer {
    background: var(--site-blue-deep) !important;
    height: 4px !important;
    min-height: 4px;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

.footer_details {
    background: #0c3d6b !important;
    color: #f2f7fc !important;
    border-top: 0 !important;
    padding: 28px var(--site-pad) 32px !important;
    font-size: 14px;
    line-height: 1.7;
    font-family: var(--site-font);
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 260px);
    gap: 28px;
    align-items: start;
    min-height: 120px;
}

/* Force readable text from CMS HTML — do NOT clear footer_details background */
.footer_details p,
.footer_details span,
.footer_details strong,
.footer_details b,
.footer_details font,
.footer_details em,
.footer_details a,
.footer-copy,
.footer-copy *,
.footer-stats,
.footer-stats * {
    color: #f2f7fc !important;
    background: transparent !important;
}

.footer_details a,
.footer-copy a {
    color: #9fd0ff !important;
    text-decoration: underline;
}

.footer_details .footer-stats {
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    padding-left: 24px;
    font-size: 13px;
    line-height: 1.8;
    color: #f2f7fc !important;
}

.footer_details .footer-stats strong {
    display: inline-block;
    min-width: 7.5em;
    font-weight: 600;
    color: rgba(242, 247, 252, 0.78) !important;
}

@media (max-width: 1024px) {
    .menu ul li {
        font-size: 13px;
    }

    .menu ul li a .content,
    .menu .content {
        padding: 0 6px !important;
    }
}

@media (max-width: 860px) {
    /* Kill leftover line between banner and nav */
    .banner {
        border-top: 0 !important;
        border-bottom: 0 !important;
    }

    body.menu-drawer-open {
        overflow: hidden !important;
    }

    .menu {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 12px;
        padding: 8px var(--site-pad) !important;
        border-top: 0 !important;
        border-bottom: 1px solid var(--site-line);
        min-height: 0;
        overflow: visible;
    }

    .menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        order: 1;
        width: 42px;
        height: 42px;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 8px;
        border: 1px solid var(--site-line);
        background: #fff;
        color: var(--site-blue-deep);
        font-size: 18px;
        line-height: 1;
        text-align: center;
        flex: 0 0 auto;
        z-index: 2;
    }

    .menu-toggle i {
        margin: 0 !important;
    }

    .menu-toggle-label {
        display: none !important;
    }

    .menu-inner {
        display: contents;
    }

    .menu-actions {
        order: 2;
        margin-left: auto;
        margin-right: 0;
        padding: 0 !important;
        border: 0 !important;
        border-left: 0 !important;
        border-bottom: 0 !important;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex: 0 0 auto;
        z-index: 2;
    }

    .menu-actions .nav-btn-register {
        display: none !important;
    }

    .menu-actions .nav-btn-login {
        min-height: 36px;
        padding: 0 14px;
        font-size: 13px;
    }

    .menu-actions .user {
        max-width: 46vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 12px !important;
    }

    /* Left slide-in drawer */
    .menu-drawer {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 84vw);
        max-width: 300px;
        margin: 0;
        padding: 0;
        display: flex !important;
        flex-direction: column;
        flex: none;
        background: #fff;
        border-right: 1px solid var(--site-line);
        box-shadow: 8px 0 28px rgba(15, 79, 138, 0.14);
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 10040;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .menu.is-open .menu-drawer {
        transform: translateX(0);
    }

    .menu-drawer-head {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex: 0 0 auto;
        padding: 14px 14px 12px;
        border-bottom: 1px solid var(--site-line);
        background: linear-gradient(180deg, var(--site-sky) 0%, #fff 100%);
    }

    .menu-drawer-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--site-blue-deep);
        letter-spacing: 0.02em;
    }

    .menu-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin: 0;
        padding: 0;
        border: 1px solid var(--site-line);
        border-radius: 8px;
        background: #fff;
        color: var(--site-blue-deep);
        cursor: pointer;
        font-size: 16px;
    }

    .menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 10030;
        margin: 0;
        padding: 0;
        border: 0;
        background: rgba(12, 40, 70, 0.42);
        backdrop-filter: blur(1px);
    }

    .menu-backdrop[hidden] {
        display: none !important;
    }

    .menu ul {
        display: flex !important;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 2px;
        padding: 10px 12px 20px !important;
        margin: 0 !important;
        width: 100% !important;
        flex: 1 1 auto;
        border-top: 0 !important;
        align-self: stretch;
    }

    .menu ul li {
        flex: none;
        width: 100% !important;
        text-align: left;
    }

    .menu ul li a .content,
    .menu .content {
        padding: 12px 12px 12px 14px !important;
        min-height: 0;
        height: auto !important;
        display: block !important;
        text-align: left !important;
        border-radius: 6px;
        color: var(--site-blue-deep) !important;
        background: transparent !important;
        overflow: visible !important;
        white-space: normal !important;
        line-height: 1.35 !important;
    }

    .menu ul li a.active,
    .menu ul li a.active .content,
    .menu .active {
        background: transparent !important;
        color: var(--site-blue-deep) !important;
    }

    .menu ul li a:hover .content {
        background: var(--site-sky) !important;
        color: var(--site-blue-deep) !important;
    }

    .menu ul li a.active .content {
        background: var(--site-sky) !important;
        color: var(--site-blue-deep) !important;
        font-weight: 700 !important;
        box-shadow: inset 3px 0 0 var(--site-blue);
    }

    .footer_details {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .footer_details .footer-stats {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        padding-left: 0;
        padding-top: 16px;
    }
}

@media (max-width: 560px) {
    .top .head {
        padding: 8px var(--site-pad) !important;
        justify-content: flex-end;
    }

    .fab-join {
        right: 12px;
        bottom: 12px;
        padding: 12px 14px;
        font-size: 13px;
    }
}

/* Fixed join FAB — bottom-right */
.fab-join {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 999px;
    background: #1a6bb5;
    color: #fff !important;
    font-family: var(--site-font);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    box-shadow:
        0 8px 24px rgba(15, 79, 138, 0.35),
        0 0 0 0 rgba(26, 107, 181, 0.45);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    animation: fab-join-pulse 2.4s ease-out infinite;
}

.fab-join i {
    font-size: 18px;
    line-height: 1;
}

.fab-join:hover {
    background: #0f4f8a;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 28px rgba(15, 79, 138, 0.42);
    animation: none;
}

.fab-join:focus {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

@keyframes fab-join-pulse {
    0% {
        box-shadow:
            0 8px 24px rgba(15, 79, 138, 0.35),
            0 0 0 0 rgba(26, 107, 181, 0.45);
    }
    70% {
        box-shadow:
            0 8px 24px rgba(15, 79, 138, 0.35),
            0 0 0 14px rgba(26, 107, 181, 0);
    }
    100% {
        box-shadow:
            0 8px 24px rgba(15, 79, 138, 0.35),
            0 0 0 0 rgba(26, 107, 181, 0);
    }
}

/* —— Site alert modal (viewport-centered, overrides legacy style.css) —— */
body.site-modal-open {
    overflow: hidden !important;
}

.overlay.site-modal-backdrop,
.overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    opacity: 1 !important;
    background: rgba(12, 40, 70, 0.48) !important;
    backdrop-filter: blur(2px);
    z-index: 10050 !important;
}

.overlay.tam_hienthi,
.confirm.tam_hienthi {
    display: none !important;
}

.overlay:not(.tam_hienthi) {
    display: block !important;
}

.confirm.site-modal,
.confirm {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(440px, calc(100vw - 32px)) !important;
    min-width: 0 !important;
    max-width: min(440px, calc(100vw - 32px)) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--site-text) !important;
    font-family: var(--site-font) !important;
    font-size: 14px !important;
    z-index: 10060 !important;
    box-shadow: none !important;
}

.confirm:not(.tam_hienthi) {
    display: block !important;
}

.site-modal-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #fff !important;
    border: 1px solid var(--site-line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(15, 79, 138, 0.22);
    animation: site-modal-in 0.2s ease-out;
}

.site-modal-head,
.site-modal-body,
.site-modal-foot {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    float: none !important;
}

@keyframes site-modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.site-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(180deg, var(--site-sky) 0%, #fff 100%);
    border-bottom: 1px solid var(--site-line);
}

.site-modal-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--site-blue-deep);
    line-height: 1.3;
}

.site-modal-title i {
    color: var(--site-blue);
    font-size: 18px;
}

.site-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--site-line);
    border-radius: 8px;
    background: #fff;
    color: var(--site-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.site-modal-close:hover {
    background: var(--site-sky);
    color: var(--site-blue-deep);
    border-color: var(--site-blue);
}

.site-modal-body {
    padding: 20px 18px;
    background: #fff;
}

.site-modal-body #_thongbao {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
    color: var(--site-text) !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
}

.site-modal-body #_thongbao a {
    color: var(--site-blue) !important;
    font-weight: 700;
}

.site-modal-foot {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 18px 18px;
    background: #fff !important;
}

.site-modal-cancel,
.site-modal-ok {
    flex: 0 0 auto;
    white-space: nowrap;
}

.site-modal-cancel {
    min-width: 110px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--site-line);
    border-radius: 8px;
    background: #fff;
    color: var(--site-blue-deep);
    font-family: var(--site-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.site-modal-cancel:hover {
    background: var(--site-sky);
    border-color: var(--site-blue);
}

.site-modal-ok {
    min-width: 120px;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: var(--site-blue);
    color: #fff;
    font-family: var(--site-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.site-modal-ok:hover {
    background: var(--site-blue-deep);
}

@media (max-width: 480px) {
    .confirm.site-modal,
    .confirm {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
    }
}

