/**
 * Our Team Block Styles
 */

.our-team-block {
    background-color: #ffffff;
    padding: 90px 0;
    margin: 0;
}

.our-team-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 200px;
    align-items: start;
    width: 90%;
    margin: 0 auto;
}

.our-team-intro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.our-team-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #0f1a13;
    gap: 0.5rem;
    opacity: 0; /* Hidden initially for animation */
}

.our-team-label-bullet {
    font-size: 1.5rem;
    line-height: 1;
}

.our-team-title {
    margin: 0;
    background-color: #1D3557;
    color: #ffffff;
    padding: 3px 12px;
    display: inline-block;
    font-weight: 600;
    font-size: 50px;
    line-height: 1.25;
    opacity: 0; /* Hidden initially for animation */
}

.our-team-description {
    font-size: 1rem;
    line-height: 1.75;
    color: #515151;
    max-width: 420px;
    opacity: 0; /* Hidden initially for animation */
}

/* Team Grid */
.our-team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1000px;
}

/* Team Member Card */
.team-member-card {
    position: relative;
    overflow: hidden;
    opacity: 0; /* Hidden initially for animation */
}

.team-member-image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    aspect-ratio: 3 / 4.2;
}

.team-member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.team-member-card:hover .team-member-image {
    filter: grayscale(0%);
}

/* Placeholder silhouette */
.team-member-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e5e5e5;
}

.team-member-silhouette {
    width: 40%;
    height: 60%;
    color: #ccc;
}

/* Red Accent Dot */
.team-member-accent-dot {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 14px;
    height: 14px;
    background-color: #d94f3d;
    border-radius: 50%;
    z-index: 2;
}

/* Hover Overlay */
.team-member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(184, 208, 243, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.team-member-card:hover .team-member-overlay {
    opacity: 0.5;
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.95);
}

.team-member-contact-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.contact-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #A8DADC;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-icon-button:hover {
    background-color: #A8DADC;
    transform: translateY(-3px);
}

.contact-icon {
    flex-shrink: 0;
}

/* Member Info */
.team-member-info {
    margin-top: 10px;
}

.team-member-name {
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
    color: #ffffff;
    background-color: #457B9D;
    padding: 10px 5px;
    display: inline-block;
    margin-bottom: 8px;
}

.team-member-position {
    font-size: 1rem;
    color: #000000;
    font-weight: 400;
}

/* Empty State */
.our-team-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.team-member-name {
    font-size: 1.125rem;
}

.team-member-position {
    font-size: 0.95rem;
}

@media (min-width: 900px) {
    .our-team-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

@media (max-width: 900px) {
    .our-team-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .our-team-description {
        max-width: 100%;
    }
}

@media (min-width: 1200px) {
    .team-member-name {
        font-size: 25px;
    }

    .team-member-position {
        font-size: 15px;
    }
}

/* Alignment Support */
.our-team-block.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.our-team-block.alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.our-team-block.is-visible .our-team-label {
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.our-team-block.is-visible .our-team-title {
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

.our-team-block.is-visible .our-team-description {
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
}

.our-team-block.is-visible .team-member-card {
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

/* Stagger delay for team members if needed, though they currently all come in at 0.6s. 
   We can add a slight stagger for the first few items. */
.our-team-block.is-visible .team-member-card:nth-child(2) {
    animation-delay: 0.7s;
}
.our-team-block.is-visible .team-member-card:nth-child(3) {
    animation-delay: 0.8s;
}
.our-team-block.is-visible .team-member-card:nth-child(4) {
    animation-delay: 0.9s;
}

/* Disable animations in backend editor */
.our-team-block.no-animation .our-team-label,
.our-team-block.no-animation .our-team-title,
.our-team-block.no-animation .our-team-description,
.our-team-block.no-animation .team-member-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    animation-delay: 0s !important;
    transition: none !important;
}