/**
 * MG 2025 Theme - Images Gallery Styles UNIFICATE
 * Stesso layout per homepage, user profile, explorer
 * Version: 20251204 - MOBILE 2 COLONNE ATTIVO + LOADER
 * TIMESTAMP: 2025-12-04 18:00 - 2 COLONNE MOBILE + LOADING SPINNER
 */

/* ============================================
   PHOTO LOADING SPINNER - ENHANCED
   ============================================ */

.photo-loading {
    position: relative;
    min-height: 250px;
    background: rgba(255, 255, 255, 0.05);
}

.photo-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.photo-loading img {
    opacity: 0 !important;
    transition: opacity 0.4s ease;
}

/* Quando la foto è caricata */
.mg-card:not(.photo-loading) img,
.pt:not(.photo-loading) img,
.mg2025-photo:not(.photo-loading) img {
    opacity: 1 !important;
}

.photo-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: photo-spin 0.6s linear infinite;
}

@keyframes photo-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Nascondi loader quando foto è caricata */
.mg-card:not(.photo-loading) .photo-loader,
.pt:not(.photo-loading) .photo-loader,
.mg2025-photo:not(.photo-loading) .photo-loader {
    display: none !important;
}

/* GALLERY UNIFICATA - Zero gap, 6 colonne Desktop XL */
/* Specificità aumentata per vincere su CSS vecchi */
body .photo-gallery,
body .mg2025-photo-gallery,
.photo-gallery.photo-gallery,
.mg2025-photo-gallery.mg2025-photo-gallery {
    /* Layout masonry RESPONSIVE - 6 colonne default */
    -webkit-column-count: 6 !important;
    -moz-column-count: 6 !important;
    column-count: 6 !important;
    -webkit-column-gap: 0 !important;
    -moz-column-gap: 0 !important;
    column-gap: 0 !important;
    -webkit-column-fill: balance !important;
    -moz-column-fill: balance !important;
    column-fill: balance !important;
    
    /* Elimina micro-gap verticali */
    line-height: 0 !important;
    font-size: 0 !important;
    
    /* Container responsive */
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    
    /* Forza layout masonry */
    display: block !important;
    position: relative !important;
}

/* === RESPONSIVE BREAKPOINTS === */

/* Desktop L: 5 colonne (1200px - 1439px) */
@media (max-width: 1439px) {
    body .photo-gallery,
    body .mg2025-photo-gallery,
    .photo-gallery.photo-gallery,
    .mg2025-photo-gallery.mg2025-photo-gallery {
        -webkit-column-count: 5 !important;
        -moz-column-count: 5 !important;
        column-count: 5 !important;
    }
}

/* Desktop M: 4 colonne (992px - 1199px) */
@media (max-width: 1199px) {
    body .photo-gallery,
    body .mg2025-photo-gallery,
    .photo-gallery.photo-gallery,
    .mg2025-photo-gallery.mg2025-photo-gallery {
        -webkit-column-count: 4 !important;
        -moz-column-count: 4 !important;
        column-count: 4 !important;
    }
}

/* Tablet: 3 colonne (768px - 991px) */
@media (max-width: 991px) {
    body .photo-gallery,
    body .mg2025-photo-gallery,
    .photo-gallery.photo-gallery,
    .mg2025-photo-gallery.mg2025-photo-gallery {
        -webkit-column-count: 3 !important;
        -moz-column-count: 3 !important;
        column-count: 3 !important;
    }
}

/* Mobile verticale: 2 colonne FULL WIDTH (< 768px) */
@media (max-width: 767px) {
    /* DEFAULT: 2 colonne per TUTTE le pagine */
    body .photo-gallery,
    body .mg2025-photo-gallery,
    .photo-gallery.photo-gallery,
    .mg2025-photo-gallery.mg2025-photo-gallery {
        -webkit-column-count: 2 !important;
        -moz-column-count: 2 !important;
        column-count: 2 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Elementi foto: larghezza 100% (non vw per Opera) */
    .photo-gallery .pt,
    .photo-gallery .mg2025-photo,
    .mg2025-photo-gallery .pt,
    .mg2025-photo-gallery .mg2025-photo,
    .mg-card,
    .pt {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Override AGGRESSIVO per rimuovere max-width 310px */
    .mg2025-profile-layout .mg2025-photo-gallery .pt,
    .mg2025-profile-layout .mg2025-photo-gallery .mg2025-photo,
    .mg2025-photo-gallery .pt,
    .mg2025-photo-gallery .mg2025-photo,
    .mg-masonry-grid .mg-card,
    .mg-masonry-grid .pt {
        max-width: none !important;
        width: 100% !important;
    }
    
    /* Mobile: mostra immagini complete senza taglio (stile Instagram) */
    /* HOMEPAGE: object-fit contain | ALTRE PAGINE: object-fit contain */
    .photo-gallery .pt img,
    .photo-gallery .pt-image,
    .photo-gallery .pt-image-container img,
    .photo-gallery .mg2025-photo-img,
    .mg2025-photo-gallery .pt img,
    .mg2025-photo-gallery .pt-image,
    .mg2025-photo-gallery .pt-image-container img,
    .mg2025-photo-gallery .mg2025-photo-img,
    .mg2025-home-container .mg2025-photo-gallery .pt img,
    .mg2025-home-container .mg2025-photo-gallery .pt-image,
    .mg2025-home-container .mg2025-photo-gallery .pt-image-container img,
    .mg2025-home-container .mg2025-photo-gallery .mg2025-photo-img,
    .mg2025-recent-photos .mg2025-photo-gallery .pt img,
    .mg2025-recent-photos .mg2025-photo-gallery .pt-image,
    .mg2025-recent-photos .mg2025-photo-gallery .pt-image-container img,
    .mg2025-recent-photos .mg2025-photo-gallery .mg2025-photo-img,
    .mg2025-home-container #homepage-gallery .mg-card-img,
    .mg2025-home-container #homepage-gallery .mg2025-photo-img,
    #homepage-gallery .mg-card-img,
    #homepage-gallery .mg2025-photo-img {
        object-fit: contain !important; /* Mostra immagine completa */
        background-color: #000 !important; /* Sfondo nero per eventuali spazi */
        background: #000 !important;
        width: 100% !important;
    }
    
    /* Rimuovi TUTTI i border-radius su mobile */
    .photo-gallery .pt,
    .photo-gallery .pt-image,
    .photo-gallery .pt-image-container,
    .photo-gallery .mg2025-photo,
    .mg2025-photo-gallery .pt,
    .mg2025-photo-gallery .mg2025-photo,
    .photo-thumbnail,
    .photo-thumbnail-image-container,
    .photo-thumbnail-image,
    .mg-card,
    .mg-card-img {
        border-radius: 0 !important;
    }
    
    /* Forza sfondo NERO su tutte le immagini e container */
    .photo-gallery .pt,
    .photo-gallery .pt-image-container,
    .photo-gallery .mg2025-photo,
    .mg2025-photo-gallery .pt,
    .mg2025-photo-gallery .mg2025-photo,
    .photo-thumbnail,
    .photo-thumbnail-image-container,
    .mg-card {
        background-color: #000 !important;
        background: #000 !important;
    }
}

/* Mobile S: già gestito dalla regola @media (max-width: 767px) */

/* Elementi della gallery UNIFICATI */
.photo-gallery .pt,
.photo-gallery .mg2025-photo,
.mg2025-photo-gallery .pt,
.mg2025-photo-gallery .mg2025-photo {
    display: inline-block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    break-inside: avoid !important;
    position: relative !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    vertical-align: top !important;
    font-size: initial !important;
}

/* Immagini UNIFICATE */
.photo-gallery .pt img,
.photo-gallery .pt-image,
.photo-gallery .pt-image-container img,
.photo-gallery .mg2025-photo-img,
.mg2025-photo-gallery .pt img,
.mg2025-photo-gallery .pt-image,
.mg2025-photo-gallery .pt-image-container img,
.mg2025-photo-gallery .mg2025-photo-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
}

/* Link delle foto UNIFICATI */
.photo-gallery .pt-link,
.photo-gallery .mg2025-photo-link,
.mg2025-photo-gallery .pt-link,
.mg2025-photo-gallery .mg2025-photo-link {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
}

/* Overlay hover UNIFICATI */
.photo-gallery .pt-overlay,
.photo-gallery .mg2025-photo-overlay,
.mg2025-photo-gallery .pt-overlay,
.mg2025-photo-gallery .mg2025-photo-overlay {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.35) !important;
    opacity: 0 !important;
    transition: opacity 180ms ease-in-out !important;
    pointer-events: none !important;
    padding: 16px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    z-index: 1 !important;
}

/* Testo overlay UNIFICATO */
.photo-gallery .pt-title,
.photo-gallery .mg2025-photo-title,
.mg2025-photo-gallery .pt-title,
.mg2025-photo-gallery .mg2025-photo-title {
    font-size: 16px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
    text-align: center !important;
}

.photo-gallery .pt-author,
.photo-gallery .mg2025-photo-author,
.mg2025-photo-gallery .pt-author,
.mg2025-photo-gallery .mg2025-photo-author {
    font-size: 13px !important;
    line-height: 1.3 !important;
    font-weight: 400 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0.95 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
    color: #fff !important;
    text-align: center !important;
}

/* Hover effects UNIFICATI */
.photo-gallery .pt:hover .pt-overlay,
.photo-gallery .pt:focus-within .pt-overlay,
.photo-gallery .mg2025-photo:hover .mg2025-photo-overlay,
.photo-gallery .mg2025-photo:focus-within .mg2025-photo-overlay,
.mg2025-photo-gallery .pt:hover .pt-overlay,
.mg2025-photo-gallery .pt:focus-within .pt-overlay,
.mg2025-photo-gallery .mg2025-photo:hover .mg2025-photo-overlay,
.mg2025-photo-gallery .mg2025-photo:focus-within .mg2025-photo-overlay {
    opacity: 1 !important;
}

/* Nessun effetto di trasformazione UNIFICATO */
.photo-gallery .pt:hover,
.photo-gallery .pt:hover img,
.photo-gallery .pt:hover .pt-image,
.photo-gallery .mg2025-photo:hover,
.photo-gallery .mg2025-photo:hover img,
.photo-gallery .mg2025-photo:hover .mg2025-photo-img,
.mg2025-photo-gallery .pt:hover,
.mg2025-photo-gallery .pt:hover img,
.mg2025-photo-gallery .pt:hover .pt-image,
.mg2025-photo-gallery .mg2025-photo:hover,
.mg2025-photo-gallery .mg2025-photo:hover img,
.mg2025-photo-gallery .mg2025-photo:hover .mg2025-photo-img {
    transform: none !important;
    scale: 1 !important;
}

/* Responsive breakpoints UNIFICATI */
/* Mobile: full width gallery container - 2 COLONNE */
@media (max-width: 767px) {
    .photo-gallery,
    .mg2025-photo-gallery,
    .mg-masonry-grid {
        column-width: auto !important;
        column-count: 2 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Rimuovi padding anche dai container parent */
    .mg2025-gallery-container,
    .mg2025-main,
    .container,
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Homepage: rimuovi padding dalla section e dal container */
    .section-spacing,
    .bg-dark,
    section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Homepage: container Bootstrap senza padding */
    .mg2025-full-page-layout .container,
    .mg2025-full-page-layout .container-fluid,
    section .container,
    section .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Forza gallery a piena larghezza */
    #homepage-gallery,
    #explorer-gallery,
    #user-gallery,
    .mg-masonry-grid {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Body senza overflow laterale */
    html, body {
        overflow-x: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Main e wrapper senza padding */
    main,
    .main,
    .mg2025-full-page-layout {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Fix Bootstrap container padding override ultra-specifico */
    body .container,
    body section .container,
    body .mg2025-full-page-layout .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Fix specifico per Opera Mobile - usa % invece di vw */
    .photo-gallery,
    .mg2025-photo-gallery,
    .mg-masonry-grid,
    #homepage-gallery,
    #explorer-gallery,
    #user-gallery {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Elementi foto: larghezza 100% (non vw per Opera) */
    .photo-gallery .pt,
    .photo-gallery .mg2025-photo,
    .mg2025-photo-gallery .pt,
    .mg2025-photo-gallery .mg2025-photo {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Rimosso: ora mobile usa 1 colonna fino a 767px */

@media (min-width: 768px) and (max-width: 1199px) {
    .photo-gallery,
    .mg2025-photo-gallery {
        column-width: calc(33.333% - 0px) !important;
        column-count: 3 !important;
    }
}

@media (min-width: 1200px) {
    .photo-gallery,
    .mg2025-photo-gallery {
        column-width: calc(20% - 0px) !important;
        column-count: 5 !important;
    }
}

/* OVERRIDE AGGESSIVO UNIFICATO - Sovrascrive qualsiasi CSS esistente */
.photo-gallery *,
.mg2025-photo-gallery * {
    box-sizing: border-box !important;
}

.photo-gallery .pt,
.photo-gallery .mg2025-photo,
.mg2025-photo-gallery .pt,
.mg2025-photo-gallery .mg2025-photo {
    /* Forza layout masonry */
    display: inline-block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    break-inside: avoid !important;
    position: relative !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    vertical-align: top !important;
    font-size: initial !important;
    
    /* Sovrascrive qualsiasi float o flex */
    float: none !important;
    clear: none !important;
    flex: none !important;
}

/* FORZA LAYOUT MASONRY UNIFICATO - Sovrascrive TUTTO */
.photo-gallery,
.mg2025-photo-gallery {
    /* Sovrascrive qualsiasi display esistente */
    display: block !important;
    display: -webkit-columns !important;
    display: -moz-columns !important;
    display: columns !important;
    
    /* Forza CSS columns */
    -webkit-column-width: 280px !important;
    -moz-column-width: 280px !important;
    column-width: 280px !important;
    
    -webkit-column-gap: 0 !important;
    -moz-column-gap: 0 !important;
    column-gap: 0 !important;
    
    -webkit-column-fill: balance !important;
    -moz-column-fill: balance !important;
    column-fill: balance !important;
    
    /* Sovrascrive qualsiasi grid o flex */
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-gap: 0 !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

/* Classe .pt per compatibilità - SOLO DESKTOP */
@media (min-width: 768px) {
    .pt {
        max-width: 310px;
    }
}

/* FORZA DIMENSIONI IDENTICHE - Profilo utente */
.mg2025-profile-layout .mg2025-gallery-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* SOVRASCRIVE TUTTI I CSS ESISTENTI - ULTRA AGRESSIVO */
.mg2025-photo-gallery {
    /* Forza display block invece di grid */
    display: block !important;
    display: -webkit-columns !important;
    display: -moz-columns !important;
    display: columns !important;
    
    /* Sovrascrive qualsiasi grid */
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-gap: 0 !important;
    gap: 0 !important;
    
    /* Forza CSS columns */
    -webkit-column-width: 280px !important;
    -moz-column-width: 280px !important;
    column-width: 280px !important;
    
    -webkit-column-gap: 0 !important;
    -moz-column-gap: 0 !important;
    column-gap: 0 !important;
    
    -webkit-column-fill: balance !important;
    -moz-column-fill: balance !important;
    column-fill: balance !important;
    
    /* Sovrascrive qualsiasi flex */
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

.mg2025-profile-layout .mg2025-photo-gallery,
.mg2025-detail-layout .mg2025-photo-gallery {
    /* Forza le stesse dimensioni della homepage - USA COLUMN-COUNT NON COLUMN-WIDTH */
    column-count: 2 !important;
    -webkit-column-count: 2 !important;
    -moz-column-count: 2 !important;
    column-gap: 0 !important;
    column-fill: balance !important;
    width: 100% !important;
    line-height: 0 !important;
    font-size: 0 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mg2025-profile-layout .mg2025-photo-gallery .pt,
.mg2025-profile-layout .mg2025-photo-gallery .mg2025-photo {
    /* Forza le stesse dimensioni della homepage */
    display: inline-block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    break-inside: avoid !important;
    position: relative !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    vertical-align: top !important;
    font-size: initial !important;
}

/* Max-width solo su desktop per profilo */
@media (min-width: 768px) {
    .mg2025-profile-layout .mg2025-photo-gallery .pt,
    .mg2025-profile-layout .mg2025-photo-gallery .mg2025-photo {
        max-width: 310px !important;
    }
}

.mg2025-profile-layout .mg2025-photo-gallery .pt img,
.mg2025-profile-layout .mg2025-photo-gallery .mg2025-photo-img {
    /* Forza le stesse dimensioni delle immagini */
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
}

/* ULTRA AGRESSIVO - Sovrascrive TUTTO per elementi foto */
.mg2025-photo-gallery .pt,
.mg2025-photo-gallery .mg2025-photo {
    /* Forza layout masonry */
    display: inline-block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    break-inside: avoid !important;
    position: relative !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    vertical-align: top !important;
    font-size: initial !important;
    
    /* Sovrascrive qualsiasi float o flex */
    float: none !important;
    clear: none !important;
    flex: none !important;
    
    /* Sovrascrive qualsiasi grid */
    grid-column: unset !important;
    grid-row: unset !important;
    grid-area: unset !important;
}

/* Max-width 310px solo su desktop per gallery */
@media (min-width: 768px) {
    .mg2025-photo-gallery .pt,
    .mg2025-photo-gallery .mg2025-photo {
        max-width: 310px !important;
    }
}

.mg2025-photo-gallery .pt img,
.mg2025-photo-gallery .mg2025-photo-img {
    /* Forza dimensioni identiche */
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    
    /* Sovrascrive qualsiasi transform */
    transform: none !important;
    scale: 1 !important;
}

/* ============================================
   PROFILO UTENTE - SFONDO NERO
   ============================================ */

/* Layout profilo con Flexbox responsive */
.mg2025-profile-layout {
    display: flex !important;
    flex-direction: row !important;
    min-height: 100vh;
    background-color: #000 !important;
    background: #000 !important;
}

/* Sidebar sticky desktop */
.mg2025-profile-layout .mg2025-sidebar {
    flex: 0 0 320px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: #000;
    padding: 32px 24px;
}

/* Main content */
.mg2025-profile-layout .mg2025-main {
    flex: 1;
    background: #000;
    padding: 0;
}

/* Desktop Large (≥1440px) */
@media (min-width: 1440px) {
    .mg2025-profile-layout .mg2025-sidebar {
        flex: 0 0 340px;
    }
}

/* Tablet (768-991px) - 1 colonna, sidebar sopra */
@media (min-width: 768px) and (max-width: 991px) {
    .mg2025-profile-layout {
        flex-direction: column !important;
    }
    
    .mg2025-profile-layout .mg2025-sidebar {
        flex: 0 0 auto;
        position: static;
        height: auto;
        padding: 24px 20px;
    }
    
    .mg2025-profile-layout .mg2025-main {
        flex: 1;
    }
}

/* NOTA: Regole mobile unificate più sotto alla riga ~819 */

/* Sfondo nero per sidebar e main */
.mg2025-profile-layout .mg2025-sidebar,
.mg2025-profile-layout .mg2025-main,
.mg2025-profile-layout .mg2025-gallery-container,
.mg2025-profile-layout .mg2025-photo-gallery {
    background-color: #000000 !important;
    background: #000 !important;
}

/* Sfondo nero per la profile card */
.mg2025-profile-layout .mg2025-profile-card {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.mg2025-gallery-container{
    background-color: #000000 !important;
}

/* ============================================
   GALLERY TOOLBAR - BREADCRUMB
   ============================================ */

/* Toolbar breadcrumb nella colonna destra */
.mg2025-gallery-toolbar {
    position: sticky;
    top: 70px; /* sotto la navbar */
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    padding: 12px 0;
    margin-bottom: 24px;
    width: 100%;
    max-width: 1500px; /* stessa larghezza max della gallery */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Breadcrumb allineato a destra */
.mg2025-gallery-toolbar #breadcrumb-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.mg2025-gallery-toolbar .breadcrumb-container {
    width: auto;
    max-width: 100%;
}

.mg2025-gallery-toolbar .breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.mg2025-gallery-toolbar .breadcrumb-item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.mg2025-gallery-toolbar .breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.mg2025-gallery-toolbar .breadcrumb-link:hover {
    color: rgba(255, 255, 255, 1);
    background-color: rgba(255, 255, 255, 0.05);
}

.mg2025-gallery-toolbar .breadcrumb-current {
    color: rgba(255, 255, 255, 1);
    font-weight: 500;
    padding: 4px 8px;
}

.mg2025-gallery-toolbar .breadcrumb-separator {
    display: flex;
    align-items: center;
    margin: 0 4px;
    opacity: 0.5;
}

.mg2025-gallery-toolbar .breadcrumb-home-icon,
.mg2025-gallery-toolbar .breadcrumb-separator-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mg2025-gallery-toolbar .breadcrumb-home-icon {
    margin-right: 4px;
}

/* Mobile: allineamento a sinistra e non-sticky */
@media (max-width: 767px) {
    .mg2025-gallery-toolbar {
        position: static;
        top: auto;
        padding: 12px 16px;
        margin-bottom: 16px;
    }

    .mg2025-gallery-toolbar #breadcrumb-nav {
        justify-content: flex-start;
    }

    .mg2025-gallery-toolbar .breadcrumb-list {
        font-size: 13px;
    }

    .mg2025-gallery-toolbar .breadcrumb-link {
        padding: 4px 6px;
    }
    
    /* Profilo: layout mobile 1 colonna verticale */
    .mg2025-profile-layout.mg2025-profile-layout {
        flex-direction: column !important;
        padding: 0 !important;
    }
    
    .mg2025-profile-layout.mg2025-profile-layout .mg2025-sidebar {
        flex: 0 0 auto !important;
        position: static !important;
        height: auto !important;
        width: 100% !important;
        padding: 24px 16px !important;
    }
    
    .mg2025-profile-layout.mg2025-profile-layout .mg2025-main {
        flex: 1 !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mg2025-profile-layout .mg2025-gallery-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .mg2025-profile-layout .mg2025-photo-gallery {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* OVERRIDE AGGESSIVO SPECIFICO PER PROFILO */
.mg2025-profile-layout .mg2025-photo-gallery * {
    box-sizing: border-box !important;
}

.mg2025-profile-layout .mg2025-photo-gallery,
.mg2025-detail-layout .mg2025-photo-gallery {
    /* Sovrascrive qualsiasi CSS del profilo - USA COLUMN-COUNT */
    display: block !important;
    -webkit-column-count: 2 !important;
    -moz-column-count: 2 !important;
    column-count: 2 !important;
    -webkit-column-gap: 0 !important;
    -moz-column-gap: 0 !important;
    column-gap: 0 !important;
    -webkit-column-fill: balance !important;
    -moz-column-fill: balance !important;
    column-fill: balance !important;
    background-color: #000 !important;
    background: #000 !important;
}

