/* Items Popup Widget Styles */

/* Grid Layout */
.items-popup-widget__grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.items-popup-widget__grid--columns-1 {
    grid-template-columns: 1fr;
}

.items-popup-widget__grid--columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.items-popup-widget__grid--columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.items-popup-widget__grid--columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Item Cards */
.items-popup-widget__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 150px;
    justify-content: center;
    will-change: box-shadow transform;
    transition: all 0.3s ease;
}
.items-popup-widget__item.popup-disabled {
	cursor:unset;
}

.items-popup-widget__item:not(.popup-disabled):hover {
    box-shadow: 0px 0px 16px 0px #00000040;
    scale: 1.01;
}

.items-popup-widget__icon {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.items-popup-widget__item:not(.popup-disabled):hover .items-popup-widget__icon {
    transform: scale(1.2);
}

.items-popup-widget__icon i,
.items-popup-widget__icon svg {
    width: auto;
    height: auto;
}
@media (max-width:767px) {
	.items-popup-widget__icon i,
	.items-popup-widget__icon svg {
		width: 48px;
		max-height:48px;
	}
}
.items-popup-widget__icon.icon-mode {
    width: 50px;
    height: 50px;
}

.items-popup-widget__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 48px;
    max-height: 48px;
}

.items-popup-widget__text {
    margin-bottom: 10px;
    font-weight: 600;
}

.items-popup-widget__link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.items-popup-widget__item:not(.popup-disabled):hover .items-popup-widget__link {
    text-decoration: underline;
}

.items-popup-widget__link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.items-popup-widget__link-icon i,
.items-popup-widget__link-icon svg {
    width: 1em;
    height: 1em;
}

.items-popup-widget__link-text {
    display: inline-block;
}

/* Mobile Slider */
.items-popup-widget__mobile-slider {
    display: none;
}

/* Mobile card layout - icon top, text bottom */
@media (max-width: 1024px) {
    .items-popup-widget__mobile-slider .items-popup-widget__item {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 225px;
        justify-content: flex-end;
        align-items: flex-start;
    }
    
    .items-popup-widget__mobile-slider .items-popup-widget__icon {
        align-self: flex-start;
        margin-bottom: auto !important;
    }
    
    .items-popup-widget__mobile-slider .items-popup-widget__text {
        margin-bottom: 10px !important;
        text-align: left;
    }
    
    .items-popup-widget__mobile-slider .items-popup-widget__link {
        margin-top: auto;
        text-align: left;
        align-items: center;
    }
    .items-popup-widget__mobile-slider .items-popup-widget__link-text {
        margin-bottom: -4px;
		line-height:120%;
    }
}
@media (max-width: 767px) {
	.items-popup-widget__mobile-slider .items-popup-widget__text {
		font-size:24px !important;
	}
}

/* Swiper wrapper - let Swiper handle the layout */
.items-popup-widget__mobile-slider .swiper-wrapper {
    display: flex;
    transition-timing-function: linear;
}

.items-popup-widget__mobile-slider .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: auto;
}

/* Fallback for when Swiper is not loaded - show items in a vertical stack */
.items-popup-widget__mobile-slider.swiper-not-loaded .swiper-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.items-popup-widget__mobile-slider.swiper-not-loaded .swiper-slide {
    width: 100% !important;
    height: auto !important;
}

.items-popup-widget__mobile-slider .swiper {
    --swiper-navigation-size: 20px;
}

/* Slide gap is handled by Swiper's spaceBetween option */

/* Next slide peek effect */
.items-popup-widget__mobile-slider.show-next-peek .swiper {
    overflow: visible;
}

.items-popup-widget__mobile-slider.show-next-peek .swiper-wrapper {
    overflow: visible;
}

.items-popup-widget__mobile-slider.show-next-peek .swiper-slide:last-child {
    margin-right: 40px;
}

.items-popup-widget__mobile-slider .swiper-pagination {
    position: relative;
    margin-top: 20px;
    justify-content: center;
    display: flex;
}

.items-popup-widget__mobile-slider .swiper-pagination-bullet {
    background: #D9DADA !important;
    background-color: #D9DADA !important;
    opacity: 1;
    display: inline-block;
    border-radius: 50%;
}
.items-popup-widget__mobile-slider .swiper-pagination-bullet:hover {
    background: #A4A4A4 !important;
    background-color: #A4A4A4 !important;
}

.items-popup-widget__mobile-slider .swiper-pagination-bullet-active {
    background: #007cba !important;
    background-color: #007cba !important;
}

/* Popup Overlay */
.items-popup-widget__popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.items-popup-widget__popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Content */
.items-popup-widget__popup {
    background: #fff;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.items-popup-widget__popup-overlay.active .items-popup-widget__popup {
    transform: scale(1);
}

/* Close Button */
.items-popup-widget__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 10;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
    pointer-events:cursor;
}

.items-popup-widget__close:hover path {
    fill: var(--primary) !important;
}
@media (max-width: 768px) {
    .items-popup-widget__close {
        top:32px;
        right:16px;
        width:20px !important;
        height:20px !important;
    }
    .items-popup-widget__close svg {
        width:20px !important;
        height:20px !important;
    }
}

/* Popup Content Layout */
.items-popup-widget__popup-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: flex-start;
}

/* Popup Content without icon column */
.items-popup-widget__popup-content--no-icon {
    grid-template-columns: 1fr !important;
}

.items-popup-widget__popup-left {
    display: flex;
    justify-content: center;
    align-items: center;
}

.items-popup-widget__popup-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f0f0f0;
}

.items-popup-widget__popup-icon i,
.items-popup-widget__popup-icon svg {
    font-size: 48px;
    color: #666;
}
.items-popup-widget__popup-icon img {
    width:100px;
}

/* Popup Image */
.items-popup-widget__popup-image {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f0f0f0;
    overflow: hidden;
}

.items-popup-widget__popup-image img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    border-radius: inherit;
}

.items-popup-widget__popup-right {
    display: flex;
    flex-direction: column;
}

.items-popup-widget__popup-heading {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.items-popup-widget__popup-subheading {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #666;
    line-height: 1.3;
}

.items-popup-widget__popup-content-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    min-height:130px;
}

/* Navigation */
.items-popup-widget__popup-navigation {
    display: flex;
    justify-content: center;
    padding: 20px 30px 30px;
}

.items-popup-widget__nav-arrow {
    background: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.items-popup-widget__nav-arrow:hover path:first-of-type {
    fill: #00538E;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .items-popup-widget__grid {
        display: none;
    }
    
    .items-popup-widget__mobile-slider {
        display: block;
    }
}

@media (max-width: 768px) {
    /* Mobile popup - 80% height, docked at bottom */
    .items-popup-widget__popup-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    .items-popup-widget__popup {
        width: 100%;
        height: 80vh;
        max-height: 80vh;
        border-radius: 8px 8px 0 0 !important;
        transform: none;
        display: flex;
        flex-direction: column;
        padding: 32px 16px !important;
    }
    
    .items-popup-widget__popup-overlay.active .items-popup-widget__popup {
        transform: none;
    }
    
    /* 1-column layout for mobile */
    .items-popup-widget__popup-content {
        grid-template-columns: 1fr;
        gap: 24px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        align-items:flex-start;
    }
    
    /* Mobile layout without icon column */
    .items-popup-widget__popup-content--no-icon {
        grid-template-columns: 1fr !important;
    }
    
    .items-popup-widget__popup-left {
        order: 1;
        display: flex;
        justify-content: center;
        margin-bottom: 0px;
    }
    
    .items-popup-widget__popup-right {
        order: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .items-popup-widget__popup-icon {
        width: 150px !important;
        height: 150px !important;
        border-radius: 8px !important;
    }
    
    .items-popup-widget__popup-icon i,
    .items-popup-widget__popup-icon svg,
    .items-popup-widget__popup-icon img {
        font-size: 32px;
        max-width: 110px;
    }
    
    .items-popup-widget__popup-image {
        width: 150px !important;
        height: 150px !important;
        border-radius: 8px !important;
    }
    
    .items-popup-widget__popup-image img {
        font-size: 32px;
        max-width: 110px;
    }
    
    .items-popup-widget__popup-heading {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .items-popup-widget__popup-subheading {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    /* Fixed height scrollable content area */
    .items-popup-widget__popup-content-text {
        font-size: 20px;
        line-height:26px;
        flex: 1;
        overflow-y: auto;
        max-height: calc(80vh - 200px); /* 80vh minus space for icon, headings, navigation */
        padding-right: 10px;
    }
    
    /* Custom scrollbar for mobile */
    .items-popup-widget__popup-content-text::-webkit-scrollbar {
        width: 4px;
    }
    
    .items-popup-widget__popup-content-text::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .items-popup-widget__popup-content-text::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }
    
    .items-popup-widget__popup-navigation {
        padding: 15px 20px 20px;
        flex-shrink: 0;
    }
    
    .items-popup-widget__nav-arrow {
        width: 56px;
        height: 45px;
    }
}

* {
    scroll-margin-top: 170px;
}
@media (max-width: 768px) {
    * {
        scroll-margin-top: 100px;
    }
}