body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f4f4f4; /* Changed from #3c6e2d */
    color: #333;
}

.sticky-header {
    background-color: #3c6e2d;
    border-bottom: 15px solid #0a2d4d;
    width: 100%;
    min-height: auto;
}

.header-container {
    display: flex;
    align-items: center;
    padding: 0 40px;
    position: relative;
    min-height: 0;
}

.logo {
    margin: 0;
    padding: 0;
}

.logo img {
    display: block;
    width: auto;
    max-height: 150px;
}

.header-center-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 20px;
    color: #FFFFFF;
}

.header-branding {
    text-align: center;
}

.header-branding h1 {
    font-size: 1.8rem;
    margin: 0;
    color: #FFFFFF;
}

.header-branding p {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #FFFFFF;
}

.header-weather-corner {
    position: absolute;
    bottom: 8px;
    right: 20px;
    color: #FFFFFF;
}

.weather-text {
    color: #FFFFFF;
}

#weather-box {
    background: transparent; 
    padding: 0;
    margin: 0;
}

.sticky-header .logo img {
    max-height: 150px;
}

.hamburger-menu {
    display: none;
    color: #FFFFFF;
    font-size: 2.5rem;
    cursor: pointer;
}

.nav-links {
    display: flex; 
    gap: 20px; 
    list-style: none; 
    margin: 0; 
    padding: 0;
}

.nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: #e0e0e0;
    text-decoration: underline;
}

.container {
    width: 80%; /* Changed from 90% */
    margin: 0 auto;
    padding: 2rem 0; /* Changed from 2rem and removed background-color */
    /* Removed overflow: hidden; */
    /* Removed background-color: #fff; */
}

footer, .site-footer {
	background: #3c6e2d;
    text-align: center;
    color: #FFFFFF;
    padding: 20px 0;
}

footer a {
    color: #FFFFFF;
}

#login-form {
    background: #fff;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 400px; /* Centers and limits width */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
#login-form .form-group {
    margin-bottom: 1.5rem;
}
#login-form input {
    width: 100%;
    padding: .7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Prevents width overflow */
}
#login-form button {
    width: 100%;
    padding: .8rem;
    background-color: #3c6e2d; /* Using site primary green */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
}
#login-form button:hover {
    background-color: #0a2d4d; /* Site dark blue on hover */
}

/* Form Styles */
#application-form {
    background: #fff;
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 5px;
}

#application-form h2 {
    text-align: center;
    margin-bottom: 1rem;
}

#application-form .form-group {
    margin-bottom: 1rem;
}

#application-form label {
    display: block;
    margin-bottom: .5rem;
}

#application-form input[type="text"],
#application-form input[type="email"],
#application-form input[type="password"],
#application-form select {
    width: 100%;
    padding: .5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

#application-form .honeypot {
    display: none;
}

#application-form .terms {
    margin-top: 2rem;
}

#application-form button {
    display: block;
    width: 100%;
    padding: .7rem;
    border: none;
    background: #333;
    color: #fff;
    cursor: pointer;
    border-radius: 3px;
}

#application-form button:hover {
    background: #555;
}

#additional-applicants .applicant {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* New styles for form layout */
.form-row {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1rem;
    margin-bottom: 1rem; /* Add space below each row */
}

.input-group {
    flex: 1 1 0; /* Allow flex items to grow and shrink */
    min-width: 150px; /* Prevent fields from becoming too small */
    display: flex;
    flex-direction: column;
}

/* Last row in a group shouldn't have extra margin */
.form-group .form-row:last-child {
    margin-bottom: 0;
}

/* Set input width to 100% of its container (.input-group) */
.input-group input {
    width: 100%;
}

/* Password Requirements */
#password-requirements {
    display: none;
    margin-top: 5px;
    background: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.req-item {
    font-size: 0.85rem;
    margin-bottom: 3px;
    color: #d9534f; /* Red for invalid */
    display: flex;
    align-items: center;
}

.req-item.valid {
    color: #28a745; /* Green for valid */
}

.req-item .icon {
    margin-right: 8px;
    width: 15px;
    text-align: center;
}

/* Dashboard Styles */
.dashboard-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dashboard-card h3, .member-card h3 {
    margin-top: 0;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #333;
}

.profile-details p {
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.profile-details p strong {
    flex: 0 0 190px; /* Matches the sidebar card alignment */
    color: #555;
    width: auto; /* Overrides the old 150px width */
}
.profile-details p .value {
    flex: 1;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    color: #fff;
    background-color: #777;
    text-transform: capitalize;
}

.status-badge.pending { background-color: #f0ad4e; }
.status-badge.approved, .status-badge.active { background-color: #28a745; }
.status-badge.rejected { background-color: #d9534f; }

.password-reset-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    width: 100%;
    clear: both; /* Prevents interference from floated elements */
}
.password-reset-container a {
    text-decoration: none;
    font-weight: bold;
    color: #0a2d4d;
}

/* Dashboard Layout Grid */
.dashboard-layout {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-top: 2rem;
}
.dashboard-content {
    flex: 1;
    color: #333333; /* Keep welcome text white if background is green */
}
.dashboard-sidebar {
    width: 550px;
    flex-shrink: 0;
    margin-right: 30px;
}
.member-card {
    background: #FFFFFF !important; /* Forces white background */
    color: #333333 !important;      /* Forces dark gray text */
    padding: 35px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.member-card h3 {
    color: #3c6e2d !important;      /* Site Green for heading */
    margin-top: 0;
    border-bottom: 2px solid #3c6e2d;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.member-card h4 {
    color: #3c6e2d !important;
    margin-bottom: 15px;
}
.member-card p {
    display: flex;
    align-items: flex-start; /* Keeps labels at the top if text wraps */
    margin-bottom: 15px;
    line-height: 1.4;
}
.member-card p strong {
    flex: 0 0 190px; /* Fixed width for labels */
    margin-right: 10px;
    width: auto; /* Override old fixed width */
    color: #0a2d4d;
    font-weight: 800;
}
.member-card p span.value {
    flex: 1; /* Allows value to take up remaining space */
    word-wrap: break-word;
}
.member-card strong {
    color: #0a2d4d !important;      /* Site Dark Blue for labels */
}
.member-card hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

.registration-summary-header {
    margin-top: 1.5rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
}

.complete-payment-header {
    text-align: center;
    margin-top: 2rem;
}

.payment-button-container {
    display: flex;
    justify-content: center;
}

/* Responsive fix */
@media (max-width: 850px) {
    .dashboard-layout {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
    }
}

.nav-links a, .nav-links a:visited {
    color: #FFFFFF;
}

.nav-links a:hover {
    text-decoration: underline;
    color: #e0e0e0;
}

.footer-separator {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin: 40px 0 20px 0;
    width: 100%;
}

footer, .site-footer {
	background: #3c6e2d;
    text-align: center;
    color: #FFFFFF;
    padding: 20px 0;
}

footer a {
    color: #FFFFFF;
}

/* Mobile styles for hamburger menu */
@media (max-width: 768px) {
    .header-container {
        align-items: center; /* Vertically center logo and hamburger */
    }
    .nav-links {
        display: none; /* Hide nav links by default on mobile */
    }
    .hamburger-menu {
        display: block;
    }
    .main-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #3c6e2d;
        z-index: 1000; /* Ensure it's above other content */
        text-align: center;
        padding: 20px 0;
    }
    .main-nav.active .nav-links {
        display: flex !important; /* Display as a flex column when active */
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }
    .main-nav.active .nav-links li {
        margin: 0.5rem 0;
    }
    .main-nav.active .nav-links li a {
        display: block;
        padding: 15px;
    }

/* Stack labels and values vertically on mobile */
.member-card p, 
.profile-details p {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px;
    margin-bottom: 15px;
}
/* Allow labels to take full width and stop pushing content off-screen */
.member-card p strong, 
.profile-details p strong {
    flex: none !important;
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 2px;
}
/* Ensure the value spans align correctly below labels */
.member-card p .value,
.profile-details p .value {
    width: 100%;
    padding-left: 0;
}
}

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.admin-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.admin-card h3 { border-bottom: 2px solid #007bff; padding-bottom: 10px; margin-bottom: 15px; color: #333; }
.admin-card ul { list-style: none; padding: 0; }
.admin-card li { margin-bottom: 10px; }
.admin-card a { text-decoration: none; color: #007bff; font-weight: 500; }

@media (max-width: 1024px) {
    .sticky-header {
        height: auto;
    }
    .header-container {
        flex-direction: column;
        height: auto;
        min-height: 0;
        padding: 20px 10px;
    }
    .logo,
    .header-center-stack,
    .header-weather-corner {
        position: static;
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .header-branding h1,
    .header-branding p,
    .weather-text {
        color: #FFFFFF;
    }
}

.news-widget { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); max-width: 600px; margin: 20px 0; text-align: left; }
.news-widget ul { list-style: none; padding: 0; }
.news-widget li { margin-bottom: 12px; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.news-widget a { color: #0a2d4d; font-weight: bold; text-decoration: none; display: block; }
.news-source { font-size: 0.8rem; color: #666; font-style: italic; }
.more-news-link { display: block; margin-top: 15px; font-weight: bold; color: #3c6e2d; text-decoration: none; font-size: 0.9rem; }

.scrollable-news-list {
    max-height: 600px; /* Adjust height as needed */
    overflow-y: auto;
    padding-right: 10px;
    margin: 0;
    list-style: none;
}
/* Optional: Style the scrollbar for a cleaner look */
.scrollable-news-list::-webkit-scrollbar {
    width: 8px;
}
.scrollable-news-list::-webkit-scrollbar-thumb {
    background: #0a2d4d;
    border-radius: 4px;
}

.success-container {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 5px;
    margin-top: 2rem;
}

/* Styles for forgot_password.php */
.form-group { 
    margin-bottom: 1.5rem; 
    text-align: left; 
} 
.form-group label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: bold; 
} 
.form-group input[type="email"] { 
    width: 100%; 
    padding: 0.75rem; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 1rem; 
    box-sizing: border-box; /* Ensures padding doesn't increase width */
}

/* Modal Overlay (Background) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); /* Dim the dashboard */
}
/* The actual popup box */
.modal-content {
    margin: 10% auto;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* X Close Button */
.close-modal {
    position: absolute;
    right: 20px; top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #777;
}
.close-modal:hover { color: #d9534f; }

/* --- Admin Dashboard Grid Layout --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.dashboard-grid .card { background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); border: 1px solid #ddd; }

.dashboard-grid .card h3 { margin-top: 0; border-bottom: 2px solid #3c6e2d; /* Site Green */ padding-bottom: 10px; color: #3c6e2d; font-size: 1.2rem; }

.dashboard-grid label { display: block; margin-top: 12px; font-weight: bold; color: #0a2d4d; /* Site Blue */ }

.dashboard-grid input[type='text'], .dashboard-grid input[type='email'] { width: 100%; padding: 8px; margin-top: 5px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }
