* {
    box-sizing: border-box;
}

body { 
    margin: 0; 
    padding: 0 0 40px 0; 
    font-family: Arial, sans-serif; 
    background: #F0F8FF; 
    color: #333; 
    line-height: 1.5;
}

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

.form-card, .dashboard-card, .profile-card { 
    background: white; 
    width: 100%;
    max-width: 450px; 
    margin: 40px auto; 
    padding: 30px; 
    border-radius: 8px;
    border: 1px solid #999999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
}

.profile-card { 
    max-width: 700px; 
}

.dashboard-card {
    max-width: 500px;
}

/* === CLASSIC 2-COLUMN FLOAT SYSTEM FOR REGISTRATION === */
.form-card {
    max-width: 900px; 
}

.form-card form::after {
    content: "";
    display: table;
    clear: both;
}

.form-card .form-group { 
    float: left;
    width: 48%; 
    margin-right: 4%;
    margin-bottom: 15px; 
}

/* Every second field sits perfectly on the right edge */
.form-group:nth-child(even) {
    margin-right: 0;
}

/* Force headings, uploads box, bio, and submit button to be full width */
.form-card h2,
.form-card .form-group[style*="dashed"],
.form-card .form-group:last-of-type,      
.form-card button[type="submit"] {
    width: 100% !important;
    float: none !important;
    clear: both;
}

label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold; 
    font-size: 0.95em;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
select { 
    width: 100%; 
    padding: 11px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 1em;
    background: #fff;
}

input[type="file"] { 
    width: 100%; 
    padding: 8px 0; 
    font-size: 0.95em;
}

textarea { 
    width: 100%; 
    height: 150px; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 1em;
    resize: vertical; 
}

button, .view-btn { 
    display: block;
    width: 100%; 
    padding: 12px 20px; 
    font-size: 1em; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold; 
    text-align: center;
    text-decoration: none;
    border: none;
}

button[type="submit"], .btn-success {
    background: #1D4D7A; 
    color: white; 
}

button[type="submit"]:hover, .btn-success:hover { 
    background: #333333; 
}

.view-btn, .btn-primary { 
    background: #1D4D7A; 
    color: white; 
}

.view-btn:hover, .btn-primary:hover { 
    background: #333333; 
}

.alert { 
    padding: 12px; 
    margin-bottom: 20px; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 0.95em;
}

.alert-error { 
    background: #f8d7da; 
    color: #721c24; 
    border: 1px solid #f5c6cb; 
}

.alert-success { 
    background: #d4edda; 
    color: #155724; 
    border: 1px solid #c3e6cb; 
}

.login-link { 
    text-align: center; 
    margin-top: 15px; 
    display: block; 
    color: #333333; 
    text-decoration: none; 
    font-weight: bold;
}

.directory-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
    justify-content: center; 
}

.member-card { 
    background: white; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    width: 100%; 
    max-width: 280px; 
    padding: 20px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.member-img { 
    width: 100%; 
    aspect-ratio: 1 / 1; 
    object-fit: cover; 
    border-radius: 6px; 
    border: 1px solid #eee; 
    margin-bottom: 15px; 
}

.member-name { 
    font-size: 1.3em; 
    margin: 0 0 5px 0; 
    color: #333; 
    text-transform: capitalize; 
}

.member-meta { 
    font-size: 0.9em; 
    color: #666; 
    margin-bottom: 20px; 
    line-height: 1.4; 
}

.no-members { 
    text-align: center; 
    font-size: 1.2em; 
    color: #777; 
    width: 100%; 
    padding: 40px 0; 
}

/* === MOBILE LAYER COLLAPSE === */
@media (max-width: 768px) {
    body { padding-bottom: 20px; }
    
    .form-card, .dashboard-card, .profile-card { 
        margin: 15px auto; 
        padding: 20px; 
        border-radius: 0; 
        box-shadow: none;
        border-left: none;
        border-right: none;
    }
    
    .form-card .form-group {
        width: 100% !important; 
        margin-right: 0 !important;
        float: none !important;
    }
}
        /* Desktop styles (Default) */
        .region-nav-container {
            background: #ffffff; 
            border: 1px solid #eee; 
            border-radius: 8px; 
            padding: 20px; 
            margin-bottom: 40px; 
            box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        }
        .region-nav-title {
            font-size: 1.1em; 
            color: #1D4D7A; 
            margin-top: 0; 
            margin-bottom: 15px; 
            text-transform: none; 
            letter-spacing: 0.5px; 
            font-weight: bold; 
            text-align: center;
        }
        .region-desktop-links {
            display: flex; 
            flex-wrap: wrap; 
            gap: 10px; 
            justify-content: center;
        }
        .region-mobile-dropdown {
            display: none; /* Hidden on desktop */
            width: 100%;
            padding: 12px;
            font-size: 1em;
            font-weight: bold;
            color: #495057;
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
        }

        /* Mobile styles (Screens under 768px wide) */
        @media (max-width: 768px) {
            .region-nav-container {
                padding: 15px;
                margin-bottom: 20px; /* Reduced margin for tighter mobile layouts */
            }
            .region-nav-title {
                font-size: 0.95em;
                margin-bottom: 10px;
            }
            .region-desktop-links {
                display: none; /* Hide the big button wall */
            }
            .region-mobile-dropdown {
                display: block; /* Show the dropdown menu */
            }
        }
        /* Dashboard Image Upload Previews */
.dashboard-images-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.dashboard-image-box {
    flex: 1;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
}
.dashboard-thumb {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
}

