/* Team Section Block Styles */
.wp-block-custom-team-section {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.team-content {
    max-width: 1440px; /* Default, can be changed via block settings */
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
    padding-top: 2rem;
    padding-bottom: 50px;
}

.team-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.team-description {
    margin: 0 auto;
    line-height: 1.4;
}

/* Original carousel container */
.team-carousel {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    position: relative;
    padding: 1rem 0;
    cursor: grab;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
}

/* Hide scrollbar for Chrome and Safari */
.team-carousel::-webkit-scrollbar {
    display: none;
}

.team-carousel.active {
    cursor: grabbing;
}

/* Images container */
.team-images {
    display: flex;
    gap: 24px;
    padding: 0 2rem;
    transition: transform 0.3s ease-out;
    min-width: max-content; /* Ensure it extends beyond container if needed */
}

/* Individual image container */
.team-image {
    flex: 0 0 auto;
    width: 400px; /* Default, can be changed via block settings */
    height: 400px; /* Default, can be changed via block settings */
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevent image dragging */
    user-select: none;
    -webkit-user-drag: none;
}

/* For Swiper slides */
.swiper-slide.team-image {
    height: auto;
}

/* Image wrapper for better mobile handling */
.image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* Arrow navigation (original) */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.9);
}

.next-arrow {
    right: 20px;
}

/* Swiper specific styling */
.team-swiper-container {
    width: 100%;
    padding-bottom: 30px; /* Space for pagination if needed */
    overflow: hidden; /* Important for Swiper */
    position: relative;
}

.swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Phantom slide for left offset */
.phantom-slide {
    opacity: 0;
    pointer-events: none;
    margin-right: 0;
    visibility: hidden;
    width: 1px !important;
}

/* Offset for phantom slide - create left padding */
.team-swiper-container {
    padding-left: 2rem;
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff !important;
    background: transparent;
    width: 40px !important;
    height: 40px !important;
    transition: opacity 0.3s ease;
    border: none;
    box-shadow: none;
}

.swiper-button-next {
    right: 10px;
}

.swiper-button-prev {
    left: 10px;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 24px !important;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    opacity: 0.8;
}

/* Custom notification for editor */
.swiper-notice {
    text-align: center;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 12px;
    font-style: italic;
}

/* Admin-specific styling */
.wp-admin .team-image {
    background: #f0f0f0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-admin .image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.wp-admin .image-item {
    position: relative;
}

.wp-admin .image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.wp-admin .remove-image {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 2px 6px;
    cursor: pointer;
    z-index: 10;
}

/* Responsive design */
@media (max-width: 1024px) {
    .team-image {
        width: 350px;
        height: 350px;
    }
    
    .wp-block-custom-team-section {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .wp-block-custom-team-section {
        padding: 3rem 0;
    }
    
    .team-title {
        font-size: 2rem;
    }
    
    .team-description {
        font-size: 1.25rem;
        /* padding: 0 24px; */
    }
    
    .team-image {
        width: 280px;
        height: 280px;
    }
    
    .team-content {
        padding: 0 24px;
        padding-bottom: 30px;
        
    }
    
    .team-images {
        gap: 16px;
        padding: 0 1rem;
    }
    
    .carousel-arrow,
    .swiper-button-next,
    .swiper-button-prev {
        width: 36px !important;
        height: 36px !important;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 20px !important;
    }
    
    /* Improve mobile swiper appearance */
    .team-swiper-container {
        padding-left: 24px;
    }
    
    /* Adjust phantom slide for better mobile spacing */
    .phantom-slide {
        width: 0 !important;
    }
}

@media (max-width: 480px) {
    .wp-block-custom-team-section {
        padding: 2rem 0rem;
    }
    
    .team-title {
        font-size: 1.75rem;
    }
    
    .team-description {
        font-size: 1.1rem;
    }
    
    .team-image {
        width: 240px;
        height: 240px;
    }
    
    .team-content {
        padding-bottom: 20px;
    }
    
    .team-images {
        gap: 12px;
    }
    
    .carousel-arrow,
    .swiper-button-next,
    .swiper-button-prev {
        width: 32px !important;
        height: 32px !important;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 18px !important;
    }
}

/* Swiper Specific Responsive Styles */
@media (max-width: 768px) {
    .team-swiper-container {
        padding-bottom: 25px;
    }
}

/* Additional styles for editor preview */
.wp-admin .wp-block-custom-team-section {
    overflow: visible;
}

/* Font loading for Satoshi Variable */
@font-face {
    font-family: 'Satoshi Variable';
    src: url('path-to-your-font/Satoshi-Variable.woff2') format('woff2'),
         url('path-to-your-font/Satoshi-Variable.woff') format('woff');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}