/* NUCLEAR OPTION - KILL ALL GAPS ON MOBILE */
@media only screen and (max-width: 850px) {
    /* Hide EVERYTHING video related AND empty sections */
    .background-video,
    #player,
    .sqs-video-background,
    .Parallax-item,
    .Parallax-host,
    .Parallax-host-outer,
    .Index-page--has-image,
    .Index-page-image,
    #frank-g-director,
    .Index-page[id="frank-g-director"],
    [data-url-id="frank-g-director"],
    #welcome,
    #contact,
    .Index-page:not(:has(.Index-gallery)),
    .Index-page-scroll-indicator,
    .Index-page-content:not(:has(.Index-gallery)),
    .sqs-layout:not(:has(.Index-gallery)) {
        display: none !important;
        height: 0 !important;
        max-height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Body and main containers */
    html, body {
        background: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Main container */
    .Main {
        padding-top: 50px !important;
        padding-bottom: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }
    
    /* All Index containers - ZERO spacing */
    .Index,
    .Index-page,
    .Index-page-content,
    .Index-gallery,
    .Index-gallery-wrapper,
    .Index-gallery-items {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        line-height: 0 !important;
        font-size: 0 !important;
    }
    
    /* Gallery inner containers - NO GAPS */
    .Index-gallery-inner {
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        line-height: 0 !important;
        font-size: 0 !important;
        letter-spacing: 0 !important;
        word-spacing: 0 !important;
    }
    
    /* Gallery items - ABSOLUTELY NO GAPS */
    .Index-gallery-item {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        position: relative !important;
        float: none !important;
        clear: both !important;
        border: none !important;
        outline: none !important;
        line-height: 0 !important;
        font-size: 0 !important;
        letter-spacing: 0 !important;
        vertical-align: top !important;
    }
    
    /* Inner container - aspect ratio only */
    .Index-gallery-item-inner {
        position: relative !important;
        width: 100% !important;
        padding: 0 0 56.25% 0 !important; /* ONLY bottom padding for aspect ratio */
        margin: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        line-height: 0 !important;
    }
    
    /* Image container */
    .Index-gallery-item-image {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
    }
    
    /* Image itself */
    .Index-gallery-item-image img {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        object-fit: cover !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Text overlay */
    .Index-gallery-item-content {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 15px !important;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%) !important;
        z-index: 2 !important;
        pointer-events: none !important;
        line-height: normal !important;
        font-size: initial !important;
    }
    
    .Index-gallery-item-content-heading {
        color: white !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        margin: 0 !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.8) !important;
        line-height: 1.2 !important;
    }
    
    /* Make links clickable */
    .Index-gallery-item-content-link {
        pointer-events: auto !important;
    }
    
    /* Header */
    .Mobile {
        display: block !important;
    }
    
    .Mobile-bar--top {
        background: #000 !important;
        border-bottom: 1px solid #222 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 100 !important;
        height: 50px !important;
    }
    
    .Mobile-bar-branding {
        color: #fff !important;
        font-size: 14px !important;
        letter-spacing: 1px !important;
    }
    
    /* Hide desktop nav */
    .Header, 
    .Ancillary,
    .Index-nav,
    .Index-page-scroll-indicator {
        display: none !important;
    }
    
    /* Force continuous layout */
    .Index-gallery-inner + .Index-gallery-inner {
        margin-top: 0 !important;
    }
    
    /* Remove ALL possible gaps between items */
    .Index-gallery-item + .Index-gallery-item,
    article + article {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Kill any min-heights */
    [style*="min-height"],
    [style*="height"] {
        min-height: auto !important;
    }
    
    /* Specific overrides for inline styles */
    .Index-gallery-item[style] {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Hide empty items */
    .Index-gallery-item:empty,
    .Index-gallery-item:not(:has(img)) {
        display: none !important;
    }
    
    /* First gallery should start at top */
    .Main > .Index:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Remove page wrapper spacing */
    #frank-g-commercial,
    [data-url-id="home"],
    [id*="commercial"] {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }
}