/* layout.css */
header {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 10px 0;
}

/* Header and navigation styling */
header nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li {
    position: relative;
    margin: 0;
    padding: 0;
    flex: 1;
    /* Ensures menu items are evenly spaced */
}

header nav ul li a {
    text-decoration: none;
    color: var(--yodb-green);;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    /* Adjust height to preference */
    padding: 0 20px;
    /* Horizontal padding only */
    background-color: #FFF;
    transition: background-color 0.3s ease;
    text-align: center;
    border-bottom:10px var(--yodb-green) solid;
}

header nav ul li a:hover {
    background-color: #004d00;
    color: #FFF;
}

/* Submenu styles */
.submenu {
    position: absolute;
    color: var(--yodb-green);
    top: 100%;
    left: 0;
    background-color: #FFF;
    border: 1px solid var(--yodb-green);
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    /* Ensure full width */
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    /* Start above */
    pointer-events: none;
    /* Disable interaction when hidden */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.submenu li a {
    padding: 10px 15px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    /* Horizontal centring */
    align-items: center;
    /* Vertical centring */
    transition: background-color 0.5s ease;
    height: 50px;
    /* Set a consistent height */
    text-align: center;
    border-bottom: 0px var(--yodb-green) solid;
}

.submenu li a:hover {
    background-color: var(--yodb-green);
    color: #FFF;
}


/* Show submenu on hover or focus */
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Show submenu on hover */
.has-submenu:hover .submenu {
    display: block;
}

.has-submenu a {
    cursor: pointer;
}

.about ol,
.about ul {
    list-style-type:none;
}
.events {
    padding: 20px;
    background-color: #f4f4f4;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.event-card {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.event-card:hover {
    transform: translateY(-5px);
}

.gallery {
    padding: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    max-width: 250px;
    max-height: 225px;
    height: auto;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.5);
    z-index: 2;
    /* Ensures the image hovers over other elements */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
}

footer {
    padding: 15px;
    background-color: #222;
    color: white;
    text-align: center;
}

.see-more {
    text-align: right;
}

.alert {
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: bold;
}

.warning {
    background-color: #ffcccc;
    color: #a00;
    border: 1px solid #a00;
    padding: 10px 25px;
    margin-bottom: 10px;
}

.warning:empty {
    display: none;
}

.notice {
    max-width: 30%;
    background-color: #ccffcc;
    color: #060;
    border: 1px solid #060;
    padding:10px;
    margin: 10px auto;
    text-align:center;
}

.info1 {
    max-width: 95%;
    background-color: #dbeeff;     /* Soft blue background */
    color: #0a3c7d;                /* Muted navy text */
    border: 1px solid #0a3c7d;     /* Matching border */
    padding: 10px 25px;
    margin: 10px auto;
    text-align: center;
}

.info {
    max-width: 75%;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 10px 25px;
    margin: 10px auto;
    text-align: center;
}


.contact-club .notice {
    max-width: 50%;
    background-color: #ccffcc;
    color: #060;
    border: 1px solid #060;
    padding:10px;
    margin: 10px auto;
    text-align:center;
}

/* 🛠️ Ensure `.formgroup` properly aligns label and inputs */
.formgroup {
    max-width: 67%;
    padding: 5px 0;
    margin: auto;
    display: flex;
    flex-direction: column; /* Ensures label and input stack properly */
    align-items: flex-start; /* Prevents full-width stretching */
}

/* 🛠️ Fix label spacing */
.formgroup label {
    display: block;
    margin-bottom: 3px; /* Reduce space between label and input */
}

/* 🛠️ Fix input spacing */
.formgroup input,
.formgroup textarea,
.formgroup select {
    padding: 6px 10px;
    height: 30px;
    border-radius: 5px;
    margin: 3px 0 10px 0; /* Reduce excessive spacing */
    display: block;
}

/* 🛠️ Fix textareas */
.formgroup textarea {
    height: 7em;
    width: 50em;
}

/* 🛠️ Fix submit button width */
input[type="submit"],
button[type='submit'] {
    min-width: 150px;
    min-height: 35px;
    margin: 20px auto; /* Centers the button */
    background: #367C1A;
    border-radius: 50px;
    font-weight: bold;
    color: white;
    display: block; /* Prevents full-width stretching */
    text-align: center;
    width: auto; /* Ensures button does not stretch full width */
    padding: 10px 20px;
}

/* 🛠️ Ensure disabled submit button styling */
input[type="submit"]:disabled {
    background: darkgrey;
}


.gallery-folders {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.gallery-folder {
    width: 200px;
    text-align: center;
}

.gallery-folder a {
    display: block;
    text-decoration: none;
    color: #333;
}

.gallery-folder img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}

.gallery-folder span {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.toggle-buttons {
    display: flex;
    gap: 10px;
}

.toggle-buttons input[type="radio"] {
    visibility: hidden; /* Hide the default radio buttons */
}

.toggle-buttons label {
    padding: 10px 20px;
    border: 1px solid var(--yodb-green);
    background-color: #f8f9fa;
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-align: center;
    display: inline-block;
}

/* Change appearance when selected */
.toggle-buttons input[type="radio"]:checked + label {
    background-color: var(--yodb-green-transparent);
    color: white;
    font-weight: bold;
    border-color: var(--yodb-green);
}

/* Add a hover effect */
.toggle-buttons label:hover {
    background-color: #e0e0e0;
}


.dashboard {
    text-align: center;
    padding: 20px;
}

.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: auto;
}

.dashboard-card {
    background: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 5px 20px;
    margin:5px 0;
    text-align: center;
    width: 250px;
    transition: 0.3s;
    text-decoration: none;
    color: black;
}

.dashboard-card:hover {
    background: var(--yodb-green);
    color: white;
    transform: scale(1.05);
}

.dashboard-card h3 {
    margin: 5px 0;
}

.dashboard-card.logout {
    background: #ffe6e6;
    border-color: #ff4d4d;
}

.dashboard-card.logout:hover {
    background: #ff4d4d;
    color: white;
}

.dashboard-card.admin,
.dashboard-card.user {
    background: #e6f7ff;
    border-color: #007bff;
}

.dashboard-card.admin:hover,
.dashboard-card.user:hover {
    background: #007bff;
    color: white;
}

.admin-events {
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.create-event {
    padding: 8px 12px;
    background: var(--yodb-green-transparent);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    min-width:150px;
    text-align:center;
}

.create-event:hover {
    background:var(--yodb-green);
    transition: background-color 0.3s ease-in-out;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.events-table th, .events-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.title-col {
    width: 50%;
}

.date-col {
    width: 20%;
}

.actions-col {
    width: 30%;
    text-align: center;
}

.actions-cell {
    text-align: right;
}

.edit-button, .delete-button {
    padding: 6px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.edit-button {
    border: #ffc107 solid 2px;
    color: var(--text-color);
    margin-right: 5px;
}

.edit-button:hover {
    border: #d7a200 solid 2px;
    background: #ffc107;
    transition: background-color 0.3s ease-in-out;
}

.delete-button {
    border: #dc3545 solid 2px;
    color: var(--text-color);
}

.delete-button:hover {
    border: #7f1f29 solid 2px;
    background: #dc3545;
    color:#FFF;
    transition: background-color 0.3s ease-in-out;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 5px; /* Ensures spacing between checkbox and label */
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.members-list {
    width:90%;
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.members-table th,
.members-table td {
    padding: 10px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.members-table th {
    background-color: #367C1A;
    color: white;
    font-weight: bold;
    text-align: center;
}

.members-table tr:nth-child(even) {
    background-color: #f9f9f9; /* Light grey for alternating rows */
}

.members-table tr:hover {
    background-color: #e0e0e0; /* Highlight row on hover */
}

.members-table td {
    white-space: nowrap;
}

.members-table th:first-child,
.members-table td:first-child {
    padding-left: 20px;
}

.members-table td:last-child {
    padding-right: 20px;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    .members-table {
        font-size: 14px;
    }

    .members-table th,
    .members-table td {
        padding: 8px;
    }
}

.profile-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: auto;
    gap: 20px;
}

.profile-card {
    display: flex; 
    align-items: center;
    justify-content: space-between;
    background: #f4f4f4;
    padding: 20px;
    max-width: 75%;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    margin: auto;
    text-align: left;
}


.profile-info {
    flex: 1;
}

.profile-card h2 {
    margin-bottom: 10px;
    text-align:center;
}

.profile-card p {
    font-size: 16px;
    line-height: 1.4;
}

.profile-card a {
    display: inline-block;
    padding: 10px 15px;
    margin-top: 15px;
    background: #367C1A;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

.profile-card a:hover {
    background: #2a5e13;
}

.profile-logo {
    flex-shrink: 0;
}

.profile-logo img {
    width: 150px;
    height: auto;
}

.expired-member {
    background-color: #f4f4f4;
    color: #888;
}

.no-results {
    text-align: center;
    font-style: italic;
    color: #888;
}


.member-administration {
    max-width:75%;
    margin:auto;
}
/* ✅ Permissions Management Styling */
.member-administration .text {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

/* ✅ Align checkboxes */
.member-administration input[type="checkbox"] {
    margin-right: 10px;
}

#updatePermsButton,
#updateRolesButton {
    margin-top:10px;
    background-color:#6fbf73;
}

#updatePermsButton:hover,
#updateRolesButton:hover {
    background-color: #58bd5d; /* Slightly darker on hover */
}

.two-column .button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.two-column button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: 0.3s ease;
    width: 45%; /* ✅ Ensures full width inside column */
}

/* ✅ Softer green for "Extend Membership" */
button[name="adjust"][value="+1year"] {
    background-color: #6fbf73; /* Softer green */
}

button[name="adjust"][value="+1year"]:hover {
    background-color: #58bd5d; /* Slightly darker on hover */
}

/* ✅ Softer red for "Decrease Membership" */
button[name="adjust"][value="-1year"] {
    background-color: #e57373; /* Muted red */
}

button[name="adjust"][value="-1year"]:hover {
    background-color: #eb4e4e; /* Slightly darker on hover */
}

.honorary {
    background-color:gold;
    width: 91%;
    margin-top:10px;
}

.checkbox-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
    justify-content: space-between;
}

.checkbox-pills .pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}


.checkbox-pills input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-pills label {
    display: inline-block;
    padding: 8px 14px;
    border: 2px solid #999;
    border-radius: 20px;
    background-color: #f4f4f4;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
    font-size: 0.95em;
}

.checkbox-pills input[type="checkbox"]:checked + label,
.checkbox-pills label.selected {
    background-color: #367C1A;
    color: white;
    border-color: #367C1A;
}


.checkbox-pills legend,
fieldset.checkbox-pills {
    border: none;
}


.role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 5px 0;
}

.role-badges .pill {
    display: inline-block;
    padding: 6px 12px;
    background-color: #eef5ea;
    border: 2px solid #4a9449;
    border-radius: 20px;
    font-size: 0.9em;
    color: #2b5d2a;
    font-weight: 500;
}

.manage-roles form {
    margin-top: 20px;
    padding: 15px;
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 15px;
}

.manage-roles form .formgroup {
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

.manage-roles form select {
    padding: 6px 10px;
}

.manage-roles form button {
    align-self: flex-start;
    padding: 8px 18px;
    font-size: 1em;
    border: none;
    background-color: #4CAF50;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.manage-roles form button:hover {
    background-color: #3e9444;
}


form.quick-assign-form .formgroup {
    margin-bottom: 15px;
}

form.quick-assign-form select {
    padding: 6px;
    font-size: 0.95em;
    width: 300px;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95em;
}

.audit-table th,
.audit-table td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
}

.audit-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.audit-table tr:nth-child(even) {
    background-color: #f9f9f9;
}


.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-form label {
    font-weight: bold;
}

.filter-form select,
.filter-form button {
    padding: 6px;
    font-size: 0.95em;
}

.gdpr-download-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.gdpr-download-buttons a.button {
    padding: 10px 20px;
    background: #367C1A;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    transition: background 0.2s ease-in-out;
}

.gdpr-download-buttons a.button:hover {
    background: #2c6215;
}