/* ============================================
   SECTION 1: MAIN CONTAINER STYLES
   Edit overall directory appearance here
   ============================================ */
.municipal-staff-directory {
    margin: 20px 0;
    width: 100%;
}

/* ============================================
   SECTION 2: GRID LAYOUT
   Edit grid columns and spacing here
   ============================================ */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
}

/* For tablets and smaller */
@media (max-width: 768px) {
    .staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* For mobile phones */
@media (max-width: 480px) {
    .staff-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   SECTION 3: STAFF CARD STYLES
   Edit card appearance, colors, and borders here
   ============================================ */
.staff-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   SECTION 4: PHOTO STYLES
   Edit image size and styling here
   ============================================ */
.staff-photo {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #f5f5f5;
}

.staff-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ============================================
   SECTION 5: STAFF INFO SECTION
   Edit spacing and padding here
   ============================================ */
.staff-info {
    padding: 20px;
}

/* ============================================
   SECTION 6: NAME STYLING
   Edit name font, size, and color here
   ============================================ */
.staff-name {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
}

/* ============================================
   SECTION 7: JOB TITLE STYLING
   Edit title font, size, and color here
   ============================================ */
.staff-title {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #3498db;
}

/* ============================================
   SECTION 8: DEPARTMENT STYLING
   Edit department display here
   ============================================ */
.staff-department {
    margin: 0 0 12px 0;
    font-size: 0.95em;
    color: #7f8c8d;
    font-style: italic;
}

/* ============================================
   SECTION 9: CONTACT INFO STYLING
   Edit email and phone appearance here
   ============================================ */
.staff-email,
.staff-phone,
.staff-term {
    margin: 8px 0;
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
}

.staff-email strong,
.staff-phone strong,
.staff-term strong {
    color: #2c3e50;
}

.staff-email a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.staff-email a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ============================================
   SECTION 10: BIOGRAPHY STYLING
   Edit bio text appearance here
   ============================================ */
.staff-bio {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.6;
}

.staff-bio p {
    margin: 0 0 10px 0;
}

.staff-bio p:last-child {
    margin-bottom: 0;
}

/* ============================================
   SECTION 11: TERM DATES STYLING
   Edit term date appearance here
   ============================================ */
.staff-term {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

/* ============================================
   SECTION 12: NO RESULTS MESSAGE
   Edit the message when no staff are found
   ============================================ */
.municipal-staff-directory > p {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 1.1em;
}

/* ============================================
   SECTION 13: ALTERNATIVE LAYOUT - LIST VIEW
   Uncomment this section to use a list layout instead of grid
   ============================================ */
/*
.staff-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.staff-card {
    display: flex;
    flex-direction: row;
}

.staff-photo {
    width: 200px;
    height: 250px;
    flex-shrink: 0;
}

.staff-info {
    flex: 1;
}
*/

/* ============================================
   SECTION 14: PRINT STYLES
   Styles for printing staff directory
   ============================================ */
@media print {
    .staff-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .staff-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ============================================
   SECTION 15: STAFF SUBMISSION FORM STYLES
   Edit form appearance here
   ============================================ */
.municipal-staff-form-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.municipal-staff-form {
    margin-top: 20px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus,
.form-row input[type="tel"]:focus,
.form-row input[type="date"]:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row input[type="file"] {
    padding: 8px 0;
}

.form-row small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 13px;
}

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .form-row-half {
        grid-template-columns: 1fr;
    }
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.staff-submit-button {
    background: #3498db;
    color: #ffffff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.staff-submit-button:hover {
    background: #2980b9;
}

.required {
    color: #e74c3c;
}

.form-note {
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 14px;
}

.staff-form-success {
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    margin-bottom: 20px;
}

.staff-form-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

.staff-form-error a {
    color: #721c24;
    text-decoration: underline;
}

/* ============================================
   SECTION 16: DEPARTMENTS DIRECTORY STYLES
   Edit departments grid appearance here
   ============================================ */
.municipal-departments-directory {
    margin: 20px 0;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .departments-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .departments-grid {
        grid-template-columns: 1fr;
    }
}

.department-card {
    background: #ffffff;
    border: 2px solid #3498db;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.2);
}

.department-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 20px;
}

.department-name {
    margin: 0 0 5px 0;
    font-size: 1.6em;
    font-weight: 700;
    color: #ffffff;
}

.department-head {
    margin: 0;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.department-info {
    padding: 20px;
}

.department-description {
    margin: 0 0 15px 0;
    color: #555;
    line-height: 1.6;
}

.department-location,
.department-email,
.department-phone,
.department-staff-count {
    margin: 10px 0;
    font-size: 0.95em;
    color: #555;
}

.department-email a {
    color: #3498db;
    text-decoration: none;
}

.department-email a:hover {
    text-decoration: underline;
}

.department-staff-count {
    padding-top: 10px;
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    color: #2c3e50;
    font-weight: 600;
}

/* ============================================
   SECTION 17: SINGLE DEPARTMENT PAGE STYLES
   Edit full department page appearance here
   ============================================ */
.municipal-department-page {
    margin: 30px 0;
}

.department-page-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 40px 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.department-page-title {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    font-weight: 700;
    color: #ffffff;
}

.department-page-head {
    margin: 0 0 20px 0;
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.95);
}

.department-page-description {
    margin: 20px 0;
    font-size: 1.1em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
}

.department-page-description p {
    margin: 0 0 15px 0;
}

.department-page-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.contact-item {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.95);
}

.contact-item strong {
    color: #ffffff;
}

.contact-item a {
    color: #ffffff;
    text-decoration: underline;
}

.contact-item a:hover {
    opacity: 0.8;
}

.department-page-staff {
    margin-top: 40px;
}

.staff-section-title {
    margin: 0 0 30px 0;
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}
