/* ===== /css/global.css – SHARED ACROSS PAGES ===== */
:root {
    --primary: #007849;
    --secondary: #EF3340;
    --accent: #FFD100;
    --light: #f8f9fa;
    --dark: #1D1D1B;
    --gray: #6c757d;
    --dull-white: #f5f5f5;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: clip;
}

body { background: white !important; }

body {
    font-family: 'Segoe UI', 'Poppins', sans-serif;
    color: var(--dark);
    background: white;
    display: flex ;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Push content down so fixed header doesn't cover it */
    padding-top: var(--header-height);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ----- HEADER (fixed at top on all screens) ----- */
header {
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: var(--header-height);
    width: 100%;
    will-change: transform;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 25px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Desktop menu */
.nav-menu {
    display: flex;
    flex-direction: row;
    background: transparent;
    box-shadow: none;
    padding: 0;
    width: auto;
    position: static;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(0, 120, 73, 0.1);
    color: var(--primary);
}

.nav-item.active {
    background: rgba(0, 120, 73, 0.05);
    color: var(--primary);
    font-weight: 600;
    position: relative;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.nav-item i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.menu-toggle {
    display: none; /* hidden on desktop */
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10000;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ----- MAIN CONTENT CONTAINER ----- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    color: var(--dark);
    
}

/* ----- FOOTER ----- */
footer {
    background: var(--dark);
    color: white;
    padding: 1.5rem 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
}

.contact-item i {
    color: var(--accent);
    width: 18px;
}

.copyright {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray);
    font-size: 0.75rem;
}

/* ----- FOOTER AUTH BUTTON (dynamic logout/login) ----- */
.footer-auth-button {
    text-align: center;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.5rem;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.logout-btn {
    background: var(--secondary);
    color: white;
}

.logout-btn:hover {
    background: #c92a2a;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(239, 51, 64, 0.3);
    color: white;
}

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

.login-btn:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 120, 73, 0.3);
    color: white;
}

/* ----- UTILITY CLASSES ----- */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ----- RESPONSIVE (header/footer) ----- */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        background: transparent;
        box-shadow: none;
        padding: 0;
        width: auto;
    }
    .nav-item {
        color: var(--primary);
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    /* Hide mobile-only message on desktop */
    .nav-menu-message {
        display: none;
    }
}

/* ----- MOBILE STYLES (max-width: 767px) ----- */
@media (max-width: 767px) {
    header {
        padding: 0.8rem 1rem;
    }
    .logo-text {
        font-size: 1.2rem;
    }
    .logo {
        width: 32px;
        height: 32px;
    }

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

    /* Mobile menu – fixed overlay below header */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        width: 100%;
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding: 1rem 0;
        flex-direction: column;
        gap: 0;
        z-index: 9998;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        display: flex;
    }
    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu .nav-item {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        width: 100%;
        border-radius: 0;
        font-size: 1rem;
        color: var(--dark);
    }
    .nav-menu .nav-item:last-child {
        border-bottom: none;
    }
    .nav-menu .nav-item i {
        color: var(--primary);
        width: 24px;
        font-size: 1.1rem;
    }

    .nav-menu .nav-item.active {
        background: rgba(0,120,73,0.08);
        border-left: 4px solid var(--accent);
        font-weight: 600;
    }
    .nav-menu .nav-item.active::after {
        display: none;
    }

    .nav-menu-message {
        padding: 1.5rem 1.5rem 2rem;
        text-align: center;
        font-size: 0.95rem;
        color: var(--dark);
        border-top: 1px solid rgba(0,0,0,0.1);
        margin-top: 1rem;
        background: #f9f9f9;
        font-style: italic;
        line-height: 1.5;
    }
    .nav-menu-message i {
        color: var(--secondary);
        margin-right: 0.3rem;
    }

    /* When menu is open, prevent body scroll */
    body.menu-open {
        overflow: hidden;
    }

    .footer-auth-button {
        padding: 1.2rem 0 1.8rem;
        text-align: left;
    }
    .footer-btn {
        width: 100%;
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .footer-btn {
        transition: none;
    }
}

@media print {
    header, footer, .menu-toggle {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}