﻿/* ==================================================
           ROOT
        ================================================== */

:root {
    --red: #ad202b;
    --red-dark: #941c25;
    --red-light: #bd2935;
    --white: #ffffff;
    --header-height: 96px;
}


/* ==================================================
           GLOBAL
        ================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
    color: #222;
}

button,
input {
    font-family: inherit;
}


/* ==================================================
           HEADER
        ================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--red);
    color: var(--white);
    border-top: 3px solid var(--red-dark);
    transition: box-shadow .3s ease, background .3s ease;
}

    .site-header.scrolled {
        box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    }


/* ==================================================
           HEADER CONTAINER
        ================================================== */

.header-container {
    width: 100%;
    max-width: 1200px;
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ==================================================
           BRAND
        ================================================== */

.brand {
    color: #fff;
    text-decoration: none;
    display: block;
    line-height: 1.1;
    flex-shrink: 0;
}

.brand-small {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.brand-title {
    font-size: 23px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.brand-subtitle {
    font-size: 12px;
    margin-top: 7px;
    opacity: .95;
    text-transform: uppercase;
}


/* ==================================================
           RIGHT SIDE
        ================================================== */

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: 30px;
}


/* ==================================================
           DESKTOP MENU
        ================================================== */

.main-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

    .main-menu a {
        position: relative;
        color: #fff;
        text-decoration: none;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        white-space: nowrap;
        padding: 10px 0;
        transition: opacity .25s ease;
    }

        .main-menu a::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 3px;
            height: 2px;
            background: #fff;
            transform: scaleX(0);
            transform-origin: center;
            transition: transform .25s ease;
        }

        .main-menu a:hover {
            opacity: .9;
        }

            .main-menu a:hover::after {
                transform: scaleX(1);
            }


/* ==================================================
           SEARCH BUTTON
        ================================================== */

.search-btn,
.mobile-menu-btn {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.search-btn {
    font-size: 21px;
}

    .search-btn:hover {
        opacity: .75;
    }


/* ==================================================
           MOBILE MENU BUTTON
        ================================================== */

.mobile-menu-btn {
    display: none;
    font-size: 25px;
}


/* ==================================================
           ISSN
        ================================================== */

.issn {
    position: absolute;
    right: max(20px, calc((100vw - 1200px) / 2 + 20px));
    bottom: 5px;
    font-size: 11px;
    opacity: .9;
}


/* ==================================================
           SEARCH BOX
        ================================================== */

.search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    padding: 18px 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

    .search-panel.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.search-form {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    display: flex;
}

    .search-form input {
        flex: 1;
        height: 46px;
        border: 1px solid #ddd;
        padding: 0 15px;
        outline: none;
        font-size: 15px;
    }

        .search-form input:focus {
            border-color: var(--red);
        }

.search-submit {
    width: 55px;
    border: 0;
    background: var(--red);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

    .search-submit:hover {
        background: var(--red-dark);
    }


/* ==================================================
           MOBILE MENU
        ================================================== */

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--red-dark);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .4s ease, opacity .3s ease;
}

    .mobile-menu.active {
        max-height: 500px;
        opacity: 1;
    }

    .mobile-menu a {
        display: block;
        color: #fff;
        text-decoration: none;
        text-transform: uppercase;
        font-size: 13px;
        font-weight: 700;
        padding: 15px 20px;
        border-top: 1px solid rgba(255,255,255,.12);
        transition: background .2s ease, padding-left .2s ease;
    }

        .mobile-menu a:hover {
            background: rgba(255,255,255,.08);
            padding-left: 27px;
        }


/* ==================================================
           DEMO CONTENT
        ================================================== */

.demo-content {
    max-width: 1200px;
    margin: auto;
    padding: 70px 20px;
    min-height: 1000px;
}

    .demo-content h1 {
        font-weight: 700;
    }


/* ==================================================
           TABLET
        ================================================== */

@media (max-width: 1100px) {

    .header-container {
        padding-left: 25px;
        padding-right: 25px;
    }

    .main-menu {
        gap: 18px;
    }

        .main-menu a {
            font-size: 11px;
        }

    .brand-title {
        font-size: 20px;
    }

    .brand-small {
        font-size: 14px;
    }

    .brand-subtitle {
        font-size: 10px;
    }

    .header-right {
        gap: 12px;
    }
}


/* ==================================================
           MOBILE
        ================================================== */

@media (max-width: 768px) {

    :root {
        --header-height: 78px;
    }

    .site-header {
        border-top-width: 2px;
    }

    .header-container {
        min-height: var(--header-height);
        padding: 8px 15px;
    }

    /* Ẩn menu desktop */
    .main-menu {
        display: none;
    }

    /* Hiện hamburger */
    .mobile-menu-btn {
        display: flex;
    }

    .header-right {
        margin-left: 15px;
        gap: 2px;
    }

    .brand-small {
        font-size: 12px;
    }

    .brand-title {
        font-size: 18px;
    }

    .brand-subtitle {
        font-size: 9px;
        margin-top: 5px;
        white-space: nowrap;
    }

    .issn {
        display: none;
    }

    .search-panel {
        padding: 12px 15px;
    }
}


/* ==================================================
           SMALL MOBILE
        ================================================== */

@media (max-width: 480px) {

    .header-container {
        min-height: 70px;
        padding: 7px 12px;
    }

    .brand-small {
        font-size: 10px;
    }

    .brand-title {
        font-size: 15px;
        letter-spacing: .2px;
    }

    .brand-subtitle {
        font-size: 7px;
    }

    .search-btn,
    .mobile-menu-btn {
        width: 32px;
        height: 32px;
    }

    .search-btn {
        font-size: 19px;
    }

    .mobile-menu-btn {
        font-size: 24px;
    }

    .search-form input {
        height: 42px;
        font-size: 14px;
    }

    .search-submit {
        width: 48px;
    }
}


/* ==================================================
           VERY SMALL SCREEN
        ================================================== */

@media (max-width: 360px) {

    .brand-title {
        font-size: 13px;
    }

    .brand-subtitle {
        display: none;
    }

    .brand-small {
        font-size: 9px;
    }
}
