/* Membership Directory Frontend Styles */

.membership-directory-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

/* Search Header */
.membership-directory-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#member-search {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    width: 300px;
    transition: border-color 0.3s ease;
}

#member-search:focus {
    outline: none;
    border-color: #007cba;
}

#search-btn {
    padding: 10px 20px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#search-btn:hover {
    background-color: #005a87;
}

/* Members Grid */
.members-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.members-grid.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.members-grid.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.members-grid.columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Member Cards */
.member-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
    padding: 18px;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.member-card .member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
    border: 3px solid #f0f0f0;
}

.member-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 3px solid #e0e0e0;
}

.member-photo-placeholder .dashicons {
    font-size: 48px;
    color: #999;
}

.member-info {
    padding: 0;
}

.member-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.member-title {
    font-size: 17px;
    color: #333;
    margin: 0 0 10px 0;
    font-style: italic;
}

/* Member Grid Bio */
.member-grid-bio {
    margin-top: 8px;
}

.member-grid-bio-item {
    font-size: 17px;
    color: #555;
    margin: 0 0 4px 0;
    margin-block-end: 0.4rem;
    line-height: 1.3;
    text-align: center;
    position: relative;
}

.member-grid-bio-item:before {
    content: "•";
    color: #007cba;
    font-weight: bold;
    margin-right: 6px;
}

.member-grid-bio-item:last-child {
    margin-bottom: 0;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.loading-spinner p {
    font-size: 16px;
    color: #666;
}

/* No Members Message */
.no-members {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    grid-column: 1 / -1;
}

/* Lightbox Modal */
.member-lightbox {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border-radius: 10px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.lightbox-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #000;
    background: rgba(255, 255, 255, 1);
}

/* Member Profile in Lightbox */
.member-profile {
    padding: 30px;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 30px;
    flex-wrap: nowrap;
}

.profile-photo {
    flex-shrink: 0;
}

.profile-photo .lightbox-photo {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.profile-basic-info {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
    padding: 0 15px; /* Add some padding for better spacing */
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
}

.profile-title {
    font-size: 18px;
    color: #007cba;
    margin: 0;
    font-weight: 500;
}

/* LinkedIn Profile Section */
.profile-linkedin {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 200px;
    max-width: 220px;
    width: 220px; /* Fixed width to prevent shrinking */
}

.linkedin-qr-code {
    text-align: center;
}

.linkedin-qr-code img {
    max-width: 150px;
    height: auto;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    background: white;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.linkedin-text {
    font-size: 14px;
    color: #555;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.linkedin-text a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.linkedin-text a:hover {
    color: #005a87;
    text-decoration: underline;
}

.profile-bio {
    margin-bottom: 30px;
}

.profile-bio h3 {
    font-size: 20px;
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

.profile-bio p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* Professional Achievements Accordion */
.professional-achievements h3 {
    font-size: 20px;
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

.achievements-accordion .accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #e9ecef;
}

.accordion-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.accordion-toggle {
    font-size: 20px;
    font-weight: bold;
    color: #007cba;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-toggle {
    transform: rotate(45deg);
}

.accordion-content {
    display: none;
    padding: 20px;
    background-color: #fff;
}

.accordion-content ul {
    margin: 0;
    padding-left: 20px;
}

.accordion-content li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* Responsive Design */
@media (min-width: 769px) {
    .profile-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
    
    .profile-linkedin {
        width: 220px !important;
        min-width: 200px !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 768px) {
    .membership-directory-container {
        padding: 15px;
    }
    
    .membership-directory-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-container {
        justify-content: stretch;
    }
    
    #member-search {
        width: 100%;
        flex-grow: 1;
    }
    
    .members-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .profile-linkedin {
        min-width: auto;
        width: 100%;
        max-width: none;
    }
    
    .linkedin-qr-code img {
        max-width: 120px;
    }
    
    .profile-photo .lightbox-photo {
        width: 150px;
        height: 150px;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .lightbox-content {
        margin: 5% auto;
        width: 98%;
        max-height: 90vh;
    }
    
    .member-profile {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .members-grid {
        grid-template-columns: 1fr;
    }
    
    .member-card .member-photo,
    .member-photo-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .profile-photo .lightbox-photo {
        width: 120px;
        height: 120px;
    }
    
    .accordion-header {
        padding: 12px 15px;
    }
    
    .accordion-content {
        padding: 15px;
    }
}
