:root {
    /* Color Palette */
    --clr-bg: #0a0808;
    --clr-bg-alt: #13100e;
    --clr-text: #f2efe9;
    --clr-text-muted: #a39b92;
    --clr-accent: #c48b4b;
    --clr-accent-hover: #dfa562;
    --clr-accent-dark: #7a5026;

    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-serif: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Sizes */
    --padding-section: 110px;
    --transition: 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 3D Canvas Background */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: -1;
    pointer-events: none;
}

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.section-padding { padding: var(--padding-section) 0; }

section {
    scroll-margin-top: 100px;
}

/* ─── Navigation ─────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 50px;
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    padding: 14px 50px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    background: rgba(10, 8, 8, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(196, 139, 75, 0.15);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.8vw, 18px);
    text-decoration: none;
    flex-shrink: 1;
    min-width: 0;
}

.logo-img {
    height: clamp(44px, 7vw, 64px);
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
    flex-shrink: 0;
}

.logo-text-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 2.8vw, 1.55rem);
    font-weight: 700;
    color: var(--clr-accent);
    letter-spacing: clamp(1.2px, 0.25vw, 2.5px);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-sub {
    font-size: clamp(0.6rem, 1.3vw, 0.72rem);
    text-transform: uppercase;
    letter-spacing: clamp(1.8px, 0.35vw, 2.8px);
    color: var(--clr-text-muted);
    margin-top: 3px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 38px;
}

.nav-link {
    color: var(--clr-text);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--clr-accent);
    transition: var(--transition);
}

.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: var(--clr-accent); }

.nav-btn {
    padding: 10px 24px;
    border: 1px solid var(--clr-accent);
    color: var(--clr-accent);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--clr-accent);
    color: var(--clr-bg);
}

/* Language Switcher */
.lang-switcher {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 2px;
    padding: 7px 14px;
    border: 1px solid rgba(196, 139, 75, 0.45);
    background: transparent;
    color: var(--clr-accent);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.lang-switcher:hover {
    background: var(--clr-accent);
    color: var(--clr-bg);
    border-color: var(--clr-accent);
}

.lang-switcher-mobile {
    font-size: 1rem;
    padding: 12px 30px;
    margin-top: 10px;
    border-color: rgba(196, 139, 75, 0.5);
}

@media (max-width: 768px) {
    .lang-switcher:not(.lang-switcher-mobile) {
        margin-left: auto; /* push right, just before hamburger */
        margin-right: 12px;
    }
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 300;
}

.hamburger .bar {
    width: 26px;
    height: 2px;
    background: var(--clr-text);
    transition: 0.35s ease;
    transform-origin: center;
}

.hamburger.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open .bar:nth-child(2) { opacity: 0; }
.hamburger.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: var(--clr-bg);
    z-index: 900;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding-top: env(safe-area-inset-top, 0px);
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--clr-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: color 0.3s;
}

.mobile-link:hover { color: var(--clr-accent); }

/* ─── Hero Section ───────────────────────────── */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 40px 40px;
    padding-top: calc(100px + env(safe-area-inset-top, 0px));
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    z-index: 0;
    opacity: 0.45;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(10,8,8,0.1) 0%, rgba(10,8,8,0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.subtitle {
    font-family: var(--font-body);
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.85rem;
    margin-bottom: 22px;
}

.title {
    font-family: var(--font-heading);
    font-size: 6rem;
    line-height: 1.05;
    margin-bottom: 30px;
    text-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.title span {
    font-style: italic;
    font-family: var(--font-serif);
    color: var(--clr-accent);
    font-weight: 400;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--clr-text-muted);
    max-width: 620px;
    margin: 0 auto 44px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 38px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-primary {
    background: var(--clr-accent);
    color: var(--clr-bg);
    border: 1px solid var(--clr-accent);
}

.btn-primary:hover {
    background: var(--clr-accent-hover);
    border-color: var(--clr-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(196, 139, 75, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--clr-text);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: var(--clr-accent);
    color: var(--clr-accent);
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 38px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 2px;
    height: 6px;
    background: var(--clr-accent);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll-anim 1.5s infinite;
}

@keyframes scroll-anim {
    0%  { top: 8px;  opacity: 1; }
    100%{ top: 22px; opacity: 0; }
}

/* ─── Section Typography ─────────────────────── */
.section-eyebrow {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--clr-accent);
    margin-bottom: 16px;
    display: block;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
}

.section-title span {
    color: var(--clr-accent);
    font-family: var(--font-serif);
    font-style: italic;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    max-width: 600px;
    margin: 0 auto 70px;
    line-height: 1.8;
}

/* ─── About Section ──────────────────────────── */
.about {
    background: var(--clr-bg-alt);
    position: relative;
    z-index: 10;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 90px;
    align-items: center;
}

.about-text p {
    font-size: 1.08rem;
    margin-bottom: 1.4rem;
    color: var(--clr-text-muted);
    line-height: 1.85;
}

.about-text strong { color: var(--clr-text); }

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 1rem;
    color: var(--clr-text-muted);
}

.dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    background: var(--clr-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--clr-accent);
}

/* Image Frame */
.image-frame {
    position: relative;
    padding: 20px;
}

.image-frame img {
    width: 100%;
    height: 620px;
    object-fit: cover;
    display: block;
    filter: brightness(0.85) contrast(1.05);
    transition: var(--transition);
}

/* About portrait — middle-ground frame size to show more context without breaking borders */
.about-visual .image-frame img {
    height: 480px; /* shorter container means less side cropping with cover */
    object-fit: cover;
    /* Removed transform: scale to ensure perfect alignment with the frame border */
}

.image-frame:hover img {
    filter: brightness(1) contrast(1);
}

.frame-border {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border: 1px solid var(--clr-accent-dark);
    /* Removed translate offset so it's perfectly centered */
    z-index: -1;
    transition: var(--transition);
}

.image-frame:hover .frame-border {
    border-color: var(--clr-accent); /* Simple color change on hover instead of offset */
}

/* ─── Strumenti Section ──────────────────────── */
.strumenti {
    background: var(--clr-bg);
    position: relative;
    z-index: 10;
}

.strumenti-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
}

.strumento-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.strumento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--clr-accent), transparent);
    transform: scaleX(0);
    transition: var(--transition);
    z-index: 2;
}

.strumento-card:hover { transform: translateY(-10px); }
.strumento-card:hover::before { transform: scaleX(1); }

.strumento-img-wrap {
    position: relative;
    overflow: hidden;
    height: 340px;
}

.strumento-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    filter: brightness(0.85);
}

.strumento-card:hover .strumento-img-wrap img {
    transform: scale(1.07);
    filter: brightness(1);
}

.strumento-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,8,8,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.overlay-btn {
    padding: 12px 28px;
    border: 1px solid var(--clr-accent);
    color: var(--clr-accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.82rem;
    transition: var(--transition);
    background: transparent;
}

.overlay-btn:hover {
    background: var(--clr-accent);
    color: #ffffff !important;
}

.strumento-info {
    padding: 30px 28px 35px;
}

.strumento-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--clr-text);
}

.strumento-info p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* ─── Parallax Quote ─────────────────────────── */
.parallax-quote {
    position: relative;
    padding: 140px 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 10;
    overflow: hidden;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 8, 0.82);
}

.parallax-quote .container {
    position: relative;
    z-index: 1;
}

blockquote {
    max-width: 700px;
    margin: 0 auto;
}

blockquote p {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-style: italic;
    color: var(--clr-text);
    line-height: 1.4;
    margin-bottom: 20px;
}

blockquote cite {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--clr-accent);
}

/* ─── Galleria Section ───────────────────────── */
.galleria {
    background: var(--clr-bg-alt);
    position: relative;
    z-index: 10;
}

/* ─── Gallery Filters ────────────────────────── */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 60px;
}

.filter-btn {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 11px 26px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--clr-text-muted);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--clr-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    z-index: 0;
}

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

.filter-btn:hover {
    border-color: var(--clr-accent);
    color: #ffffff !important;
}

.filter-btn:hover::before { transform: scaleX(1); }

.filter-btn.active {
    border-color: var(--clr-accent);
    color: #ffffff !important;
    background: var(--clr-accent);
}

/* ─── Gallery Groups ─────────────────────────── */
.gallery-groups {
    display: flex;
    flex-direction: column;
    gap: 70px;
}

.gallery-group {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-group.hidden {
    display: none;
}

/* Group Title Divider */
.gallery-group-title {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--clr-text);
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
    white-space: nowrap;
}

.gallery-group-title em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--clr-accent);
    font-weight: 400;
}

.group-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196,139,75,0.35), transparent);
    min-width: 40px;
}

/* ─── Masonry Columns ────────────────────────── */
.masonry-cols {
    columns: 3 220px;
    column-gap: 14px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: brightness(0.85);
}

.gallery-item:hover img {
    transform: scale(1.04);
    filter: brightness(1);
}

/* Hover overlay */
.gi-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 8, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-item:hover .gi-overlay {
    opacity: 1;
}

.gi-zoom {
    font-size: 1.4rem;
    color: var(--clr-accent);
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gi-zoom {
    transform: rotate(5deg) scale(1.2);
}

/* ─── Lightbox ───────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 4, 4, 0.96);
    cursor: pointer;
}

.lightbox-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 92vh;
}

.lb-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

#lb-img {
    max-width: 85vw;
    max-height: 78vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    transition: opacity 0.25s ease;
}

#lb-img.loading { opacity: 0; }

.lb-spinner {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(196,139,75,0.2);
    border-top-color: var(--clr-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.lb-spinner.active { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.lb-footer {
    margin-top: 18px;
    text-align: center;
}

.lb-caption {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--clr-text-muted);
    margin-bottom: 6px;
}

.lb-counter {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-accent);
}

/* Lightbox buttons */
.lb-btn {
    background: transparent;
    border: none;
    color: var(--clr-text);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.lb-close {
    position: fixed;
    top: 28px;
    right: 36px;
    font-size: 1.6rem;
    z-index: 10;
    opacity: 0.7;
}

.lb-close:hover {
    opacity: 1;
    color: var(--clr-accent);
    transform: rotate(90deg);
}

.lb-prev, .lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.5;
    padding: 0 20px;
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-prev:hover, .lb-next:hover {
    opacity: 1;
    color: var(--clr-accent);
}

.lb-prev:hover { transform: translateY(-50%) translateX(-4px); }
.lb-next:hover { transform: translateY(-50%) translateX(4px); }

/* ─── Responsive Gallery ─────────────────────── */
@media (max-width: 900px) {
    .masonry-cols { columns: 2 180px; }
    .gallery-group-title { font-size: 1.35rem; }
}

@media (max-width: 560px) {
    .masonry-cols { columns: 1; }
    .gallery-group-title { font-size: 1.1rem; white-space: normal; text-align: center; flex-direction: column; gap: 10px; }
    .group-line { width: 60px; min-width: unset; height: 1px; }
    .lb-prev { left: 4px; font-size: 2rem; }
    .lb-next { right: 4px; font-size: 2rem; }
}

/* ─── Diplomi Section ────────────────────────── */
.diplomi {
    background: var(--clr-bg);
    position: relative;
    z-index: 10;
}

.diplomi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.diploma-card {
    border: 1px solid rgba(196, 139, 75, 0.12);
    overflow: hidden;
    transition: var(--transition);
    background: rgba(255,255,255,0.02);
}

.diploma-card:hover {
    border-color: rgba(196, 139, 75, 0.4);
    transform: translateY(-8px);
}

.diploma-img-wrap {
    overflow: hidden;
    height: 260px;
}

.diploma-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.9) sepia(0.15);
}

.diploma-card:hover .diploma-img-wrap img {
    transform: scale(1.05);
}

.diploma-info {
    padding: 28px 26px 32px;
}

.diploma-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--clr-accent);
    letter-spacing: 1px;
}

.diploma-info p {
    color: var(--clr-text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ─── Banner CTA ─────────────────────────────── */
.cta-banner {
    position: relative;
    padding: 140px 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 10;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 8, 0.88);
}

.cta-banner h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.cta-banner p {
    font-size: 1.15rem;
    color: var(--clr-text-muted);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ─── Footer ─────────────────────────────────── */
footer {
    background: #050404;
    padding: 90px 0 30px;
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(196, 139, 75, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 18px;
    display: block;
    filter: brightness(0.9);
}

.footer-brand p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
}

.address {
    margin-top: 18px;
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-contact h4, .footer-social h4 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--clr-text);
    letter-spacing: 1px;
}

.footer-contact a, .footer-social a {
    display: block;
    color: var(--clr-text-muted);
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 0.92rem;
    transition: var(--transition);
}

.footer-contact a:hover, .footer-social a:hover {
    color: var(--clr-accent);
}

.footer-hours {
    margin-top: 18px;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--clr-text-muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--clr-text-muted);
    font-size: 0.82rem;
}

.legal-links a {
    color: var(--clr-text-muted);
    text-decoration: none;
    margin-left: 22px;
    transition: var(--transition);
}

.legal-links a:hover { color: var(--clr-text); }

/* ─── Back to Top ────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: rgba(10, 8, 8, 0.8);
    border: 1px solid rgba(196, 139, 75, 0.4);
    color: var(--clr-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(8px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:not(.visible) {
    transform: translateY(20px);
}

.back-to-top:hover {
    background: var(--clr-accent);
    color: var(--clr-bg);
    border-color: var(--clr-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(196, 139, 75, 0.2);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}

/* ─── Scroll Reveal base state ───────────────── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 1200px) {
    .strumenti-grid { grid-template-columns: repeat(2, 1fr); }
    .diplomi-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-item.gallery-wide { grid-column: span 2; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-item.gallery-large { grid-column: span 2; }
    .gallery-item.gallery-wide { grid-column: span 2; }
}

@media (max-width: 992px) {
    .title { font-size: 4.5rem; }
    .section-title { font-size: 2.6rem; }
    .about-grid { grid-template-columns: 1fr; gap: 50px; }
    .about-visual { order: -1; }
    .image-frame img { height: 480px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* Tablet Specific Fix (No Mobile, No Desktop) */
@media (min-width: 769px) and (max-width: 1100px) {
    .navbar {
        padding: 20px 30px;
        gap: 20px;
    }
    .logo {
        gap: 12px;
        flex-shrink: 0;
    }
    .nav-links {
        margin-left: auto; /* Push links and lang-switcher to the right */
        gap: 24px; /* Proportional gap */
    }
    .nav-link {
        font-size: 0.75rem; 
        letter-spacing: 1px;
    }
    .lang-switcher {
        padding: 6px 12px;
        font-size: 0.68rem;
    }
}

@media (max-width: 768px) {
    .navbar { 
        padding: 16px 24px;
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
        background: transparent;
    }
    .navbar.scrolled { 
        padding: 12px 24px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
        background: rgba(10, 8, 8, 0.98);
    }
    .nav-links { display: none; }
    .hamburger { display: flex; }

    .title { font-size: 3.2rem; }
    .section-title { font-size: 2.1rem; }
    blockquote p { font-size: 1.8rem; }
    .cta-banner h2 { font-size: 2rem; }

    .container { padding: 0 22px; }
    .hero { padding: 0 22px; }

    .strumenti-grid { grid-template-columns: 1fr; }
    .strumento-img-wrap { height: 300px; }
    .diplomi-grid { grid-template-columns: 1fr; }

    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item.gallery-large,
    .gallery-item.gallery-wide { grid-column: span 1; }
    .gallery-item.gallery-wide img { height: 200px; }
    .gallery-item.gallery-large img { height: 280px; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .legal-links a { margin: 0 10px; }

    section {
        scroll-margin-top: 80px;
    }

    /* Parallax Fix for Mobile */
    .hero-bg, .parallax-quote, .cta-banner {
        background-attachment: scroll !important;
        background-position: center center !important;
    }
}

@media (max-width: 480px) {
    .title { font-size: 2.6rem; }
    .logo-sub { display: none; }
    .hero-cta { flex-direction: column; align-items: center; gap: 14px; }
    blockquote p { font-size: 1.4rem; }
}
