/**
 * Board Members Layout Styles
 * For converted DIVI content to Gutenberg blocks
 */

/* Team Member Cards Grid */
.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Individual Team Member Card */
.team-member-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Team Member Image */
.team-member-card .team-member-image {
    margin: 0 0 20px 0;
}

.team-member-card .team-member-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f0f0;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.team-member-card:hover .team-member-image img {
    filter: grayscale(0%);
}

/* Team Member Name */
.team-member-card .team-member-name {
    color: #00407a;
    font-size: 1.4em;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

/* Team Member Position */
.team-member-card .team-member-position {
    color: #666;
    font-size: 1em;
    margin: 10px 0;
    font-style: italic;
}

.team-member-card .team-member-position em {
    font-style: normal;
}

/* Team Member Bio */
.team-member-card .team-member-bio {
    color: #333;
    font-size: 0.95em;
    line-height: 1.6;
    margin-top: 15px;
    text-align: left;
}

/* Board of Directors Specific Styles */
.board-members-section {
    padding: 40px 0;
}

.board-members-section h2 {
    color: #00407a;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.board-members-section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #00407a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .team-members-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .team-member-card {
        padding: 20px;
    }

    .team-member-card .team-member-image img {
        width: 120px;
        height: 120px;
    }

    /* Stack board member columns on mobile */
    #tab-board .wp-block-columns.is-layout-flex {
        flex-direction: column;
    }

    #tab-board .wp-block-columns.is-layout-flex .wp-block-column {
        flex-basis: 100%;
        margin-bottom: 2em;
    }
}

/* Three Column Layout for Board Members */
.wp-block-columns.board-members-row {
    margin-bottom: 40px;
}

.wp-block-columns.board-members-row .wp-block-column {
    padding: 0 15px;
}

/* WordPress Block Columns - Fix for Board Tab */
.wp-block-columns.is-layout-flex {
  display: flex !important;
  flex-wrap: wrap;
  gap: 2em;
  align-items: stretch;
}

.wp-block-columns.is-layout-flex .wp-block-column {
  flex: 1;
  min-width: 0;
}

/* Specific fix for board members 3-column layout */
#tab-board .wp-block-columns.is-layout-flex .wp-block-column {
  flex-basis: calc(33.333% - 1.5em) !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  width: auto !important;
  max-width: calc(33.333% - 1.5em) !important;
}

/* Remove any float that might be interfering */
#tab-board .wp-block-column {
  float: none !important;
}

/* Ensure images stay within their containers */
#tab-board .wp-block-column .wp-block-image {
  margin-bottom: 1em;
}

#tab-board .wp-block-column .wp-block-image img {
  max-width: 100%;
  height: auto;
}

/* Alternative Card Style (with white background) */
.team-member-card.style-white {
    background: #fff;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.team-member-card.style-white:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Alternative Card Style (with blue accent) */
.team-member-card.style-blue {
    border-top: 4px solid #00407a;
}

.team-member-card.style-blue .team-member-name {
    color: #00407a;
}

/* Info Container Style (matching existing theme) */
.team-member-info-container {
    background: #00407a;
    color: white;
    border-radius: 16px;
    box-shadow: 0px 2px 18px rgba(0, 0, 0, 0.3);
    padding: 30px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-member-info-container .team-member-name {
    color: white;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.team-member-info-container .team-member-position {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

.team-member-info-container .team-member-bio {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 15px;
}