@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&display=swap');

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    padding-top: 140px;
}

body,
button,
input,
textarea,
select,
a,
p,
span,
div,
li,
ul,
ol,
label,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lexend', sans-serif;
}

.btn-theme,
.btn-theme:focus-visible {
    background-color: var(--main-color) !important;
    font-weight: 600;
}

.btn-theme:hover{
    background-color: var(--main-dark) !important;
}

.aw-floating{
    left: 10px !important;
    right: inherit !important;
}

/* ==========================================================================
   Header
   ========================================================================== */
.custom-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 60px;
    padding-left: 60px;
    padding-bottom: 15px;
    max-width: 1920px;
    margin: 0 auto;
    box-sizing: border-box;
}

.logo-img {
    height: 113px;
    width: auto;
    display: block;
}

.main-nav {
    position: relative;
    top: 45px;
}

.main-nav .nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 45px;
    padding-right: 75px;
}

.main-nav a {
    text-decoration: none;
    color: #000000;
    font-family: 'Lexend', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 20px;
    letter-spacing: 0px;
    opacity: 1;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #888888;
}

/* Switcher lingua */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 30px;
}

.lang-switcher .sep {
    color: #000000;
    font-weight: 300;
}

.lang-switcher a {
    text-transform: uppercase;
    font-weight: 500;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.hamburger-line {
    width: 25px;
    height: 2px;
    background-color: #000;
}

/* ==========================================================================
   Galleria Progetti (Home)
   ========================================================================== */
.main-content-wrapper {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0px 50px 50px 75px;
    box-sizing: border-box;
    margin-top: 40px;
}

.projects-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

.project-item {
    height: 320px;
    display: block;
    overflow: hidden;
    border-radius: 0;
    transition: transform 0.3s ease;
    position: relative;
}

.project-item:hover {
    transform: scale(1.02);
    z-index: 10;
    position: relative;
}

.project-image {
    height: 100%;
    width: auto;
    object-fit: cover;
    display: block;
}

/* Overlay Dinamico per le immagini dei progetti */
.project-overlay {
    position: absolute;
    bottom: 0;
    transform: translateY(100%);
    left: 0;
    width: 100%;
    min-height: 50px;
    height: auto;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    gap: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    box-sizing: border-box;
    z-index: 2;
}

.project-item:hover .project-overlay {
    transform: translateY(0);
    opacity: 1;
}

.project-overlay-title {
    color: #000000;
    font-weight: 400;
    font-size: 16px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
    min-width: 40%;
}

.project-overlay-tags {
    color: #000000;
    font-size: 14px;
    font-weight: 300;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    flex: 0 1 auto;
    text-align: left;
    margin-left: 0;
}

.project-overlay-tags span {
    margin-left: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.bg-footer {
    background-color: #000000;
}

.custom-footer {
    width: 100%;
    margin-top: auto;
    padding: 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 50px 75px 50px 75px;
    max-width: 1920px;
    margin: 0 auto;
    box-sizing: border-box;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.contact-col {
    text-align: right;
}

.footer-logo-img {
    height: auto;
    max-height: 55px;
    max-width: 100%;
    margin: 0 0 0px -5px;
    display: block;
}

.copyright-text,
.contact-info {
    font-family: 'Lexend', sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 19px;
    letter-spacing: 0px;
    color: #ffffff;
    opacity: 1;
    margin: 0;
}

.spaced-text {
    letter-spacing: 0px;
}

.footer-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 5px 0;
    color: #ffffff;
    text-transform: lowercase;
}

.custom-footer a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-footer a:hover {
    color: #aaaaaa;
}

/* ==========================================================================
   Signature / Copyright Bar
   ========================================================================== */
section.eweb_signature {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 12px !important;
    line-height: 16px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    font-weight: 300 !important;
    overflow-x: hidden;
}

section.eweb_signature .custom-container {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

section.eweb_signature .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

section.eweb_signature div,
section.eweb_signature .col-12 {
    color: #000000 !important;
}

section.eweb_signature a {
    color: #000000 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
}

section.eweb_signature a:hover {
    color: #888888 !important;
}

section.eweb_signature img {
    vertical-align: middle !important;
    filter: invert(1) !important;
}

/* ==========================================================================
   Project Details
   ========================================================================== */
.project-detail-container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;

}

.breadcrumb {
    font-size: 14px;
    font-weight: 300;
    color: #000000;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 120px;
    padding-bottom: 50px;
}

.breadcrumb a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #888888;
}

.breadcrumb .current {
    font-weight: 500;
}

/* ==== PADDING SOLO SUI TESTI E TITOLI ==== */

.project-title,
.project-hashtags,
.paragraph-text,
.paragraph-attachments,
.paragraph-title,
.publication-attachments-row {
    padding-left: 0px;
}

.project-title{
    padding-top: 30px;
}

/* Titolo Progetto basato su XD */
.project-title {
    font-family: 'Lexend', sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 23px !important;
    letter-spacing: 0px !important;
    color: #000000 !important;
    margin: 0;
}

.project-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Hashtag basato su XD */
.hashtag {
    font-family: 'Lexend', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 16px !important;
    letter-spacing: 0px !important;
    color: #000000 !important;
}

.margin-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.paragraph-title,
.paragraph-title p,
.paragraph-title span,
.paragraph-text,
.paragraph-text p,
.paragraph-text span {
    font-family: 'Lexend', sans-serif !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    line-height: 20px !important;
    letter-spacing: -0.45px !important;
    color: #000000 !important;
    opacity: 1 !important;
    margin: 0;
}

/* Evita overflow orizzontale nei testi progetto su mobile e desktop */
.paragraph-text,
.paragraph-text p,
.paragraph-text span,
.paragraph-text a,
.paragraph-text li,
.paragraph-text strong,
.paragraph-text em {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Se dentro al testo arrivano elementi lunghi dal CMS */
.paragraph-text * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Tabelle o blocchi larghi eventualmente incollati dal builder */
.paragraph-text table {
    display: block;
    width: 100%;
    overflow-x: auto;
}

/* Sicurezza extra mobile */
@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }

    .project-detail-container,
    .margin-content,
    .project-content,
    .paragraph-text {
        width: 100%;
        max-width: 100%;
    }
}

/* ==========================================================================
   Gestione Media (Immagini / Video / Allegati)
   ========================================================================== */
.project-main-image-wrap {
    width: 100%;
    overflow: hidden;
}

.project-main-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.paragraph-media-stack {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 18px;
    padding: 0;
}

.media-item-full {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

/* NUOVA REGOLA IMG ORIZZONTALE VERTICALE */
/* Regola di base, valida per tutte le immagini */
.project-main-image,
.img-fluid-full,
.w-100-full {
    display: block;
    width: 100%;
    height: auto;
}

/* Immagine ORIZZONTALE (orientation = 0): larga quanto tutto il contenitore */
.project-main-image.is-horizontal,
.img-fluid-full.is-horizontal,
.w-100-full.is-horizontal {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Immagine VERTICALE (orientation = 1): altezza fissa, larghezza che si adatta, centrata */
.project-main-image.is-vertical,
.img-fluid-full.is-vertical,
.w-100-full.is-vertical {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 630px;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

.paragraph-attachments {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.attachment-link {
    display: inline-block;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border: 1px solid #eeeeee;
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.attachment-link:hover {
    background-color: #eeeeee;
}

.attachment-link i {
    margin-right: 8px;
}

.publication-attachments-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
    box-sizing: border-box;
    margin-top: 15px;
}

.publication-attachments-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.publication-more-link {
    text-decoration: none;
    color: #000000;
    font-family: 'Lexend', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.publication-more-link:hover {
    color: #888888;
}

/* ==========================================================================
   Pagina Contatti
   ========================================================================== */
.contact-page-container {
    max-width: 1024px;
    padding-top: 40px;
    padding-bottom: 20px;
}

.specific-title-details {
    margin-bottom: 10px;
}

.paragraph-text a {
    color: #000000 !important;
    text-decoration: none;
    border-bottom: 1px solid #cccccc;
    transition: border-color 0.3s ease;
    padding-bottom: 2px;
}

.paragraph-text a:hover {
    border-bottom-color: #000000;
}

/* Mappa Contatti */
.map-responsive {
    width: 100%;
    aspect-ratio: 3 / 1;
    margin-bottom: 60px;
    overflow: hidden;
    border-radius: 4px;
}

.map-responsive iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ==========================================================================
   Spaziatura Architects (Logo Header)
   ========================================================================== */
.brand-text-logo {
    display: inline-block;
    width: max-content;
    position: relative;

}

.brand-name {
    display: block;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    color: #ffffff;
}

.brand-subtitle {
    display: block;
    width: 100%;
    font-size: 16px;
    font-weight: 200;
    color: #ffffff;
    text-align: justify;
    text-align-last: justify;
    letter-spacing: 0.27em;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .header-inner {
        padding: 30px;
    }

    .main-content-wrapper {
        padding: 0 30px 30px 30px;
    }

    body {
        padding-top: 100px;
    }

    .footer-inner {
        padding: 50px 30px 50px 30px;
    }

    .project-title {
        font-size: 18px !important;
    }

    .project-title,
    .project-hashtags,
    .paragraph-text,
    .paragraph-attachments,
    .paragraph-title,
    .publication-attachments-row {
        padding-left: 30px;
        padding-right: 30px;
    }
}

.studio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.studio-grid-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.studio-grid-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.studio-grid-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #000000;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.studio-grid-role {
    font-size: 13px;
    font-weight: 400;
    color: #888888;
    text-transform: none;
}

.studio-grid-text,
.studio-grid-text p,
.studio-grid-text span {
    font-family: 'Lexend', sans-serif !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    line-height: 20px !important;
    letter-spacing: -0.45px !important;
    color: #000000 !important;
    opacity: 1 !important;
}

.studio-grid-text p {
    margin-top: 0 !important;
}

.studio-grid-attachments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.studio-grid-attachments .attachment-link {
    align-self: flex-start;
    padding: 6px 12px;
    margin: 0;
}

/* Responsive Griglia Studio */
@media (max-width: 992px) {
    .studio-grid {
        padding-left: 30px;
        padding-right: 30px;
        gap: 40px;
    }
}

/* ==========================================================================
   Dropdown Progetti (DESKTOP)
   ========================================================================== */
.has-dropdown {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: -20px;
}

.projects-dropdown {
    position: absolute;
    top: 100%;
    left: -20px;
    background-color: #ffffff;
    border: 1px solid #eeeeee;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    min-width: 300px;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 2000;
    cursor: default;
}

.has-dropdown:hover .projects-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-inner {
    padding: 30px;
    white-space: nowrap;
}

.dropdown-title {
    font-size: 14px;
    font-weight: 300;
    color: #888888;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.dropdown-columns {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.dropdown-col {
    flex: 1;
}

.col-title {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 5px;
}

/* Scroll custom filtri */
.col-scroll-wrap {
    position: relative;
    padding-right: 10px;
}

.col-scroll {
    max-height: 145px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.col-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.col-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.col-list li a {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #555555 !important;
    text-transform: none;
    transition: color 0.3s ease;
    display: block;
}

.col-list li a:hover {
    color: #000000 !important;
}

.col-scrollbar {
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: transparent;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.col-scrollbar-thumb {
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    min-height: 18px;
    border-radius: 999px;
    background: #d8d8d8;
    opacity: 0.9;
    transform: translateY(0);
    transition: background-color 0.25s ease, opacity 0.25s ease;
}

.col-scroll-wrap.is-scrollable .col-scrollbar {
    opacity: 1;
}

.col-scroll-wrap:hover .col-scrollbar-thumb {
    background: #bdbdbd;
    opacity: 1;
}

/* ==========================================================================
   Stato Attivo Menu (Current)
   ========================================================================== */
.main-nav .current-menu-item > a {
    font-weight: 500 !important;
    color: #000000 !important;
}

.grecaptcha-badge {
    visibility: hidden !important;
}

.custom-form .form-control,
.custom-form .select-box {
    border: none !important;
    border-bottom: 1px solid #ccc !important;
    border-radius: 0 !important;
    padding: 10px 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.custom-form .form-control:focus,
.custom-form .select-box:focus {
    border-bottom-color: #000 !important;
    outline: none !important;
}

.custom-form label {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.custom-form button[type="submit"] {
    border-radius: 0;
    background-color: #000;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Gestione Blocco Privacy
   ========================================================================== */
.privacy-check-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.privacy-check-wrap .form-check-input {
    flex: 0 0 auto;
    margin-top: 4px;
}

.privacy-label-wrap {
    display: block;
    flex: 1;
    margin: 0;
    cursor: pointer;
}

.privacy-text {
    display: block;
    font-family: 'Lexend', sans-serif !important;
    font-size: 13px !important;
    line-height: 18px !important;
    font-weight: 300 !important;
    letter-spacing: -0.2px !important;
    color: #555555 !important;
    max-height: 36px;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out, -webkit-mask-size 0.6s ease-in-out, mask-size 0.6s ease-in-out;
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 55%,
        rgba(0, 0, 0, 0.45) 78%,
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 55%,
        rgba(0, 0, 0, 0.45) 78%,
        rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-size: 100% 36px;
    mask-size: 100% 36px;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.privacy-check-wrap:hover .privacy-text,
.privacy-check-wrap:active .privacy-text,
.privacy-check-wrap:focus-within .privacy-text {
    max-height: 200px;
    -webkit-mask-size: 100% 400px;
    mask-size: 100% 400px;
}

/* Imposta una larghezza fissa in pixel solo su Desktop */
@media (min-width: 992px) {
    .projects-dropdown.dropdown-pubblicazioni {
        position: absolute !important;
        width: 180px !important;
        min-width: unset !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }

    .dropdown-pubblicazioni .dropdown-columns {
        display: block !important;
        width: 100% !important;
    }

    .dropdown-pubblicazioni .dropdown-col {
        width: 100% !important;
    }
}

/* Su mobile e tablet (fino a 992px) l'informativa è sempre aperta e senza effetti */
@media (max-width: 992px) {
    .privacy-text {
        max-height: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        overflow: visible !important;
    }

    .privacy-check-wrap:hover .privacy-text,
    .privacy-check-wrap:active .privacy-text,
    .privacy-check-wrap:focus-within .privacy-text {
        max-height: none !important;
    }
}

/* ==========================================================================
   Stile Testi Form (Font Lexend)
   ========================================================================== */

/* Applica il font agli input, textarea e placeholder */
.custom-form .form-control {
    font-family: 'Lexend', sans-serif !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    letter-spacing: -0.45px !important;
    color: #000000 !important;
}

/* Colore specifico per i placeholder (leggermente più chiaro) */
.custom-form .form-control::placeholder {
    color: #888888 !important;
    opacity: 1;
}

.custom-form .form-control:-ms-input-placeholder {
    color: #888888 !important;
}

.custom-form .form-control::-ms-input-placeholder {
    color: #888888 !important;
}

/* Stile del pulsante INVIA */
.custom-form button[type="submit"] {
    font-family: 'Lexend', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    letter-spacing: 0.1em !important;
}

/* ==========================================================================
   MEDIA QUERY 768px - MOBILE & TABLET (Menu hamburger & filtri)
   ========================================================================== */
@media (max-width: 768px) {
    /* === HAMBURGER BARS: visibili e cliccabili === */
    .mobile-menu-toggle {
        display: flex;
    }
    .logo-img {
        height: 62.5px;
    }
    /* === NAVIGAZIONE: nascosta di default, compare come finestra bianca a metà schermo === */
    .main-nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        border-bottom: 1px solid #eeeeee;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 20px 30px;
        z-index: 2000;
        box-sizing: border-box;
    }

    .main-nav.is-open {
        display: block !important;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 0;
    }

    .main-nav .nav-list li {
        width: 100%;
    }

    .main-nav a {
        display: inline-block;
    }

    .lang-switcher {
        margin-left: 0;
    }

    /* === HAS-DROPDOWN: annulla il padding/margin del desktop === */
    .has-dropdown {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* === DROPDOWN FILTRI: nascosto di default, compare solo al click su "progetti" === */
    .projects-dropdown {
        display: none !important;
        position: static;
        width: 100%;
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background-color: transparent;
        margin-top: 15px;
    }

    .has-dropdown.open-mobile-dropdown .projects-dropdown {
        display: block !important;
    }

    .dropdown-inner {
        padding: 0;
        white-space: normal;
    }

    .dropdown-title {
        margin-bottom: 15px;
    }

    .dropdown-columns {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }

    .dropdown-col {
        flex: 1;
        min-width: 0;
    }

    .col-list li a {
        font-size: 12px !important;
    }

    /* === RESTO LAYOUT MOBILE === */
    .projects-gallery {
        margin-top: 100px;
    }

    .breadcrumb {
        margin-top: 100px;
    }

    .header-inner {
        padding: 20px;
        position: relative;
    }

    .main-content-wrapper {
        padding: 0 20px 30px 20px;
    }

    body {
        padding-top: 80px;
    }

    .project-item {
        height: auto;
        width: 100%;
    }

    .project-image {
        width: 100%;
        height: auto;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
        padding: 30px 20px 30px 20px;
    }

    .contact-col {
        text-align: left;
    }

    .project-title {
        font-size: 18px !important;
    }

    .map-responsive {
        aspect-ratio: 4 / 3;
    }

    .project-title,
    .project-hashtags,
    .paragraph-text,
    .paragraph-attachments,
    .paragraph-title,
    .publication-attachments-row {
        padding-left: 10px;
        padding-right: 10px;
    }

    .publication-attachments-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .publication-attachments-left {
        width: 100%;
        margin-bottom: 10px;
    }

    .publication-more-link {
        white-space: normal;
    }

    .studio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .breadcrumb {
        padding-left: 0px;
        padding-top: 40px;
    }
}

.generic_form,
.generic_form .form-control,
.generic_form input,
.generic_form textarea,
.generic_form button,
.generic_form label,
.generic_form .title,
.generic_form .privacy-text {
    font-family: 'Lexend', sans-serif;
}

/* TEST: per schermi più grandi */
/* QHD ~2560px */
@media (min-width: 1921px) {
    .paragraph-title, .paragraph-title p, .paragraph-title span,
    .paragraph-text, .paragraph-text p, .paragraph-text span,
    .studio-grid-text, .studio-grid-text p, .studio-grid-text span {
        font-size: 14px !important;
        line-height: 20px !important;
    }
    .project-title { font-size: 16px !important; line-height: 22px !important; }
    .studio-grid-title { font-size: 14px !important; }
    .studio-grid-role { font-size: 10px !important; }
    .main-nav a { font-size: 14px !important; }
}

/* 4K ~3840px: qui il raddoppio ha senso */
@media (min-width: 2560px) {
    .paragraph-title, .paragraph-title p, .paragraph-title span,
    .paragraph-text, .paragraph-text p, .paragraph-text span,
    .studio-grid-text, .studio-grid-text p, .studio-grid-text span {
        font-size: 18px !important;
        line-height: 26px !important;
    }
    .project-title { font-size: 28px !important; line-height: 38px !important; }
    .studio-grid-title { font-size: 24px !important; }
    .studio-grid-role { font-size: 18px !important; }
    .main-nav a { font-size: 24px !important; }
}

/* =====================================================================
   FLIPBOOK PUBBLICAZIONI
   - libro a tutto schermo, larghezza = container (1024px)
   - ombra lieve e squadrata, verticali centrate
   - navbar fissa che si nasconde quando il libro riempie il viewport
   ===================================================================== */

.pub-flip-section {
    --pub-page-w: min(1024px, calc(100vw - 30px));   /* larghezza = container */
    --pub-page-h: min(1300px, calc(100vh - 48px));   /* libro a tutto schermo */
    --pub-paper: #ffffff;
    position: relative;
    width: 100%;
    background: transparent;
}

.pub-flipbook__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: transparent;
}

.pub-flipbook__stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 2800px;
    perspective-origin: 50% 48%;
    background: transparent;
}

.pub-flipbook {
    position: relative;
    width: var(--pub-page-w);
    height: var(--pub-page-h);
    transform-style: preserve-3d;
}

.pub-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transform-style: preserve-3d;
    will-change: transform;
    transform: rotateY(0deg);
    border-radius: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

.pub-page__face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    background: var(--pub-paper);
    border-radius: 0;
}

.pub-page__face--front { z-index: 2; }

.pub-page__face--back {
    transform: rotateY(180deg);
    background:
        linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,0) 16%),
        var(--pub-paper);
    border-radius: 0;
}

.pub-page__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
    user-select: none;
    pointer-events: none;
}

.pub-page__shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    border-radius: inherit;
}
.pub-page__shade--front { background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,0) 55%); }
.pub-page__shade--back  { background: linear-gradient(270deg, rgba(0,0,0,.38), rgba(0,0,0,0) 55%); }

.pub-page__gloss {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    border-radius: inherit;
    background: linear-gradient(105deg,
        rgba(255,255,255,0) 35%,
        rgba(255,255,255,.32) 50%,
        rgba(255,255,255,0) 65%);
    mix-blend-mode: screen;
}

.pub-info-row {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    width: 100%;
}
.pub-info-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.pub-info-side {
    flex: 0 0 auto;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    padding-top: 30px;
}
.pub-info-side__label {
    font-family: 'Lexend', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    line-height: 1.2;
}
.pub-info-side__pdf {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
}

/* ---------------------------------------------------------------------
   PAGINA EXTRA FINALE:
   "leggi l'articolo" + pulsante PDF, poi DISTANZIATO sotto "altre pubblicazioni"
   --------------------------------------------------------------------- */
.pub-page--extra .pub-page__face--front { background: var(--pub-paper); }
.pub-extra {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vw, 64px);
}
.pub-extra__inner {
    display: flex;
    flex-direction: column;
    gap: 100px;
    align-items: flex-start;
    width: 100%;
    max-width: 520px;
}
.pub-extra__read {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    width: 100%;
}
.pub-extra__attachments {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: flex-start;
}
.pub-extra__more {
    align-self: flex-start;
    text-decoration: none;
    color: #111;
    font-family: 'Lexend', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .02em;
    transition: opacity .2s ease;
}
.pub-extra__more:hover { opacity: .6; }

/* UI: contatore + suggerimento */
.pub-flipbook__ui {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(16px, 3vh, 34px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(0,0,0,.55);
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 60000;
}
.pub-flipbook__hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: .85;
    animation: pubHintPulse 1.8s ease-in-out infinite;
    transition: opacity .4s ease;
}
.pub-flipbook__hint::after { content: "\2193"; }
.pub-flip-section.is-flipping .pub-flipbook__hint { opacity: 0; }

@keyframes pubHintPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ---------------------------------------------------------------------
   NAVBAR (desktop pubblicazioni): fissa, ma si nasconde sul libro
   --------------------------------------------------------------------- */
@media (min-width: 1024px) {
    body.is-pubblicazione .custom-header-fixed {
        transition: transform .35s ease, opacity .35s ease;
    }
    body.is-pubblicazione.pub-immersive .custom-header-fixed {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
}

/* ---------------------------------------------------------------------
   RESPONSIVE BLOCCO INFO (sotto 992px il lato destro va sotto)
   --------------------------------------------------------------------- */
@media (max-width: 992px) {
    .pub-info-row { flex-direction: column; gap: 28px; }
    .pub-info-side {
        width: 100%;
        padding-top: 0;
        padding-left: 30px;
        padding-right: 30px;
        box-sizing: border-box;
        margin-bottom: 30px
    }
}
@media (max-width: 768px) {
    .pub-info-side { padding-left: 10px; padding-right: 10px; }
}

/* ---------------------------------------------------------------------
   FALLBACK MOBILE / TABLET (< 1024px): galleria verticale semplice
   --------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .pub-flip-section { height: auto !important; background: transparent; }
    .pub-flipbook__sticky { position: static; height: auto; overflow: visible; }
    .pub-flipbook__stage { display: block; height: auto; perspective: none; }
    .pub-flipbook { width: 100%; height: auto; transform-style: flat; }
    .pub-page {
        position: static; width: 100%; height: auto;
        transform: none !important;
        box-shadow: 0 6px 20px rgba(0,0,0,.15);
        margin-bottom: 18px; border-radius: 4px; overflow: hidden;
    }
    .pub-page__face { position: static; border-radius: 0; }
    .pub-page__face--back { display: none; }
    .pub-page__img { position: static; height: auto; object-fit: contain; }
    .pub-page.is-vertical .pub-page__img { max-height: 90vh; }
    .pub-page__shade, .pub-page__gloss { display: none; }
    .pub-page--extra .pub-page__face--front { min-height: 60vh; position: relative; }
    .pub-extra { position: static; }
    .pub-flipbook__ui { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pub-flipbook__hint { animation: none; }
    .pub-page { transition: none !important; }
}

/* --- DESKTOP --- */
/* Nascondiamo la freccia, non altera gli spazi perché non ha contenitori extra */
.dropdown-trigger {
    display: none;
}

/* --- MOBILE (fino a 768px) --- */
@media (max-width: 768px) {

    .main-nav .nav-list li {
        position: relative;
    }

    .dropdown-trigger {
        display: flex;
        position: absolute;
        right: 0;
        top: -10px;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: flex-end;
        cursor: pointer;
        color: #000;
        font-size: 16px;
        transition: transform 0.3s ease;
        z-index: 10;
    }

    .has-dropdown.open-mobile-dropdown .dropdown-trigger i {
        transform: rotate(180deg);
    }

    .main-nav .has-dropdown > a {
        padding-right: 40px;
    }
}