/* 
    Begin Exhibitor Loop 
*/

.exhibitor-grid {
    --grid-column-gap: 40px;
    --grid-row-gap: 60px;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: var(--grid-row-gap) var(--grid-column-gap);
}

.exhibitor-grid.cols-2 > .exhibitor { width: calc((100% - var(--grid-column-gap)) / 2); }
.exhibitor-grid.cols-3 > .exhibitor { width: calc((100% - (2 * var(--grid-column-gap))) / 3); }
.exhibitor-grid.cols-4 > .exhibitor { width: calc((100% - (3 * var(--grid-column-gap))) / 4); }
.exhibitor-grid.cols-5 > .exhibitor { width: calc((100% - (4 * var(--grid-column-gap))) / 5); }
.exhibitor-grid.cols-6 > .exhibitor { width: calc((100% - (5 * var(--grid-column-gap))) / 6); }

.exhibitor {
    box-sizing: border-box;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.exhibitor .wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform .3s, box-shadow 0.3s;
    position:relative;
}

.exhibitor .wrap:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.exhibitor .image {
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    position: relative;
    background-color: #f5f5f5;
}

.exhibitor .image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 40px;
}

.exhibitor .text {
    padding: 15px;
    text-align: center;
    background-color: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.exhibitor .text h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: #333;
}

.exhibitor .stand {
    padding: 0 10px 5px;
    text-align: center;
}

.exhibitor .stand span {
    font-size: 14px;
    color: #666;
}

.exhibitor .more-info {
    padding: 15px;
    text-align: center;
    background-color: #fff;
}
.exhibitor .more-info a:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.exhibitor .more-info .button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f1f1f1;
    color: #000000;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all .3s ease-in-out;
}

.exhibitor .more-info .button:hover {
    background-color: #e1e1e1;

}

@media (max-width: 1200px) {
    .exhibitor-grid.cols-5 > .exhibitor,
    .exhibitor-grid.cols-6 > .exhibitor {
        width: calc((100% - (3 * var(--grid-column-gap))) / 4);
    }
}

@media (max-width: 992px) {
    .exhibitor-grid.cols-4 > .exhibitor,
    .exhibitor-grid.cols-5 > .exhibitor,
    .exhibitor-grid.cols-6 > .exhibitor {
        width: calc((100% - (2 * var(--grid-column-gap))) / 3);
    }
}

@media (max-width: 768px) {
    .exhibitor-grid.cols-3 > .exhibitor,
    .exhibitor-grid.cols-4 > .exhibitor,
    .exhibitor-grid.cols-5 > .exhibitor,
    .exhibitor-grid.cols-6 > .exhibitor {
        width: calc((100% - var(--grid-column-gap)) / 2);
    }
}

@media (max-width: 480px) {
    .exhibitor-grid[class*=cols-] > .exhibitor {
        width: 100%;
    }
}

@supports not (gap: 20px) {
    .exhibitor-grid {
        margin: calc(var(--grid-row-gap) / -2) calc(var(--grid-column-gap) / -2);
    }
    .exhibitor {
        padding: calc(var(--grid-row-gap) / 2) calc(var(--grid-column-gap) / 2);
    }
    .exhibitor-grid.cols-2 > .exhibitor { width: 50%; }
    .exhibitor-grid.cols-3 > .exhibitor { width: 33.333%; }
    .exhibitor-grid.cols-4 > .exhibitor { width: 25%; }
    .exhibitor-grid.cols-5 > .exhibitor { width: 20%; }
    .exhibitor-grid.cols-6 > .exhibitor { width: 16.666%; }
}


/* controls */
.exhibitor-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.exhibitor-search-wrap {
    position: relative;
    flex-grow: 1;
}

.exhibitor-search {
    padding: 8px 30px 8px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.exhibitor-search-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.exhibitor-controls button {
    padding: 8px 16px;
    background-color: #f1f1f1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.exhibitor-controls button:hover {
    background-color: #e1e1e1;
}

.exhibitor-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: #666;

}

.exhibitor-loading .dashicons-update {
    animation: spin 1s linear infinite;
    margin-right: 5px;
    transform-origin: center center;
}


@media (max-width: 768px) {
    .exhibitor-controls {
        flex-wrap:wrap;
    }

    .exhibitor-search-wrap {
        width:100%;
    }
    .exhibitor-controls button {
        flex-grow:1;
    }
}

.exhibitor-no-results {
    text-align: center;
    padding: 20px;
    color: #666;
}


/* begin single exhibitor model */
#exhibitor-modal {
    /* Base positioning */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    
    /* Perfect centering with flexbox */
    display: flex;
    justify-content: center;
    align-items: center;
}

#exhibitor-modal .modal-content {
    /* Base styling */
    position: relative;
    background: #fff;
    
    /* Explicit sizing */
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    
    /* Ensure consistent spacing */
    margin: 10px;
    padding: 0;
    
    /* Clean appearance */
    overflow: hidden;
    z-index: 10;
}

#exhibitor-modal iframe {
    /* Make iframe fill container completely */
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

#exhibitor-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

#exhibitor-modal .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 11;
    line-height: 1;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

/* Height adjustment for short screens */
@media (max-height: 700px) {
    #exhibitor-modal .modal-content {
        height: calc(100% - 20px);
        max-height: none;
        margin: 10px;
    }
}

/* Width adjustment for narrow screens */
@media (max-width: 768px) {
    #exhibitor-modal .modal-content {
        width: calc(100% - 20px);
        max-width: none;
        margin: 10px;
    }
}

/* Override the inline display style */
#exhibitor-modal[style*="display: block"] {
    display: flex !important;
}

/* end single exhibitor modal */
/* 
    End Exhibitor Loop 
*/

/* 
    Begin Single Exhibitors
*/

html:has(body.single-exhibitor.modal) {
  height: 100%;
}

body.single-exhibitor.modal {
    display: flex;
    justify-content: center;
    min-height: 100%;
    margin: 0;
    flex-direction: column;
}

.single-exhibitor .logo {
    position: relative;
    width: 450px;
    height: 400px;
}

.single-exhibitor .logo img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: contain;
    object-position: top left;
}

.single-exhibitor .logo.auto-height {
    height: auto; 
}

.single-exhibitor .logo.auto-height img {
    position: static; 
    width: 100%;
    height: auto;
}

/* Exhibitor Gallery Styles */
.exhibitor-gallery {
    --swiper-navigation-color: #ccc; /* arrows */
    --swiper-pagination-color: #888; /* bullets active */
    --swiper-pagination-bullet-inactive-color: #ccc;
    --swiper-pagination-bullet-inactive-opacity:1;
    --swiper-pagination-bullet-size: 16px;
    
    position: relative;
    max-width: 100%;
    padding-bottom:50px;
    height:500px;
}

.exhibitor-gallery .swiper-container
{
    height: 100%;
}

.exhibitor-gallery .image {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 20px;
}
.exhibitor-gallery .image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor:pointer;
}
.exhibitor-gallery .exhibitor-description {
    text-align: center;
    margin-top: 10px;
    font-style: italic;
    color: #999;
}
.exhibitor-gallery .swiper-container {
    overflow: hidden;
}
.exhibitor-gallery .swiper-pagination {
    text-align: center;
}
.exhibitor-gallery .swiper-button-prev,
.exhibitor-gallery .swiper-button-next {
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: bold;
    filter: drop-shadow(0 0px 2px rgba(120,120,120,1))
}
.exhibitor-gallery .swiper-button-prev::after,
.exhibitor-gallery .swiper-button-next::after {
    font-size: 50px;
}
.exhibitor-gallery:hover .swiper-button-prev,
.exhibitor-gallery:hover .swiper-button-next {
    opacity: 1;
}
.exhibitor-gallery .swiper-loading-spinner {
    position: absolute;
    top: calc(50% - 20px); /* Half height (20px) up from center */
    left: calc(50% - 20px); /* Half width (20px) left from center */
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid #888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

.exhibitor-gallery.loaded .swiper-loading-spinner {
    display: none;
}

.social-links .elementor-grid-item:has(a:not([href])),
.social-links .elementor-grid-item:has(a[href=""]) {
  display: none;
}
/* 
    End Single Exhibitors
*/



.fade-in {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.fade-out {
    opacity: 1;
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
