﻿/* =========================
   MOBILE (≤ 768px)
========================= */
@media (max-width: 768px) {

    body.menu-open {
        overflow: hidden;
    }

    .page-content {
        padding-top: 64px;
    }

    .navbar {
        padding: 10px 0;
        background: rgba(255, 255, 255, 0.94) !important;
        backdrop-filter: blur(14px);
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    }

    .navbar .nav-wrap {
        justify-content: space-between;
        gap: 16px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 2001;
        width: 46px;
        height: 46px;
        padding: 0;
        border-radius: 14px;
        background: #ffffff;
        border: 1px solid rgba(148, 163, 184, 0.25);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    }

    .menu-toggle.active {
        background: #0f172a;
        box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
        transform: translateY(1px);
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .menu-toggle span {
        width: 18px;
        height: 2px;
        background: #0f172a;
        margin: 3px 0;
        border-radius: 999px;
        transition: transform 0.25s ease, opacity 0.2s ease, background 0.25s ease;
    }

    .menu-toggle.active span {
        background: #ffffff;
    }

    nav {
        position: fixed;
        top: 76px;
        left: 16px;
        right: 16px;
        width: auto;
        background: linear-gradient(180deg, #0f172a 0%, #172338 100%);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 24px;
        display: none !important;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        gap: 10px;
        z-index: 2000;
        box-shadow: 0 24px 60px rgba(2, 8, 23, 0.35);
        max-height: calc(100vh - 96px);
        overflow-y: auto;
    }

    nav.open {
        display: flex !important;
    }

    nav > a,
    nav > .nav-dropdown,
    nav > .btn {
        width: 100%;
    }

    nav a {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        width: 100%;
        padding: 14px 16px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        line-height: 1.25;
        transition: background 0.2s ease, color 0.2s ease;
    }

    nav > a:not(.btn):hover,
    nav > a:not(.btn):focus-visible {
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    /* Dropdown */
    .nav-dropdown {
        width: 100%;
        text-align: left;
    }

    .nav-dropdown > .nav-link {
        background: rgba(255, 255, 255, 0.04);
    }

    .nav-dropdown.open > .nav-link {
        background: rgba(52, 96, 173, 0.34);
    }

    .dropdown-menu,
    .dropdown-sidemenu {
        display: none;
        position: static;
        min-width: 0;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        box-shadow: none;
        padding: 8px;
        margin-top: 8px;
    }

    .dropdown-menu a,
    .dropdown-sidemenu a,
    .submenu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
        margin: 0;
        color: rgba(255, 255, 255, 0.92);
        font-size: 14px;
        text-decoration: none;
        transition: background 0.25s ease, color 0.25s ease;
        border-radius: 12px;
        white-space: normal;
    }

    .dropdown-menu a:hover,
    .dropdown-sidemenu a:hover,
    .submenu-toggle:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-submenu {
        width: 100%;
    }

    .dropdown-submenu > .dropdown-sidemenu {
        margin-top: 8px;
        padding-left: 8px;
    }

    .dropdown-submenu.open > .submenu-toggle {
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .dropdown-submenu.open > .dropdown-sidemenu {
        display: block;
    }

    #navRaiseTicket.btn,
    #navAssessment.btn {
        margin-top: 6px;
        justify-content: center;
        padding: 14px 18px;
        font-size: 16px;
        font-weight: 700;
        border-radius: 14px;
    }

    #navRaiseTicket.btn {
        background: #ffffff;
        color: #0f172a;
        box-shadow: 0 12px 24px rgba(255, 255, 255, 0.08);
    }

    #navAssessment.btn {
        box-shadow: 0 16px 32px rgba(52, 96, 173, 0.28);
    }

    /* Navbar adjustments */
    .logo img {
        height: 36px;
    }


    /*/*html, body {
        overflow-y: auto !important;*/ /* allow vertical scrolling */
        /*overflow-x: hidden;*/ /* keep horizontal scroll hidden */
        /*height: auto !important;*/ /* let body expand */
        /*touch-action: pan-y;*/ /* allow swipe to scroll */
    /*}*/

    .section {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    /* Two-column to single-column */
    .two-col {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

        .two-col > div {
            width: 100%;
        }

    .col-text {
        order: 1;
    }

    .col-features {
        order: 2;
    }

    /* Typography adjustments */
    h1 {
        font-size: 26px;
        line-height: 1.25;
    }

    p,
    .section-subtext {
        font-size: 15px;
        line-height: 1.6;
    }

    /* Feature Cards */
    .feature-card {
        grid-template-columns: 1fr;
        padding: 24px;
        margin-top: auto;
    }

    .glitter-card::before {
        animation-duration: 8s;
        opacity: 0.3;
    }

    .feature-card-singlecolumn {
        padding: 24px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        border-radius: 16px;
    }

    .feature-item {
        font-size: 14px;
    }

    .tick {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    /* Hero/background adjustments */
    .hero-bg {
        background-size: contain !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
        background-color: #000 !important; /* fills empty space */
    }

    .arrow-btn .arrow {
        animation-duration: 2.4s;
    }

}


/* =========================
   TABLET (769px – 992px)
========================= */
@media (min-width: 769px) and (max-width: 992px) {
    .feature-card {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* =========================
   DESKTOP (≥ 993px)
========================= */
@media (min-width: 769px) {

    nav {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        /* gap: 20px; */
    }
    .nav-dropdown {
        position: relative;
    }

    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        display: none;
        background: rgb(177 180 193);
        box-shadow: 0 20px 40px rgba(0,0,0,0.25);
        border-radius: 10px;
        padding: 12px 0;
        min-width: 260px;
        z-index: 2000;
    }

    .nav-dropdown:hover .dropdown-menu {
        display: block;
    }

}

@media (prefers-reduced-motion: reduce) {
 .glitter-card::before {
        animation: none;
        opacity: 0.2;
    }
}


nav.open {
    display: flex !important;
}
