﻿/* CONTENITORE FISSO */
.fixed-info-header-container {
    position: sticky;
    top: 5px;
    z-index: 500;
    width: 95%;
    margin: 0 auto 18px auto;
    padding: 20px 28px 16px 28px;
    border-radius: 18px;
    /* Mix pastello morbido ottenuto calcolando le opacità dei canali RGB dell'appsettings */
    background: linear-gradient(100deg, rgba(var(--primary-rgb, 211, 47, 47), 0.12), #ffffff 50%, rgba(var(--secondary-rgb, 255, 76, 76), 0.12));
    background-size: 200% 200%;
    animation: pastel-gradient-move 10s ease-in-out infinite;
    color: #2c2c2c;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb, 211, 47, 47), 0.10);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* FULL CONTENT WRAPPER */
.project-info-header-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transition: opacity 0.25s ease, max-height 0.35s ease;
    opacity: 1;
    max-height: 300px;
    overflow: hidden;
}

/* MINI BADGE - nascosto di default */
.project-info-mini-badge {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-color, #d32f2f);
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* ── STATO SCROLLED ── */
.fixed-info-header-container.scrolled {
    width: auto;
    min-width: 0;
    margin: 0 24px 8px auto;
    padding: 7px 18px;
    border-radius: 50px;
    animation: none;
    background: linear-gradient(100deg, rgba(var(--primary-rgb, 211, 47, 47), 0.08), rgba(var(--secondary-rgb, 255, 76, 76), 0.08));
    box-shadow: 0 4px 14px rgba(var(--primary-rgb, 211, 47, 47), 0.15);
    flex-direction: row;
    align-items: center;
}

    .fixed-info-header-container.scrolled .project-info-header-full {
        opacity: 0;
        max-height: 0;
        display: none;
    }

    .fixed-info-header-container.scrolled .project-info-mini-badge {
        display: flex;
        opacity: 1;
    }

@keyframes pastel-gradient-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* TITOLONE */
.fixed-info-header-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary-color, #d32f2f);
    text-align: center;
    text-shadow: 0 2px 8px rgba(var(--primary-rgb, 211, 47, 47), 0.10);
}

/* DESCRIZIONE */
.fixed-info-header-description {
    margin: 6px 0 12px 0;
    font-size: 1.1rem;
    opacity: 0.85;
    color: var(--secondary-color, #ff4c4c);
    text-align: center;
}

/* WRAPPER INFO */
.fixed-info-header-info {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-height: thin;
    justify-content: center;
}

    .fixed-info-header-info::-webkit-scrollbar {
        height: 6px;
    }

    .fixed-info-header-info::-webkit-scrollbar-thumb {
        background: rgba(var(--primary-rgb, 211, 47, 47), 0.2);
        border-radius: 10px;
    }

/* SINGOLO BLOCCO KEY-VALUE */
.fixed-info-header-info-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(var(--secondary-rgb, 255, 76, 76), 0.08);
    border: 1px solid rgba(var(--primary-rgb, 211, 47, 47), 0.15);
    white-space: nowrap;
    transition: all 0.2s ease;
}

    .fixed-info-header-info-item:hover {
        transform: translateY(-2px);
        background: rgba(var(--secondary-rgb, 255, 76, 76), 0.15);
    }

/* KEY */
.fixed-info-header-info-key {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--primary-color, #d32f2f);
    opacity: 0.8;
    line-height: 1.2;
}

/* VALUE */
.fixed-info-header-info-value {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
}

/* HEADER STILE */
.fixed-header {
    width: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    background: linear-gradient(120deg, rgba(var(--primary-rgb, 211, 47, 47), 0.12), rgba(var(--secondary-rgb, 255, 76, 76), 0.12), rgba(var(--primary-rgb, 211, 47, 47), 0.08), rgba(var(--secondary-rgb, 255, 76, 76), 0.15));
    background-size: 300% 300%;
    animation: gradient-move 10s ease-in-out infinite;
    box-shadow: 0 4px 24px 0 rgba(var(--primary-rgb, 211, 47, 47), 0.08);
    border-radius: 0 0 18px 18px;
    padding: 0 32px;
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* TITOLI HEADER */
.fixed-header-title {
    color: var(--primary-color, #d32f2f);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.25em;
    text-shadow: 0 2px 8px rgba(var(--primary-rgb, 211, 47, 47), 0.08);
}

.fixed-header-subtitle {
    color: var(--text-main, #1e293b);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0;
    letter-spacing: 0.2px;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .fixed-header {
        min-height: 80px;
        padding: 0 8px;
    }

    .fixed-header-title {
        font-size: 1.3rem;
    }

    .fixed-header-subtitle {
        font-size: 0.95rem;
    }
}
