* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

:root {
    --color-primary: #293D60;
    --color-success: #00bf8e;
    --color-warning: #f7c94b;
    --color-danger: #f75842;
    --color-danger-variant: rgba(247, 88, 66, 0.4);
    --color-white: #fff;
    --color-light: rgba(255, 255, 255, 0.7);
    --color-black: #000;
    --color-bg: #1f2641;
    --color-bg1: hsl(216, 19%, 16%);
    --color-bg2: #ffffff;
    --container-width-lg: 80%;
    --container-width-md: 90%;
    --container-width-sm: 94%;
    --transition: all 400ms ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    color: var(--color-white);
    background: var(--color-bg);
}

.container {
    width: var(--container-width-lg);
    margin: 0 auto;
    
}

section {
    padding: 6rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
}

h1, h2, h3, h4, h5 {
    line-height: 1.2;
}

h1 {
    font-size: 2.4rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.3rem;
}

a {
    color: var(--color-white);
}

img {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.btn {
    display: inline-block;
    background: var(--color-white);
    color: var(--color-black);
    padding: 1rem 2rem;
    border: 1px solid transparent;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-primary {
    background: var(--color-danger);
    color: var(--color-white);
}

/* ========================================== NAVBAR ========================================== */

nav {
    background-color: #293D60;
    width: 100vw;
    height: 5rem;
    position: fixed;
    top: 0;
    z-index: 11;
}

/* change navbar styles on scroll using javascript */
.window-scroll {
    background: var(--color-primary);
    box-shadow: 0 1rem 2rem rgba(9, 8, 8, 0.2);
}

.nav__container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav button {
    display: none;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__menu a {
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav__menu a:hover {
    color: #F75842;

}
@media screen and (max-width: 1024px) {
    .container {
        width: var(--container-width-md);
    }
    
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    h4 {
        font-size: 1.2rem;
    }

    /* ==================== NAVBAR ==================== */
    nav button {
        display: inline-block;
        background: transparent;
        font-size: 1.8rem;
        color: var(--color-white);
        cursor: pointer;
    }

    nav button#close-menu-btn {
        display: none;
    }

    .nav__menu {
        position: fixed;
        top: 5rem;
        right: 5%;
        height: fit-content;
        width: 18rem;
        flex-direction: column;
        gap: 0;
        display: none;
    }

    .nav__menu li {
        width: 100%;
        height: 5.8rem;
        
        transform-origin: top right;
        opacity: 1;
    }

    .nav__menu li a {
        background: var(--color-primary);
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
    }

    .nav__menu li a:hover {
        background: var(--color-bg2);
        color: #F75842;
    }
}

@media (max-width: 600px) {
    .popup-content {
      width: 90%;
    }
  
    .image-grid {
      grid-template-columns: 1fr; /* 1 column for mobile */
    }
  }

  /* Dropdown Styles */
.test-series-navlink {
    position: relative;
}

.psu-exams-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #212731;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 25px 40px;
    border-radius: 5px;
    width: max-content;
    max-width: 90vw;
    z-index: 9999;
}

.test-series-navlink:hover .psu-exams-dropdown {
    display: block;
    
}

/* Main Content Layout */
.psu-exams-dropdown .subheading-container {
    display: flex;
    justify-content: space-between;
    gap: 50px;
}

/* Sections Styling */
.psu-exams-dropdown .section {
    width: auto;
    padding: 0 15px;
    position: relative;
}

/* Headings Styling */
.psu-exams-dropdown .subheading {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    display: block;
}

/* Engineering & Diploma Columns */
.engineering-diploma-container {
    display: flex;
    gap: 40px;
}

.engineering-diploma-container .column {
    flex: 1;
}

.engineering-diploma-container .column > div:first-child {
    margin-bottom: 10px;
}

/* Links Styling */
.psu-exams-dropdown .sub-subheading {
    display: block;
    margin-top: 12px;
    line-height: 2.2;
}

.psu-exams-dropdown .sub-subheading a {
    display: block;
    color: white;
    padding: 6px 0;
    white-space: nowrap;
}

.psu-exams-dropdown .sub-subheading a:hover {
    text-decoration: underline;
}

/* Right Section Alignment */
.psu-exams-dropdown .section:not(:first-child) {
    margin-left: 20px;
}


/* ==================== MOBILE & TABLET POPUP ==================== */
@media (max-width: 1024px) {
    .psu-exams-dropdown.mobile-dropdown {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 20px;
        border-radius: 10px;
        width: 90%;
        max-width: 380px;
        max-height: 80vh;
        overflow-y: auto; /* Scrollable if content is long */
        z-index: 10001;
        background-color: #1a2a44;
        color: white;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .psu-exams-dropdown.mobile-dropdown.active {
        display: block;
    }

    /* Vertical layout for popup content */
    .psu-exams-dropdown.mobile-dropdown .subheading-container {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    /* Section styling */
    .psu-exams-dropdown.mobile-dropdown .section {
        margin-bottom: 10px;
    }

    /* Heading styling */
    .psu-exams-dropdown.mobile-dropdown .subheading {
        font-size: 14px;
        font-weight: bold;
        margin-bottom: 10px;
        color: white;
        border-bottom: 1px solid #344b73;
        padding-bottom: 5px;
    }

    /* Subheading links (compact boxes) */
    .psu-exams-dropdown.mobile-dropdown .sub-subheading a {
        display: inline-block; /* Allow compact inline blocks */
        color: white;
        padding: 4px 8px; /* Reduced padding for compactness */
        font-size: 12px; /* Smaller font size */
        text-decoration: none;
        background-color: #1a2a44;
        margin-right: 5px; /* Add slight gap between items */
        border-radius: 4px;
        max-width: 150px; /* Limit the width of each box */
        overflow: hidden;
        text-overflow: ellipsis; /* Add ellipsis if text overflows */
        white-space: nowrap;
    }

    .psu-exams-dropdown.mobile-dropdown .sub-subheading a:hover {
        text-decoration: underline;
        color: #F75842;
        background-color: #253659;
    }

    /* Engineering & Diploma columns */
    .psu-exams-dropdown.mobile-dropdown .engineering-diploma-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .psu-exams-dropdown.mobile-dropdown .engineering-diploma-container .column {
        margin-bottom: 10px;
    }
    /* Make the navbar appear as a hamburger menu for small screens */

}

