﻿/* Base Reset and Full Site Border Layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    border: 3px solid #261c14;
    background-color: #261c14;
}

body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Layout Container */
.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Layout */
.site-header {
    background-color: #fdfbf7;
    color: #3d2a1d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: relative;
    z-index: 1000;
    border-bottom: 2px solid #261c14;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.logo img {
    height: 101px;
}

/* Navigation Layout */
.nav-section ul {
    display: flex;
    list-style: none;
    align-items: center; /* FIXED: Keeps usernames aligned with text links */
}

.nav-section li {
    margin-left: 25px;
}

.nav-section a {
    color: #3d2a1d;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

    .nav-section a:hover {
        color: #c01c24;
    }

    .nav-section a::after {
        content: '';
        position: absolute;
        width: 100%;
        transform: scaleX(0);
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: #c01c24;
        transform-origin: bottom right;
        transition: transform 0.25s ease-out;
    }

    .nav-section a:hover::after {
        transform: scaleX(1);
        transform-origin: bottom left;
    }

/* FIXED: Authentication Layout Accent Classes */
.user-welcome {
    font-weight: 600;
    color: #3d2a1d;
    font-size: 15px;
}

.logout-link {
    color: #c01c24 !important;
}

/* Hamburger Menu Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .menu-toggle .bar {
        height: 3px;
        width: 100%;
        background-color: #3d2a1d;
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .menu-toggle:hover {
        background-color: rgba(61, 42, 29, 0.05);
        transform: scale(1.05);
    }

        .menu-toggle:hover .bar {
            background-color: #c01c24;
        }

/* Main Content Layout */
.main-content {
    flex: 1;
    padding: 40px 30px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
}

/* Footer Layout */
.site-footer {
    background-color: #261c14;
    color: #e5dec9;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    border-top: 2px solid #261c14;
}

/* Responsive Breakpoint (Mobile View) */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-section {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fdfbf7;
        padding: 20px;
        border-top: 1px solid #eae5d8;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        z-index: 1000;
    }

        .nav-section.active {
            display: block;
        }

        .nav-section ul {
            flex-direction: column;
            gap: 15px;
        }

        .nav-section li {
            margin-left: 0;
            text-align: center;
        }

        .nav-section a {
            display: block;
            font-size: 1.2rem;
            padding: 10px 0;
            color: #3d2a1d;
        }

            .nav-section a::after {
                display: none;
            }

    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}
