/* ============================================
   Portfolio Giulia Bertoluzzi - Stylesheet
   Design: Light Editorial
   ============================================ */

/* ============================================
   1. CUSTOM PROPERTIES & RESET
   ============================================ */

:root {
    --color-bg:          #FAF8F5;
    --color-bg-elevated: #FFFFFF;
    --color-text:        #1A1614;
    --color-text-secondary: #3D3731;
    --color-text-muted:  #6B635C;
    --color-border:      #E5DDD4;
    --color-hover-dark:  #0D0B0A;
    --color-white:       #FAF8F5;

    --font-heading: 'Josefin Sans', sans-serif;
    --font-body:    'Karla', sans-serif;

    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6rem;

    --sidebar-width: 20%;

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s ease;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   2. TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--color-text);
}

/* ============================================
   3. LANDING PAGE (index.html root)
   ============================================ */

.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--color-bg);
    padding: var(--space-md);
}

.landing-logo {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 200;
    color: var(--color-text);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    animation: fadeInUp 1s ease forwards;
}

.landing-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: var(--color-text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.language-selector {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.language-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all var(--transition-base);
    font-weight: 400;
    background: transparent;
}

.language-btn:hover {
    background: var(--color-hover-dark);
    color: #FAF8F5;
    border-color: var(--color-hover-dark);
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   4. LAYOUT WRAPPER
   ============================================ */

#wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ============================================
   5. SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--color-bg);
    padding: var(--space-md) 1.5rem;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: var(--space-lg);
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
    display: block;
    line-height: 1.4;
}

.sidebar-tagline {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: var(--space-xs);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sidebar-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition-base);
    padding: 0.3rem 0.75rem;
    display: block;
    border-left: 2px solid transparent;
}

.sidebar-link:hover {
    color: var(--color-text);
    padding-left: 1.25rem;
}

.sidebar-link.active {
    color: var(--color-text);
    padding-left: 1.25rem;
    border-left-color: var(--color-text);
}

/* Sidebar Dropdown */
.sidebar-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.dropdown-arrow {
    font-size: 0.6rem;
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.sidebar-dropdown.is-open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base), opacity var(--transition-base);
    opacity: 0;
    padding-left: 1.5rem;
    margin-top: 0.2rem;
    border-left: 1px solid var(--color-border);
}

.sidebar-dropdown.is-open .dropdown-menu {
    max-height: 500px;
    opacity: 1;
}

.dropdown-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition-base);
    padding: 0.25rem 0;
    display: block;
    cursor: pointer;
}

.dropdown-link:hover {
    color: var(--color-text);
    padding-left: 0.5rem;
}

.dropdown-count {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    margin-left: 0.3rem;
}

/* Dropdown: "All Projects" link */
.dropdown-link--all {
    font-weight: 400;
}

/* Dropdown separator */
.dropdown-separator {
    height: 1px;
    background: var(--color-border);
    margin: 0.4rem 0;
    list-style: none;
}

/* Dropdown nested subcategories */
.dropdown-subcategories {
    list-style: none;
    padding-left: 0.8rem;
    margin-top: 0.15rem;
    border-left: 1px solid var(--color-border);
}

.dropdown-link--sub {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    transition: all var(--transition-base);
    padding: 0.15rem 0;
    display: block;
    cursor: pointer;
}

.dropdown-link--sub:hover {
    color: var(--color-text);
    padding-left: 0.3rem;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: var(--space-xs);
    list-style: none;
    margin-bottom: var(--space-md);
}

.lang-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

.lang-link.active {
    color: var(--color-text);
}

.lang-link:not(.active):hover {
    color: var(--color-text);
}

.lang-separator {
    color: var(--color-border);
}

/* Copyright */
.copyright {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    letter-spacing: 0.05em;
}

/* Social Links */
.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--color-text);
    border-radius: 50%;
    color: var(--color-text);
    transition: all var(--transition-base);
    text-decoration: none;
}

.social-link svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.social-link:hover {
    background: rgba(26, 22, 20, 0.05);
    transform: scale(1.1);
}

/* ============================================
   6. MOBILE HEADER
   ============================================ */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    z-index: 200;
    border-bottom: 1px solid var(--color-border);
}

.mobile-header .sidebar-logo {
    font-size: 0.9rem;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger-line {
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-base);
}

.nav-toggle.is-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.nav-toggle.is-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   7. MAIN CONTENT AREA
   ============================================ */

.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* ============================================
   8. PAGE SECTIONS
   ============================================ */

.page-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.page-section.is-active {
    display: flex;
}

/* ============================================
   9. HERO SECTION
   ============================================ */

#section-hero {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: var(--space-lg);
    background: var(--color-bg);
}

.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 300;
    line-height: 1.1;
    margin: 0 0 var(--space-sm) 0;
    color: var(--color-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-sm) 0;
}

.hero-description {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.7;
    max-width: 500px;
    margin: 0;
}

/* ============================================
   10. CAROUSEL (Progetti)
   ============================================ */

#section-progetti {
    overflow: hidden;
    padding: 0;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-lg);
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 40%, transparent 60%);
    z-index: 1;
}

.carousel-slide-content {
    position: relative;
    z-index: 2;
    color: #FAF8F5;
    max-width: 500px;
}

.slide-tag {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 var(--space-sm) 0;
    font-weight: 400;
    color: rgba(250, 248, 245, 0.8);
}

.slide-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    margin: 0 0 var(--space-sm) 0;
    line-height: 1.2;
    color: #FAF8F5;
}

.slide-description {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
    max-width: 450px;
    margin: 0 0 var(--space-md) 0;
    color: rgba(250, 248, 245, 0.85);
}

.slide-play-btn,
.slide-read-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 1.5px solid rgba(250, 248, 245, 0.6);
    background: transparent;
    color: #FAF8F5;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-weight: 400;
}

.slide-play-btn:hover,
.slide-read-btn:hover,
.slide-detail-btn:hover {
    background: rgba(250, 248, 245, 0.15);
    border-color: #FAF8F5;
}

.slide-detail-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 1.5px solid rgba(250, 248, 245, 0.6);
    background: transparent;
    color: #FAF8F5;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Carousel Navigation */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #FAF8F5;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 10;
    opacity: 0.6;
    transition: opacity var(--transition-base);
    font-size: 2rem;
}

.carousel-arrow:hover {
    opacity: 1;
}

.carousel-arrow--prev {
    left: var(--space-md);
}

.carousel-arrow--next {
    right: var(--space-md);
}

.carousel-dots {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    z-index: 10;
    display: flex;
    gap: var(--space-xs);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FAF8F5;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: all var(--transition-base);
    padding: 0;
}

.carousel-dot.is-active {
    width: 24px;
    border-radius: 4px;
    opacity: 1;
}

/* ============================================
   11. PORTFOLIO CAROUSEL SECTION
   ============================================ */

#section-portfolio {
    overflow: hidden;
    padding: 0;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 300;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

/* View All slide (last carousel page) */
.carousel-slide--view-all {
    background: var(--color-bg);
    justify-content: center;
    align-items: center;
}

.view-all-slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    max-width: calc(100% - 10rem);
}

/* Move arrows to bottom corners on view-all slide */
.carousel.is-view-all .carousel-arrow {
    top: auto;
    bottom: var(--space-md);
    transform: none;
}

.view-all-link {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1.5px solid var(--color-text);
    padding: 0.8rem 2rem;
    transition: all var(--transition-base);
    display: inline-block;
}

.view-all-link:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.view-all-category-name {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 300;
    color: var(--color-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

/* Dark arrows/dots when view-all slide is shown */
.carousel.is-view-all .carousel-arrow {
    color: var(--color-text);
}

.carousel.is-view-all .carousel-dot {
    background: var(--color-text);
}

/* ============================================
   11b. ALL PROJECTS GRID SECTION
   ============================================ */

#section-all-projects {
    overflow-y: auto;
    flex-direction: column;
    padding: var(--space-md);
    background: var(--color-bg);
}

.all-projects-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.all-projects-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.project-box {
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--color-bg-elevated);
}

.project-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.project-box-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: var(--color-border);
    position: relative;
}

.project-box-action {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #FAF8F5;
    background: rgba(0, 0, 0, 0.5);
    color: #FAF8F5;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    opacity: 0.85;
}

.project-box-action:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.project-box-info {
    padding: var(--space-sm);
}

.project-box-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text);
    margin: 0 0 0.3rem 0;
    line-height: 1.3;
}

.project-box-meta {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0;
}

.project-box-desc {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.4;
    color: var(--color-text-muted);
    margin: 0.3rem 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   11a2. SECTION LANDING PAGES (Journalism / NGO Work)
   ============================================ */

#section-journalism-landing,
#section-ngo-landing {
    overflow: hidden;
    padding: 0;
}

.section-landing {
    display: flex;
    width: 100%;
    height: 100%;
}

.landing-column {
    flex: 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: flex var(--transition-slow);
}

.landing-column:hover {
    flex: 1.3;
}

.landing-column-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-slow);
}

.landing-column:hover .landing-column-bg {
    transform: scale(1.05);
}

.landing-column-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 22, 20, 0.85) 0%, rgba(26, 22, 20, 0.4) 50%, rgba(26, 22, 20, 0.2) 100%);
    transition: background var(--transition-base);
}

.landing-column:hover .landing-column-overlay {
    background: linear-gradient(to top, rgba(26, 22, 20, 0.9) 0%, rgba(26, 22, 20, 0.3) 50%, rgba(26, 22, 20, 0.1) 100%);
}

.landing-column-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    z-index: 2;
    color: #FAF8F5;
}

.landing-column-category {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 var(--space-xs) 0;
    color: #FAF8F5;
}

.landing-column-count {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(250, 248, 245, 0.6);
    margin: 0 0 var(--space-sm) 0;
}

.landing-column-featured {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(250, 248, 245, 0.75);
    margin: 0;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-base);
}

.landing-column:hover .landing-column-featured {
    opacity: 1;
    transform: translateY(0);
}

/* Separator line between columns */
.landing-column + .landing-column {
    border-left: 1px solid rgba(250, 248, 245, 0.15);
}

/* ============================================
   11b2. CATEGORY PAGE (grid with subsections)
   ============================================ */

#section-category-page {
    overflow-y: auto;
    flex-direction: column;
    background: var(--color-bg);
}

.category-page-wrapper {
    padding: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.section-intro {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    max-width: 700px;
    line-height: 1.6;
}

.subsection-title {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    color: #3D3731;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 60px 0 30px 0;
    padding-bottom: 10px;
    position: relative;
}

.category-page-wrapper .subsection-title:first-child {
    margin-top: 0;
}

.subsection-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 2px;
    background: #1A1614;
}

/* ============================================
   11c. PROJECT DETAIL SECTION
   ============================================ */

#section-project-detail {
    overflow-y: auto;
    flex-direction: column;
    padding: var(--space-md);
    background: var(--color-bg);
}

.project-detail-wrapper {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.project-detail-back {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.3rem 0;
    margin-bottom: var(--space-md);
    transition: color var(--transition-base);
    display: inline-block;
}

.project-detail-back:hover {
    color: var(--color-text);
}

.project-detail-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 300;
    margin: 0 0 var(--space-sm) 0;
    color: var(--color-text);
    line-height: 1.2;
}

.project-detail-meta {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-md) 0;
}

.project-detail-video {
    margin-bottom: var(--space-md);
}

.project-detail-video-wrapper {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.project-detail-video-wrapper iframe,
.project-detail-video-wrapper video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.project-detail-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.project-detail-text p {
    margin: 0 0 1em 0;
}

.project-detail-text p:last-child {
    margin-bottom: 0;
}

.project-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--space-md);
}

.project-detail-tag {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
}

.project-detail-tag strong {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.project-detail-attachments {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-sm);
    margin-top: var(--space-md);
}

.project-detail-attachments h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 300;
    margin: 0 0 var(--space-sm) 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
}

.project-detail-attachments ul {
    list-style: none;
    padding: 0;
}

.project-detail-attachments li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-border);
}

.project-detail-attachments a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-base);
}

.project-detail-attachments a:hover {
    color: var(--color-text);
}

/* ============================================
   12. CONSULENZE SECTION
   ============================================ */

#section-consulenze {
    overflow-y: auto;
    flex-direction: column;
    padding: var(--space-md);
    background: var(--color-bg);
}

.consulting-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.consulting-intro {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 0 var(--space-md) 0;
}

.consulting-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: var(--space-md);
}

.consulting-card {
    padding: var(--space-md);
    background: transparent;
    border-left: 2px solid var(--color-text);
    transition: all var(--transition-base);
}

.consulting-card:hover {
    border-left-width: 3px;
    transform: translateX(8px);
}

.consulting-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 300;
    margin: 0 0 var(--space-xs) 0;
    color: var(--color-text);
}

.consulting-description {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

.consulting-cta-box {
    text-align: center;
    padding: var(--space-md);
    border: 2px solid var(--color-text);
}

.consulting-cta-text {
    font-size: 0.95rem;
    font-weight: 300;
    margin: 0 0 var(--space-sm) 0;
}

.consulting-cta-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: transparent;
    border: 1.5px solid var(--color-text);
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 400;
}

.consulting-cta-btn:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

/* ============================================
   13. CONTATTI SECTION
   ============================================ */

#section-contatti {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-bg);
}

.contact-email {
    font-family: var(--font-body);
    font-size: 1.3rem;
    color: var(--color-text);
    text-decoration: none;
    margin: 1.5rem 0;
    transition: color var(--transition-base);
    display: block;
}

.contact-email:hover {
    color: var(--color-hover-dark);
}

.contact-tagline {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.contact-social {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-md);
}

.contact-social-icon {
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--color-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition-base);
}

.contact-social-icon:hover {
    background: rgba(26, 22, 20, 0.05);
    transform: scale(1.1);
}

.contact-social-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ============================================
   14. VIDEO MODAL
   ============================================ */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.video-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.video-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 90vw;
    max-width: 1000px;
    z-index: 1;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.video-modal.is-active .modal-content {
    transform: scale(1);
}

.video-modal .modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #FAF8F5;
    font-size: 2rem;
    cursor: pointer;
    transition: color var(--transition-fast);
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal .modal-close:hover {
    color: var(--color-border);
}

.modal-video-wrapper {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.modal-video-wrapper iframe,
.modal-video-wrapper video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   15. RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        z-index: 1000;
    }

    .sidebar.is-active {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    #wrapper {
        flex-direction: column;
    }

    .main-content {
        width: 100%;
        height: calc(100% - 60px);
        margin-top: 60px;
    }

    #section-hero {
        padding: var(--space-md);
    }

    .hero-name {
        font-size: 2rem;
    }

    .carousel-slide {
        padding: var(--space-md);
    }

    .carousel-arrow {
        padding: var(--space-xs);
        font-size: 1.5rem;
    }

    .carousel-arrow--prev {
        left: var(--space-xs);
    }

    .carousel-arrow--next {
        right: var(--space-xs);
    }

    .view-all-slide-content {
        max-width: calc(100% - 4rem);
    }

    .view-all-category-name {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
    }

    .view-all-link {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }

    .slide-title {
        font-size: 1.8rem;
    }

    .all-projects-grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-sm);
    }

    /* Landing pages: stack columns vertically on mobile with horizontal scroll */
    .section-landing {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
    }

    .landing-column {
        min-width: 85vw;
        scroll-snap-align: start;
        flex: none;
    }

    .landing-column:hover {
        flex: none;
    }

    .landing-column-content {
        padding: var(--space-md);
    }

    .landing-column-featured {
        opacity: 1;
        transform: none;
    }

    /* Category page responsive */
    .category-page-wrapper {
        padding: var(--space-md);
    }

    .subsection-title {
        margin: 40px 0 20px 0;
        font-size: 15px;
    }

    .project-detail-wrapper {
        padding: 0 var(--space-sm);
    }

    .slide-detail-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .language-selector {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .language-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }

    .consulting-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --sidebar-width: 240px;
    }

    .sidebar {
        width: var(--sidebar-width);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---- SKIP LINK (accessibility) ---- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #1A1614;
    color: #FAF8F5;
    padding: 0.5rem 1rem;
    z-index: 9999;
    font-family: inherit;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
}
.skip-link:focus {
    top: 0;
}
