﻿/* =========================================================
   BURIANI MASTER PAGE
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    border: 3px solid #261c14;
    background-color: #261c14;
}

body {
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #ffffff;
    overflow-x: hidden;
}


/* =========================================================
   SITE CONTAINER
   ========================================================= */

.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    background-color: #fdfbf7;
    color: #3d2a1d;
    border-bottom: 2px solid #261c14;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 10px 15px 10px 30px;
    z-index: 1000;
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
    flex: 0 0 auto;
}

    .logo img {
        display: block;
        height: 101px;
        width: auto;
        max-width: 100%;
    }


/* =========================================================
   RIGHT SIDE
   ========================================================= */

.header-right {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: auto;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.nav-section {
    display: block;
    width: auto;
}


    /* Main navigation row */

    .nav-section ul {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        list-style: none;
        margin: 0;
        padding: 0;
    }


    .nav-section li {
        display: block;
        margin-left: 25px;
        white-space: nowrap;
    }


    /* Navigation links */

    .nav-section a {
        display: inline-block;
        color: #3d2a1d;
        text-decoration: none;
        font-weight: 500;
        font-size: 16px;
        padding: 5px 0;
        position: relative;
        transition: color 0.3s ease;
    }


        .nav-section a:hover {
            color: #c01c24;
        }


    /* Animated underline */

    .nav-section ul li a::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: #c01c24;
        transform: scaleX(0);
        transform-origin: bottom right;
        transition: transform 0.25s ease-out;
    }


    .nav-section ul li a:hover::after {
        transform: scaleX(1);
        transform-origin: bottom left;
    }


/* =========================================================
   LOGGED-IN SECOND ROW
   ========================================================= */

.logged-in-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-top: 8px;
    gap: 25px;
}


/* Welcome message */

.welcome-row {
    color: #3d2a1d;
    font-size: 14px;
    white-space: nowrap;
}


.user-welcome {
    color: #3d2a1d;
    font-weight: 600;
}


/* Logout */

.logout-link {
    color: #c01c24 !important;
    text-decoration: none;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap;
}


    .logout-link:hover {
        color: #8f151b !important;
        text-decoration: underline;
    }


    /* Do not apply navigation underline to logout */

    .logout-link::after {
        display: none !important;
    }


/* =========================================================
   HAMBURGER
   ========================================================= */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 34px;
    height: 27px;
    padding: 3px 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}


    .menu-toggle .bar {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #3d2a1d;
        border-radius: 10px;
        transition: all 0.3s ease;
    }


    .menu-toggle:hover .bar {
        background-color: #c01c24;
    }


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px;
    background-color: #ffffff;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    background-color: #261c14;
    color: #e5dec9;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    border-top: 2px solid #261c14;
}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 768px) {


    /* =====================================================
       MOBILE HEADER
       ===================================================== */

    .site-header {
        display: flex;
        align-items: center;
        padding: 8px 15px;
        min-height: 90px;
    }


    /* Logo remains LEFT */

    .logo {
        flex: 0 0 auto;
    }


        .logo img {
            height: 75px;
            width: auto;
        }


    /* =====================================================
       HAMBURGER - FAR RIGHT
       ===================================================== */

    .menu-toggle {
        display: flex;
        /*
           This is the important part.

           margin-left:auto consumes all remaining space,
           pushing the hamburger against the right side.
        */

        margin-left: auto;
        flex: 0 0 auto;
        position: relative;
        z-index: 1200;
    }


    /* =====================================================
       HEADER-RIGHT

       It must NOT occupy space between logo and hamburger.
       ===================================================== */

    .header-right {
        position: static;
        display: block;
        width: 0;
        margin: 0;
        padding: 0;
    }


    /* =====================================================
       MOBILE NAVIGATION
       ===================================================== */

    .nav-section {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fdfbf7;
        padding: 15px 20px 20px 20px;
        border-top: 1px solid #eae5d8;
        border-bottom: 2px solid #261c14;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
        z-index: 1100;
    }


        /* Hamburger opens menu */

        .nav-section.active {
            display: block;
        }


        /* =====================================================
       MOBILE MENU ITEMS
       ===================================================== */

        .nav-section ul {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            width: 100%;
            gap: 3px;
        }


        .nav-section li {
            width: 100%;
            margin-left: 0;
            text-align: center;
        }


        .nav-section ul li a {
            display: block;
            width: 100%;
            padding: 11px 10px;
            font-size: 17px;
            text-align: center;
        }


            /* Remove desktop underline */

            .nav-section ul li a::after {
                display: none;
            }


            .nav-section ul li a:hover {
                background-color: rgba(61, 42, 29, 0.04);
                color: #c01c24;
            }


    /* =====================================================
       LOGGED-IN MOBILE SECTION
       ===================================================== */

    .logged-in-row {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-top: 12px;
        padding-top: 12px;
        gap: 8px;
        border-top: 1px solid #e5dec9;
    }


    .welcome-row {
        position: static;
        margin: 0;
        padding: 0;
        text-align: center;
        font-size: 14px;
        white-space: normal;
    }


    .logout-link {
        display: block;
        padding: 8px 20px;
        font-size: 16px !important;
        text-align: center;
    }


    /* =====================================================
       HAMBURGER X ANIMATION
       ===================================================== */

    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }


    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }


    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }


    /* =====================================================
       MAIN CONTENT
       ===================================================== */

    .main-content {
        padding: 30px 20px;
    }


    /* =====================================================
       FOOTER
       ===================================================== */

    .site-footer {
        padding: 25px 15px;
    }
}


/* =========================================================
   SMALL MOBILE PHONES
   ========================================================= */

@media (max-width: 480px) {

    .site-header {
        min-height: 78px;
        padding: 7px 12px;
    }


    .logo img {
        height: 62px;
    }


    .menu-toggle {
        width: 31px;
        height: 25px;
    }


    .nav-section {
        padding: 12px 15px 18px 15px;
    }


        .nav-section ul li a {
            font-size: 16px;
            padding: 10px 8px;
        }


    .welcome-row {
        font-size: 13px;
    }


    .main-content {
        padding: 25px 15px;
    }
}
