/**
 * FRG Project Hero — Slide Version
 * Stili v1.2.2
 */

/* ============================================
   FOUC FIX
   ============================================ */

.frg-project-hero .frg-project-title,
.frg-project-hero .frg-project-breadcrumb,
.frg-project-hero .frg-project-meta,
.frg-project-hero .frg-project-description,
.frg-project-hero .frg-project-cta {
    opacity: 0;
    visibility: hidden;
}


/* ============================================
   HERO SECTION
   ============================================ */

.frg-project-hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

.frg-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    clip-path: inset(0 100% 0 0);
}

.frg-project-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #131620;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.frg-project-hero .et_pb_row {
    position: relative;
    z-index: 3;
}


/* ============================================
   INTRO — Titolo centrato + hint
   ============================================ */

.frg-intro-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 90vw;
    max-width: 700px;
}

.frg-intro-center__title {
    font-family: 'Satoshi', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    line-height: 1.12;
    color: #FFFFFF;
    margin: 0;
}

.frg-intro-center__hint {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.3s ease;
    border: none;
    background: none;
    padding: 0.4em 0;
}

.frg-intro-center__hint:hover {
    color: transparent;
    background: linear-gradient(135deg, #FFD616 0%, #F15411 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.frg-intro-center__hint:hover .frg-intro-center__arrow {
    background: linear-gradient(135deg, #FFD616 0%, #F15411 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.frg-intro-center__arrow {
    display: inline-block;
    animation: frg-hint-bounce 1.8s ease-in-out infinite;
    transition: color 0.3s ease;
}

@keyframes frg-hint-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}


/* ============================================
   TITOLO + HIGHLIGHT
   ============================================ */

.frg-project-title {
    position: relative;
    z-index: 3;
}

.frg-highlight {
    position: relative;
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.frg-highlight-bg {
    position: absolute;
    top: -0.02em;
    left: -0.2em;
    right: -0.2em;
    bottom: -0.02em;
    background: linear-gradient(135deg, #FFD616 0%, #F15411 100%);
    border-radius: 2px;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left center;
}

.frg-project-breadcrumb,
.frg-project-meta,
.frg-project-description {
    position: relative;
    z-index: 3;
}


/* ============================================
   BARRA NAVIGAZIONE PERSISTENTE
   ============================================ */

.frg-project-bar {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: calc(100% - 200px);
    max-width: 1600px;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    box-sizing: border-box;
    border-radius: 14px;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;

    /* Stato normale (hero) — trasparente */
    background: transparent;
    border: 1px solid transparent;
}

/* Stato frosted (sezioni dopo la hero) */
.frg-project-bar--frosted {
    background: rgba(19, 22, 32, 0.4);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Link base */
.frg-project-bar a,
.frg-project-bar button {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    color: #B2B2B2;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.frg-project-bar a:hover,
.frg-project-bar button:hover {
    color: #FFFFFF;
}

/* Underline animata per tutti i link/button della barra */
.frg-project-bar a::after,
.frg-project-bar button::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #FFFFFF;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.frg-project-bar a:hover::after,
.frg-project-bar button:hover::after {
    transform: scaleX(1);
}

/* Chevron SVG */
.frg-nav-chevron {
    display: inline-block;
    vertical-align: middle;
}

/* Scorri ↓ al centro */
.frg-project-bar__scroll {
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.frg-project-bar__scroll-arrow {
    display: inline-block;
    animation: frg-bar-bounce 1.8s ease-in-out infinite;
}

@keyframes frg-bar-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
}

.frg-project-bar__empty {
    width: 1px;
}


/* ============================================
   GALLERY (opzionale)
   ============================================ */

.frg-project-gallery {
    position: relative;
}


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

@media (max-width: 768px) {
    .frg-intro-center__title {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }

    .frg-intro-center__hint {
        font-size: 0.72rem;
    }

    .frg-project-bar {
        padding: 0.8rem 1.5rem;
        bottom: 12px;
        width: calc(100% - 40px);
    }

    .frg-project-bar a,
    .frg-project-bar button {
        font-size: 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .frg-project-bar {
        width: calc(100% - 100px);
    }
}

/* ── Nascondi barra quando il menu mobile è aperto ── */
body.frg-menu-open .frg-project-bar {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease !important;
}
