/* Swiper Pagination Bullet Styles */
.swiper-pagination {
    position: absolute;
    text-align: center;
    transition: 300ms opacity;
    transform: translate3d(0, 0, 0);
    z-index: 10;
    width: 100%;
    left: 0;
    user-select: none;
    pointer-events: auto;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #ffa200;
    opacity: 0.4;
    margin: 0 3px;
    transition: background 0.3s, opacity 0.3s, transform 0.3s;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.swiper-pagination-bullet-active {
    background: #ffa200;
    opacity: 1;
    transform: scale(1.2);
    border: 2px solid #E09F1E;
}

@media (max-width: 767px) {
    .swiper-pagination {
        bottom: 40px;
    }

    .swiper-pagination-bullet {
        width: 5px;
        height: 5px;
        margin: 0 1px;
    }
}

.office-agent-container {
    margin-bottom: 40px;
    width: 100%;
}

.office-name {
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 12px;
    margin-top: 0;
    color: #FEC344;
    position: relative;
    overflow: hidden;
    display: inline-block;
    /* For centering the inline-block */
    left: 50%;
    transform: translateX(-50%);
    background: none;
}

.office-name::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    animation: shine-effect 2.5s infinite;
}

@keyframes shine-effect {
    0% {
        left: -75%;
    }

    60% {
        left: 120%;
    }

    100% {
        left: 120%;
    }
}

.agent-photo {
    width: 210px !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    transition: opacity 0.2s;
    background: white; 
    display: block;
    object-fit: cover;
    /* Ensures the image remains a circle even with auto height */
}

/* Make only the circular part of the agent photo clickable */
.agent-photo-link {
    display: inline-block;
    border-radius: 50%;
    overflow: hidden;
    /* Remove default link styles */
    padding: 0;
    margin: 0;
    border: none;
}

.agent-photo-link img.agent-photo {
    display: block;
}

.agent-photo:hover {
    opacity: 0.5;
} 

.agent-name {
    overflow-wrap: break-word;
    white-space: normal;
    margin: 3rem 3rem 3rem !important;
    /* Increased top and bottom margin */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 50px;
    color: #EEA633 !important;
}

.level-1-div,
.level-2-div,
.level-3-div {
    display: block;
    background-color: white;
    border-radius: 25px;
    padding: 7px 15px;
    /* Make button thinner */
    font-size: 20px;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 150px;
    /* Make button thinner */
    border-width: 2px;
    border-style: solid;
    width: fit-content;
}

.level-1-div {
    border-color: #F4A460;
    color: #F4A460;
}

.level-2-div {
    border-color: #F4A460;
    color: #F4A460;
}

.level-3-div {
    border-color: #F4A460;
    color: #F4A460;
}

.swiper {
    width: 100%;
    padding-bottom: 0px;
}

.swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center all items vertically */
    min-height: 200px;
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    /* Center all items horizontally */
}

/* Responsive styles for screens 767px and below */
@media (max-width: 767px) {
    .office-agent-container {
        margin-bottom: 20px;
    }

    .office-name {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .agent-photo {
        width: 100px !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    .agent-photo:hover {
        opacity: 1;
    } 

    .agent-name {
        margin: 1.5rem 1rem 1.5rem !important;
        /* Increased top and bottom margin for mobile - bigger */
        font-size: 14px;
        height: 30px;
        width: 100%;
    }

    .level-1-div,
    .level-2-div,
    .level-3-div {
        font-size: 12px;
        min-width: 90px;
        border-radius: 16px;
        margin-top: 2px;
        margin-bottom: 10px;
        padding: 2px 2px;
    }

    .swiper {
        padding-bottom: 16px;
    }

    .swiper-slide {
        min-height: 100px;
        border-radius: 8px;
        padding: 8px 4px;
    }
}

/* Swiper navigation buttons and rendering fixes (moved from inline PHP) */
.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 28px !important;
    color: #E09F1E !important;
    display: inline-block;
}

.swiper-button-prev:after {
    border-color: transparent #E09F1E transparent transparent;
}

.swiper-button-next:after {
    border-color: transparent transparent transparent #E09F1E;
}

.swiper-button-next,
.swiper-button-prev {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    color: #E09F1E !important;
    font-weight: bold;
}

.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
    opacity: 0 !important;
    pointer-events: none;
}

@media (max-width: 767px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

.swiper,
.swiper-wrapper {
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}

.swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    transition-property: transform !important;
    will-change: transform;
}

.swiper-slide {
    flex-shrink: 0 !important;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .agent-photo:hover {
        opacity: 1;
    } 
}