/* General Styling */
:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --header-bg: #0d47a1;
    /* Dark blue for header */
    --background-color: #f4f7fa;
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

* {
    font-family: Arial, sans-serif;
}

body,
html {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

p,
ul li {
    text-align: justify;
}

a {
    text-decoration: none;
    color: var(--header-bg);
}

a:hover {
    color: var(--secondary-color);
    cursor: pointer;
}


/* Modal */
.pdfmodal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.pdfmodal-header {
    padding: 10px 20px;
    background: #007BFF;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px 5px 0 0;
}

.pdfmodal-header h2 {
    margin: 0;
    font-size: 18px;
}

.pdfclose {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.pdfmodal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

iframe {
    flex: 1;
    width: 100%;
    border: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Landing Page Styling */
#landing-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    background-image:
        url(../../images/trong-dong.png),
        radial-gradient(circle, #e3f2fd, #f3db03);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;


    position: relative;
    box-sizing: border-box;
}

.issuing-authority {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #d61818;
}

.issuing-authority .logo {
    width: 5%;
}

.title-container {
    margin-bottom: 60px;
    margin-top: 0px;
}

.title-main {
    font-size: 3.2rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.title-sub {
    font-size: 1.6rem;
    /* Larger */
    margin: 5px 0 0 0;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: bold;
    /* Added bold */
}

.title-tag {
    font-size: 1.2rem;
    /* Larger */
    color: var(--text-color);
    font-weight: bold;
    /* Added bold */
    margin-top: 8px;
}

p.leftindent {
    text-indent: 30px;
    text-align: justify;
}

.button-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.btn-main-action {
    background-color: var(--header-bg);
}

.btn-main-action:hover {
    background-color: #0b3a8a;
}

.btn-secondary-action {
    background-color: var(--secondary-color);
}

.btn-secondary-action:hover {
    background-color: var(--primary-color);
}

#landing-page footer {
    width: 100%;
    position: absolute;
    bottom: 20px;
    left: 0;
    font-size: 0.9rem;
    color: #555;
}

/* Modal (Popup) Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slide-down 0.5s;
}

@keyframes slide-down {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
}

.modal h2 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Handbook Content Page Styling */
#handbook-content {
    display: none;
    flex-direction: column;
}

#handbook-content header {
    background-color: var(--header-bg);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-btn {
    position: absolute;
    left: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

main {
    padding: 60px;
}

/* Main Menu Layout */
.desktop-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-items: center;
    width: 100%;
}

.menu-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px 10px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    background-color: #e3f2fd;
}

.menu-card .part-number {
    font-weight: bold;
    color: var(--header-bg);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.menu-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.menu-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

#view-part1 h3,
#view-part2 h3,
#view-part3 h3,
#view-part4 h3,
#view-part5 h3,
#view-part6 h3 {
    color: var(--primary-color);
}

#view-part1 h3::before,
#view-part2 h3::before,
#view-part3 h3::before,
#view-part4 h3::before,
#view-part5 h3::before,
#view-part6 h3::before {
    content: '▌';
    /* font-family: "Font Awesome 6 Free"; */
}

.image-container {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 30px;
    }

    .menu-container {
        flex: 2;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fit, 1fr);
    }
}

.qrcode-container img {
    max-width: 100px;
    height: auto;
}

.qrcode-container p {
    margin: 10px 0 0 0;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1rem;
}

/* Content Section Styling */
.content-section {
    display: none;
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    animation: fade-in 0.5s;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.content-section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-top: 0;
}

.back-btn {
    margin-bottom: 20px;
    background-color: var(--secondary-color);
}

.back-btn:hover {
    background-color: var(--primary-color);
}

.download-pdf {
    display: block;
    margin: 30px auto 10px auto;
    text-align: center;
    width: fit-content;
    background-color: var(--secondary-color);
}

.download-pdf:hover {
    background-color: var(--primary-color);
}

.infographic-list {
    list-style: none;
    padding-left: 0;
}

.infographic-list li {
    background-color: #eef4fb;
    margin-bottom: 10px;
    padding: 15px;
    border-left: 5px solid var(--secondary-color);
    border-radius: 4px;
}

.infographic-list li strong,
.infographic-list li b {
    color: var(--primary-color);
}

.accordion {
    background-color: #f1f1f1;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.4s;
    margin-top: 10px;
    border-radius: 4px;
    position: relative;
}

.accordion:hover,
.accordion.active {
    background-color: #d4eaf7;
}

.accordion::after {
    content: '\f078';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #777;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

.accordion.active::after {
    transform: translateY(-50%) rotate(180deg);
}

.panel {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
}

.panel p,
.panel ul {
    padding: 5px 0;
    margin: 0;
}

.panel h4 {
    margin: 5px 0;
}

.faq {
    text-transform: none !important;
    font-weight: 500 !important;
}

.center {
    text-align: center !important;
}


.abbreviation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.abbreviation-table th,
.abbreviation-table td {
    border: 1px solid #ddd;
    padding: 10px;
}

.abbreviation-table th {
    background-color: var(--primary-color);
    color: white;
}

.abbreviation-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.abbreviation-table td:first-child {
    text-align: center;
}

@media (max-width: 600px) {
    main {
        padding: 20px;
    }

    .title-main {
        font-size: 2.2rem;
    }

    .title-sub {
        font-size: 1.2rem;
    }

    #handbook-content header {
        font-size: 1rem;
        padding-left: 50px;
        padding-right: 50px;
    }

    .issuing-authority .logo {
        width: 15%;
    }

    .pdfmodal-content {
        margin: 35% auto;
        height: 65vh;
    }
    table{
        font-size: 0.7rem;
    }
    
    .hide{
        display: none;
    }
}