/* Local Gallery Styles */

/* Disable Squarespace gallery auto-functionality */
.local-gallery-override[data-controller] {
    /* Override any remaining Squarespace gallery scripts */
}

/* Gallery slide visibility control - Only target main slideshow items, not thumbnails */
.gallery-slideshow-list {
    overflow: visible !important; /* Allow larger images */
}

.gallery-slideshow-list .gallery-slideshow-item {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: visible !important; /* Allow larger images */
}

.gallery-slideshow-list .gallery-slideshow-item[data-active="true"] {
    display: block !important;
    opacity: 1 !important;
}

/* NUCLEAR OPTION: Complete CSS isolation and override */
/* Use CSS custom properties that can't be overridden by Squarespace */
:root {
    --custom-gallery-width: min(92vw, 135vh);
    --custom-gallery-height: min(92vw, 135vh);
}

/* Create a new stacking context to isolate from Squarespace */
.gallery-slideshow-item[data-active="true"] {
    contain: layout style paint !important;
    isolation: isolate !important;
}

/* Ultra-specific override that uses CSS specificity tricks */
html body .gallery-slideshow .gallery-slideshow-list .gallery-slideshow-item[data-active="true"] img[src] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    max-width: var(--custom-gallery-width) !important;
    max-height: var(--custom-gallery-height) !important;
    min-width: unset !important;
    min-height: unset !important;
    transform: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    /* Force specific dimensions */
    aspect-ratio: auto !important;
    object-position: center !important;
}

/* Prevent any transitions or animations that cause flashing */
.gallery-slideshow-item[data-active="true"] img {
    transition: none !important;
    animation: none !important;
}

/* Override any lazy loading that might cause issues */
.gallery-slideshow-item[data-active="true"] img[loading] {
    loading: eager !important;
}

/* Ultra-high specificity override for stubborn Squarespace styles */
.gallery-slideshow-wrapper .gallery-slideshow .gallery-slideshow-list .gallery-slideshow-item[data-active="true"][data-in="true"] img[src][data-src] {
    max-width: min(92vw, 135vh) !important;
    max-height: min(92vw, 135vh) !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    min-width: unset !important;
    min-height: unset !important;
}

/* Target the exact Squarespace element structure */
.gallery-slideshow-wrapper .gallery-slideshow .gallery-slideshow-list .gallery-slideshow-item[data-active="true"][data-in="true"] img[data-src][data-image][data-image-dimensions][data-image-focal-point][src][srcset],
.gallery-slideshow-wrapper .gallery-slideshow .gallery-slideshow-list .gallery-slideshow-item[data-active="true"] img[data-src][data-image][data-image-dimensions][data-image-focal-point][src][srcset],
.gallery-slideshow-wrapper .gallery-slideshow .gallery-slideshow-list .gallery-slideshow-item[data-active="true"] img[data-src][data-image][data-image-dimensions][src],
.gallery-slideshow-wrapper .gallery-slideshow .gallery-slideshow-list .gallery-slideshow-item[data-active="true"] img[data-src][data-image][src] {
    max-width: min(92vw, 135vh) !important;
    max-height: min(92vw, 135vh) !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    min-width: unset !important;
    min-height: unset !important;
    cursor: pointer !important;
}

/* Nuclear option - target any img in active slide regardless of attributes */
.gallery-slideshow-item[data-active="true"] img,
.gallery-slideshow-item[data-active="true"][data-in="true"] img {
    max-width: min(92vw, 135vh) !important;
    max-height: min(92vw, 135vh) !important;
    width: 100% !important;
    height: 100% !important;  
    object-fit: contain !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    min-width: unset !important;
    min-height: unset !important;
    cursor: pointer !important;
}

/* Ensure thumbnails are always visible */
.gallery-slideshow-thumbnails {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.gallery-slideshow-thumbnails .gallery-slideshow-thumbnails-thumb {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Make sure thumbnail images are visible and efficiently rendered */
.gallery-slideshow-thumbnails img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    /* Performance optimizations for thumbnails */
    image-rendering: auto !important;
    /* Remove ALL size restrictions to let images fill container */
    max-width: none !important;
    max-height: none !important;
    min-width: unset !important;
    min-height: unset !important;
    /* Prevent browser lazy loading interference */
    content-visibility: visible !important;
    /* Force immediate loading */
    loading: eager !important;
    /* Override any Squarespace responsive sizing */
    flex-shrink: 0 !important;
    flex-grow: 1 !important;
}

/* Aggressive override for Squarespace thumbnail sizing */
.gallery-slideshow-thumbnails img[src*="thumb"] {
    width: 100% !important;
    height: 100% !important;
    max-width: unset !important;
    max-height: unset !important;
    object-fit: cover !important;
}

/* Override any browser lazy loading placeholders */
.gallery-slideshow-thumbnails img[src*="placeholder"],
.gallery-slideshow-thumbnails img[src*="data:image"],
.gallery-slideshow-thumbnails img[src=""] {
    background: #f0f0f0 !important;
    min-height: 60px !important;
    min-width: 60px !important;
}

/* Enhanced gallery controls - Position arrows safely without affecting layout width */
.gallery-slideshow-wrapper {
    position: relative !important;
    margin: 0 auto !important; /* Center the gallery */
    max-width: calc(100% - 160px) !important; /* Reserve space for arrows */
    overflow: visible !important; /* Allow larger images to extend */
}

.gallery-slideshow-wrapper .gallery-slideshow-control {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1000 !important; /* Higher z-index to ensure visibility */
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 40px !important;
    height: 40px !important;
    display: block !important; /* Force visibility */
    opacity: 1 !important; /* Force visibility */
}

.gallery-slideshow-wrapper .gallery-slideshow-control-prev {
    left: -80px !important; /* Position outside the container */
}

.gallery-slideshow-wrapper .gallery-slideshow-control-next {
    right: -80px !important; /* Position outside the container */
}

.gallery-slideshow-control:hover {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1) !important;
}

/* Ensure arrow buttons are visible */
.gallery-slideshow-control-btn {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: none !important;
    border: none !important;
    color: #000 !important;
    width: 40px !important;
    height: 40px !important;
    cursor: pointer !important;
    font-size: 24px !important;
    font-weight: bold !important;
    text-align: center !important;
    line-height: 40px !important;
}

/* Force all gallery control elements to be visible */
.gallery-slideshow-control,
.gallery-slideshow-control-prev,
.gallery-slideshow-control-next {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Responsive max-width and arrow positioning */
@media (max-width: 1200px) {
    .gallery-slideshow-wrapper {
        max-width: calc(100% - 120px) !important;
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control-prev {
        left: -60px !important;
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control-next {
        right: -60px !important;
    }
}

@media (max-width: 900px) {
    .gallery-slideshow-wrapper {
        max-width: calc(100% - 100px) !important;
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control-prev {
        left: -50px !important;
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control-next {
        right: -50px !important;
    }
}

@media (max-width: 600px) {
    .gallery-slideshow-wrapper {
        max-width: calc(100% - 80px) !important; /* Leave space for arrows on mobile */
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control {
        display: block !important; /* Show arrows on mobile */
        opacity: 1 !important;
        visibility: visible !important;
        width: 30px !important;
        height: 30px !important;
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control-prev {
        left: -40px !important; /* Position arrows on mobile */
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control-next {
        right: -40px !important; /* Position arrows on mobile */
    }
    .gallery-slideshow-control-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 20px !important;
        line-height: 30px !important;
    }
    /* Use smaller sizing on mobile */
    .gallery-slideshow-list .gallery-slideshow-item[data-active="true"] img {
        max-width: min(81vw, 102vh) !important; /* Moderate size on mobile */
        max-height: min(81vw, 102vh) !important;
    }
}

/* Thumbnail active state */
.gallery-slideshow-thumbnails-thumb.active {
    border: 3px solid #000;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.gallery-slideshow-thumbnails-thumb {
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.gallery-slideshow-thumbnails-thumb:hover {
    opacity: 0.7;
}

/* Modest thumbnail sizing improvements */
.gallery-slideshow-thumbnails-thumb {
    box-sizing: border-box !important;
}

.gallery-slideshow-thumbnails-image-wrapper {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Lightbox styles */
.local-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 75%;
    max-height: 75%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 60px;
    cursor: pointer;
    padding: 20px;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-prev {
    left: -144px;
}

.lightbox-next {
    right: -144px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Tablet specific adjustments */
@media (max-width: 768px) and (min-width: 601px) {
    .gallery-slideshow-wrapper {
        max-width: calc(100% - 90px) !important;
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control-prev {
        left: -45px !important;
    }
    .gallery-slideshow-wrapper .gallery-slideshow-control-next {
        right: -45px !important;
    }
    /* Use moderate sizing on tablets */
    .gallery-slideshow-list .gallery-slideshow-item[data-active="true"] img {
        max-width: min(87vw, 122vh) !important; /* Moderate size on tablets */
        max-height: min(87vw, 122vh) !important;
    }
}
    
    /* Lightbox controls */
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        width: 60px;
        height: 60px;
        padding: 10px;
    }
    
    .lightbox-prev {
        left: -72px;
    }
    
    .lightbox-next {
        right: -72px;
    }
    
    .lightbox-counter {
        bottom: 20px;
        font-size: 16px;
        padding: 8px 16px;
    }
}

/* Smooth slide transitions */
.gallery-slideshow-item {
    transition: opacity 0.5s ease-in-out;
}

/* Image hover effect */
.gallery-slideshow-item img:hover {
    max-width: min(94vw, 138vh) !important; /* Slightly larger on hover */
    max-height: min(94vw, 138vh) !important;
    transition: max-width 0.3s ease, max-height 0.3s ease !important;
}

/* Reduce height of bIFE A CAVALO section by 50% */
[data-section-id="67ccae9a85ef8f612ca0b13b"] .fe-67ccae9a85ef8f612ca0b13a {
    --row-height-scaling-factor: 0.01075 !important; /* 50% of original 0.0215 */
}

[data-section-id="67ccae9a85ef8f612ca0b13b"] .fe-67ccae9a85ef8f612ca0b13a {
    grid-template-rows: repeat(4,minmax(12px, auto)) !important; /* 50% of original 24px */
}

@media (min-width: 768px) {
    [data-section-id="67ccae9a85ef8f612ca0b13b"] .fe-67ccae9a85ef8f612ca0b13a {
        grid-template-rows: repeat(8,minmax(calc(var(--container-width) * 0.01075), auto)) !important;
    }
}

/* Fix section divider visibility - Define missing CSS variables and force display */
.has-section-divider[data-section-id="67cca822c45f5f71ab5f0dc8"] {
    --divider-height: 1px !important;
    --z-index: 10 !important;
    position: relative !important;
}

.has-section-divider[data-section-id="67cca822c45f5f71ab5f0dc8"] .section-divider-display {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    z-index: 10 !important;
}

.has-section-divider[data-section-id="67cca822c45f5f71ab5f0dc8"] .section-divider-block {
    height: 1px !important;
    position: relative !important;
}

.has-section-divider[data-section-id="67cca822c45f5f71ab5f0dc8"] .section-divider-svg-clip {
    display: block !important;
}

.has-section-divider[data-section-id="67cca822c45f5f71ab5f0dc8"] .section-divider-svg-stroke {
    display: block !important;
    height: 1px !important;
    width: 100% !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
}

.has-section-divider[data-section-id="67cca822c45f5f71ab5f0dc8"] .section-divider-stroke {
    stroke: #000 !important;
    stroke-width: 1px !important;
    opacity: 1 !important;
}

/* Fallback: Create a visible border line */
.has-section-divider[data-section-id="67cca822c45f5f71ab5f0dc8"]::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: #000 !important;
    width: 100% !important;
    z-index: 100 !important;
}

/* Add dividers BEFORE sections by targeting the text sections that contain titles */

/* Serbia section title - add divider at top of section */
[data-section-id="67ccafa96bf80853a9caefe6"] {
    position: relative !important;
}

[data-section-id="67ccafa96bf80853a9caefe6"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 1px !important;
    background: #000 !important;
    z-index: 1000 !important;
}

/* Hide any existing bottom dividers in Serbia gallery section */
.has-section-divider[data-section-id="67cca822c45f5f71ab5f0dc9"] .section-divider-display {
    display: none !important;
}

/* China section title - add divider at top of section */
[data-section-id="67ccb698a499334945b40cd2"] {
    position: relative !important;
}

[data-section-id="67ccb698a499334945b40cd2"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 1px !important;
    background: #000 !important;
    z-index: 1000 !important;
}

/* Hide any existing bottom dividers in China gallery section */
.has-section-divider[data-section-id="67ccafa5b148926014716ff0"] .section-divider-display {
    display: none !important;
}

/* Egypt section title - add divider at top of section */
[data-section-id="67ccba5e7ee9543f3f537907"] {
    position: relative !important;
}

[data-section-id="67ccba5e7ee9543f3f537907"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 1px !important;
    background: #000 !important;
    z-index: 1000 !important;
}

/* Hide any existing bottom dividers in Egypt gallery section */
.has-section-divider[data-section-id="67ccb6a01282cc129a57e3c1"] .section-divider-display {
    display: none !important;
}

/* Remove outer borders from sections */
[data-section-id="67ccae9a85ef8f612ca0b13b"] .section-border,
[data-section-id="67ccafa96bf80853a9caefe6"] .section-border,
[data-section-id="67cca822c45f5f71ab5f0dc9"] .section-border,
[data-section-id="67ccb698a499334945b40cd2"] .section-border,
[data-section-id="67ccafa5b148926014716ff0"] .section-border,
[data-section-id="67ccba5e7ee9543f3f537907"] .section-border,
[data-section-id="67ccb6a01282cc129a57e3c1"] .section-border {
    border: none !important;
    outline: none !important;
}

/* Loading state */
.gallery-slideshow-item img[data-loading="true"] {
    filter: blur(2px);
    transition: filter 0.3s ease;
}

.gallery-slideshow-item img[data-loading="false"] {
    filter: blur(0);
}

/* Fix Skip to Content link visibility - properly hide off-screen */
.header-skip-link {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    background: transparent !important;
    color: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
}

/* Show Skip to Content link only when focused for accessibility */
.header-skip-link:focus,
.header-skip-link:focus-visible {
    position: absolute !important;
    left: 6px !important;
    top: 7px !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: #000 !important;
    color: #f5f5f3 !important;
    padding: 8px 16px !important;
    margin: 0 !important;
    border-radius: 4px !important;
    z-index: 999999 !important;
    text-decoration: none !important;
}

/* Fix section titles positioning - Squarespace scaled text positioning issue */
.sqsrte-scaled-text {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* Match original website font sizes for section titles - maximum specificity */
/* Use CSS custom properties and ultra-high specificity to override any existing styles */

/* "Whithin each grain" title */
.clearfix.site-wrapper .container.sections .page-section[data-section-id="67cca822c45f5f71ab5f0dc8"] .content-wrapper .content .fluid-engine .fe-block .sqs-block .sqs-block-content .sqs-html-content .sqsrte-scaled-text-container .sqsrte-scaled-text h4,
.sections section[data-section-id="67cca822c45f5f71ab5f0dc8"] h4 {
    font-size: clamp(28px, 5vw, 72.4px) !important;
    line-height: clamp(28px, 5vw, 72.4px) !important;
    letter-spacing: clamp(-2.24px, -0.4vw, -5.792px) !important;
}

/* "bIFE A CAVALO - BRAZIL" title */
.clearfix.site-wrapper .container.sections .page-section[data-section-id="67ccae9a85ef8f612ca0b13b"] .content-wrapper .content .fluid-engine .fe-block .sqs-block .sqs-block-content .sqs-html-content .sqsrte-scaled-text-container .sqsrte-scaled-text h4,
.sections section[data-section-id="67ccae9a85ef8f612ca0b13b"] h4 {
    font-size: clamp(20px, 2.8vw, 40.5px) !important;
    line-height: clamp(20px, 2.8vw, 40.5px) !important;
    letter-spacing: clamp(-1.6px, -0.22vw, -3.24px) !important;
}

/* "Punjene paprike sa mesom - Serbia" title */
.clearfix.site-wrapper .container.sections .page-section[data-section-id="67ccafa96bf80853a9caefe6"] .content-wrapper .content .fluid-engine .fe-block .sqs-block .sqs-block-content .sqs-html-content .sqsrte-scaled-text-container .sqsrte-scaled-text h4,
.sections section[data-section-id="67ccafa96bf80853a9caefe6"] h4 {
    font-size: clamp(20px, 2.9vw, 42.4px) !important;
    line-height: clamp(20px, 2.9vw, 42.4px) !important;
    letter-spacing: clamp(-1.6px, -0.23vw, -3.392px) !important;
}

/* "FRIED RICE - china" title */
.clearfix.site-wrapper .container.sections .page-section[data-section-id="67ccb698a499334945b40cd2"] .content-wrapper .content .fluid-engine .fe-block .sqs-block .sqs-block-content .sqs-html-content .sqsrte-scaled-text-container .sqsrte-scaled-text h4,
.sections section[data-section-id="67ccb698a499334945b40cd2"] h4 {
    font-size: clamp(18px, 2.5vw, 36.6px) !important;
    line-height: clamp(18px, 2.5vw, 36.6px) !important;
    letter-spacing: clamp(-1.44px, -0.2vw, -2.928px) !important;
}

/* "Roz Bel Laban - Egypt" title */
.clearfix.site-wrapper .container.sections .page-section[data-section-id="67ccba5e7ee9543f3f537907"] .content-wrapper .content .fluid-engine .fe-block .sqs-block .sqs-block-content .sqs-html-content .sqsrte-scaled-text-container .sqsrte-scaled-text h4,
.sections section[data-section-id="67ccba5e7ee9543f3f537907"] h4 {
    font-size: clamp(18px, 2.4vw, 34.8px) !important;
    line-height: clamp(18px, 2.4vw, 34.8px) !important;
    letter-spacing: clamp(-1.44px, -0.19vw, -2.784px) !important;
}