/* Global elements */
:root {
    /* Definizione dei range: clamp(min, preferito, max) */

    /* Extra Small - Didascalie, note */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.85rem);

    /* Small - Testo secondario */
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);

    /* Medium - Body copy (Base) */
    --text-md: 1.5rem;
    /* 24px */

    /* Large - Sottotitoli o intro */
    --text-lg: clamp(1.25rem, 1.1rem + 1vw, 2rem);

    /* Extra Large - Titoli Hero */
    --text-xl: clamp(2rem, 1.5rem + 4vw, 5rem);

    /* Opzionale: XXL per impatti visivi forti */
    --text-xxl: clamp(3rem, 2rem + 8vw, 10rem);

    /* Color Palette Tokens */
    --color-green: #B7F27B;
    --color-skyblue: #76E5FC;
    --color-cyan: #4BC0D9;
    --color-purple: #E35ABD;
    --color-violet: #9DACFF;

    /* Neutri (sempre utili) */
    --color-black: #000000;
    --color-white: #FFFFFF;
}

* {
    font-family: "Ribes";
}

.ff-geist {
    font-family: "Geist";
}

.font-ribes {
    font-family: "Ribes";
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    background-color: #fafafa;
}

.title-works {
    font-size: 3rem !important;
    font-weight: 500;
}

@media (min-width: 992px) {
    .container {
        max-width: 1620px;
    }
}

/* --- BACKGROUND UTILITIES --- */
.bg-color-green {
    background-color: var(--color-green);
}

.bg-color-skyblue {
    background-color: var(--color-skyblue);
}

.bg-color-cyan {
    background-color: var(--color-cyan);
}

.bg-color-purple {
    background-color: var(--color-purple);
}

.bg-color-violet {
    background-color: var(--color-violet);
}

.bg-color-black {
    background-color: black;
}

/* --- TEXT UTILITIES --- */
.text-color-green {
    color: var(--color-green);
}

.text-color-skyblue {
    color: var(--color-skyblue);
}

.text-color-cyan {
    color: var(--color-cyan);
}

.text-color-purple {
    color: var(--color-purple);
}

.text-color-violet {
    color: var(--color-violet);
}

/* --- TEXT SIZES --- */
.text-xs {
    font-size: var(--text-xs);
    line-height: 1.4;
}

.text-sm {
    font-size: var(--text-sm);
    line-height: 1.4;
}

.text-md {
    font-size: var(--text-md);
    line-height: 1.5;
}

.text-lg {
    font-size: var(--text-lg);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.text-xl {
    font-size: var(--text-xl);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.text-xxl {
    font-size: var(--text-xxl);
    line-height: 1;
    letter-spacing: -0.03em;
    font-weight: 800;
}

/* Project Cards */
.progetto-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 5 / 4;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.badge-tipologia {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #000;
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    z-index: 10;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- EFFETTO LUCE VERDE (Ispirato alla reference) --- */
.progetto-card::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Un gradiente radiale che emula la luce al neon della tua immagine */
    background: radial-gradient(circle at center, rgba(183, 242, 123, 0.4) 0%, rgba(183, 242, 123, 0) 80%);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Immagine di sfondo */
.progetto-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.5s ease, transform 0.8s ease, opacity 0.5s ease;
    z-index: 1;
}

/* Overlay per il titolo */
.progetto-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Titolo a sinistra come nella reference */
    padding: 40px;
    opacity: 0;
    z-index: 5;
    transition: opacity 0.4s ease;
}

.progetto-titolo {
    color: #000;
    /* Nero per staccare sul verde della reference */
    font-weight: 700;
    max-width: 60%;
    line-height: 1.1;
    margin: 0;
    transform: translateX(-20px);
    transition: transform 0.5s ease;
}

/* --- LOGICA HOVER --- */
/* Scoperto solo per dispositivi con hover reale: su touch (mobile) evita il bug iOS
   per cui il primo tap attiva solo lo stato :hover e serve un secondo tap per il link */
@media (hover: hover) and (pointer: fine) {
    .progetto-card:hover {
        transform: scale(1.02);
        /* Box shadow sottile e diffusa del colore verde (#B7F27B) */
        box-shadow: 0 10px 40px rgba(183, 242, 123, 0.25);
    }

    .progetto-card:hover::before {
        opacity: 1;
    }

    .progetto-card:hover .progetto-visual img {
        opacity: 0.5;
        /* L'immagine schiarisce per far emergere il titolo */
        filter: saturate(1.5) brightness(1.2);
        /* Effetto "vibrante" */
        transform: scale(1.05);
    }

    .progetto-card:hover .progetto-overlay {
        opacity: 1;
    }

    .progetto-card:hover .progetto-titolo {
        transform: translateX(0);
    }
}

/* pulsanti */
.btn-1 {
    position: relative;
    text-decoration: none;
    color: black;
}

.btn-2 {
    position: relative;
    text-decoration: none;
}

.btn-2:hover {
    color: black;
}

.btn-boldhover:hover {
    font-weight: bold;
}

.btn-1 span,
.btn-2 span {
    position: relative;
    z-index: 2;
}

.btn-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    transition: 0.25s ease-in;
}

.btn-1:hover .btn-background,
.btn-2:hover .btn-background {
    width: 100%;
}

/* Navbar */
#custom-navbar {
    /* position: absolute; */
    top: 0;
    left: 0;
    z-index: 99;
}

.navigation-link {
    color: black;
    position: relative;
    text-decoration: unset;
    transition: 0.25s;
    text-align: center;
    font-size: 24px !important;
}

.navigation-link:before {
    display: block;
    content: attr(title);
    font-weight: bold;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    padding: 0 5px;
}

.navigation-link:hover {
    color: black;
}

.navigation-link span {
    position: relative;
    z-index: 2;
    display: inline-block;
}

.navigation-link-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    transition: 0.25s ease-in;
}

.navigation-link-background.active {
    width: 100%;
}

.navigation-link:hover .navigation-link-background {
    width: 100%;
}

.navigation-link.current-page .navigation-link-background {
    width: 100%;
}

.animated-icon3 {
    width: 60px;
    height: 30px;
    position: relative;
    margin: 0px;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .5s ease-in-out;
    -moz-transition: .5s ease-in-out;
    -o-transition: .5s ease-in-out;
    transition: .5s ease-in-out;
    cursor: pointer;
    z-index: 99;
}

.animated-icon3 span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .25s ease-in-out;
    -moz-transition: .25s ease-in-out;
    -o-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
}

.animated-icon3 span {
    background: black;
}

.animated-icon3 span:nth-child(1) {
    top: 0px;
    -webkit-transform-origin: left center;
    -moz-transform-origin: left center;
    -o-transform-origin: left center;
    transform-origin: left center;
}

.animated-icon3 span:nth-child(2) {
    top: 12px;
    -webkit-transform-origin: left center;
    -moz-transform-origin: left center;
    -o-transform-origin: left center;
    transform-origin: left center;
}

.animated-icon3 span:nth-child(3) {
    top: 24px;
    -webkit-transform-origin: left center;
    -moz-transform-origin: left center;
    -o-transform-origin: left center;
    transform-origin: left center;
}

.animated-icon3.open span:nth-child(1) {
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
    top: -16px;
    left: 9px;
}

.animated-icon3.open span:nth-child(2) {
    width: 0%;
    opacity: 0;
}

.animated-icon3.open span:nth-child(3) {
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
    top: 25px;
    left: 8px;
}

#menu-wrapper {
    position: fixed;
    z-index: 98;
    top: 0;
    left: 300%;
    background-color: #F5F5F5;
    opacity: 0;
    transition: 0.5s;
    height: 100vh;
    width: 100%;
    overflow-y: scroll;
}

#menu-wrapper.open {
    left: 0;
    opacity: 1;
    transition: 0.5s;
}

/* Footer */
footer .navigation-link {
    color: white !important;
}

/* --- IL BADGE ESTERNO --- */
.back-to-top-badge {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    z-index: 97;
    transition: transform 0.3s ease;
    border-radius: 100%;
}

.back-to-top-animation {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Homepage */
.eye-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    /*     height: 300px; */
}

.eye-animation {
    height: 125px;
    width: auto;
}

.eye {
    width: 80px;
    height: 90px;
    border-bottom: 14px solid #000;
    border-top: 14px solid #000;
    border-left: 4px solid #000;
    border-radius: 50px 50px 50px 50px;
    position: relative;
    overflow: hidden;
}

.pupil {
    width: 40px;
    height: 40px;
    background-color: #000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Transizione fluida per evitare scatti */
    transition: transform 0.1s ease-out;
}

.eye::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    /* Colore della palpebra (uguale al bordo o pupilla) */
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.1s ease-in-out;
    z-index: 2;
    /* Sopra la pupilla */
}

/* Classe che attiva il battito */
.eye.blink::after {
    transform: scaleY(1);
}

/* slide-animation-section */
.slide-animation-section {
    transform: rotatez(356deg);
    transition: 1s;
}

.quadrato {
    aspect-ratio: 1 / 1;
    width: 5%;
    background-color: #9DACFF;
    transform: translatex(0%) translatey(-21%) rotatez(45deg);
    transition: 1s;
}

.piano {
    position: relative;
    width: 100%;
    background-color: black;
    color: white;
    transition: 1s;
}

.piano-arrow {
    background-color: black;
    bottom: -7px;
    left: 50%;
    position: absolute;
    width: 15px;
    transform: rotatez(45deg);
    aspect-ratio: 1 / 1;
}

/* Desktop: l'animazione parte al passaggio del mouse */
@media (min-width: 992px) {
    .slide-animation-section:hover {
        transform: rotatez(360deg);
        transition: 1s;
    }

    .slide-animation-section:hover .quadrato {
        transform: translatex(961%) translatey(-21%) rotatez(405deg);
        transition: 1s;
    }
}

/* Logofolio cards */
.logofolio-card {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.logofolio-card img {
    object-fit: contain;
}

.logofolio-card-link {
    text-decoration: none;
    color: inherit;
}

.logofolio-card-link:hover .logofolio-card {
    transform: scale(1.02);
}

/* Logofolio marquee (homepage) */
.logofolio-marquee-wrapper {
    overflow: hidden;
}

.logofolio-marquee-track {
    display: flex;
    width: max-content;
    gap: 30px;
    animation: logofolio-marquee 30s linear infinite;
}

.logofolio-marquee-wrapper:hover .logofolio-marquee-track {
    animation-play-state: paused;
}

.logofolio-marquee-track .logofolio-card-link {
    flex: 0 0 auto;
    width: clamp(220px, 22vw, 320px);
}

@keyframes logofolio-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* get in touch */
#lets-get-in-tounch {
    text-decoration: none;
    color: #000000;
}

.touch-hover-shere {
    opacity: 0;
}

.touch-blue-sphere,
.touch-hover-shere {
    transition: 0.3s
}

#lets-get-in-tounch:hover .touch-blue-sphere {
    opacity: 0;
}

#lets-get-in-tounch:hover .touch-hover-shere {
    opacity: 1;
}

/* pagina works */
.btn-filter {
    /* Dimensione fissa */
    min-width: 160px;
    height: 45px;

    background-color: transparent;
    border: 2px solid #000;
    padding: 0 20px;
    border-radius: 50px;

    font-family: "Geist";
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;

    /* Centratura testo */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Stato Attivo (Multi-selezione) */
.btn-filter.active {
    background-color: #000;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Bottone "Clear All" */
.btn-clear-filter {
    min-width: 160px;
    height: 45px;

    background-color: transparent;
    border: none;
    padding: 0 20px;

    font-family: "Geist";
    font-weight: 400;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear-filter:hover {
    opacity: 1;
}

/* Container per i pulsanti */
#progetti-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
    gap: 15px;
    justify-content: center;
}

#progetti-container {
    transition: opacity 0.3s ease;
}

/* manifesto */
.manifesto-text-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    background-color: #fafafa;
}

.manifesto-text-wrapper:hover {
    opacity: 1;
}

.manifesto-img-wrapper {
    position: relative;
}

.manifesto-grid {
    display: grid;
    /* Creiamo 4 colonne uguali e 3 righe ad altezza automatica */
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto auto;
    gap: 20px;
    /* Spazio tra le immagini */
}

/* Base per tutti gli item per renderli visibili nell'esempio */
.item {
    display: flex;
    position: relative;
    overflow: hidden;
}

/* --- RIGA 1 --- */
.map {
    /* La mappa è molto larga: occupa 10 colonne su 12 */
    grid-column: 1 / 8;
    grid-row: 1;
}

.fruits {
    /* La frutta occupa le restanti 2 colonne */
    grid-column: 8 / 13;
    grid-row: 1;
}

/* --- RIGA 2 & 3 (Il corpo centrale) --- */
.painting {
    /* Il dipinto occupa quasi metà larghezza (5 colonne) e 2 righe in altezza */
    grid-column: 1 / 6;
    grid-row: 2 / 4;
}

/* --- COLONNA "ICONE E MASCHERA" --- */
.icons {
    grid-column: 6 / 8;
    /* Occupa 3 colonne */
    grid-row: 2;
}

.mask-img {
    grid-column: 6 / 11;
    grid-row: 3;
}

/* --- COLONNA "FOTO E LISTA NOMI" --- */
.photo {
    grid-column: 8 / 13;
    /* Occupa le ultime 4 colonne */
    grid-row: 2;
}

.name-list {
    grid-column: 11 / 13;
    grid-row: 3;
    display: flex;
    align-items: end;
    /* Stile per la lista */
    font-family: 'Geist', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    padding-left: 10px;
}

@media (max-width: 992px) {
    .manifesto-grid {
        grid-template-columns: 1fr;
    }

    .item {
        grid-column: auto !important;
        grid-row: auto !important;
        flex-direction: column;
        overflow: visible;
    }

    .manifesto-img-wrapper {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Hover non disponibile su mobile: la caption diventa sempre visibile sotto l'immagine */
    .manifesto-text-wrapper {
        position: static;
        opacity: 1;
        order: 2;
        height: auto;
        background-color: transparent;
        padding: 10px 0 0;
    }

    .manifesto-text-wrapper p {
        font-size: var(--text-sm);
        line-height: 1.4;
    }

    .manifesto-img-wrapper img,
    .item img {
        order: 1;
    }
}

/*  single progetti */
.content-wrapper * {
    font-family: 'Geist';
}

.single-badge-tipologia {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.gallery-media {
    position: relative;
    overflow: hidden;
}

.gallery-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ratio-5-4 {
    aspect-ratio: 5 / 4;
}

.ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.ratio-9-16 {
    aspect-ratio: 9 / 16;
}

.gallery-mosaic-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.gallery-mosaic-stack .gallery-media {
    flex: 1;
}

/* Typography */
@font-face {
    font-family: "Ribes";
    src: url('/wp-content/themes/paolapanza/assets/fonts/Ribes-Light.woff') format('woff'),
        url('/wp-content/themes/paolapanza/assets/fonts/Ribes-Light.woff2') format('woff2');
    font-weight: 100;
}

@font-face {
    font-family: "Ribes";
    src: url('/wp-content/themes/paolapanza/assets/fonts/Ribes-Regular.woff') format('woff'),
        url('/wp-content/themes/paolapanza/assets/fonts/Ribes-Regular.woff2') format('woff2');
    font-weight: 500;
}

@font-face {
    font-family: "Ribes";
    src: url('/wp-content/themes/paolapanza/assets/fonts/Ribes-Black.woff') format('woff'),
        url('/wp-content/themes/paolapanza/assets/fonts/Ribes-Black.woff2') format('woff2');
    font-weight: 700;
}

@media screen and (max-width: 992px) {
    footer .navigation-link {
        text-align: start;
    }
}

/*===========================
  CUSTOM STYLES MAURO
===========================*/

.intro-text {
    font-size: 2.6rem !important;
    line-height: 3.4rem;
}

.eye-container {
    transform: scale(0.5);
}

@media (hover: hover) and (pointer: fine) {
    .progetto-card:hover {
        box-shadow: 0 10px 40px rgb(183 242 123);
        filter: brightness(1.2);
    }
}

.badge-tipologia {
    display: none;
}

.progetto-overlay {
    align-items: start;
}

.progetto-titolo {
    font-size: 2rem;
    font-weight: 400;
}

.progetto-titolo-mobile {
    font-size: 1rem;
    font-weight: 400;
    margin-top: 10px;
    color: black;
}

body .progetto-link .progetto-titolo-mobile {
    text-decoration: none !important;
}

.btn-filter {
    background-color: #dfdfdf;
    border: none;
    color: #fff;
}

.btn-clear-filter {
    text-transform: uppercase;
    text-decoration: none;
    color: #8f8f8f;
}

.btn-clear-filter:hover {
    color: #000;
}

.text-page-title {
    font-size: 3rem;
    font-weight: 500;
}

.project-title {
    font-size: 2.4rem;
    font-weight: 600 !important;
}

.single-badge-tipologia {
    font-weight: 200;
    font-size: 0.9rem;
}

.content-progetto p {
    font-size: 22px;
    line-height: 30px;
    s
}

.piano {
    font-size: 24px;
}

.slide-animation-section {
    margin-top: 150px;
}

@media (max-width: 991.98px) {
    .progetto-card {
        overflow: visible;
    }

    .progetto-link {
        text-decoration: none !important;
    }

    .btn-more-works-mobile {}

    /* Mobile: niente hover, l'animazione parte da sola all'ingresso in viewport e si ferma (vedi main.js) */
    .piano {
        margin-top: 54px;
    }

    .quadrato {
        transform: translatex(0%) translatey(0) rotatez(45deg);
        scale: 4;
    }

    .slide-animation-section.animate-in {
        transform: rotatez(360deg);
    }

    .slide-animation-section.animate-in .quadrato {
        transform: translatex(238%) translatey(0) rotatez(405deg);
    }

    .navigation-link {
        font-size: 33px !important;
    }

    .progetto-card::before {
        display: none;
    }

    .intro-text {
        font-size: 1.8rem !important;
        line-height: 2.6rem;
    }

    .slide-animation-section {
        margin-top: 60px;
    }

    .btn-logofolio {
        background-color: #9DACFF;
    }

    .text-in-touch {
        font-size: 1.8rem !important;
        line-height: 2.2rem;
    }

    footer .navigation-link {
        font-size: 1.3rem !important;
        line-height: 2.6rem;
    }

    .list-items-manifesto {
        width: 100%;
        padding-left: 10px;
    }

}

.about-columns p {
    font-size: 20px !important;
    line-height: 28px;
}