/* ================================================
   Leadership Grid Section
   Grid of leadership team member cards with overlay info
   ================================================ */

.leadership-grid {
    padding: 6rem 0;
}

.leadership-grid .container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100% !important; /* Prevent external CSS from breaking layout */
}

/* ------------------------------------------------
   Section Header
   ------------------------------------------------ */
.leadership-grid .section-header {
    margin-bottom: 4rem;
}

.leadership-grid .section-title {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.316;
    color: #1e1e23;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.leadership-grid .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #00e65f;
}

/* ------------------------------------------------
   Leadership Container Grid - Flexible Columns
   ------------------------------------------------ */
.leadership-container {
    display: grid;
    gap: 2rem;
}

/* Ensure grid items fill their grid cells, not affected by external CSS */
.leadership-container > * {
    width: auto !important;
    max-width: none !important;
}

.leadership-container[data-columns="1"] {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}

.leadership-container[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.leadership-container[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.leadership-container[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* ------------------------------------------------
   Leader Card
   ------------------------------------------------ */
.leader-card {
    display: flex;
    flex-direction: column;
    width: 100% !important; /* Override any external width rules */
    max-width: none !important; /* Override any external max-width rules */
}

/* Leader Image Container - Relative for Overlay */
.leader-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
}

.leader-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.leader-card:hover .leader-image > img {
    transform: scale(1.03);
}

/* Info Overlay - White Card at Bottom of Image */
.leader-info-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Leader Details - Left Side */
.leader-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.leader-name {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.316;
    color: #1e1e23;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leader-title {
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1.316;
    color: #1e1e23;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Social Link - Right Side */
.leader-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #1e1e23;
    transition: color 0.2s ease;
    text-decoration: none;
}

.leader-social-link:hover {
    color: #00e65f;
}

.leader-social-link svg {
    width: 20px;
    height: 20px;
}

/* ------------------------------------------------
   Responsive Styles
   ------------------------------------------------ */

/* Large Desktop */
@media (max-width: 1440px) {
    .leadership-grid .section-title {
        font-size: 2rem;
    }

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

    .leader-title {
        font-size: 0.75rem;
    }

    .leader-info-overlay {
        padding: 10px 14px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .leadership-grid {
        padding: 4rem 0;
    }

    .leadership-grid .section-header {
        margin-bottom: 3rem;
    }

    /* Force 3 columns on tablet for 4-column layout */
    .leadership-container[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr);
    }

    .leadership-grid .section-title {
        font-size: 1.75rem;
    }

    .leader-name {
        font-size: 0.9375rem;
    }

    .leader-title {
        font-size: 0.6875rem;
    }

    .leader-info-overlay {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 8px 12px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .leadership-grid {
        padding: 3rem 0;
    }

    .leadership-grid .section-header {
        margin-bottom: 2.5rem;
    }

    /* Force 2 columns on mobile */
    .leadership-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }

    .leadership-grid .section-title {
        font-size: 1.5rem;
    }

    .leader-name {
        font-size: 0.875rem;
    }

    .leader-title {
        font-size: 0.625rem;
    }

    .leader-info-overlay {
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 8px 10px;
        gap: 0.5rem;
    }

    .leader-social-link {
        width: 20px;
        height: 20px;
    }

    .leader-social-link svg {
        width: 16px;
        height: 16px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .leadership-grid {
        padding: 2.5rem 0;
    }

    /* Force 1 column on small mobile */
    .leadership-container {
        grid-template-columns: 1fr !important;
        max-width: 350px;
        margin: 0 auto;
    }

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

    .leader-title {
        font-size: 0.75rem;
    }

    .leader-info-overlay {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 10px 14px;
    }
}