/**
 * Team Grid Responsive Layout
 * Properly handles team grid layout across all screen sizes
 */

/* 
 * TEAM ARCHIVE PAGE - Main layout (4 columns on large screens)
 */
.post-type-archive-team .wp-block-query.team-grid .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--40);
}

/* Remove zoom effect on hover for all team cards */
.wp-block-post.team .wp-block-post-featured-image img,
.team-grid .wp-block-post .wp-block-post-featured-image img {
    transition: none !important;
}

.wp-block-post.team:hover .wp-block-post-featured-image img,
.team-grid .wp-block-post:hover .wp-block-post-featured-image img {
    transform: none !important;
}

/* RESPONSIVE BREAKPOINTS FOR TEAM ARCHIVE */

/* Medium screens - 3 columns (992px - 1199px) */
@media (max-width: 1199px) {
    .post-type-archive-team .wp-block-query.team-grid .wp-block-post-template {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--wp--preset--spacing--30);
    }
}

/* Small screens - 2 columns (768px - 991px) */
@media (max-width: 991px) {
    .post-type-archive-team .wp-block-query.team-grid .wp-block-post-template {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile screens - 1 column (under 767px) */
@media (max-width: 767px) {
    .post-type-archive-team .wp-block-query.team-grid .wp-block-post-template {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: var(--wp--preset--spacing--20);
    }
    
    /* Mobile text adjustments */
    .wp-block-post.team .wp-block-post-title,
    .team-grid .wp-block-post .wp-block-post-title {
        font-size: 1.5rem;
        bottom: 35px;
        padding-left: 40px;
    }
    
    .wp-block-post.team .wp-block-childtheme-team-title,
    .team-grid .wp-block-post .wp-block-childtheme-team-title {
        bottom: 10px;
        padding-left: 40px;
    }
    
    .wp-block-post.team:before,
    .team-grid .wp-block-post:before {
        left: 15px;
        width: 16px;
        height: 32px;
    }
}

/*
 * HOMEPAGE TEAM SECTION - Always 3 columns on desktop
 */
.home .section-operatives .wp-block-query.team-grid .wp-block-post-template,
.section-operatives .wp-block-query.team-grid .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--30);
}

/* RESPONSIVE BREAKPOINTS FOR HOMEPAGE TEAM SECTION */

/* Small screens - 2 columns (768px - 991px) */
@media (max-width: 991px) {
    .home .section-operatives .wp-block-query.team-grid .wp-block-post-template,
    .section-operatives .wp-block-query.team-grid .wp-block-post-template {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile screens - 1 column (under 767px) */
@media (max-width: 767px) {
    .home .section-operatives .wp-block-query.team-grid .wp-block-post-template,
    .section-operatives .wp-block-query.team-grid .wp-block-post-template {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: var(--wp--preset--spacing--20);
    }
}