/**
 * Header Improvements - Social Icons & Layout
 * Miglioramenti per header: icone social visibili, area riservata
 */

/* ===== TOPBAR AREA RISERVATA ===== */
.topbar-area-riservata {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.topbar-area-riservata:hover,
.topbar-area-riservata:focus {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
}

.topbar-area-riservata .persona-icon {
    font-size: 18px;
}

.topbar-area-riservata .persona-text {
    font-weight: 600;
}

/* ===== SOCIAL ICONS - VISIBILI E CHIARI ===== */
.header-social-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    padding: 12px 0;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.social-icon svg {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

/* Facebook */
.social-facebook {
    background-color: #1877f2;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

.social-facebook:hover,
.social-facebook:focus {
    background-color: #0d65d9;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.5);
}

/* Instagram */
.social-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(220, 39, 67, 0.3);
}

.social-instagram:hover,
.social-instagram:focus {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.5);
}

/* Focus accessibilità */
.social-icon:focus {
    outline: 3px solid #0066cc;
    outline-offset: 3px;
}

/* Rimuovi icona link esterno dai social */
.social-icon::after,
.social-facebook::after,
.social-instagram::after {
    content: none !important;
    display: none !important;
}

/* ===== BARRA DIVISORIA BLU ===== */
.header-divider {
    width: 100%;
    height: 8px;
    background-color: #0066cc;
    margin: 0;
    padding: 0;
    border: none;
}

/* Stesso colore della topbar */
.header-topbar {
    background-color: #0066cc;
}

/* ===== SITE BRANDING LAYOUT ===== */
.site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0;
}

.branding-logo {
    flex-shrink: 0;
}

.branding-logo img {
    max-height: 80px;
    width: auto;
}

.branding-content {
    flex-grow: 1;
}

.site-title {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.site-title a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-title a:hover,
.site-title a:focus {
    color: #004999;
}

.site-subtitle {
    margin: 0;
    font-size: 16px;
    color: #6c757d;
    font-weight: 400;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {

    /* Nascondi topbar su mobile — i link sono accessibili dal contenuto */
    .header-topbar {
        display: none !important;
    }

    /* Header principale: riga orizzontale compatta */
    .site-branding {
        flex-direction: row !important;
        text-align: left !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 8px 0 !important;
    }

    .branding-logo {
        flex-shrink: 0;
    }

    .branding-logo img,
    .branding-logo .custom-logo {
        max-height: 60px !important;
        width: auto !important;
    }

    .branding-content {
        flex: 1;
        min-width: 0;
    }

    .site-title {
        font-size: 13px !important;
        margin: 0 0 1px !important;
        line-height: 1.2 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-subtitle {
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Social: piccoli e flat */
    .header-controls {
        flex-shrink: 0;
    }

    .header-social-icons {
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 8px !important;
    }

    .social-icon {
        width: 24px !important;
        height: 24px !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #0066cc !important;
    }

    .social-facebook,
    .social-instagram {
        background: transparent !important;
        box-shadow: none !important;
        color: #0066cc !important;
    }

    .social-icon svg {
        width: 20px !important;
        height: 20px !important;
        fill: #0066cc !important;
    }

    .topbar-area-riservata {
        display: none !important;
    }
}

/* ===== CONTAINER FULL ===== */
.container-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container-full {
        padding: 0 15px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .header-topbar,
    .header-social-icons,
    .header-divider {
        display: none !important;
    }
}