.search-main-btn {
    background: linear-gradient(135deg, #0056b3, #0171E9);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3, #004085);
}

.search-main-btn:active {
    transform: translateY(0);
}

/* Dropdown Menu - Simple Inline Expansion */
.filter-dropdown-menu {
    display: none;
    position: relative;
    width: 100%;
    border: 2px solid #0171E9;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: dropdownSlide 0.3s ease-out;
    padding: 0;
}

.filter-dropdown-content {
    padding: 0;
}

.filter-header {
    background: linear-gradient(135deg, #0056b6, #0171E9);
    color: white;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-header-content {
    flex: 1;
}

.filter-header h5 {
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
}

/* Select All Section - Orange Toggle Button */
.select-all-section {
    display: flex;
    align-items: center;
}

.select-all-btn {
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.select-all-btn:hover {
    background: linear-gradient(135deg, #e55a2b, #cc4a24);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.select-all-btn:active {
    transform: translateY(0);
}

.select-all-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.5);
}

/* When all are selected - "取消全選" state */
.select-all-btn.all-selected {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.select-all-btn.all-selected:hover {
    background: linear-gradient(135deg, #218838, #1e9e8a);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Checkbox icon styling */
.select-all-btn .bi-check-all {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.select-all-btn:hover .bi-check-all {
    transform: scale(1.1);
}

/* When all selected, change icon */
.select-all-btn.all-selected .bi-check-all::before {
    content: "\f633";
    /* Bootstrap Icons 'x-square' */
}

/* Text animation */
.select-all-text {
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

/* UPDATED: Filter Body with Responsive Grid */
.filter-body {
    padding: 10px;
}

.filter-body .row {
    margin: -5px;
    /* Counteract the column padding */
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.filter-body .col-12.col-sm-6.col-md-4.col-lg-3 {
    padding: 5px;
}

/* Enhanced Form Elements */
.filter-body .form-check {
    background: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    word-break: break-word;
}

/* .filter-body .form-check:hover {
    background-color: #f8f9fa;
    border-color: #0171E9;
} */

.filter-body .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0;
    flex-shrink: 0;
    border: 1px solid;
}

.filter-body .form-check-input:checked {
    background-color: #0171E9;
    border-color: #0171E9;
}

.filter-body .form-check-label {
    font-weight: 500;
    margin-left: 10px;
    cursor: pointer;
    flex: 1;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Selected state for checkboxes */
.filter-body .form-check-input:checked~.form-check-label {
    font-weight: 600;
    color: #0171E9;
}

/* Animations */
@keyframes dropdownSlide {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Responsive Design */
@media (max-width: 575.98px) {
    .filter-body .col-12 {
        margin-bottom: 8px;
    }
}

@media (max-width: 768px) {
    .search-main-btn {
        padding: 10px 18px;
        font-size: 14px;
        margin-left: 20px !important;
    }

    .filter-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .filter-header-content {
        width: 100%;
    }

    .select-all-section {
        width: 100%;
        justify-content: center;
    }

    .select-all-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    .filter-body {
        padding: 15px;
    }

    .filter-footer {
        padding: 12px 15px;
    }

    /* Mobile landscape - 2 columns */
    .filter-body .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .filter-body .form-check-input {
        width: 20px;
        height: 20px;
    }

    .filter-body .form-check-label {
        margin-left: 12px;
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {

    /* Tablet - 3 columns */
    .filter-body .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 992px) {

    /* Desktop - 4 columns */
    .filter-body .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (max-width: 480px) {
    .search-main-btn {
        margin-left: 15px !important;
        padding: 8px 16px;
    }

    .filter-header h5 {
        font-size: 1rem;
    }

    .select-all-btn {
        font-size: 0.85rem;
        padding: 6px 14px;
    }

    /* Single column on very small screens */
    .filter-body .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.label-text {
    font-size: 1.25rem;
}

/* Active state for button when dropdown is open */
.search-main-btn.active {
    background: linear-gradient(135deg, #0056b3, #004085);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.5);
}

/* Title spacing */
.page-title {
    margin-right: auto;
}

.filter-header h5 {
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
    color: white;
    display: flex;
    align-items: center;
}

.filter-header h5 .bi-funnel {
    color: white;
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* ==================== LIST VIEW STYLES ====================
 * Common list-view styles are now in css/listView.css
 * Page-specific overrides and additional styles remain here
 * ========================================================== */

/* View Toggle Buttons */
.view-toggle-buttons {
    text-align: right;
}

.view-toggle-buttons .btn-group {
    border-radius: 8px;
    overflow: hidden;
    /* border: 1px solid #0171E9; */
}

.view-toggle-buttons .btn {
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.view-toggle-buttons .btn.active {
    background: #0171E9;
    color: white;
}


.div_online_course {
    margin: unset;
}

body .mainContent h2 {
    margin-bottom: 0px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .view-toggle-buttons {
        text-align: center;
    }

    .list-view-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .list-view-image {
        flex: 0 0 auto;
        width: 33.33333333%;
    }

    .list-view-details {
        width: 100%;
    }

    .list-view-action {
        width: 100%;
    }

    .list-view-btn {
        width: 100%;
        text-align: center;
    }
}

/* Filter Container Styles */
.filter-container {
    padding: 0px 18px;
    /* display: flex; */
    /* flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: flex-start; */
}

.filter-dropdown-container {
    padding: 0px 30px;
}

/* Desktop View - All items side by side */
.filter-container .filter-item {
    flex: 0 0 auto;
}

.grid-view,
.list-view {
    display: none;
}

.btn:hover {
    background-color: #0171E9;
}


/* Mobile View - First item full width, last two items underneath */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0px;
    }

    .filter-container .filter-item:first-child {
        order: 1;
        width: 100%;
    }

    .filter-container .filter-item:not(:first-child) {
        order: 2;
        display: flex;
        gap: 10px;
        justify-content: space-between;
    }

    .filter-container .filter-item:not(:first-child)>* {
        flex: 1;
    }
}

/* Alternative Mobile Layout - More compact */
@media (max-width: 768px) {
    .filter-container.compact-layout {
        display: grid;
        grid-template-areas:
            "first-item first-item"
            "second-item third-item";
        gap: 10px;

    }

    .filter-container.compact-layout .filter-item:nth-child(1) {
        grid-area: first-item;
    }

    .filter-container.compact-layout .filter-item:nth-child(2) {
        grid-area: second-item;
    }

    .filter-container.compact-layout .filter-item:nth-child(3) {
        grid-area: third-item;
    }
}

@media (max-width: 576px) {
    .control {
        padding: 0;
    }

    .filter-dropdown-container {
        padding: 0;
    }
}

@media (max-width:360px) {
    .bi-funnel::before {
        display: none;
    }

    .me-2 {
        margin-right: 0 !important;
    }
}

/* Upper Container - Slider + Info Panel */
.upperContainer {
    position: relative;
    overflow: visible;
    margin-bottom: 40px;
}

.upperContainer .row {
    margin: 0;
    align-items: stretch;
}

.upperContainerLeft {
    padding: 0;
    background-color: #f8f9fa;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 16px;
}

.upperContainerRight {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 16px;
}

/* Album Information Panel */
#album-information-container {
    text-align: center;
    width: 100%;
}

.album-info-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.album-info-org,
.album-info-date {
    font-size: 1rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.album-info-org {
    margin-bottom: 10px;
}

@media (min-width: 992px) {
    .upperContainerRight {
        border-left: 1px solid #b7b7b7;
    }
}

/* Specific fix for 650-752px tablet range */
@media (min-width: 650px) and (max-width: 752px) {
    .gallery-controls-container {
        padding: 10px 15px;
        min-height: 55px;
    }

    .gallery-slide-counter {
        font-size: 1rem;
        padding: 4px 8px;
        display: flex;
        flex-direction: row;
        gap: 4px;
    }

    .gallery-pause-play {
        width: 30px;
        height: 30px;
    }

    .gallery-pause-play:before {
        width: 12px;
        height: 12px;
    }
}

/* Tablet and Mobile: Stack vertically, info panel below slider */
@media (max-width: 991.98px) {
    .upperContainer {
        margin-bottom: 32px;
    }

    .upperContainer .row {
        flex-direction: column;
    }

    .upperContainerLeft {
        width: 100%;
        padding: 0 !important;
    }

    .upperContainerRight {
        width: 100%;
        padding: 20px;
        border-left: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .album-info-title {
        font-size: 1.5rem;
    }

    /* Ensure gallery swiper stays within bounds */
    #gallery-container {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    #photo-gallery-swiper {
        width: 100%;
        height: 100%;
    }

    #photo-gallery-swiper .swiper-button-next,
    #photo-gallery-swiper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }

    #photo-gallery-swiper .swiper-button-next,
    #photo-gallery-swiper .swiper-button-next:hover {
        background-size: 35px 35px;
    }

    #photo-gallery-swiper .swiper-button-prev,
    #photo-gallery-swiper .swiper-button-prev:hover {
        background-size: 35px 35px;
    }
}

@media (max-width: 576px) {
    .upperContainerLeft {
        gap: 12px;
    }

    .album-info-title {
        font-size: 1.25rem;
    }

    .album-info-org,
    .album-info-date {
        font-size: 0.9rem;
    }

    #photo-gallery-swiper .swiper-button-next,
    #photo-gallery-swiper .swiper-button-prev {
        width: 30px;
        height: 30px;
    }

    #photo-gallery-swiper .swiper-button-next,
    #photo-gallery-swiper .swiper-button-next:hover {
        background-size: 30px 30px;
    }

    #photo-gallery-swiper .swiper-button-prev,
    #photo-gallery-swiper .swiper-button-prev:hover {
        background-size: 30px 30px;
    }

    .gallery-controls-container {
        padding: 8px 15px;
        min-height: 50px;
    }

    .gallery-slide-counter {
        font-size: 0.85rem;
        padding: 4px 10px;
    }

    .gallery-slide-counter .current-slide {
        font-size: 1rem;
        color: #0171E9;
    }

    .gallery-pause-play {
        width: 32px;
        height: 32px;
    }

    .gallery-pause-play:before {
        width: 14px;
        height: 14px;
    }
}

/* Photo Gallery Swiper Styles */
#photo-gallery-swiper {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 16px;
}

#photo-gallery-swiper .swiper {
    width: 100%;
    border-radius: 20px;
    overflow: visible;
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {
    #photo-gallery-swiper {
        gap: 12px;
    }
}

#photo-gallery-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
}

#photo-gallery-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
}

#photo-gallery-swiper .slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    transition: transform 0.3s ease;
}

#photo-gallery-swiper .slide-image-wrapper,
#photo-gallery-swiper .slide-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#photo-gallery-swiper .slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#photo-gallery-swiper .swiper-slide:hover .slide-content img {
    transform: scale(1.02);
}

/* Scaled and layered preview for adjacent slides */
#photo-gallery-swiper .swiper-slide:not(.swiper-slide-active) {
    opacity: 0.7;
    transform: scale(0.7);
    z-index: 1;
}

#photo-gallery-swiper .swiper-slide-active {
    transform: scale(1);
    z-index: 10;
}

#photo-gallery-swiper .swiper-slide-prev,
#photo-gallery-swiper .swiper-slide-next {
    z-index: 0;
    opacity: 0.3;
    transform: scale(0.4);
}

/* Pagination styling - Hidden */
#photo-gallery-swiper .swiper-pagination {
    display: none;
}

/* Navigation buttons - Complete custom style */
#photo-gallery-swiper .swiper-button-next,
#photo-gallery-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: unset;
    color: transparent;
    transition: all 0.3s ease;
}

#photo-gallery-swiper .swiper-button-next:hover,
#photo-gallery-swiper .swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

/* Hide default Swiper arrow icons completely */
#photo-gallery-swiper .swiper-button-next::after,
#photo-gallery-swiper .swiper-button-prev::after {
    content: '';
    font-family: none;
    font-size: 0;
    text-indent: -9999px;
    display: none;
}

/* Custom arrow using background image on button itself */
#photo-gallery-swiper .swiper-button-next {
    background: rgba(0, 0, 0, 0.6) url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 40px 40px;
}

#photo-gallery-swiper .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.8) url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 40px 40px;
}

#photo-gallery-swiper .swiper-button-prev {
    background: rgba(0, 0, 0, 0.6) url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 40px 40px;
    transform: translateY(-50%) rotate(180deg);
}

#photo-gallery-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8) url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 40px 40px;
    transform: translateY(-50%) rotate(180deg) scale(1.1);
}

/* Disabled state */
#photo-gallery-swiper .swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Gallery Controls Container - Below slider */
.gallery-controls-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(248, 249, 250, 0.9);
    border-top: 1px solid rgba(222, 226, 230, 0.5);
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
    z-index: 10;
}

#photo-gallery-swiper.gallery-controls-responsive .gallery-controls-container {
    gap: 16px;
}

#photo-gallery-swiper.gallery-controls-responsive .gallery-nav-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    margin-right: auto;
}

#photo-gallery-swiper.gallery-controls-responsive .gallery-nav-buttons .swiper-button-next,
#photo-gallery-swiper.gallery-controls-responsive .gallery-nav-buttons .swiper-button-prev {
    position: static;
    margin: 0;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: transparent;
    background-image: url(../../images/icon_footslider_arrow.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 36px 36px;
    color: transparent;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#photo-gallery-swiper.gallery-controls-responsive .gallery-nav-buttons .swiper-button-next {
    transform: none;
}

#photo-gallery-swiper.gallery-controls-responsive .gallery-nav-buttons .swiper-button-prev {
    transform: rotate(180deg);
}

#photo-gallery-swiper.gallery-controls-responsive .gallery-nav-buttons .swiper-button-next:hover,
#photo-gallery-swiper.gallery-controls-responsive .gallery-nav-buttons .swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Gallery Slide Counter */
.gallery-slide-counter {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-slide-counter .current-slide {
    color: #0171E9;
    font-size: 1.1rem;
}

/* Gallery Play/Pause Button */
.gallery-pause-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-pause-play:before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url(../../images/icon_footslider_pause.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto 100%;
}

.gallery-pause-play.paused:before {
    background-image: url(../../images/icon_footslider_play.png);
}

.gallery-pause-play:hover {
    transform: scale(1.1);
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Photo Gallery Page Specific Styles (from photo_gallery.php) */
/* Remove location display */
.locat {
    display: none !important;
}

.pagelist_area .page .title {
    min-height: 140px;
}

@media print,
screen and (max-width: 767px) {
    .pagelist_area .page .title {
        min-height: 0px;
    }
}

/* ==================== PHOTO ALBUM MODAL STYLES ==================== */

/* Modal Overlay */
.photo-album-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.photo-album-modal[style*="display: block"],
.photo-album-modal[style*="display:block"] {
    display: flex !important;
}

.photo-album-modal .modal-content {
    position: relative;
    margin: auto;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modal Header */
.photo-album-modal .modal-header {
    position: relative;
    padding: 20px 60px 20px 30px;
    border-bottom: 1px solid rgba(222, 226, 230, 0.5);
    flex-shrink: 0;
}

.photo-album-modal .modal-title {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.photo-album-modal .closeModal {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: #333;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    background: transparent;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.photo-album-modal .closeModal:hover,
.photo-album-modal .closeModal:focus {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-50%) scale(1.1);
}

/* Modal Body */
.photo-album-modal .modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 30px 20px;
    overflow: hidden;
}

/* Modal Controls Container - Below slider, same horizontal level */
.modal-controls-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid rgba(222, 226, 230, 0.5);
    flex-shrink: 0;
}

.modal-slide-counter {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
}

.modal-slide-counter span {
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-pause-play {
    width: 40px;
    height: 40px;
    border: unset;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: #fff;
}

.modal-pause-play:before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url(../../images/icon_footslider_pause.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto 100%;
}

.modal-pause-play.paused:before {
    background-image: url(../../images/icon_footslider_play.png);
}

#modal-photo-swiper {
    width: 100%;
    height: 500px;
    position: relative;
}

#modal-photo-swiper .modalSwiper {
    width: 100%;
    height: 100%;
    padding: 0;
}

#modal-photo-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    opacity: 1;
    transform: scale(1);
}

#modal-photo-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

#modal-photo-swiper .swiper-button-next,
#modal-photo-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    border-radius: 50%;
    color: transparent;
    transition: all 0.3s ease;
}

#modal-photo-swiper .swiper-button-next:hover,
#modal-photo-swiper .swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

#modal-photo-swiper .swiper-button-next::after,
#modal-photo-swiper .swiper-button-prev::after {
    content: '';
    font-family: none;
    font-size: 0;
    text-indent: -9999px;
    display: none;
}

#modal-photo-swiper .swiper-button-next {
    background: rgba(0, 0, 0, 0.6) url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 40px 40px;
}

#modal-photo-swiper .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.8) url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 40px 40px;
}

#modal-photo-swiper .swiper-button-prev {
    background: rgba(0, 0, 0, 0.6) url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 40px 40px;
    transform: translateY(-50%) rotate(180deg);
}

#modal-photo-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8) url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 40px 40px;
    transform: translateY(-50%) rotate(180deg) scale(1.1);
}

#modal-photo-swiper .swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.modal-photo-description {
    display: none;
}

.modal-nav-buttons .swiper-button-next,
.modal-nav-buttons .swiper-button-prev {
    position: static;
    margin: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent url(../../images/icon_footslider_arrow.png) center center no-repeat;
    background-size: 36px 36px;
}

.modal-nav-buttons .swiper-button-next {
    transform: none;
}

.modal-nav-buttons .swiper-button-prev {
    transform: rotate(180deg);
}

svg.swiper-navigation-icon {
    display: none;
}

/* Body when modal is open */
body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .photo-album-modal {
        padding: 10px;
    }

    .photo-album-modal .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .photo-album-modal .modal-header {
        padding: 15px 50px 15px 20px;
    }

    .photo-album-modal .modal-title {
        font-size: 1.2rem;
    }

    .photo-album-modal .closeModal {
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }

    .photo-album-modal .modal-body {
        padding: 20px 10px;
    }

    .modal-controls-container {
        padding: 12px 15px;
    }

    .modal-slide-counter {
        font-size: 1rem;
        padding: 6px 12px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        white-space: nowrap;
        gap: 4px;
    }

    .modal-slide-counter .current-slide {
        color: #0171E9;
    }

    .modal-pause-play {
        width: 35px;
        height: 35px;
    }

    .modal-pause-play:before {
        width: 15px;
        height: 15px;
    }

    #modal-photo-swiper {
        height: 350px;
    }

    #modal-photo-swiper .modalSwiper {
        padding: 0;
    }

    #modal-photo-swiper .swiper-button-next,
    #modal-photo-swiper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }

    #modal-photo-swiper .swiper-button-next {
        background-size: 35px 35px;
    }

    #modal-photo-swiper .swiper-button-prev {
        background-size: 35px 35px;
    }

    #modal-photo-swiper .swiper-button-next:hover {
        background-size: 35px 35px;
    }

    #modal-photo-swiper .swiper-button-prev:hover {
        background-size: 35px 35px;
    }
}

@media (max-width: 575.98px) {
    .modal-slide-counter {
        font-size: 0.9rem;
        padding: 0px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        white-space: nowrap;
        gap: 4px;
    }

    #photo-gallery-swiper.gallery-controls-responsive .gallery-controls-container {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }

    #photo-gallery-swiper.gallery-controls-responsive .gallery-controls-container .gallery-nav-buttons {
        margin-left: auto;
        margin-right: auto;
        width: auto;
        justify-content: center;
    }

    .modal-controls-container {
        flex-direction: row-reverse;
        gap: 12px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .modal-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 16px;
        width: 70%;
        order: 2;
    }

    .modal-controls-container .modal-slide-counter {
        order: 1;
    }

    .modal-controls-container .modal-pause-play {
        order: 3;
    }

    .modal-nav-buttons .swiper-button-next,
    .modal-nav-buttons .swiper-button-prev {
        position: static;
        margin: 0;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: transparent url(../../images/icon_footslider_arrow.png) center center no-repeat;
        background-size: 30px 30px;
    }
}