/********************************************
   OCCASIONAL MEDIA - PUBLIC GALLERY STYLES 
 ********************************************/
.sidebar {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	width: 100%;
	padding: 10px 15%;
	box-sizing: border-box;
	font-size: 0.71em;
	position: sticky !important;
	z-index: 10000 !important;
	background-color: #fff !important;
	box-shadow: 0 2px #8888881a;
}

.sidebar::before {
	content: "";
	display: block !important;
	background: #fff !important; 
	position: flex !important;
	z-index: -1 !important;
	top: 0;
	bottom: 0;
	left: -300px;
}

/* OVERRIDE THEME CONTAINERS FOR FULL-WIDTH */
.om-gallery ~ .content.thin, .content, .post-inner,
.post-inner:has(.om-gallery) {
    width: 100% !important;
    max-width: none !important;
    padding: 20px 40px;
}
.om-gallery {
	padding: 20px;
}

.entry.post.single:has(.om-gallery),
.entry.page:has(.om-gallery) {
	background-color: #fff !important;
}

/* GALLERY CONTAINER - FULL WIDTH */
.entry-content .om-gallery,
.main-content .om-gallery, 
.content-area .om-gallery {
	--gallery-width: 100%;
	--columns: 5;
	--gutter: 3%;
	--column-width: calc((100% - (var(--gutter) * (var(--columns) - 1))) / var(--columns));
	margin: 0;
	width: 100%;
	max-width: 100%;
	background-color: #484848 !important;
}

/* MASONRY SIZERS - RESTORED SPECIFICITY */
.entry-content .om-sizer,
.main-content .om-sizer,
.content-area .om-sizer {
    width: var(--column-width);
}

.entry-content .om-gutter-sizer,
.main-content .om-gutter-sizer,
.content-area .om-gutter-sizer {
    width: var(--gutter);
}

.entry-content .om-gallery-item,
.main-content .om-gallery-item,
.content-area .om-gallery-item {
    width: var(--column-width);
    margin-bottom: var(--gutter);
}

.om-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    max-height: calc(var(--column-width) * 2);
}

/* SHUFFLE BUTTON */
.om-shuffle-controls {
    text-align: right;
    margin: -45px 0 35px 0;
    padding: 0;
    position: relative;
    z-index: 10;
}

.om-shuffle-btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 20px;
    border: 2px solid #333;
    font-size: 13px;
    line-height: 150%;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #333;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.om-shuffle-btn:hover {
    background: #333;
    color: #fff;
}

/* ======================================
   ASSOCIATION INDICATOR STYLES
   ====================================== */
.om-association-link {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: #ffd700;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    z-index: 10;
    transition: all 0.3s ease;
}

.om-association-link:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Ensure gallery items have relative positioning for absolute children */
.om-gallery-item {
    position: relative;
}

/* Mobile: Hide association indicator on very small screens */
@media (max-width: 480px) {
    .om-association-link {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
}
/* ======================================
   LIGHTBOX STYLES - FIXED POSITION CONTROLS
   ====================================== */
#om-lightbox {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.95) !important;
    z-index: 999999 !important;
    backdrop-filter: blur(5px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.lightbox-content {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    animation: lightboxFadeIn 0.3s ease;
    margin: 0 60px !important;
}

.lightbox-content img {
    max-width: 100% !important;
    max-height: 70vh !important;
 /*   width: auto !important;   */
    height: auto !important;
/*    display: block !important;  */
    object-fit: contain !important;
    margin: 0 auto !important;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* FIXED POSITION NAVIGATION CONTROLS */
.lightbox-close {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: rgba(0,0,0,0.8) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    border-radius: 4px !important;
    z-index: 1000001 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

.lightbox-prev,
.lightbox-next {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(0,0,0,0.8) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 4px !important;
    width: 44px !important;
    height: 60px !important;
    font-size: 20px !important;
    cursor: pointer !important;
    z-index: 1000001 !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lightbox-prev {
    left: 20px !important;
}

.lightbox-next {
    right: 20px !important;
}

/* Hover effects */
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.9) !important;
    color: #000 !important;
    border-color: rgba(0,0,0,0.5) !important;
}

.lightbox-close:hover {
    transform: scale(1.05) !important;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.05) !important;
}

/* FIXED POSITION INFO PANEL */
.lightbox-info {
    position: fixed !important;
    bottom: 30px !important;
    left: 0 !important;
    width: 100% !important;
    color: white !important;
    text-align: center !important;
    padding: 0 !important;
    z-index: 1000001 !important;
}

.lightbox-counter {
    font-size: 14px !important;
    margin-bottom: 8px !important;
    color: #ccc !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
}

.lightbox-association a {
    color: #ffd700 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border: 1px solid #ffd700 !important;
    padding: 8px 20px !important;
    border-radius: 20px !important;
    background: rgba(0,0,0,0.6) !important;
    transition: all 0.3s ease !important;
 /*   display: inline-block !important;
*/	font-size: 14px !important;
    letter-spacing: 0.5px !important;
}

.lightbox-association a:hover {
    background: #ffd700 !important;
    color: #000 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
}

/* Ensure gallery items are clickable for lightbox */
.om-gallery-item {
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.om-gallery-item:hover {
    opacity: 0.9;
}

/* Don't interfere with association links */
.om-gallery-item a.om-gallery-link {
    cursor: pointer !important;
}

/* ======================================
   TABLET BREAKPOINT (768px - 1024px)
   ====================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .entry-content .om-gallery,
    .main-content .om-gallery, 
    .content-area .om-gallery {
        --columns: 3 !important;
    }
    
    .om-gallery ~ .content.thin, .content, .post-inner,
    .post-inner:has(.om-gallery) {
        padding: 15px 30px !important;
    }
    
    .lightbox-content {
        margin: 0 50px !important;
        max-width: 85vw !important;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px !important;
        height: 55px !important;
        font-size: 18px !important;
    }
    
    .lightbox-prev {
        left: 15px !important;
    }
    
    .lightbox-next {
        right: 15px !important;
    }
}

/* ======================================
   MOBILE RESPONSIVE
   ====================================== */

/* Mobile Portrait */
@media (max-width: 767px) {
    .content, div.om-gallery[style*="position: relative"],
    .om-gallery ~ .content.thin, 
    .content, 
    .post-inner,
    .post-inner:has(.om-gallery) {
        display: block !important;
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 20px !important;
    }
    
    .entry-content .om-gallery,
    .main-content .om-gallery, 
    .content-area .om-gallery {
        --columns: 2 !important;
        padding: 10px !important;
    }
    
    .om-gallery-item {
        position: relative !important;
        width: 100% !important;
        left: 0 !important;
        top: auto !important;
        margin-bottom: 10px;
    }

    .om-gallery-item img {
        width: 100%;
        height: auto !important;
        display: block;
        border-radius: 0;
        max-height: 500px !important;
    }
    
    /* Lightbox mobile portrait */
    .lightbox-content {
        margin: 0 40px !important;
        max-width: 85vw !important;
        max-height: 85vh !important;
    }
    
    .lightbox-content img {
        max-height: 85vh !important;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 36px !important;
        height: 50px !important;
        font-size: 18px !important;
    }
    
    .lightbox-prev {
        left: 10px !important;
    }
    
    .lightbox-next {
        right: 10px !important;
    }
    
    .lightbox-close {
        top: 15px !important;
        right: 15px !important;
        font-size: 20px !important;
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
    }
    
    .lightbox-info {
        bottom: 20px !important;
    }
}

/* Mobile Landscape - Buttons OFF the images */
@media (max-width: 767px) and (orientation: landscape) {
    .lightbox-content {
        margin: 0 50px !important;
        max-width: 80vw !important;
        max-height: 80vh !important;
    }
    
    .lightbox-content img {
        max-height: 80vh !important;
    }
    
    /* Push buttons further out in landscape */
    .lightbox-prev {
        left: 5px !important;
    }
    
    .lightbox-next {
        right: 5px !important;
    }
    
    .lightbox-close {
        top: 10px !important;
        right: 10px !important;
    }
    
    .lightbox-info {
        bottom: 15px !important;
    }
    
    .lightbox-association a {
        padding: 6px 16px !important;
        font-size: 13px !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .om-gallery ~ .content.thin, .content, .post-inner,
    .post-inner:has(.om-gallery) {
        padding: 5px 10px !important;
    }
    
    .entry-content .om-gallery,
    .main-content .om-gallery, 
    .content-area .om-gallery {
        --columns: 1 !important;
        padding: 5px !important;
    }
    
    .lightbox-content {
        margin: 0 30px !important;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 32px !important;
        height: 44px !important;
        font-size: 16px !important;
    }
    
    .lightbox-close {
        width: 32px !important;
        height: 32px !important;
        line-height: 32px !important;
        font-size: 18px !important;
    }
}