/* --- Global Styles --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Horizontal Header Layout --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000; /* Ensures the header stays on top of images/text */
    
    /* Keep your existing styles */
    display: flex;
    flex-direction: row;        
    align-items: center;        
    justify-content: flex-start;
    gap: 30px;
    width: 100%;
    background-color: #fdfaf5;
    padding: 10px 20px;
    border-bottom: 1px solid #e8e2d9;
    box-sizing: border-box;
    /* Remove any margin-bottom if it causes a weird gap */
}

.logo-container {
    width: 150px;              
    height: 150px;
    flex-shrink: 0;            
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}
/* Remove extra space around the container and heading */
.container {
    padding-top: 0 !important;
    margin-top: 10px !important; /* Adjust this to move the Welcome text closer to the top */
    padding-bottom: 0 !important;
    text-align: center;
}

.container h1 {
    margin: 0 !important;
    padding: 0 !important;
}

/* --- Navigation --- */
.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    width: 100%; 
}

.main-nav a {
    text-decoration: none;
    color: #4a5d4e;
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* --- Dropdown Styles --- */
.dropdown { position: relative; display: flex; align-items: center; }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; 
    left: 0;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 5px;
    padding: 10px 0; 
}
.dropdown-content a { color: #4a5d4e; padding: 8px 16px; display: block; text-transform: none; font-size: 0.85rem; }
.dropdown-content a:hover { background-color: #fdfaf5; color: #c09e85; }
.dropdown:hover .dropdown-content { display: block; }

/* --- Content & Cards --- */
.nav-grid { display: flex; flex-direction: column; gap: 15px; }
.nav-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e1e4e8;
}
.nav-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #3498db; }
.nav-card strong { display: block; font-size: 1.1em; margin-bottom: 5px; color: #2980b9; }

/* --- Home Layout (New) --- */
/* --- Home Layout (Updated) --- */
/* Ensure the home layout forces children into a row */
.home-layout { 
    display: flex; 
    flex-direction: row; /* Force side-by-side */
    gap: 30px; 
    justify-content: center; 
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 40px auto;
}

/* Ensure the nav-grid is ready to sit next to the Facebook feed */
.nav-grid { 
    display: flex; 
    flex-direction: column; /* Keeps your menu items stacked */
    gap: 15px;
    flex: 1; /* Allows it to take up available space */
    max-width: 400px;
}
.fb-wrapper {
    flex: 1;
    width: 100%;       /* Fluid width */
    min-width: 0;      /* This is the magic key for Flexbox: it allows the wrapper to shrink below its content size on mobile */
    max-width: 500px;  /* Set your preferred desktop width here */
}
.site-footer {
    background-color: #fdfaf5;
    border-top: 1px solid #e8e2d9;
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
    color: #4a5d4e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.site-footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.site-footer a {
    color: #c09e85;
    text-decoration: none;
    font-weight: bold;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #999;
}
/* Target the form that holds the login inputs in your header */
header form {
    display: flex;
    flex-direction: row; /* Forces items into a horizontal line */
    align-items: center; /* Centers inputs and buttons vertically */
    gap: 5px;            /* Adds a small space between them */
}

/* Optional: Ensure inputs aren't too wide */
header form input {
    width: 120px; /* Adjust this width to fit your header comfortably */
}

.total-display { font-size: 1.2em; font-weight: bold; color: #4a5d4e; margin-top: 20px; background: #fdfaf5; padding: 15px; border-radius: 10px; border: 1px solid #e8e2d9; }
.row { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.line-total { font-weight: bold; color: #555; width: 80px; }
form input, form select { padding: 8px; border: 1px solid #ddd; border-radius: 5px; }

/* --- Login Form & Logout Link --- */
.login-form { display: flex; gap: 5px; align-items: center; }
.login-form input { padding: 5px 8px; border: 1px solid #e8e2d9; border-radius: 4px; font-size: 0.8rem; width: 100px; background-color: #ffffff; }
.login-form button { padding: 5px 10px; background-color: #4a5d4e; color: #ffffff; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 0.8rem; }
.login-form button:hover { background-color: #c09e85; }

.login-link { color: #c09e85 !important; text-decoration: none; font-weight: bold; font-family: 'Georgia', serif; font-size: 0.9rem; text-transform: uppercase; }
.user-indicator { font-size: 0.9rem; color: #4a5d4e; font-weight: bold; font-family: 'Georgia', serif; margin-right: 10px; }

/* --- Mobile Toggle Styles --- */
.menu-toggle { display: none; cursor: pointer; padding: 15px; font-weight: bold; color: #4a5d4e; border: 1px solid #4a5d4e; border-radius: 5px; }

/* --- Mobile Adjustments --- */
@media screen and (max-width: 768px) {
    /* Header Wraps */
    .site-header { flex-wrap: wrap !important; justify-content: space-between !important; }
    .menu-toggle { display: block !important; order: 1; }
    
    /* Nav Toggle */
    .main-nav { display: none !important; width: 100% !important; text-align: center !important; flex-basis: 100% !important; order: 2 !important; }
    .main-nav.show { display: flex !important; flex-direction: column !important; }
    .main-nav a, .main-nav form { display: block !important; padding: 15px !important; border-bottom: 1px solid #eee !important; }
    
    /* Dropdown */
    .dropdown { display: block !important; }
    .dropdown-content { position: static !important; box-shadow: none !important; width: 100% !important; text-align: center !important; }

    /* Stack home content vertically on mobile */
.home-layout { 
        flex-direction: column !important; 
        /* align-items: center;  <-- REMOVE OR COMMENT OUT THIS LINE to stop vertical centering */
        width: 100%;
        display: flex;
    }
    
    .nav-grid {
        width: 90%;          /* Let it be slightly narrower than the screen */
        max-width: 400px;    /* Prevents it from getting too wide */
        margin: 0 auto;      /* This is the magic for horizontal centering */
    }

    .fb-wrapper { 
        width: 90%;          /* Matches the nav-grid width */
        max-width: 400px; 
        margin: 20px auto 0; /* Adds space above the feed and centers it horizontally */
    }
    .container h1 {
        margin-top: 10px; 
    }
    /* Add this to style.css */
.dropdown-content.show-dropdown { 
    display: block !important; 
}
}