/* Reset */
* {
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f9fafb;
    margin: 0;
}
:root {
    --primary-orange: #020180;
    --primary-red: #dc2626;
    --light-orange: #dcdcec;
    --light-red: #fef2f2;
}
/* Section1 Parallax/Animated Backgrounds */
.section1 {
    position: relative;
    min-height: 700px;
    overflow: hidden;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    --bg-scale: 1; /* Default scale */
}

.section1::before,
.section1::after,
.section1 div::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-fill-mode: forwards;
    animation-duration: 12s;
    animation-delay: 1s;
    transition: opacity 0.5s ease-in-out,
        transform 0.6s cubic-bezier(0.5, 3, 0.5, 2);
    z-index: -1;
    will-change: transform;
    transform: scale(var(--bg-scale));
}

/* ... (rest of your background and animation code stays unchanged) ... */

/* Content styles */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

/* Modal Card */
.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    width: 600px;
    max-width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 700;
    color: #222;
}

/* Role Options */
.role-container {
    display: flex;
    justify-content: space-around;
    gap: 30px;
}

.role-card {
    background: #f8f9fc;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    width: 220px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.role-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.role-card img {
    width: 80px;
    margin-bottom: 15px;
}

.role-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #0a2d82;
}

/* Add this to your CSS file or inside <style> in <head> */
#roleModal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}
#roleModal .modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.select-btn {
    background: #0a2d82;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.select-btn:hover {
    background: #071f5a;
}

/* Close Button */
.close-btn {
    margin-top: 25px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.close-btn:hover {
    text-decoration: underline;
}

/* First background */
.section1::before {
    background-image: linear-gradient(
            rgba(255, 255, 255, 0.6),
            rgba(255, 255, 255, 0.6)
        ),
        url("https://live.staticflickr.com/7319/11098520013_b8fefb21a8_z.jpg");
    animation-name: fade1;
    animation-delay: 1s;
}

/* Second background */
.section1::after {
    background-image: linear-gradient(
            rgba(255, 255, 255, 0.6),
            rgba(255, 255, 255, 0.6)
        ),
        url("https://www.industriall-union.org/sites/default/files/styles/article_top_image_w1440/public/uploads/images/2022/Philippines/52018243170_0ffe923734_c.jpg?itok=NaDoQzdF");
    animation-name: fade2;
    animation-delay: 1s;
}

/* Third background - add a child div inside .section1 for this */
.section1 div::before {
    background-image: linear-gradient(
            rgba(255, 255, 255, 0.6),
            rgba(255, 255, 255, 0.6)
        ),
        url("https://recruit-nz.co.nz/wp-content/uploads/2023/02/hire-filipino-workers.jpg");
    animation-name: fade3;
    animation-delay: 1s;
}

/* Fade keyframes */
@keyframes fade1 {
    0%,
    33% {
        opacity: 0;
    }
    0%,
    33% {
        opacity: 1;
    }
    40%,
    100% {
        opacity: 0;
    }
}

@keyframes fade2 {
    0%,
    33% {
        opacity: 0;
    }
    40%,
    66% {
        opacity: 1;
    }
    70%,
    100% {
        opacity: 0;
    }
}

@keyframes fade3 {
    0%,
    33% {
        opacity: 0;
    }
    40%,
    66% {
        opacity: 1;
    }
}

/* Navbar container */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff; /* dark slate */
    color: white;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
    z-index: 1000;
    /* Add these lines: */
    height: 78px; /* Set a specific, short height */
    align-items: center; /* Vertically center children */
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%; /* Make container fill nav height */
    padding: 5px 16px; /* Optional: horizontal padding */
}

/* Example for nav links */
.navbar-container a {
    color: #333;
    text-decoration: none;
    padding: 0 12px;
    line-height: 48px; /* Match nav height for vertical centering */
    font-size: 16px;
}

/*logo*/
.nav-logo {
    display: flex;
    align-items: inherit;
    gap: 8px;
    padding: 10px;
}
.nav-logo img {
    height: 50px; /*  Adjust height as needed */
    width: auto;
    display: block;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.3s ease;
    filter: invert(45%) sepia(84%) saturate(10058%) hue-rotate(247deg)
        brightness(47%) contrast(121%);
}
.nav-logo #home {
    height: 120px;
}

.nav-logo img:hover {
    opacity: 0.8; /* subtle hover effect */
}

.biglogo {
    filter: invert(45%) sepia(84%) saturate(10058%) hue-rotate(247deg)
        brightness(47%) contrast(121%);
}

/* Nav links */
.nav-links {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: #000000; /* gray-300 */
    font-weight: 400;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}
.nav-links a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #020180;
    transition: width 0.3s ease;
}
.nav-links a:hover {
    color: #020180;
}
.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger menu (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}
.hamburger div {
    width: 25px;
    height: 3px;
    background: #d1d5db;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Content padding to avoid overlap */
.content {
    max-height: 2200px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: start;
}

.content img:not(#workeroremployer) {
    margin-left: 150px;
    margin-top: 100px;
}

.content h1 {
    margin-top: 200px;
    font-size: 50px;
    margin-left: 90px;
}
.content p {
    font-size: 25px;
    margin-top: -30px;
    margin-left: 90px;
}
.content span {
    color: #020180;
    font-weight: 500;
}

.sign-in-b {
    display: inline-block;
    padding: 0 14px; /* Horizontal padding */ /* Fixed height as in many Figma templates */
    line-height: 28px; /* Vertically center text */
    background: #b1bad1; /* Primary color (customize as needed) */
    color: #000000; /* White text */ /* Semi Bold */
    font-size: 15px;
    border: none;
    margin-top: 10px;
    border-radius: 8px; /* Rounded corners */
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
    text-align: center;
}

/* Hover state */
.sign-in-b:hover {
    background: #678fff; /* Lighter blue on hover */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Focus state */
.sign-in-b:focus {
    outline: 2px solid #204ecf; /* Focus ring */
    outline-offset: 2px;
}

.sign-up-b {
    display: inline-block;
    padding: 0 14px; /* Horizontal padding */ /* Fixed height as in many Figma templates */
    line-height: 28px; /* Vertically center text */
    background: #020180; /* Primary color (customize as needed) */
    color: #ffffff; /* White text */ /* Semi Bold */
    font-size: 15px;
    border: none;
    margin-top: 10px;
    border-radius: 8px; /* Rounded corners */
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
    text-align: center;
}

#wideb {
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 8px;
    padding-bottom: 8px;
    margin-left: 80px;
}

#wideb2 {
    background-color: #333;
    padding-left: 60px;
    padding-right: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
}

#wideb2:hover {
    background: #a1a4aa; /* Lighter blue on hover */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Hover state */
.sign-up-b:hover {
    background: #678fff; /* Lighter blue on hover */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Focus state */
.sign--b:focus {
    outline: 2px solid #204ecf; /* Focus ring */
    outline-offset: 2px;
}

.features-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 16px;
}

.features-section h1 {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px 40px;
}

.feature-icon {
    flex-shrink: 0;
    margin-top: 3px;
}

.feature-item strong {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.feature-item p {
    margin: 0;
    color: #222;
    font-size: 1.3rem;
    line-height: 1.5;
}

/* Responsive for mobile */
@media (max-width: 700px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 28px 0;
    }
}
.feature-item {
    perspective: 1000px; /* Enables 3D perspective */
    width: 350px; /* adjust as needed */
    height: 300px; /* adjust as needed */
    margin: 1rem;
}

.flip-card-inner {
    position: relative;
    width: 120%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
    margin-left: -30px;
}

.feature-item {
    position: relative; /* enable z-index stacking */
    transition: transform 0.6s, z-index 0s; /* smooth transform */
    z-index: 1; /* default stacking */
}

.feature-item:hover {
    z-index: 10; /* bring to front on hover */
}

.feature-item:hover .flip-card-inner {
    transform: rotateY(180deg) scale(1.3); /* flip and enlarge */
}

.front,
.back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 1px solid #ccc;
    box-shadow: 5px 5px 10px 0 rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.back {
    transform: rotateY(180deg);
    background-color: #fff;
    width: 100%;
    height: 100%;
}

.back img {
    width: 114%;
    height: 71%;
    object-fit: cover;
}

#tutorial {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 2rem 0;
    box-sizing: border-box;
}
#tutorial h1 {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

#tutorial video {
    max-width: 90vw;
    max-height: 70vh;
    width: 1200px;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: #000;
    margin: 0 auto;
}

/* CSS */
.footer {
    background: #d3d3d3;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 3vw;
    font-family: "Helvetica Neue", Arial, sans-serif;
    gap: 2rem;
}

.footer-col {
    flex: 1 1 0;
    min-width: 220px;
}

.logo-placeholder {
    width: 100px;
    height: 100px;
    /* Add your logo as background-image or <img> here */
}

.footer-col.about p {
    margin: 0 0 1rem 0;
    color: #222;
    font-size: 1rem;
    line-height: 1.4;
}

.footer-col.about a {
    color: #222;
    text-decoration: underline;
    font-size: 1rem;
}

.footer-col.contact h3,
.footer-col.links h3 {
    font-weight: bold;
    margin-bottom: 1rem;
    color: #111;
    font-size: 1.1rem;
}

.footer-col.contact ul,
.footer-col.links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col.contact li {
    display: flex;
    align-items: center;
    margin-bottom: 0.7rem;
    color: #222;
    font-size: 1rem;
    gap: 0.7em;
}

.footer-col.contact .icon {
    font-size: 1.2em;
}

.footer-col.links li {
    margin-bottom: 0.7rem;
}

.footer-col.links a {
    color: #222;
    text-decoration: underline;
    font-size: 1rem;
}

/*responsiveness*/

/* Hide big logo on very small screens (e.g., iPhone SE, Galaxy A01) */

/* iPhone SE/5/6/7/8, Galaxy A01/A10, etc. */
@media (max-width: 375px) {
    html {
        font-size: 15px;
    }
    .content h1 {
        font-size: 1.7rem;
    }
    .content p {
        font-size: 1rem;
    }
    .feature-item {
        width: 92vw;
        max-width: 300px;
    }

    .biglogo {
        display: none;
    }
}

/* iPhone 12/13/14/15/Pro, Galaxy S21/S22/S23, etc. */
@media (max-width: 430px) {
    nav {
        width: 100vw;
    }
    .navbar-container {
        padding: 0 4vw;
    }
    .nav-links li {
        padding: 12px 10vw;
    }
    .feature-item {
        width: 94vw;
        max-width: 320px;
    }
    .content img {
        max-width: 80vw;
        margin: 0 auto;
    }
    #wideb,
    #wideb2 {
        width: 90vw;
        max-width: 220px;
    }

    .biglogo {
        display: none;
    }
}

/* iPad Mini, Galaxy Tab, iPad Air/Pro portrait */
@media (max-width: 820px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .feature-item {
        justify-self: center;
    }
    .footer {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    .footer-col {
        min-width: 0;
        width: 100%;
    }
    .biglogo {
        display: none;
    }
}

/* Responsive footer for tablets and phones */
@media (max-width: 900px) {
    .footer {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem 5vw;
        gap: 1.5rem;
    }
    .footer-col {
        min-width: 0;
        width: 100%;
        margin-bottom: 1rem;
    }
    .biglogo {
        display: none;
    }
}

/* Extra small devices (iPhone SE, Galaxy A01, etc.) */
@media (max-width: 375px) {
    .footer {
        padding: 1rem 2vw;
        font-size: 0.95rem;
    }
    .footer-col {
        padding: 0;
    }
    html,
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .biglogo {
        display: none;
    }
}

/* Responsive Navbar (CSS) */
@media (max-width: 900px) {
    .nav-menu-wrapper {
        position: absolute;
        bottom: 0;
        right: 0;
        height: 100vh;
        width: 40vw;
        overflow: hidden;
    }

    .nav-menu {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 100%;
        background: transparent;
    }

    /* Hamburger button */
    .hamburger {
        width: 30px;
        height: 22px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 1201;
    }

    .hamburger span {
        display: block;
        height: 3px;
        background: #e50914;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Hamburger active state (X icon) */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Nav links - hidden by default on mobile */
    .nav-links {
        position: fixed;
        left: -180%;
        width: 300vw;
        max-width: 700px;
        height: 200vh;
        background: linear-gradient(
            to right,
            rgba(1, 1, 126),
            rgba(1, 1, 126, 0.72),
            rgba(1, 1, 126, 0)
        );
        display: flex;
        flex-direction: column;
        gap: 2rem;
        transition: left 0.35s ease;
        z-index: 1200;
        overflow: hidden;
        padding-bottom: 100px;
    }

    .noscroll {
        overflow: hidden;
    }
    /* Show menu */
    .nav-links.active {
        left: 0;
    }

    /* Nav items */
    .nav-links li {
        list-style: none;
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* Animate items when menu is active */
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    /* Links and buttons styling */
    .nav-links a,
    .nav-links button {
        font-size: 1.5rem;
        color: white;
        text-decoration: none;
        font-weight: 600;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem 1rem;
        text-align: left;
        width: 100%;
        transition: color 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links button:hover {
        color: #ffffff;
    }

    /* Desktop styles */
    @media (min-width: 900px) {
        .hamburger {
            display: none;
        }
        .nav-links {
            position: static;
            flex-direction: row;
            height: auto;
            width: auto;
            background: transparent;
            padding: 0;
            gap: 1.5rem;
            transform: none !important;
            opacity: 1 !important;
            left: 0 !important;
        }
        .nav-links li {
            opacity: 1 !important;
            transform: none !important;
            margin: 0;
        }
        .nav-links a,
        .nav-links button {
            font-size: 1rem;
            color: rgb(255, 255, 255);
            padding: 0;
        }
    }
}

@media (max-width: 700px) {
    .flip-card-inner {
        position: relative;
        height: 100%;
        transition: transform 0.6s;
        transform-style: preserve-3d;
        cursor: pointer;
        margin-left: -30px;
    }

    .section1 {
        min-height: 400px;
        padding: 40px 0 0 0;
    }

    .content {
        flex-direction: column;
        align-items: center;
        padding: 0 8px;
        max-width: 100vw;
    }
    .content h1 {
        font-size: 2rem;
        margin: 40px 0 12px 0;
        text-align: center;
    }
    .content p {
        font-size: 1.1rem;
        margin: 0 0 16px 0;
        text-align: center;
    }
    .content img {
        margin: 24px auto 0 auto;
        max-width: 80vw;
        height: auto;
        display: none;
    }
    #wideb,
    #wideb2 {
        margin: 8px 0;
        width: 90vw;
        max-width: 320px;
        padding: 12px 0;
        display: block;
    }

    .back {
        transform: rotateY(180deg);
        background-color: #fff;
        width: 80%;
        height: 80%;
        left: 10%;
    }
}

/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Hide dropdown by default */
.dropdown-menu {
    display: none;
    position: absolute;
    background: white;
    min-width: 150px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
}

/* Dropdown items */
.dropdown-menu li {
    list-style: none;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.dropdown-menu li a:hover {
    background: #f1f1f1;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* =========================================
   Mobile Popup Version (fixed to viewport)
========================================= */
@media (max-width: 992px) {
    .dropdown {
        position: static !important;
    }

    .dropdown-menu {
        display: none;
    }

    /* Active popup covers full screen */
    .dropdown.active .dropdown-menu {
        display: contents !important;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 3000;
        background: rgba(0, 0, 0, 0.6);
        padding: 20px;
        overflow-y: auto;
    }

    /* Card layout */
    .dropdown.active .dropdown-menu > li {
        list-style: none;
        width: 100%;
        max-width: 380px;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
        overflow: hidden;
        animation: popupFade 0.25s ease-out;
    }

    .dropdown.active .dropdown-menu li a {
        display: block;
        padding: 16px;
        text-align: center;
        font-weight: 600;
        color: #020180;
        border-bottom: 1px solid #eee;
        text-decoration: none;
        transition: background 0.25s ease;
    }

    .dropdown.active .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    .dropdown.active .dropdown-menu li a:hover {
        background: #f3f3ff;
    }

    /* Optional Close Button */
    .popup-close {
        display: block;
        background: #020180;
        color: white;
        text-align: center;
        padding: 12px;
        font-weight: bold;
        border-top: 1px solid #ccc;
        cursor: pointer;
    }

    @keyframes popupFade {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Make footer about img match nav logo img */
.footer-col.about img {
    height: 100px;
    width: auto;
    display: block;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.3s ease;
    filter: invert(45%) sepia(84%) saturate(10058%) hue-rotate(247deg)
        brightness(47%) contrast(121%);
}

/* Responsive role selection modal */
#roleModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 130000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow: auto;
}

#roleModal .modal-content {
    width: min(920px, 96%);
    max-width: 920px;
    max-height: 90vh;
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

/* Header */
#roleModal .modal-content h2 {
    margin: 0;
    font-size: 1.125rem;
    text-align: center;
}

/* Grid -> responsive stack */
.role-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: stretch;
}

/* Role card */
.role-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: #f7f8fb;
    border-radius: 10px;
    min-height: 120px;
    width: 100%;
    box-shadow: 0 6px 18px rgba(12, 18, 30, 0.06);
    cursor: pointer;
}

/* Image and text */
.role-card img,
.role-card #workeroremployer {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex: 0 0 auto;
}

/* Title */
.role-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0a2d82;
    text-align: center;
}

/* Buttons */
.select-btn {
    background: #0a2d82;
    color: #fff;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 220px;
    align-self: center;
}
.close-btn {
    background: transparent;
    border: none;
    color: #444;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 10px;
    align-self: center;
}

/* Mobile adjustments */
@media (max-width: 720px) {
    #roleModal .modal-content {
        padding: 0.75rem;
        max-height: 94vh;
    }
    .role-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .role-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px;
        min-height: 72px;
        gap: 12px;
    }
    .role-card img,
    .role-card #workeroremployer {
        width: 56px;
        height: 56px;
        flex: 0 0 56px;
    }
    .role-card h3 {
        text-align: left;
        margin-left: 8px;
        font-size: 1rem;
        flex: 1;
    }
    .select-btn {
        width: 120px;
        padding: 8px 10px;
        max-width: none;
        flex: 0 0 auto;
    }
    .close-btn {
        width: 100%;
        margin-top: 8px;
        text-align: center;
        padding: 12px;
        border-radius: 8px;
        background: transparent;
    }
}

/* Ensure modal content scrolls internally when too tall */
#roleModal .modal-content > .role-container,
#roleModal .modal-content > .modal-body {
    overflow: auto;
}

/* Small visual tweak for very small screens */
@media (max-width: 360px) {
    .role-card h3 {
        font-size: 0.95rem;
    }
    .select-btn {
        padding: 8px;
        font-size: 0.95rem;
    }
}

@media (max-width: 900px) {
    .mobile-nav {
        position: relative;
        z-index: 10000;
        display: none;
    }

    .m-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
    }

    .m-logo {
        width: 140px;
        max-width: 60%;
    }

    .m-hamburger {
        background: transparent;
        border: 0;
        padding: 6px;
        display: inline-flex;
        flex-direction: column;
        justify-content: space-between;
        width: 34px;
        height: 24px;
        cursor: pointer;
        z-index: 1202;
    }
    .m-hamburger span {
        display: block;
        height: 3px;
        border-radius: 3px;
        background: #fff;
        transition: transform 0.25s, opacity 0.25s;
    }

    .m-hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .m-hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .m-hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .m-nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80vw;
        max-width: 340px;
        height: 100vh;
        padding-top: 5.5rem;
        background: linear-gradient(
            135deg,
            rgba(1, 1, 110, 0.96),
            rgba(1, 1, 160, 0.88)
        );
        backdrop-filter: blur(6px);
        box-shadow: 3px 0 18px rgba(0, 0, 0, 0.35);
        display: flex;
        flex-direction: column;
        gap: 1rem;
        transition: left 0.35s ease;
        z-index: 1200;
        touch-action: manipulation;
    }
    .m-nav-links.active {
        left: 0;
    }

    .m-nav-links li {
        list-style: none;
        margin-left: 1.2rem;
    }
    .m-nav-links a,
    .m-drop-btn {
        display: block;
        text-decoration: none;
        color: #fff;
        font-weight: 600;
        font-size: 1.2rem;
        padding: 0.4rem 0;
        background: none;
        border: 0;
        text-align: left;
    }

    .m-dropdown-menu {
        max-height: 0;
        overflow: hidden;
        margin-left: 1rem;
        border-left: 2px solid rgba(255, 255, 255, 0.12);
        transition: max-height 0.28s ease;
    }
    .m-dropdown.open .m-dropdown-menu {
        max-height: 220px;
    }

    /* ensure hamburger is above the panel when closed */
    .m-nav-header .m-hamburger {
        position: relative;
    }
}
/* ===== MOBILE NAVBAR (Matches Your HTML) ===== */

#mobileNavbar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    background: var(--light-orange);
    color: #fff;
    z-index: 1400;
    transition: left 0.26s cubic-bezier(0.85, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 6px 32px rgba(20, 30, 120, 0.17);
    border-radius: 0 18px 18px 0;
    font-family: "Segoe UI", Arial, sans-serif;
    padding-bottom: 21px;
}

/* Sidebar open */
#mobileNavbar.open {
    left: 0;
}

/* ===== HEADER INSIDE NAV-TOP ===== */

#mobileNavbar .nav-top {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
}

#mobileNavbar .close-btn {
    background: none;
    border: none;
    font-size: 26px;
    color: #fff;
    opacity: 0.6;
    cursor: pointer;
    margin-left: auto;
}

/* ===== MENU LIST ===== */

#mobileNavbar .mobile-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0 0 0;
    display: grid;
}

#mobileNavbar .mobile-menu li:not(:last-child) {
    margin-bottom: 12px;
}

#mobileNavbar .mobile-menu a,
#mobileNavbar .mobile-menu .dropdown-btn {
    width: 100%;
    padding: 14px 28px 14px 34px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.07rem;
    font-weight: 600;
    color: var(--primary-orange);
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.14s, color 0.15s;
    letter-spacing: 0.04em;
}

/* Hover */
#mobileNavbar .mobile-menu a:hover,
#mobileNavbar .mobile-menu .dropdown-btn:hover,
#mobileNavbar .mobile-menu .active {
    color: var(--primary-orange);
}

/* ===== DROPDOWN BUTTON + CHEVRON ===== */

.dropdown-btn::after {
    content: "▼";
    font-size: 0.85rem;
    color: var(--primary-orange);
    margin-left: 8px;
    opacity: 0.7;
    transition: transform 0.25s;
}

.dropdown.open .dropdown-btn::after {
    transform: rotate(-180deg);
}

/* ===== DROPDOWN CONTENT ===== */

.dropdown-content {
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: transparent;
}

.dropdown.open .dropdown-content {
    display: flex;
}

.dropdown-content a {
    padding: 11px 44px;
    font-size: 0.96rem;
    color: #dbe7ff;
    border-radius: 4px;
    opacity: 0.95;
}

.dropdown-content a:hover {
    background: #001572;
    color: var(--light-red);
}

/* ===== LOGOUT (you don't currently use this but it's in the template) ===== */
#mobileNavbar .mobile-menu li.logout a {
    color: #ff6464;
    font-weight: 700;
}

/* ===== OVERLAY ===== */

#mobileOverlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 19, 70, 0.18);
    z-index: 1300;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

#mobileOverlay.show {
    opacity: 1;
    visibility: visible;
}

/* ===== HAMBURGER ===== */

#m-hamburger {
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    border: none;
    padding: 0;
}

#m-hamburger span {
    height: 3.5px;
    background: var(--primary-orange);
    border-radius: 2px;
    transition: 0.25s;
}

#m-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}
#m-hamburger.active span:nth-child(2) {
    opacity: 0;
}
#m-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== HIDE ON DESKTOP ===== */

@media (min-width: 769px) {
    #mobileNavbar,
    #mobileOverlay,
    #m-hamburger {
        display: none !important;
    }
}

/* ===== SMALL SCREENS ===== */

@media (max-width: 480px) {
    #mobileNavbar {
        width: 98%;
        min-width: 140px;
    }
}
#mNavLinks {
    display: none;
}
