/**
 * MG2025 Theme - Detail Layout Specific
 * Layout 2 colonne SOLO per dettaglio utente e dettaglio foto
 * Non influenza home/esplora
 */

/* ============================================
   DETAIL LAYOUT CONTAINER
   ============================================ */

.mg2025-detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
    background: #000000 !important;
    color: #ffffff;
    gap: 0;
}

/* ============================================
   SIDEBAR STICKY
   ============================================ */

.mg2025-detail-layout .mg2025-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: #1a1a1a;
    border-right: 1px solid #333333;
    padding: 0;
}

.mg2025-detail-layout .mg2025-profile-card {
    padding: 32px 24px;
    background: #1a1a1a;
}

/* ============================================
   PROFILE HEADER
   ============================================ */

.mg2025-detail-layout .mg2025-profile-header {
    text-align: center;
    margin-bottom: 24px;
}

.mg2025-detail-layout .mg2025-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.mg2025-detail-layout .mg2025-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #333333;
}

.mg2025-detail-layout .mg2025-profile-info {
    text-align: center;
}

.mg2025-detail-layout .mg2025-name {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.mg2025-detail-layout .mg2025-role {
    font-size: 16px;
    color: #999999;
    margin: 0 0 8px 0;
}

/* ============================================
   STATS
   ============================================ */

.mg2025-detail-layout .mg2025-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid #333333;
    border-bottom: 1px solid #333333;
}

.mg2025-detail-layout .mg2025-stat {
    text-align: center;
}

.mg2025-detail-layout .mg2025-stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.mg2025-detail-layout .mg2025-stat-label {
    font-size: 12px;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   ACTIONS
   ============================================ */

.mg2025-detail-layout .mg2025-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.mg2025-detail-layout .mg2025-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 160ms ease-out;
    text-decoration: none;
    width: 100%;
}

.mg2025-detail-layout .mg2025-btn-primary {
    background: #ffffff;
    color: #000000;
}

.mg2025-detail-layout .mg2025-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.mg2025-detail-layout .mg2025-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid #333333;
}

.mg2025-detail-layout .mg2025-btn-secondary:hover {
    background: #2a2a2a;
}

/* ============================================
   TAGS
   ============================================ */

.mg2025-detail-layout .mg2025-tags {
    margin-bottom: 24px;
}

.mg2025-detail-layout .mg2025-tags-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mg2025-detail-layout .mg2025-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mg2025-detail-layout .mg2025-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 12px;
    border-radius: 0;
    border: 1px solid #333333;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.mg2025-detail-layout .mg2025-main {
    padding: 0;
    background: #000000;
}

.mg2025-detail-layout .mg2025-gallery-container {
    padding: 32px;
    background: #000000;
}

/* ============================================
   RESPONSIVE - MOBILE LAYOUT VERTICALE
   ============================================ */

/* MOBILE LAYOUT - PRIORITÀ MASSIMA - USA FLEXBOX */
@media (max-width: 991px) {
    body .mg2025-detail-layout,
    .mg2025-detail-layout.mg2025-detail-layout,
    html .mg2025-detail-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    body .mg2025-detail-layout .mg2025-sidebar,
    .mg2025-detail-layout.mg2025-detail-layout .mg2025-sidebar,
    html .mg2025-detail-layout .mg2025-sidebar {
        position: static !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid #333333;
        width: 100% !important;
        order: 1 !important;
    }
    
    body .mg2025-detail-layout .mg2025-main,
    .mg2025-detail-layout.mg2025-detail-layout .mg2025-main,
    html .mg2025-detail-layout .mg2025-main {
        width: 100% !important;
        order: 2 !important;
    }
    
    .mg2025-detail-layout .mg2025-gallery-container {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    /* Sidebar: larghezza 100% senza padding laterale */
    .mg2025-detail-layout .mg2025-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .mg2025-detail-layout .mg2025-profile-card {
        padding: 20px 16px;
        width: 100%;
    }
    
    .mg2025-detail-layout .mg2025-avatar {
        width: 80px;
        height: 80px;
    }
    
    .mg2025-detail-layout .mg2025-name {
        font-size: 20px;
    }
    
    .mg2025-detail-layout .mg2025-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Gallery: rimuovi padding laterale per full-width */
    .mg2025-detail-layout .mg2025-gallery-container {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .mg2025-detail-layout .mg2025-main {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================
   PROFILE LAYOUT - MOBILE COMPACT
   Ottimizzazioni specifiche per profile_layout.html.twig
   ============================================ */

/* Sidebar spacing (profilo e photo detail) */
.mg2025-profile-layout .mg2025-sidebar,
.mg2025-detail-layout .mg2025-sidebar {
    margin-top: 40px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 4px 0px !important;
}

/* Profile card padding */
.mg2025-profile-card {
    padding-bottom: 2px;
}

/* Profile card links padding */
.mg2025-profile-card a {
    padding: 0px 0px;
}

/* Profile header spacing */
.mg2025-profile-layout .mg2025-profile-header {
    margin-bottom: 9px;
}

/* Login CTA in fondo alla galleria */
.mg2025-gallery-login-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    margin-top: 40px;
}

.mg2025-btn-large {
    padding: 16px 32px;
    font-size: 16px;
    min-width: 250px;
}

/* Role + Location unified */
.mg2025-profile-layout .mg2025-role-location {
    font-size: 16px;
    color: #999999;
    margin: 0;
    text-align: center;
}

/* Mobile: ottimizzazioni compatte */
@media (max-width: 767px) {
    /* Layout orizzontale: avatar a sinistra + info a destra (PROFILO E PHOTO DETAIL) */
    .mg2025-profile-layout .mg2025-profile-header,
    .mg2025-detail-layout .mg2025-profile-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        text-align: left;
    }
    
    .mg2025-profile-layout .mg2025-avatar-container,
    .mg2025-detail-layout .mg2025-avatar-container {
        flex-shrink: 0;
        margin-bottom: 0;
    }
    
    .mg2025-profile-layout .mg2025-avatar,
    .mg2025-detail-layout .mg2025-avatar {
        width: 80px;
        height: 80px;
    }
    
    .mg2025-profile-layout .mg2025-profile-info,
    .mg2025-detail-layout .mg2025-profile-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        flex: 1;
    }
    
    .mg2025-profile-layout .mg2025-name,
    .mg2025-detail-layout .mg2025-name {
        font-size: 20px;
        text-align: left;
    }
    
    .mg2025-profile-layout .mg2025-role-location,
    .mg2025-detail-layout .mg2025-role {
        font-size: 14px;
        text-align: left;
    }
    
    /* Photo detail: descrizione e condividi sotto foto (solo mobile) */
    .mg2025-description-mobile {
        display: block;
        padding: 20px 16px;
        text-align: left;
    }
    
    .mg2025-description-mobile .mg2025-description-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 12px;
        color: #ffffff;
    }
    
    .mg2025-description-mobile .mg2025-description-content {
        font-size: 14px;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.9);
    }
    
    .mg2025-share-mobile {
        display: flex;
        justify-content: center;
        padding: 0 16px 24px;
    }
    
    .mg2025-share-mobile .mg2025-btn {
        width: 100%;
        max-width: 400px;
    }
    
    /* Photo detail: nascondi descrizione, stats e tags nella sidebar su mobile (ora sotto foto) */
    .mg2025-detail-layout .mg2025-sidebar .mg2025-stats,
    .mg2025-detail-layout .mg2025-description,
    .mg2025-detail-layout .mg2025-tags {
        display: none;
    }
    
    /* Stats sotto la foto - visibili solo su mobile */
    .mg2025-stats-mobile {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around;
        align-items: center;
        gap: 20px;
        padding: 20px 16px;
        margin: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mg2025-stats-mobile .mg2025-stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        flex: 1;
    }
    
    .mg2025-stats-mobile .mg2025-stat-number {
        font-size: 18px;
        font-weight: 700;
        color: #ffffff;
        margin-bottom: 4px;
        display: block;
    }
    
    .mg2025-stats-mobile .mg2025-stat-label {
        font-size: 10px;
        color: #999999;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: block;
    }
}

/* Desktop: nascondi stats, descrizione e condividi sotto foto */
@media (min-width: 768px) {
    .mg2025-stats-mobile,
    .mg2025-description-mobile,
    .mg2025-share-mobile {
        display: none;
    }
    
    /* Stats su una riga orizzontale */
    .mg2025-profile-layout .mg2025-stats {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around;
        align-items: center;
        gap: 20px;
        padding: 16px 0;
        margin-bottom: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mg2025-profile-layout .mg2025-stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        flex: 1;
    }
    
    .mg2025-profile-layout .mg2025-stat-number {
        font-size: 18px;
        font-weight: 700;
        color: #ffffff;
        margin-bottom: 4px;
        display: block;
    }
    
    .mg2025-profile-layout .mg2025-stat-label {
        font-size: 10px;
        color: #999999;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: block;
    }
}
