/* =============================================================================
   ATIS Member Directory — Styles
   Covers: search form, member list entries, contact modal, member profile page.
   Colors use the ATIS brand palette:
     Primary (navy): #2C3F79
     Dark navy:      #1e2d57
     Accent (gold):  #DDB638
   ========================================================================== */

/* =============================================================================
   1. SEARCH FORM
   ========================================================================== */

#atis-search-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.search-field select {
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    /* Override any fixed height the theme applies to <select> elements,
       which would clip the visible text. */
    height: auto !important;
    min-height: 2.875rem;
    line-height: 1.5;
    box-sizing: border-box;
}

.search-field select:focus {
    outline: none;
    border-color: #2C3F79;
    box-shadow: 0 0 0 3px rgba(44, 63, 121, 0.1);
}

.search-field select:hover {
    border-color: #2C3F79;
}

.search-field select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

.search-field input[type="text"] {
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-field input[type="text"]:focus {
    outline: none;
    border-color: #2C3F79;
    box-shadow: 0 0 0 3px rgba(44, 63, 121, 0.1);
}

/* Official docs checkbox — animates in when Translator is selected */
.checkbox-row {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    margin-bottom: 0;
}

.checkbox-row.visible {
    opacity: 1;
    max-height: 100px;
}

.checkbox-field {
    width: 100%;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    line-height: 1.4;
    padding-left: 1rem;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-top: 0.125rem;
    transform: scale(1.2);
    cursor: pointer;
    accent-color: #2C3F79;
}

/* Search / Clear buttons */
.search-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.search-btn,
.clear-btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.search-btn {
    background: #2C3F79;
    color: white;
}

.search-btn:hover:not(:disabled) {
    background: #1e2d57;
    transform: translateY(-1px);
}

.search-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.clear-btn {
    background: #6c757d;
    color: white;
}

.clear-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Button loading state */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: atis-spin 1s linear infinite;
}

/* =============================================================================
   2. SEARCH RESULTS AREA
   ========================================================================== */

.no-search-message {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    font-size: 1.1rem;
}

.results-info {
    background: #e8ecf5;
    border: 1px solid #2C3F79;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1e2d57;
    text-align: center;
}

/* Member section headers (Certified / Associate) */
.member-section-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.certified-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white !important;
}

.associate-header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white !important;
}

.associate-note {
    font-size: 1rem;
    font-weight: 400;
    margin-top: 0.75rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* =============================================================================
   3. MEMBER LIST ENTRIES
   ========================================================================== */

.member-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-entry {
    padding: 0;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.member-entry:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.member-entry.active {
    background-color: #e8ecf5;
    box-shadow: 0 4px 12px rgba(44, 63, 121, 0.2);
}

/* Three-column grid inside each entry */
.member-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid #2C3F79;
    border-radius: 4px;
    min-height: 120px;
    align-items: start;
}

/* Left column: name + specializations + profile link */
.member-left-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2C3F79;
    margin: 0;
    line-height: 1.3;
}

.member-specializations {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.specialty-item {
    font-size: 0.875rem;
    color: #555;
    background-color: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
}

.view-profile-btn {
    display: inline-block;
    background-color: #2C3F79;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-top: auto;
    text-align: center;
}

.view-profile-btn:hover {
    background-color: #1e2d57;
    color: white !important;
}

/* Middle column: profession groups + language pairs */
.member-middle-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profession-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Overriding profile page's .profession-title for the list view */
.member-content .profession-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
    margin: 0;
}

.language-pairs {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 1rem;
}

.language-pair {
    font-size: 1rem;
    color: #555;
    line-height: 1.4;
}

.no-professions {
    font-size: 0.875rem;
    color: #999;
    font-style: italic;
}

/* Right column: contact button */
.member-right-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 30px;
}

.send-email-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.send-email-btn:hover {
    background-color: #218838;
}

/* =============================================================================
   4. CONTACT MODAL
   ========================================================================== */

.contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100% !important;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.contact-modal-overlay.active .contact-modal {
    transform: scale(1) translateY(0);
}

.contact-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.contact-modal-title {
    font-size: 1.5rem !important;
    font-weight: 600;
    color: #333;
    margin: 0 !important;
    line-height: 1.2;
}

.contact-modal-close {
    background: #6c757d;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
    padding: 0 0 3px 0.5px;
}

.contact-modal-close:hover {
    background: #5a6268;
}

.contact-modal-close:focus {
    outline: 2px solid #2C3F79;
    outline-offset: 2px;
}

.contact-modal-body {
    padding: 2rem;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form .form-group.full-width {
    grid-column: 1 / -1;
}

.contact-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.contact-form .form-label .required {
    color: #dc3545;
}

.contact-form .form-input,
.contact-form .form-textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #f8f9fa;
}

.contact-form .form-input:focus,
.contact-form .form-textarea:focus {
    outline: none;
    border-color: #2C3F79;
    box-shadow: 0 0 0 3px rgba(44, 63, 121, 0.1);
    background: white;
}

.contact-form .form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #2C3F79;
    background: #eef1f9;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    pointer-events: none;
}

.file-upload-icon {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.file-upload-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.file-upload-text strong {
    color: #2C3F79;
}

.selected-files {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #e8ecf5;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-name {
    font-weight: 500;
    color: #333;
}

.file-size {
    color: #666;
    font-size: 0.85rem;
}

.file-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.file-remove:hover {
    background: #c82333;
}

.contact-submit {
    background: #2C3F79;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.contact-submit:hover {
    background: #1e2d57;
}

.contact-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* =============================================================================
   5. MEMBER PROFILE PAGE
   ========================================================================== */

.member-profile-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0;
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

/* Header */
.profile-header {
    background: linear-gradient(135deg, #2C3F79 0%, #1e2d57 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(44, 63, 121, 0.3);
    margin-bottom: 2rem;
}

/* Override .member-name on the profile page (it's an h1, not inside .member-content) */
.member-profile-page .member-name {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    color: white;
}

.member-status {
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}

/* Main content column */
.profile-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* Reuse .section-title carefully — only in profile context */
.profile-section .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #2C3F79;
}

/* Profession cards on the profile page */
.profession-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.profession-card .profession-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #2C3F79;
}

/* Language pairs on the profile page (ul/li variant) */
.profession-card .language-pairs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
    flex-direction: unset;
    padding-left: 0;
}

.profession-card .language-pairs li {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border-left: 3px solid #DDB638;
    font-weight: 500;
}

/* About section */
.about-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

/* Specializations grid */
.specializations-grid {
    display: grid;
    gap: 2rem;
}

.specialization-domain {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #2C3F79;
}

.specialization-domain h4 {
    color: #2C3F79;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem 0.25rem;
}

.subdomains-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subdomain-tag {
    background: #DDB638;
    color: #2C3F79;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Sidebar */
.profile-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.contact-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1.5rem 0;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #2C3F79;
}

.contact-group {
    margin-bottom: 2rem;
}

.contact-group:last-child {
    margin-bottom: 0;
}

.contact-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    margin-bottom: 0.5rem;
}

.contact-list a {
    color: #2C3F79;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-list a:hover {
    color: #1e2d57;
    text-decoration: underline;
}

/* Back navigation */
.back-navigation {
    margin-bottom: 2rem;
}

.back-to-directory {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2C3F79;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #2C3F79;
    transition: all 0.3s ease;
}

.back-to-directory:hover {
    background: #2C3F79;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 63, 121, 0.3);
}

/* =============================================================================
   6. MEMBER PROFILE CUSTOMIZATION FORM
   ========================================================================== */

.member-profile-form {
    max-width: 800px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.member-profile-form h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #2C3F79;
    padding-bottom: 10px;
}

.member-profile-form__member-no {
    text-align: right;
    color: #666;
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
}

.profile-update-success {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    font-weight: 500;
}

.member-profile-form .form-section {
    margin-bottom: 30px;
}

.member-profile-form .form-section h4 {
    margin: 0 0 15px 0;
    color: #444;
    font-size: 16px;
}

.member-profile-form .description {
    margin: 0 0 15px 0;
    color: #666;
    font-style: italic;
}

/* Preferences checkboxes */
.member-profile-form .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-profile-form .checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.4;
}

.member-profile-form .checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #2C3F79;
}

/* Specialization grid */
.member-profile-form .specialization-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.member-profile-form .specialization-item {
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: box-shadow 0.2s ease;
}

.member-profile-form .specialization-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.member-profile-form .specialization-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
    margin: 0;
}

.member-profile-form .specialization-option input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #2C3F79;
}

.member-profile-form .specialization-option.main-spec {
    font-size: 15px;
}

.member-profile-form .specialization-option.main-spec strong {
    color: #2C3F79;
}

.member-profile-form .subspecialization-group {
    margin-top: 12px;
    margin-left: 25px;
    padding-left: 15px;
    border-left: 3px solid #2C3F79;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-profile-form .specialization-option.sub-spec {
    font-size: 14px;
    color: #555;
    padding: 5px 0;
}

.member-profile-form .specialization-option.sub-spec:hover {
    color: #000;
}

.member-profile-form .limit-message {
    font-size: 14px;
    margin-top: 10px;
    color: #dc3545;
}

/* About Me textarea */
#additional_info {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
}

.character-count {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.profile-submit-button {
    background: #2C3F79;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.profile-submit-button:hover {
    background: #1e2d57;
}

.profile-submit-button:active {
    transform: translateY(1px);
}

@media (max-width: 600px) {
    .member-profile-form {
        padding: 15px;
    }

    .member-profile-form .subspecialization-group {
        margin-left: 15px;
        padding-left: 10px;
    }
}

/* =============================================================================
   7. ANIMATIONS
   ========================================================================== */

@keyframes atis-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================================================
   7. RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-sidebar {
        position: static;
    }

    .member-profile-page .member-name {
        font-size: 2.5rem;
    }

    .member-content {
        grid-template-columns: 1fr 1.5fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    #atis-search-container {
        padding: 1.5rem;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .search-actions {
        flex-direction: column;
        align-items: center;
    }

    .search-btn,
    .clear-btn {
        width: 100%;
        max-width: 300px;
    }

    .profile-container {
        padding: 0 1rem;
    }

    .profile-header {
        padding: 2rem 1.5rem;
    }

    .member-profile-page .member-name {
        font-size: 2rem;
    }

    .profile-section,
    .profession-card,
    .contact-card {
        padding: 1.5rem;
    }

    .profession-card .language-pairs {
        grid-template-columns: 1fr;
    }

    .member-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: left;
    }

    .member-right-column {
        align-items: flex-start;
    }

    .send-email-btn,
    .view-profile-btn {
        width: 100%;
    }

    .contact-modal {
        width: 95%;
        margin: 1rem;
    }

    .contact-modal-header {
        padding: 1rem 1.5rem;
    }

    .contact-modal-body {
        padding: 1.5rem;
    }

    .contact-modal-title {
        font-size: 1.25rem !important;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .file-upload-area {
        padding: 1.5rem 1rem;
    }

    .member-section-header {
        font-size: 1.25rem;
        padding: 0.75rem 1rem;
        margin: 1.5rem 0 1rem 0;
    }

    .associate-note {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    #atis-search-container {
        padding: 1rem;
    }

    .search-field select {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }

    .search-btn,
    .clear-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .member-profile-page .member-name {
        font-size: 1.75rem;
    }

    .member-status {
        font-size: 1rem;
    }

    .profile-section .section-title,
    .profession-card .profession-title {
        font-size: 1.25rem;
    }

    .profile-section,
    .profession-card,
    .contact-card {
        padding: 1rem;
    }

    .member-content {
        padding: 1rem;
    }

    .member-name {
        font-size: 1rem;
    }

    .specialty-item {
        font-size: 0.8rem;
    }

    .member-content .profession-title {
        font-size: 0.9rem;
    }

    .language-pair {
        font-size: 0.8rem;
    }
}
