/**
 * BASE CSS - Portfolio Architetto Artista
 * REVISED: Migliore contrasto e leggibilità
 */

/* ============================================
   CSS RESET & BOX MODEL
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a1a;
    background-color: #FAFAFA;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 500;
    line-height: 1.2;
    color: #1a1a1a;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p {
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    color: #333333;
    max-width: 65ch;
}

.mono, code, .stat-number {
    font-family: 'Courier Prime', monospace;
}

small, .text-small {
    font-size: 0.8125rem;
    color: #555555;
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #B8860B;
}

/* ============================================
   IMAGES
   ============================================ */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #1a1a1a;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
}

.skip-link:focus { top: 0; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: rgba(250, 250, 250, 0.98);
    border-bottom: 1px solid #e5e5e5;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem clamp(1.5rem, 5vw, 4rem);
    max-width: 1400px;
    margin: 0 auto;
}

.site-logo { 
    display: flex; 
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-img:hover {
    opacity: 0.8;
}

.initials {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: #1a1a1a;
}

.site-logo:hover .initials { color: #B8860B; }

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9375rem;
    color: #444;
    position: relative;
    padding: 0.25rem 0;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #B8860B;
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active { 
    color: #1a1a1a;
    transform: translateY(-2px);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-line {
    width: 24px;
    height: 2px;
    background: #1a1a1a;
    transition: transform 0.3s ease;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    padding-top: 70px;
    min-height: 100vh;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    padding: 4rem clamp(1.5rem, 5vw, 4rem) 2rem;
    background: #1a1a1a;
    color: #fff;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #333;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #fff;
    margin: 0;
}

.footer-tagline {
    font-size: 0.875rem;
    color: #888;
    margin: 0;
    line-height: 1.6;
}

.footer-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.5rem 0;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav a {
    color: #aaa;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #B8860B;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaa;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-link:hover {
    color: #B8860B;
}

.footer-contact-link svg {
    flex-shrink: 0;
}

.footer-address {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #aaa;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.footer-address svg {
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link { 
    color: #888;
    transition: all 0.3s ease;
}

.social-link:hover { 
    color: #B8860B;
    transform: translateY(-2px);
}

.social-link svg { 
    display: block;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.8125rem;
    color: #666;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    font-size: 0.8125rem;
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #B8860B;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}


/* ============================================
   BUTTONS
   ============================================ */

.button, button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #1a1a1a;
    color: #fff;
}

.button-primary:hover {
    background: #B8860B;
    color: #fff;
}

.button-outline {
    padding: 0.875rem 1.75rem;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
}

.button-outline:hover {
    background: #1a1a1a;
    color: #fff;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #1a1a1a;
    background: #fff;
    border: 2px solid #ddd;
    outline: none;
    transition: border-color 0.3s;
}

.form-input::placeholder { color: #888; }
.form-input:focus { border-color: #1a1a1a; }
.form-input.has-error { border-color: #c00; }

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-error {
    display: block;
    font-size: 0.8125rem;
    color: #c00;
    margin-top: 0.5rem;
}

.submit-button {
    font-weight: 600;
    color: #fff;
    background: #1a1a1a;
    padding: 1rem 2.5rem;
    position: relative;
}

.submit-button:hover { background: #B8860B; }

.contact-success {
    text-align: center;
    padding: 3rem;
    background: #f0f9f0;
    border: 2px solid #28a745;
}

.success-icon {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 1rem;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 5rem 0;
}

.section-dark {
    background: #1a1a1a;
    color: #fff;
}

.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #ccc; }

.section-light { background: #fff; }
.section-alt { background: #f5f5f0; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title { margin-bottom: 1rem; }

.section-subtitle {
    font-size: 1.125rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        height: calc(100vh - 70px);
        background: rgba(250, 250, 250, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 1999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .nav-links.active { display: flex; }
    .nav-link { font-size: 1.25rem; }
    .mobile-menu-toggle { display: flex; }
    
    /* Logo responsive */
    .logo-img {
        height: 35px;
        max-width: 150px;
    }
    
    .section { padding: 3rem 0; }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center { text-align: center; }
.text-gold { color: #B8860B; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden-philosophy {
    display: none;
}
/**
 * MINIMALISTA CSS - Componenti Homepage e Pagine
 */

/* ============================================
   HOMEPAGE - HERO
   ============================================ */

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 4rem 2rem;
    position: relative;
    background: #ffffff;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    width: 100%;
}

.hero-content {
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-name {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.2;
}

.hero-tagline {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #555555;
    font-weight: 400;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Hero Images Stack */
.hero-images {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 550px;
}

.hero-image-stack {
    position: relative;
    width: 450px;
    height: 480px;
}

.hero-image {
    position: absolute;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.8s ease, box-shadow 0.8s ease;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.8s ease;
}

.hero-image:hover img {
    filter: grayscale(0%);
}

.hero-image:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

/* Immagine 1 - GRANDE: sotto tutte, a sinistra */
.hero-image-1 {
    width: 280px;
    height: 350px;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Immagine 2 - MEDIA: al centro, sulla destra */
.hero-image-2 {
    width: 220px;
    height: 280px;
    top: 40px;
    right: 0;
    z-index: 2;
}

/* Immagine 3 - PICCOLA: sopra tutte, in basso a sinistra */
.hero-image-3 {
    width: 180px;
    height: 220px;
    bottom: 0;
    left: 60px;
    z-index: 3;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

/* Responsive Hero */
@media (max-width: 1000px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        text-align: center;
        order: 1;
    }

    .hero-tagline {
        margin: 0 auto 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-images {
        order: 2;
        min-height: 420px;
    }

    .hero-image-stack {
        width: 380px;
        height: 400px;
    }

    .hero-image-1 {
        width: 220px;
        height: 280px;
    }

    .hero-image-2 {
        width: 180px;
        height: 220px;
    }

    .hero-image-3 {
        width: 140px;
        height: 170px;
        left: 50px;
    }
}

@media (max-width: 600px) {
    .hero-section {
        padding: 2rem 1.5rem;
    }

    .hero-image-stack {
        width: 300px;
        height: 320px;
    }

    .hero-image-1 {
        width: 180px;
        height: 220px;
    }

    .hero-image-2 {
        width: 140px;
        height: 170px;
        top: 30px;
    }

    .hero-image-3 {
        width: 110px;
        height: 130px;
        left: 40px;
    }
}




/* ============================================
   INTRO SECTION
   ============================================ */

.intro-section {
    padding: 6rem 0;
    background: #ffffff;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.intro-image {
    position: relative;
    overflow: hidden;
}

.intro-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.6s ease;
}

.intro-image:hover img {
    filter: grayscale(0%);
}

.intro-image::after {
    content: '';
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: -2rem;
    bottom: -2rem;
    border: 3px solid #B8860B;
    z-index: -1;
    transition: all 0.6s ease;
}

.intro-image:hover::after {
    border-color: #DAA520;
}

.intro-content h2 {
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.intro-content p {
    margin-bottom: 1.5rem;
    color: #444;
}

.intro-signature {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: #B8860B;
    margin-top: 2rem;
}

/* ============================================
   SERVICES / COMPETENZE
   ============================================ */

.services-section {
    padding: 4rem 0;
    background: #f5f5f0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.service-card {
    background: #ffffff;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 3px solid #e8e8e8;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-top-color: #B8860B;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    color: #B8860B;
    font-weight: 300;
    line-height: 1;
}

.service-card h3 {
    font-size: 1.125rem;
    margin: 0;
    color: #1a1a1a;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.service-card p {
    display: none;
}

/* ============================================
   FEATURED PROJECTS
   ============================================ */

.projects-section {
    padding: 6rem 0;
    background: #ffffff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}

.project-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: grayscale(1);
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
    opacity: 0.9;
    filter: grayscale(0);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.project-card:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

.project-category {
    font-size: 0.75rem;
    color: #B8860B;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.project-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.project-year {
    font-family: 'Courier Prime', monospace;
    font-size: 0.875rem;
    color: #aaa;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-link:hover {
    color: #B8860B;
}

/* ============================================
   ARTISTIC SECTION - OPERE ARTISTICHE
   ============================================ */

.artistic-section {
    padding: 6rem 0;
    background: #f5f5f0;
}

.artistic-header-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
    align-items: start;
}

.artistic-header-wrapper .section-header {
    text-align: left;
}

.unique-pieces-intro {
    padding: 2rem;
    background: #fff;
    border-left: 4px solid #B8860B;
    text-align: left;
}

.unique-badge {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #B8860B;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.unique-pieces-intro p {
    font-size: 0.9375rem;
    color: #444;
    line-height: 1.8;
    margin: 0;
}

.unique-pieces-intro strong {
    color: #1a1a1a;
}

.artistic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.artistic-card {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}

.artistic-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
}

.artistic-card:hover img {
    transform: scale(1.05);
    opacity: 0.8;
    filter: grayscale(0%) !important;
}

.artistic-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.95));
    color: #1a1a1a;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.artistic-card:hover .artistic-info {
    transform: translateY(0);
    opacity: 1;
}

.artistic-category {
    display: inline-block;
    font-size: 0.75rem;
    color: #B8860B;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.artistic-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.artistic-description {
    font-size: 0.875rem;
    color: #ccc;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.artistic-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.artistic-card:hover .artistic-link {
    color: #B8860B;
}

@media (max-width: 768px) {
    .artistic-grid {
        grid-template-columns: 1fr;
    }

    .artistic-card img {
        height: 300px;
    }

    .artistic-header-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .artistic-header-wrapper .section-header {
        text-align: center;
    }

    .unique-pieces-intro {
        padding: 1.5rem;
    }
}

/* ============================================
   ARTISTIC GALLERY PAGE
   ============================================ */

/* .artistic-header removed to use default clean style */

.unique-intro-section {
    padding: 3rem 0;
    background: #fff;
}

/* Gallery Grid */
.artistic-gallery-section {
    padding: 3rem 0 6rem;
    background: #f5f5f5;
}

.artistic-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.artistic-gallery-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.artistic-gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.artistic-gallery-figure {
    position: relative;
    overflow: hidden;
}

.artistic-gallery-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.artistic-gallery-card:hover .artistic-gallery-image {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.unique-piece-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #B8860B;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.artistic-gallery-caption {
    padding: 1.5rem;
}

.artistic-gallery-category {
    font-size: 0.75rem;
    color: #B8860B;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.artistic-gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.artistic-gallery-desc {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.artistic-gallery-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #888;
}

.artistic-materials {
    border-left: 1px solid #ddd;
    padding-left: 1rem;
}

/* DETAIL PAGE */
.detail-nav {
    padding: 1.5rem 0;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.artistic-detail-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
}

.artistic-detail-figure {
    height: 100%;
}

.artistic-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artistic-detail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
}

.artistic-detail-category {
    font-size: 0.75rem;
    color: #B8860B;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.artistic-detail-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
}

.artistic-detail-year {
    font-family: 'Courier Prime', monospace;
    color: #aaa;
}

.artistic-detail-content {
    padding: 4rem 0;
    background: #fff;
}

.artistic-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.unique-piece-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f5f5f0;
    border-left: 4px solid #B8860B;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #555;
}

.unique-icon {
    color: #B8860B;
    font-size: 1.25rem;
}

.artistic-desc-main {
    font-size: 1.125rem;
    color: #333;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.artistic-desc-full {
    color: #555;
    line-height: 1.8;
}

.artistic-specs {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fafafa;
    border: 1px solid #eee;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 500;
    color: #666;
}

.spec-value {
    color: #1a1a1a;
}

.artistic-availability {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.availability-badge {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.availability-badge.available {
    background: #e8f5e9;
    color: #2e7d32;
}

.availability-badge.sold {
    background: #ffebee;
    color: #c62828;
}

.price-info {
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
}

.artistic-cta {
    margin-top: 2rem;
}

.artistic-gallery h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.artistic-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gallery-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-thumb img:hover {
    opacity: 0.8;
}

/* Related Section */
.related-section {
    padding: 4rem 0;
    background: #f5f5f5;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.related-card {
    background: #fff;
    overflow: hidden;
}

.related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.related-card:hover img {
    filter: grayscale(0%);
}

.related-info {
    padding: 1rem;
}

.related-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.related-info span {
    font-size: 0.8125rem;
    color: #888;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem;
}

.pagination-link {
    font-weight: 500;
    color: #1a1a1a;
    padding: 0.5rem 1rem;
    border: 2px solid #1a1a1a;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background: #1a1a1a;
    color: #fff;
}

.pagination-info {
    font-size: 0.875rem;
    color: #666;
}

@media (max-width: 900px) {
    .artistic-detail-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .artistic-gallery-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   STATS / ACHIEVEMENTS
   ============================================ */

.stats-section {
    padding: 5rem 2rem;
    background: #1a1a1a;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.stat-card {
    padding: 1rem;
}

.stat-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 500;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.stat-suffix {
    font-size: 0.5em;
    color: #B8860B;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* ============================================
   PHILOSOPHY / APPROACH
   ============================================ */

.philosophy-section {
    padding: 6rem 0;
    background: #fff;
}

.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.philosophy-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-style: italic;
    color: #1a1a1a;
    line-height: 1.6;
    margin-bottom: 2rem;
    position: relative;
}

.philosophy-quote::before {
    content: '"';
    font-size: 4rem;
    color: #B8860B;
    position: absolute;
    top: -1.5rem;
    left: -1rem;
    opacity: 0.3;
}

.philosophy-author {
    font-size: 1rem;
    color: #666;
}

/* ============================================
   PROCESS SECTION (Come Lavoro)
   ============================================ */

.process-section {
    padding: 6rem 2rem;
    background: #fff;
}

.process-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.process-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #fafafa;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.process-card:hover {
    border-color: #B8860B;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.process-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #B8860B;
    margin-bottom: 1rem;
    line-height: 1;
}

.process-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.process-card p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .process-steps {
        grid-template-columns: 1fr;
    }

    .process-card {
        padding: 1.5rem;
    }
}

/* ============================================
   CONTACT CTA SECTION
   ============================================ */

.contact-cta-section {
    padding: 0;
    background: #1a1a1a;
}

.cta-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

@media (max-width: 900px) {
    .cta-container {
        grid-template-columns: 1fr;
    }
}

.cta-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cta-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #B8860B;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: #fff;
    margin-bottom: 1rem;
}

.cta-content>p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 400px;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.cta-button-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: #B8860B;
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.cta-button-primary:hover {
    background: #d4a50d;
    transform: translateY(-2px);
}

.cta-button-secondary {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.cta-button-secondary:hover {
    color: #B8860B;
}

.cta-visual {
    background: linear-gradient(135deg, #B8860B 0%, #8a6508 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.cta-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-style: italic;
    color: #fff;
    line-height: 1.6;
    max-width: 350px;
    position: relative;
}

.cta-quote span {
    font-size: 4rem;
    position: absolute;
    top: -1.5rem;
    left: -1rem;
    opacity: 0.3;
    font-style: normal;
}

/* ============================================
   LEGACY CTA (for other pages)
   ============================================ */

.cta-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #B8860B 0%, #9a7209 100%);
    text-align: center;
    color: #fff;
}

.cta-section h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: #fff;
    color: #1a1a1a;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #1a1a1a;
    color: #fff;
}

/* ============================================
   GALLERY PAGE
   ============================================ */

.page-header {
    padding: 6rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #1a1a1a;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin: 0;
    color: #1a1a1a;
}

.page-subtitle {
    font-size: 1rem;
    color: #666;
    margin-top: 1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.filter-nav {
    padding: 2rem;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    justify-content: center;
}

.filter-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.filter-link:hover,
.filter-link.active {
    color: #1a1a1a;
    border-color: #1a1a1a;
}

.gallery-section {
    padding: 3rem 2rem;
    background: #f5f5f5;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.gallery-link {
    display: block;
}

.gallery-figure {
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    transition: transform 0.5s ease;
    background: #f5f5f5;
}

.gallery-link:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 1.5rem;
    background: #fff;
}

.gallery-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.gallery-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fff;
    background: #B8860B;
    padding: 0.25rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gallery-year {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.875rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.5rem;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #666;
}

.gallery-hero {
    margin-bottom: 2rem;
}

.gallery-hero-figure {
    position: relative;
    overflow: hidden;
}

.gallery-hero-image {
    width: 100%;
    height: 60vh;
    object-fit: contain;
    background: #f5f5f5;
}

.gallery-hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
}

.hero-opera-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: #fff;
}

.hero-opera-year {
    font-family: 'Courier Prime', monospace;
    color: #B8860B;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: #555;
    font-weight: 500;
}

.back-link:hover {
    color: #1a1a1a;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .intro-image::after {
        display: none;
    }

    .intro-image img {
        height: 350px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card img {
        height: 300px;
    }

    .project-info {
        transform: translateY(0);
        opacity: 1;
    }

    .cta-container {
        grid-template-columns: 1fr;
    }

    .cta-content {
        padding: 3rem 2rem;
    }

    .cta-visual {
        padding: 3rem 2rem;
        min-height: 250px;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 3rem;
    background: #fff;
    min-height: calc(100vh - 80px);
    align-items: center;
}

.contact-form-section {
    background: transparent;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    color: #1a1a1a;
    background: #fafafa;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 300;
}

.form-input::placeholder {
    color: #aaa;
    font-weight: 300;
}

.form-input:hover {
    background: #f5f5f5;
    border-color: #e8e8e8;
}

.form-input:focus {
    outline: none;
    background: #fff;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.05);
}

.form-input.has-error {
    border-color: #c00;
    background: #fff5f5;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.char-counter {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 0.75rem;
    color: #999;
    font-weight: 300;
    pointer-events: none;
}

.form-error {
    display: block;
    font-size: 0.8125rem;
    color: #c00;
    margin-top: 0.5rem;
    font-weight: 400;
}

.submit-button {
    align-self: flex-start;
    padding: 1.125rem 3.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: #1a1a1a;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.15);
}

.submit-button:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.25);
}

.submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.2);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.contact-intro {
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e8e8e8;
}

.contact-intro p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #555;
    font-weight: 300;
    max-width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.info-value {
    font-size: 1.125rem;
    color: #1a1a1a;
    font-weight: 300;
    line-height: 1.6;
}

.info-address {
    font-style: normal;
}

.info-link {
    color: #1a1a1a;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    width: fit-content;
}

.info-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #1a1a1a;
    transition: width 0.3s ease;
}

.info-link:hover::after {
    width: 100%;
}

.contact-social {
    padding-top: 2rem;
    border-top: 1px solid #e8e8e8;
}

.social-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    display: block;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    font-size: 1rem;
    color: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 300;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    position: relative;
    opacity: 0.8;
}

.social-link:hover {
    opacity: 1;
    color: #B8860B;
}

.social-link svg {
    flex-shrink: 0;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #B8860B;
    transition: width 0.3s ease;
}

.social-link:hover::after {
    width: 100%;
}

@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 4rem;
        padding: 3rem 1.5rem;
        min-height: auto;
    }

    .contact-info-section {
        order: -1;
    }
}

/* ============================================
   ABOUT PAGE (La Visione)
   ============================================ */

.page-about .page-header {
    padding: 4rem 2rem 2rem;
    background: #fff;
}

.about-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

.about-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    position: sticky;
    top: 100px;
}

.profile-figure {
    margin: 0;
}

.profile-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.about-text {
    padding-top: 1rem;
}

.about-header {
    margin-bottom: 2rem;
}

.architect-name {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.architect-title {
    font-size: 1rem;
    color: #B8860B;
    font-weight: 500;
}

.bio-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.bio-content p {
    margin-bottom: 1.5rem;
}

.cv-download {
    margin-top: 2rem;
}

.cv-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    transition: all 0.3s ease;
}

.cv-link:hover {
    background: #1a1a1a;
    color: #fff;
}

.page-about .philosophy-section {
    background: #f8f8f8;
    margin-top: 4rem;
    padding: 4rem 2rem;
}

.philosophy-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.philosophy-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    max-width: 700px;
}

.quote-section {
    padding: 4rem 2rem;
    background: #fff;
    text-align: center;
}

.architect-quote {
    max-width: 700px;
    margin: 0 auto;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-style: italic;
    color: #1a1a1a;
    line-height: 1.6;
}

.architect-quote cite {
    display: block;
    font-size: 0.9375rem;
    font-style: normal;
    color: #B8860B;
    margin-top: 1.5rem;
}

.timeline-section {
    padding: 4rem 2rem;
    background: #fff;
    max-width: 700px;
    margin: 0 auto;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2rem;
    text-align: center;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-year {
    margin-bottom: 2rem;
    position: relative;
}

.year-marker {
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: #B8860B;
    margin-bottom: 0.5rem;
}

.year-marker::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 8px;
    height: 8px;
    background: #B8860B;
    border-radius: 50%;
    transform: translateX(-3px);
}

.year-opere {
    list-style: none;
    padding: 0;
    margin: 0;
}

.year-opere li {
    margin-bottom: 0.5rem;
}

.timeline-link {
    font-size: 0.9375rem;
    color: #444;
    transition: color 0.3s ease;
}

.timeline-link:hover {
    color: #B8860B;
}

/* About Stats */
.about-stats {
    padding: 4rem 2rem;
    background: #1a1a1a;
}

.about-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.about-stats .stat-item {
    padding: 1rem;
}

.about-stats .stat-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
}

.about-stats .stat-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 900px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        position: static;
        max-width: 300px;
    }

    .profile-image {
        aspect-ratio: 1/1;
    }

    .about-stats .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .about-stats .stat-number {
        font-size: 2rem;
    }
}

/* ============================================
   OPERA DETAIL PAGE
   ============================================ */

.page-opera-detail {
    background: #fff;
}

.detail-nav {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #1a1a1a;
}

.back-arrow {
    font-size: 1.25rem;
}

.opera-detail {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

.opera-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: start;
}

.opera-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-figure {
    margin: 0;
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-carousel {
    position: relative;
    margin-top: 0;
    background: #f5f5f5;
    height: 80vh;
    overflow: hidden;
}

.carousel-figure {
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
    will-change: opacity;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-figure.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.carousel-image {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    will-change: transform;
}

.carousel-nav {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    z-index: 10;
}

.carousel-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.carousel-counter {
    color: #fff;
    font-size: 0.875rem;
    min-width: 3rem;
    text-align: center;
}

/* Pulsanti carousel moderni */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    opacity: 0;
    backdrop-filter: blur(10px);
}

.gallery-carousel:hover .carousel-prev,
.gallery-carousel:hover .carousel-next {
    opacity: 1;
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev:active,
.carousel-next:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev svg,
.carousel-next svg {
    display: block;
}

/* Counter modernizzato */
.carousel-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    z-index: 10;
    backdrop-filter: blur(10px);
    font-variant-numeric: tabular-nums;
}

.opera-info {
    position: sticky;
    top: 100px;
}

.opera-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.opera-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.opera-subtitle {
    font-size: 1.125rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.opera-year {
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.875rem;
    color: #B8860B;
    font-weight: 700;
}

.opera-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 2rem;
}

.opera-description p {
    margin-bottom: 1rem;
}

.full-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.opera-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f8f8;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.9375rem;
    color: #1a1a1a;
    text-align: right;
}

.detail-mono {
    font-family: 'Courier Prime', monospace;
}

.category-link {
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #B8860B;
}

.opera-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.external-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.external-link:hover {
    border-color: #B8860B;
    color: #B8860B;
}

.link-arrow {
    font-size: 1.125rem;
}

/* Related Projects */
.related-section {
    padding: 4rem 2rem;
    background: #f8f8f8;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.related-item {
    display: block;
}

.related-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f5f5f5;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
}

.related-item:hover .related-image {
    opacity: 0.8;
}

.related-item-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
}

/* Opera Navigation Prev/Next */
.opera-navigation {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-prev,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #555;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #B8860B;
}

.nav-arrow {
    font-size: 1.25rem;
}

.nav-title {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-name {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-top: 0.75rem;
}

.related-link {
    display: block;
}

.related-link:hover .related-name {
    color: #B8860B;
}

@media (max-width: 1000px) {
    .opera-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .opera-info {
        position: static;
    }

    .gallery-carousel {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-carousel {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-image {
        height: 60vh;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .detail-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .detail-value {
        text-align: left;
    }

    .opera-navigation {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .nav-next {
        text-align: left;
    }

    .nav-title {
        max-width: 100%;
    }
}

/* ============================================
   PRIVACY PAGE
   ============================================ */

.privacy-page {
    min-height: 100vh;
    background: #fafafa;
    padding: 4rem 0;
}

.privacy-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.privacy-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8e8e8;
}

.privacy-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.privacy-intro {
    font-size: 1.125rem;
    color: #666;
    font-weight: 300;
}

.privacy-section {
    background: #fff;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-left: 3px solid #B8860B;
}

.privacy-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.privacy-section h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 2rem 0 1rem;
}

.privacy-section h4 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 1.5rem 0 0.75rem;
}

.privacy-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 1rem;
}

.privacy-section ul {
    margin: 1rem 0 1rem 1.5rem;
}

.privacy-section li {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 0.5rem;
}

.privacy-section a {
    color: #B8860B;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.privacy-section a:hover {
    color: #1a1a1a;
}

.cookie-type {
    background: #fafafa;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 2px solid #e8e8e8;
}

.btn-reset-cookies {
    padding: 0.875rem 2rem;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-reset-cookies:hover {
    background: #B8860B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
}

.privacy-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e8e8e8;
}

.back-to-home {
    display: inline-block;
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-home:hover {
    color: #B8860B;
}

/* =========================================
   ANIMATIONS.CSS - Micro-interazioni e animazioni
   Architetto Artista Portfolio
   ========================================= */

/* ---------------
   Keyframes
   --------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) translateZ(0);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateZ(0);
    }

    to {
        opacity: 1;
        transform: scale(1) translateZ(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes underlineExpand {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* ---------------
   Page Transitions
   --------------- */
.page-transition {
    animation: fadeIn 0.4s ease-out;
}

body {
    animation: fadeIn 0.3s ease-out;
}

/* ---------------
   Hero Animations
   --------------- */
.hero-title {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.hero-tagline {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.hero-cta {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
}

.scroll-indicator {
    animation: bounce 2s infinite;
    animation-delay: 1.5s;
}

/* ---------------
   Scroll Reveal
   --------------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* ---------------
   Link Hover Effects
   --------------- */
a.animated-underline {
    position: relative;
    text-decoration: none;
}

a.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

a.animated-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ---------------
   Button Animations
   --------------- */
.button-primary,
.button-outline,
.cta-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.button-primary span,
.cta-button span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.button-primary:hover span,
.cta-button:hover span {
    transform: translateX(5px);
}

/* Ripple effect */
.button-ripple {
    position: relative;
    overflow: hidden;
}

.button-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.button-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* ---------------
   Card Hover Effects - OTTIMIZZATO GPU
   --------------- */
.project-card,
.gallery-item {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.project-card:hover,
.gallery-item:hover {
    transform: translateY(-8px) translateZ(0);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-card img,
.gallery-item img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.project-card:hover img,
.gallery-item:hover img {
    transform: scale(1.05) translateZ(0);
}

.project-info,
.gallery-item-info {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card:hover .project-link,
.gallery-item:hover .gallery-item-link {
    opacity: 1;
    transform: translateX(5px);
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card:hover .service-icon {
    transform: scale(1.15);
}

.service-icon {
    transition: transform 0.3s ease;
}

/* ---------------
   Stats Counter Animation
   --------------- */
.stat-number {
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

/* ---------------
   Image Lazy Load
   --------------- */
img.lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg,
            var(--gray-light) 25%,
            #e8e8e8 50%,
            var(--gray-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ---------------
   Navigation Animations
   --------------- */
header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background: rgba(250, 250, 250, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

nav a {
    transition: color 0.3s ease;
}

/* Mobile menu animation */
.nav-mobile {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
}

.nav-mobile.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* ---------------
   Gallery Filter Animations
   --------------- */
.filter-btn {
    transition: all 0.3s ease;
    position: relative;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.filter-btn.active::after,
.filter-btn:hover::after {
    width: 100%;
}

/* Gallery masonry items */
.gallery-item {
    animation: scaleIn 0.4s ease-out;
    animation-fill-mode: both;
}

.gallery-item:nth-child(1) {
    animation-delay: 0.05s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.15s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.25s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.3s;
}

/* ---------------
   Opera Detail Animations
   --------------- */
.page-opera .opera-header {
    animation: fadeInUp 0.6s ease-out;
}

.page-opera .opera-gallery img {
    transition: transform 0.5s ease, filter 0.3s ease;
    cursor: zoom-in;
}

.page-opera .opera-gallery img:hover {
    filter: brightness(1.05);
}

.page-opera .opera-info {
    animation: slideInRight 0.6s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* ---------------
   About Page Animations
   --------------- */
.page-about .about-photo {
    animation: slideInLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.page-about .about-content {
    animation: slideInRight 0.6s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.page-about .timeline-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease-out;
}

.page-about .timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---------------
   Contact Page Animations
   --------------- */
.page-contact .contact-form {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.page-contact .contact-info {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* Form field focus animations */
.form-group input,
.form-group textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

/* Form label animation */
.form-group label {
    transition: color 0.3s ease, transform 0.3s ease;
}

.form-group input:focus+label,
.form-group textarea:focus+label {
    color: var(--accent);
}

/* Submit button loading state */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------------
   Footer Animations
   --------------- */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent);
}

/* ---------------
   Lightbox Animations
   --------------- */
.lightbox {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

/* ---------------
   Toast/Notification Animations
   --------------- */
.toast {
    animation: slideInRight 0.4s ease-out, fadeOut 0.4s ease-out 3s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ---------------
   Reduced Motion
   --------------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-indicator {
        animation: none;
    }
}

/* ---------------
   Print Styles
   --------------- */
@media print {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Utility class for HTMX content swaps */
.fade-in-element {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Smooth image loading */
.gallery-image {
    transition: opacity 0.3s ease-in-out;
}

.gallery-image[src] {
    opacity: 1;
}

/* Loading indicator più fluido */
.load-more-trigger {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}/* ===========================================
   CSS FIXES & OTTIMIZZAZIONI FINALI
   Portfolio Architetto Artista
   =========================================== */

/* Fix: Previeni layout shift durante caricamento immagini */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    min-height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

/* Fix: Smooth font rendering su tutti i browser */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ottimizzazione: Will-change solo quando necessario */
.hero-image:hover,
.project-card:hover,
.gallery-item:hover {
    will-change: transform;
}

.hero-image,
.project-card,
.gallery-item {
    will-change: auto; /* Reset dopo hover */
}

/* Fix: Focus visible per accessibilità */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #B8860B;
    outline-offset: 2px;
}

/* Nascondi outline per mouse users, mantieni per keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Fix: Carosello - Previeni flash tra transizioni */
.gallery-carousel {
    background: #f5f5f5;
    position: relative;
}

.carousel-figure {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fix: Header sticky su iOS */
.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
}

/* Fix: Smooth scroll con offset per header fisso */
html {
    scroll-padding-top: 70px; /* Altezza header */
}

/* Fix: Previeni text selection accidentale su doppio tap mobile */
.hero-images,
.project-card img,
.gallery-item img {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Pero permetti selezione testo normale */
p, h1, h2, h3, h4, h5, h6, a, span {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}

/* Fix: Button tap highlight su mobile */
button, a {
    -webkit-tap-highlight-color: rgba(184, 134, 11, 0.2);
}

/* Fix: Aspect ratio container per immagini responsive */
.aspect-ratio-box {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
}

.aspect-ratio-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix: Line-height per evitare cut-off caratteri accentati */
p, span, a {
    line-height: 1.7;
}

/* Ottimizzazione: GPU layers per elementi animati */
.hero-image,
.project-card,
.carousel-figure {
    transform: translateZ(0);
}

/* Fix: Previeni blur su transform in Chrome */
* {
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
}

/* Remove solo da elementi che non ne hanno bisogno */
p, span, a, h1, h2, h3, h4, h5, h6 {
    -webkit-transform: none;
    -webkit-backface-visibility: visible;
}

/* Fix: Scrollbar styling (solo browser che lo supportano) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Fix: Form inputs su iOS hanno border-radius di default */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Fix: Previeni zoom su input focus iOS */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important; /* iOS non zoom se >= 16px */
    }
}

/* Fix: Hidden scroll-indicator su mobile small */
@media (max-height: 600px) {
    .scroll-indicator {
        display: none;
    }
}

/* Fix: Footer sempre in basso anche con poco contenuto */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1 0 auto;
}

/* Ottimizzazione: Contenimento layout per miglior performance */
.project-card,
.gallery-item,
.service-card {
    contain: layout style paint;
}

/* Fix: Previeni font flash (FOUT) */
@font-face {
    font-display: swap; /* Usa fallback font durante caricamento */
}

/* Print styles - Fix per stampa */
@media print {
    .site-header,
    .site-footer,
    .scroll-indicator {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Fix: Previeni FOUC (Flash of Unstyled Content) */
.no-js {
    .hero-cta,
    .filter-nav,
    .gallery-item {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .button-outline {
        border-width: 3px;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Dark mode support (futuro) */
@media (prefers-color-scheme: dark) {
    /* Lascia commentato per ora, implementare se necessario
    :root {
        --primary: #f0f0f0;
        --background: #1a1a1a;
        --text: #f0f0f0;
    }
    */
}

/* Fix: Safe area per notch iPhone */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Accessibility: Skip to main content link */
.skip-link:focus {
    clip: auto;
    width: auto;
    height: auto;
    top: 0;
    left: 0;
    z-index: 10000;
}

/* Performance: Contenimento per immagini large */
.main-image,
.hero-image img {
    contain: layout style paint;
    content-visibility: auto;
}

/* Fix: Prevent text from touching edges on small screens */
@media (max-width: 400px) {
    .container,
    .nav-container,
    .footer-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Fix: Opera detail gallery carousel su mobile */
@media (max-width: 600px) {
    .gallery-carousel {
        max-height: 400px;
    }
    
    .carousel-nav {
        bottom: 0.5rem;
        padding: 0.35rem 0.75rem;
    }
    
    .carousel-btn {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.875rem;
    }
}

/* Fix: Previeni overlap footer su contenuto corto */
.site-footer {
    margin-top: auto;
}

/* Ottimizzazione: Contenimento per animation-intensive sections */
.hero-section,
.projects-section,
.artistic-section {
    contain: layout style;
}

/* Fix: Garantisci leggibilità su tutti gli sfondi */
.project-info,
.artistic-info {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

/* Fix: Loading state per immagini */
img[data-src] {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #e0e0e0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Fix: Consistent button sizing */
.button-primary,
.button-outline {
    min-height: 44px; /* Touch target iOS/Android raccomandato */
    min-width: 44px;
}

/* Fix: Table responsive (se usate in futuro) */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

