
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* full viewport height */
	background-color: #D8D8C0; /* Replace with your desired color */
}

/* Make main content grow to fill available space */
.container {
    flex: 1; /* this pushes the footer down */
}

/* Optional: Footer styling */
footer {
    background-color: #2F2F2F; /* or whatever you have */
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

/* Members login page */
.container {
    max-width: 500px;
    margin: 3rem auto;
    text-align: center;
    flex: 1; /* keeps footer at bottom */
}

.captcha-image {
    border: 2px solid #ccc;
    border-radius: 5px;
    display: block;
    margin: 10px auto;
    width: 200px;   /* match image width */
    height: 70px;   /* match image height */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Login form inputs/buttons */
input[type="password"],
input[type="text"] {
    width: 80%;
    padding: 0.5rem;
    margin: 0.3rem 0;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

button[type="submit"] {
    background-color: #D4BFAA;
    color: #2F2F2F;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #c0a87d;
}

/* CAPTCHA */
.captcha-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
    text-align: center;
}

.captcha-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.captcha-image {
    border: 2px solid #ccc;
    border-radius: 8px;
    width: 240px;       /* bigger width */
    height: 90px;       /* bigger height */
    object-fit: cover;
}

.refresh-captcha {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s;
}

.refresh-captcha:hover {
    background-color: #0056b3;
}

#captcha {
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100%;
    max-width: 250px;
    text-align: center;
}


/* Dropdowns */
#nav .dropdown {
    position: relative;
    display: inline-block;
}

#nav .dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(28,28,28,0.95);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
}

#nav .dropdown-content a {
    color: #fff;
    padding: 10px 12px;
    text-decoration: none;
    display: block;
    text-align: left;
}

#nav .dropdown:hover .dropdown-content {
    display: block;
}

#nav a:hover, #nav .active > a {
    background-color: #555;
    color: #fff;
}

/* Submenu arrow */
.submenu-arrow {
    font-size: 0.7em;
    margin-left: 5px;
}

/* Mobile styles */
.navPanelToggle {
    display: none;
}

@media (max-width: 1380px) {
    #nav {
        display: none;
        flex-direction: column;
    }
    .navPanelToggle {
        display: block;
        cursor: pointer;
    }
    #nav.show {
        display: flex;
    }
    .dropdown-content {
        position: relative;
        box-shadow: none;
        min-width: 100%;
    }
    .dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .dropdown > a.active-arrow .submenu-arrow {
        transform: rotate(180deg);
    }
}

/* -------------------------
   Navigation container
------------------------- */
#nav {
    display: flex;
    justify-content: space-evenly;
    align-items: stretch;
    width: 100%;
    position: relative;
    z-index: 1000;
    background: transparent; /* remove black bar */
    margin: 0;
    padding: 0;
}

/* Each dropdown (menu item wrapper) takes equal width */
.dropdown {
    flex: 1;
    position: relative; /* for submenu positioning */
    text-align: center;
}

/* Top-level menu links */
#nav > .dropdown > a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px; /* slimmer bar */
    padding: 0 0;

    color: #fff;
    font-weight: bold;
    text-decoration: none;
    
    /* Wood texture background */
    background-image: url("/assets/textures/wood.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Text shadow for readability */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    transition: background-color 0.3s, transform 0.2s;
}

/* Remove right border on last item */
#nav > .dropdown:last-child > a {
    border-right: none;
}

/* Hover highlight */
#nav > .dropdown > a:hover,
.dropdown:hover > a {
    background-color: rgba(255,255,255,0); /* subtle overlay */
    transform: scale(1.03);
} 

/* Active page highlight */
#nav .active > a {
	background-color: transparent;
}

/* -------------------------
   Dropdown menu (submenus)
------------------------- */
.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 180px; /* adjust width */
    z-index: 999;

    /* Wood texture background */
    background-image: url("/assets/textures/wood.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border-radius: 4px;
}

/* Submenu links */
.dropdown-content a {
    display: block;
    padding: 10px;
    color: #fff;
    text-align: center;
    text-decoration: none;

    background: rgba(0,0,0,0.3); /* dark overlay for readability */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);

    transition: background 0.3s, color 0.3s;
}

/* Highlight submenu item on hover */
.dropdown-content a:hover {
    background-color: rgba(255,255,255,0.2); /* light overlay */
    color: #000;
}

/* Show submenu on hover */
.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Dropdown arrow */
.submenu-arrow {
    margin-left: 6px;
    font-size: 0.7em;
}

/* -------------------------
   Mobile toggle
------------------------- */
.navPanelToggle {
    display: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #fff;
}

/* -------------------------
   Responsive (mobile)
------------------------- */
@media (max-width: 768px) {
    #nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    #nav.show {
        display: flex;
    }

    .dropdown {
        flex: none;
        width: 100%;
    }

    .dropdown-content {
		display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        width: 100%;
        background-image: none !important;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    #nav > .dropdown > a {
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
		background-image: none !important;
    }

    #nav > .dropdown:last-child > a {
        border-bottom: none;
    }

    .dropdown-content a {
        background: rgba(0,0,0,0.3);
    }
}
