:root {
    --accent-color: #F36F23;
    --text-main: #404040;
    --text-muted: #757575;
    --placeholder-bg: #E0E0E0;
    --border-color: #EEEEEE;
    --container-padding: 8%;
    --side-margin: 10rem;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.3;
    background-color: #FFFFFF;
}

p {
    color: #5f5f5f;
}


a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* Skip link per accessibilità tastiera */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--accent-color);
    color: #FFFFFF;
    padding: 0.75rem 1.25rem;
    z-index: 9999;
    font-weight: 600;
    border-radius: 0 0 6px 6px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #000000;
}

/* Indicatore di focus visibile per navigazione da tastiera */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.container {
    padding-left: var(--side-margin);
    padding-right: var(--side-margin);
}

/* Keyframe animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero title: animazione solo all'atterraggio iniziale */
.hero-title {
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

body.is-landing .hero-title {
    animation: fadeInUp 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #FFFFFF;
    z-index: 1002;
    padding: 2rem 0;
    /* border-bottom: 1px solid var(--border-color); */
}

main {
    padding-top: 112px;
    /* Compensazione dell'header fisso su desktop */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: block;
    line-height: 0;
}

.navbar-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-group {
    display: flex;
    align-items: center;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
    background: none;
    border: none;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 992px) {

    header .container,
    main .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    main {
        padding-top: 80px;
        /* Spazio per l'header fisso */
    }

    body.menu-open {
        overflow: hidden;
    }

    .hamburger {
        display: flex;
    }

    .nav-group {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #FFFFFF;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-group.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-group nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-right: 0;
        margin-bottom: 2rem;
    }

    .nav-group nav a {
        font-size: 1.8rem;
        margin: 1.5rem 0;
        color: var(--text-main);
        font-weight: 500;
    }

    .nav-group .btn-contact {
        display: block;
        width: 80%;
        max-width: 350px;
        text-align: center;
        padding: 1.2rem;
        font-size: 1.1rem;
        border-radius: 0.8rem;
    }

    header .container {
        position: relative;
        z-index: 1002;
    }
}

nav {
    margin-right: 2rem;
}

nav a {
    margin: 0 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s, opacity 0.3s;
}

nav a:hover {
    color: var(--accent-color);
    opacity: 1;
}

.btn-contact {
    background-color: var(--accent-color);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Common Section styles */
.section-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: capitalize;
    display: flex;
    align-items: center;
}

.section-label-with-line {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 4rem;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
}

.section-label-with-line::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 1px;
    background-color: var(--accent-color);
    margin-right: 15px;
}

/* Hero Section */
#hero {
    margin: 6rem 0;
}

#hero h1 {
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 2.2rem;
    font-weight: 300;
    font-style: italic;
}

/* Works Section */


/* Margini laterali uniformi gestiti da .container */

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem 3rem;
    margin-bottom: 6rem;
}

@media (max-width: 992px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-nav {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        gap: 1.5rem;
    }

    .contact-link a {
        font-size: 1.5rem;
    }
}

.project-card .project-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--placeholder-bg);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    /* Assicura che l'immagine non esca dai bordi */
    transition: transform 0.4s ease;
    /* Transizione fluida */
}

.project-card:hover .project-image {
    transform: scale(1.05);
    /* Ingrandimento del 5% */
}

.project-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: color 0.4s ease;
    /* Transizione fluida per il colore */
}

.project-card:hover h3 {
    color: var(--accent-color);
    /* Cambio colore al passaggio del mouse */
}

.project-desc {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-tags {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Archivio Section */
.accordion {
    margin-bottom: 6rem;
}

.accordion-item {
    border-top: 1px solid var(--border-color);
}

.accordion-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    color: inherit;
    text-align: left;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.accordion-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 1rem 0rem;
}

.accordion-title-group span {
    font-size: 1.3rem;
    font-weight: 600;
}

.arrow {
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    transform: rotate(45deg);
    transition: transform 0.3s, border-color 0.3s;
}

.accordion-item.expanded .arrow {
    transform: rotate(-135deg);
    border-color: var(--accent-color);
}

.accordion-item:hover .accordion-header,
.accordion-item.expanded .accordion-header {
    color: var(--accent-color);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
}

.accordion-item.expanded .accordion-content {
    opacity: 1;
}

.sub-category {
    font-size: 0.85rem;
}

.academy-item {
    display: grid;
    grid-template-columns: 80px 150px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.academy-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.academy-thumb {
    width: 80px;
    height: 80px;
}

.academy-info strong {
    display: block;
    margin-bottom: 0.5rem;
}

.academy-info p {
    font-size: 0.9rem;
    line-height: 1.4;
}

.academy-desc {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Archivio Section - Mobile */
@media (max-width: 992px) {
    .academy-item {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
        padding: 0;
    }

    .academy-item:not(:last-child) {
        border-bottom: none;
    }

    .academy-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: 4px;
    }

    .academy-info strong {
        font-size: 1.2rem;
    }
}

.PLACEHOLDER-DELETE-ME {
    line-height: 1.5;
}

/* About Section */
#about {
    padding-bottom: 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.about-main h2 {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 2rem;
}

.about-main p {
    font-size: 1.1rem;
    max-width: 500px;
}

.details-section {
    margin-bottom: 3rem;
}

.details-section h3 {
    font-size: 0.9rem;
    text-transform: capitalize;
    margin-bottom: 1.5rem;
    color: #757575;
}

.detail-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    padding: 1rem 0.75rem 0.5rem;
    cursor: default;
    transition: transform 0.35s ease;
}

.detail-row:hover {
    transform: translateX(4px);
}

/* Logo wrap: collassato di default, si espande sull'hover */
.detail-logo-wrap {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        max-height 0.4s cubic-bezier(0.25, 1, 0.3, 1),
        opacity 0.35s ease,
        transform 0.35s ease,
        margin-bottom 0.35s ease;
    margin-bottom: 0;
}

.detail-row:hover .detail-logo-wrap {
    max-height: 80px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 1rem;
}

@media (max-width: 992px) {
    .detail-logo-wrap {
        max-height: 80px;
        opacity: 1;
        transform: translateY(0);
        margin-bottom: 1rem;
    }
}

/* Il logo vero e proprio */
.detail-row-logo {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.6rem;
}

.detail-header strong {
    font-size: 1.1rem;
    font-weight: 600;
}

.detail-description {
    font-size: 0.9rem;
    max-width: 100%;
}

.detail-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.song-title {
    color: var(--accent-color);
    font-weight: 600;
}

.small-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.small-gallery-item {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--placeholder-bg);
    border-radius: 4px;
    overflow: hidden;
}

.small-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* PDW 2022 Gallery Overrides */
.pdw-gallery .small-gallery-item {
    aspect-ratio: 1654 / 2339;
    background-color: transparent;
}

.pdw-gallery .small-gallery-item img {
    border: 1px solid #e0e0e0;
}

/* Bento Gallery */
.bento-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.bento-item {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.bento-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.bento-full {
    grid-column: 1 / -1;
}

.bento-half {
    grid-column: span 1;
}

@media (max-width: 992px) {
    .bento-gallery {
        grid-template-columns: 1fr;
    }

    .bento-half {
        grid-column: 1 / -1;
    }
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    background-color: var(--accent-color);
    color: white;
    width: 100%;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.logo-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
}

.contact-link p {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: white;
}

.contact-link a {
    font-size: 1.8rem;
    font-weight: 600;
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    font-size: 0.9rem;
    color: white;
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    opacity: 1;
}

.footer-bottom p {
    color: white;
}

/* Responsive */
@media (max-width: 992px) {

    .project-grid,
    .about-grid {
        grid-template-columns: 1fr;
    }

    #hero {
        margin: 3rem 0;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }

    .about-main h2 {
        font-size: 3rem;
    }

    .detail-header {
        display: grid;
        justify-content: flex-start;
        gap: 0.3rem;
        margin-bottom: 0.8rem;
    }

    .project-meta-grid,
    .grid-2-col,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .project-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .project-title {
        font-size: 2.2rem;
    }

    .project-subtitle {
        font-size: 1.5rem;
    }

    .section-content-large h2 {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 3rem;
    }

    .results-title {
        font-size: 2.2rem;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .footer-nav {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1.5rem;
    }
}

/* Project Page Styles */
.project-page .logo a {
    display: flex;
    align-items: center;
}

.project-hero {
    padding: 4rem 0;
}

.project-title {
    font-size: 3.5rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-subtitle {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    max-width: 900px;
}

.project-meta-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    /* border-top: 1px solid var(--border-color); */
    border-bottom: 1px solid var(--border-color);
    padding-top: 1rem;
    padding-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.project-main-image {
    width: auto;
    aspect-ratio: 16 / 9;
    background-color: var(--placeholder-bg);
    margin: 4rem 0;
    border-radius: 4px;
}

.project-main-image:has(img) {
    aspect-ratio: unset;
    background-color: transparent;
    overflow: hidden;
}

.project-main-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.project-main-video {
    width: auto;
    margin: 4rem 0;
    border-radius: 4px;
    overflow: hidden;
}

.project-section {
    margin-bottom: 4rem;
}

/* Closing section spacing */
.project-closing-section {
    margin-bottom: 8rem;
    /* Increased spacing before the next section */
}

.closing-gallery {
    width: 100%;
    display: flex;
    justify-content: center;
}

.closing-item {
    width: 100%;
    display: flex;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
}

.closing-item img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 4fr;
    gap: 2rem;
}

.section-content-large h2 {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.text-muted-italic {
    color: var(--text-muted);
    font-style: italic;
}

.section-text p {
    font-size: 1.1rem;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 4rem 0;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--placeholder-bg);
}

.visit-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--text-main);
}

.project-footer-image {
    width: 100%;
    aspect-ratio: 21 / 9;
    background-color: var(--placeholder-bg);
    margin: 4rem 0;
}

/* Link Section */
.link-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4rem;
}

.link-section .external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    padding-bottom: 0.3rem;
    transition: opacity 0.3s;
}

.link-section .external-link span {
    color: var(--accent-color);
    font-size: 1.3rem;
    line-height: 1;
}

/* Results Section */
.results-section {
    text-align: center;
    padding: 6rem 0;
}

.results-title {
    font-size: 3rem;
    margin-bottom: 4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 6rem;
}

.stat-number {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.testimonial {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial p {
    font-size: 1.4rem;
    font-style: italic;
    margin-bottom: 2rem;
}

.testimonial cite {
    font-style: normal;
    font-weight: 600;
    font-size: 1rem;
}

/* Responsive Optimizations for Project Page */
/* Desktop: margini laterali per elementi project page fuori dal container */
.project-page .project-main-image,
.project-page .project-main-video,
.project-page .project-section,
.project-page .link-section {
    margin-left: var(--side-margin);
    margin-right: var(--side-margin);
}

@media (max-width: 992px) {

    .project-page .project-main-image,
    .project-page .project-main-video,
    .project-page .project-section,
    .project-page .link-section {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width: 768px) {
    .project-hero {
        padding: 2rem 0;
    }

    .project-title {
        font-size: 2rem;
    }

    .project-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

    .project-meta-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        font-size: 0.85rem;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .section-label-with-line {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .section-text p {
        font-size: 1rem;
    }

    .small-gallery {
        grid-template-columns: 1fr;
        /* Una colonna su mobile per visibilità */
        gap: 1rem;
    }

    .project-main-image,
    .project-main-video {
        margin: 2rem 0;
    }
}

/* Footer Responsive Fix */
@media (max-width: 992px) {
    footer .container {
        padding: 0 1rem;
    }
}

/* ===================================================
   PDF VISUALIZER
   =================================================== */
.pdf-visualizer {
    margin: 0 var(--side-margin) 5rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #f9f9f9;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
}

/* ── Drop zone ── */
.pv-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    min-height: 340px;
    padding: 4rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    background: #f9f9f9;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.pv-dropzone:hover,
.pv-dropzone.pv-drag {
    background: #fff6f0;
    border-color: var(--accent-color);
}

.pv-dropzone.pv-drag .pv-dropzone-icon svg {
    color: var(--accent-color);
    transform: scale(1.1) translateY(-4px);
}

.pv-dropzone-icon svg {
    color: #c0c0c0;
    transition: color 0.2s, transform 0.25s;
}

.pv-drop-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main) !important;
    margin: 0;
}

.pv-drop-sub {
    font-size: 0.88rem;
    color: var(--text-muted) !important;
    margin: 0;
}

.pv-btn-primary {
    margin-top: 0.4rem;
    padding: 0.65rem 1.8rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.15s;
}

.pv-btn-primary:hover {
    opacity: 0.86;
    transform: translateY(-1px);
}

/* ── Viewer wrapper ── */
.pv-viewer {
    display: flex;
    flex-direction: column;
    width: 559px;
    height: 791px;
    margin: 0 auto;
    flex-shrink: 0;
    box-sizing: border-box;
    background: #fff;
}

/* ── Toolbar ── */
.pv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.2rem;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
}

/* Left */
.pv-tb-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    color: var(--text-muted);
}

.pv-filename {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.pv-btn-ghost {
    padding: 0.3rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.18s, color 0.18s;
    flex-shrink: 0;
}

.pv-btn-ghost:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

/* Center: nav + page counter */
.pv-tb-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pv-page-counter {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #f4f4f4;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
}

.pv-page-input {
    width: 42px;
    border: none;
    background: transparent;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    /* nasconde le frecce native */
    -moz-appearance: textfield;
    appearance: textfield;
}

.pv-page-input::-webkit-outer-spin-button,
.pv-page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.pv-page-input:focus {
    color: var(--accent-color);
}

.pv-page-sep {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.pv-page-total {
    font-size: 0.88rem;
    color: var(--text-muted);
    min-width: 20px;
}

/* Right: zoom */
.pv-tb-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    justify-content: flex-end;
}

.pv-zoom-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    min-width: 38px;
    text-align: center;
}

/* Icon buttons (nav + zoom + fit) */
.pv-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-main);
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.pv-icon-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #fff6f0;
}

.pv-icon-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.pv-fit-btn {
    margin-left: 0.25rem;
}

/* ── Canvas area ── */
.pv-canvas-area {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    overflow: auto;
    flex: 1;
    min-height: 0;
    cursor: grab;
    user-select: none;
}

.pv-canvas-area.grabbing {
    cursor: grabbing;
}

#pvCanvas {
    display: block;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.14);
    border-radius: 2px;
    background: #fff;
    margin: auto;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .pdf-visualizer {
        margin: 0 1rem 4rem;
    }

    .pv-filename {
        max-width: 120px;
    }

    .pv-tb-left {
        flex: none;
    }

    .pv-tb-right {
        flex: none;
    }

    .pv-toolbar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
}

@media (max-width: 600px) {
    .pv-dropzone {
        min-height: 260px;
        padding: 3rem 1rem;
    }

    .pv-canvas-area {
        padding: 1rem 0.5rem;
        min-height: 320px;
    }

    .pv-zoom-label {
        display: none;
    }
}


/* ===== PDF READER ===== */
.pdf-reader {
    margin: 0 var(--side-margin) 4rem;
}

.pdf-reader-inner {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background-color: #fafafa;
}

/* Area di upload */
.pdf-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    min-height: 320px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background-color: #fafafa;
}

.pdf-upload-area:hover,
.pdf-upload-area.dragover {
    background-color: #fff5ef;
    border-color: var(--accent-color);
}

.pdf-upload-area.dragover .pdf-upload-icon svg {
    color: var(--accent-color);
    transform: scale(1.1);
}

.pdf-upload-icon svg {
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.pdf-upload-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main) !important;
    margin: 0;
}

.pdf-upload-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted) !important;
    margin: 0;
}

.pdf-upload-btn {
    margin-top: 0.5rem;
    padding: 0.65rem 1.8rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.pdf-upload-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* Viewer container */
.pdf-viewer-container {
    flex-direction: column;
    width: 100%;
}

/* Toolbar */
.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
}

.pdf-toolbar-left {
    flex: 1;
    min-width: 0;
}

.pdf-filename {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 280px;
}

.pdf-toolbar-center {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.pdf-page-info {
    font-size: 0.88rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.pdf-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-main);
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
    font-family: 'Inter', sans-serif;
}

.pdf-nav-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: #fff5ef;
}

.pdf-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pdf-toolbar-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.pdf-close-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.pdf-close-btn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

/* Canvas */
.pdf-canvas-wrapper {
    padding: 1.5rem 1.5rem 2rem;
    display: flex;
    justify-content: center;
    background-color: #f0f0f0;
    overflow-x: auto;
}

#pdfCanvas {
    display: block;
    max-width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    border-radius: 3px;
    background: white;
}

/* Responsive PDF reader */
@media (max-width: 992px) {
    .pdf-reader {
        margin: 0 1rem 4rem;
    }

    .pdf-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .pdf-toolbar-left,
    .pdf-toolbar-right {
        flex: none;
    }

    .pdf-filename {
        max-width: 160px;
    }
}

@media (max-width: 600px) {
    .pdf-upload-area {
        padding: 3rem 1rem;
        min-height: 240px;
    }

    .pdf-canvas-wrapper {
        padding: 1rem 0.5rem;
    }
}

/* ── PDF Viewer Fullscreen Styles ── */
#pvViewer:fullscreen {
    background: #141414;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex;
    flex-direction: column;
}

#pvViewer:fullscreen .pv-toolbar {
    background: #222;
    border-bottom: 1px solid #333;
    color: #fff;
}

#pvViewer:fullscreen .pv-toolbar .pv-filename,
#pvViewer:fullscreen .pv-toolbar .pv-zoom-label,
#pvViewer:fullscreen .pv-toolbar .pv-page-total {
    color: #bbb;
}

#pvViewer:fullscreen .pv-toolbar .pv-page-counter {
    background: #333;
    border-color: #444;
}

#pvViewer:fullscreen .pv-toolbar .pv-page-input {
    background: transparent;
    color: #fff;
}

#pvViewer:fullscreen .pv-toolbar .pv-icon-btn {
    color: #bbb;
    border-color: #444;
}

#pvViewer:fullscreen .pv-toolbar .pv-icon-btn:hover:not(:disabled) {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

#pvViewer:fullscreen .pv-canvas-area {
    background: #121212;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 2rem;
}

/* ===================================================
   SUGGESTED PROJECTS
   =================================================== */
.suggested-section {
    margin: 6rem 0;
    padding: 0 var(--side-margin);
}

.suggested-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: var(--text-main);
}

.suggested-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.suggested-carousel::-webkit-scrollbar {
    height: 8px;
}

.suggested-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.suggested-carousel::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 10px;
}

.suggested-card {
    flex: 0 0 calc(33.333% - 1.33rem);
    min-width: 320px;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.suggested-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.suggested-card-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
}

.suggested-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.suggested-card-author {
    font-size: 1rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 1rem;
}

.suggested-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1a2a3a;
}

.suggested-card-desc {
    font-size: 1.05rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.suggested-card-link {
    font-size: 1.05rem;
    font-weight: 500;
    color: #F36F23;
    display: flex;
    align-items: center;
    margin-top: auto;
    transition: color 0.3s ease;
}

.suggested-card-link::after {
    content: '→';
    margin-left: 0.5rem;
    font-size: 1.3rem;
    font-weight: 400;
}

.suggested-card:hover .suggested-card-link {
    color: var(--accent-color);
}

@media (max-width: 992px) {
    .suggested-section {
        margin: 4rem 0;
        padding: 0 1rem;
    }

    .suggested-title {
        font-size: 2rem;
    }

    .suggested-card {
        flex: 0 0 85%;
        max-width: none;
    }

    .detail-row {
        padding-left: 0;
        padding-right: 0;
    }
}