/* ===========================
   SIGIS HEADER STYLES
   =========================== */

#logout {
    cursor: pointer;
}

/* Header Container */
.site-header {
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

    &.access_denied{
        justify-content: space-evenly;
        flex-direction: column;
    }
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    padding: 20px;
}

.logo-img {
    height: 55px;
    width: auto;
}

.logout-link {
    color: var(--cancel-color);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;               /* shown on mobile via media query */
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle .bar {
    width: 22px;
    height: 3px;
    background-color: var(--color-2);
    border-radius: 3px;
}

/* =========================
   MAIN NAVIGATION
   ========================= */

.main-nav {
    position: relative;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-300);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-family-base);
    border-radius: var(--border-radius-sm);
}


/* UL reset + desktop default */
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;

    display: flex;               /* IMPORTANT: visible on desktop by default */
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
}

/* LI */
.main-nav li {
    display: block;
}

/* LINKS */
.main-nav a {
    display: inline-flex;
    align-items: center;

    padding: var(--space-2) var(--space-3);
    border-radius: var(--border-radius-sm);

    color: var(--color-gray-900);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

/* Hover */
.main-nav a:hover {
    background: var(--color-gray-100);
    color: var(--color-black);
}

/* Active / current page */
.main-nav a.current_page {
    background: var(--color-primary);
    color: var(--color-white);
    position: relative;
}

.main-nav a.current_page::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--color-secondary);
    border-radius: 2px;
}

/* Active hover (keep readable) */
.main-nav a.current_page:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Logout link emphasis */
.main-nav a.logout-link {
    color: var(--color-accent);
    font-weight: 600;
}

.main-nav a.logout-link:hover {
    background: rgba(231, 76, 60, 0.10);
}




/* Access denied block */
.ac-denied {
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    flex-direction: column;
    gap: 24px;
}

.ac-denied-card {
    max-width: 560px;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    padding: 22px 22px 18px;

    background: var(--color-accent);
    color: var(--color-white);
}

.ac-denied-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ac-denied-msg {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.85;
    margin-bottom: 16px;
}

.ac-denied-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ac-denied-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.ac-denied-btn-primary {
    background: #004fa3;
    color: #fff;
}

.ac-denied-btn-primary:hover {
    filter: brightness(0.95);
}

.ac-denied-btn-secondary {
    background: white;
    color: #111;
    border-color: rgba(0, 0, 0, 0.18);
}

.ac-denied-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
}







/* =========================
   RESPONSIVE (MOBILE)
   - On desktop: menu always visible
   - On mobile: menu collapses unless .open
   ========================= */

@media (max-width: 980px) {

    /* Show hamburger toggle */
    .nav-toggle {
        display: flex;
    }

    /* Make menu vertical */
    .main-nav{
        position: absolute;
        top: 90px;
        right: 20px;
        width: max-content;
        min-width: 300px;
    }
    .main-nav ul {
        flex-direction: column;
        gap: var(--space-1);
        padding: var(--space-2);
    }

    .main-nav a {
        width: 100%;
    }

    /* Collapse behavior ONLY on mobile */
    .main-nav:not(.open) {
        display: none;
    }

    .main-nav.open ul {
        display: flex;
    }
}
