.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.brand-card {
    width: 100%;
    max-width: 220px;
    padding: 20px 16px;
    border: 1px solid rgba(196, 199, 199, 0.6);
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #ffffff, #f1f1ef);
    box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transform: perspective(900px) rotateX(5deg) rotateY(-4deg);
    transform-style: preserve-3d;
    transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

.brand-card:hover {
    transform: perspective(900px) translateY(-6px) rotateX(0deg) rotateY(0deg);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(114, 90, 58, 0.45);
}

.brand-logo {
    display: block;
    max-width: 100%;
    transform: translateZ(24px);
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.18));
}

/* Mobile fix: evita glitch di rendering 3D sui loghi brand (Safari/Chrome mobile). */
@media (max-width: 767px) {
    .brand-card {
        max-width: none;
        width: 100%;
        min-height: 130px;
        padding: 16px 10px;
        transform: none;
    }

    .brand-card:hover {
        transform: none;
    }

    .brand-logo {
        transform: none;
        filter: none;
        max-height: 56px;
        width: auto;
        opacity: 1;
    }
}

.gallery-item {
    content-visibility: auto;
    contain-intrinsic-size: 420px 320px;
}

.gallery-image {
    display: block;
    backface-visibility: hidden;
}

.access-controls {
    display: flex;
    gap: 8px;
}

.access-btn {
    border: 1px solid rgba(116, 120, 120, 0.5);
    border-radius: 9999px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.6);
    color: #1a1c1b;
    transition: all 0.2s ease;
}

.access-btn:hover {
    background: rgba(114, 90, 58, 0.15);
    border-color: rgba(114, 90, 58, 0.45);
}

.access-btn[aria-pressed="true"] {
    background: rgba(114, 90, 58, 0.2);
    border-color: rgba(114, 90, 58, 0.6);
}

.access-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body.mobile-menu-open {
    overflow: hidden;
}

html.dark body {
    background: #0b1220 !important;
    color: #e5e7eb !important;
}

html.dark nav {
    background: rgba(11, 18, 32, 0.92) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

html.dark .bg-background,
html.dark .bg-surface,
html.dark .bg-surface-container-low,
html.dark .bg-surface-container-high,
html.dark .bg-surface-container-highest,
html.dark .bg-tertiary-container {
    background-color: #111827 !important;
}

html.dark .text-primary,
html.dark .text-on-background,
html.dark .text-on-surface,
html.dark .text-on-surface-variant,
html.dark .text-on-tertiary,
html.dark .text-on-tertiary-container {
    color: #e5e7eb !important;
}

html.dark [class*="border-outline-variant"] {
    border-color: rgba(148, 163, 184, 0.35) !important;
}

html.dark .brand-card {
    background: linear-gradient(145deg, #1f2937, #111827);
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 34px -24px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html.dark .brand-logo {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 0.5rem;
    padding: 4px;
}

html.dark .access-btn {
    background: rgba(31, 41, 55, 0.85);
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.4);
}

html.a11y-text-lg .text-label-md {
    font-size: 14px !important;
    line-height: 1.2 !important;
}

html.a11y-text-lg .text-body-md {
    font-size: 20px !important;
    line-height: 1.8 !important;
}

html.a11y-text-lg .text-body-lg {
    font-size: 22px !important;
    line-height: 1.8 !important;
}

html.a11y-text-lg .text-headline-sm {
    font-size: 28px !important;
}

html.a11y-text-lg .text-headline-md {
    font-size: 36px !important;
}

html.a11y-text-lg .text-headline-lg {
    font-size: 52px !important;
}

html.a11y-text-lg .text-display-lg {
    font-size: 72px !important;
    line-height: 1.1 !important;
}

html.a11y-text-xl .text-label-md {
    font-size: 15px !important;
    line-height: 1.25 !important;
}

html.a11y-text-xl .text-body-md {
    font-size: 22px !important;
    line-height: 1.85 !important;
}

html.a11y-text-xl .text-body-lg {
    font-size: 24px !important;
    line-height: 1.85 !important;
}

html.a11y-text-xl .text-headline-sm {
    font-size: 30px !important;
}

html.a11y-text-xl .text-headline-md {
    font-size: 40px !important;
}

html.a11y-text-xl .text-headline-lg {
    font-size: 56px !important;
}

html.a11y-text-xl .text-display-lg {
    font-size: 78px !important;
    line-height: 1.1 !important;
}

html.a11y-text-2xl .text-label-md {
    font-size: 16px !important;
    line-height: 1.3 !important;
}

html.a11y-text-2xl .text-body-md {
    font-size: 24px !important;
    line-height: 1.9 !important;
}

html.a11y-text-2xl .text-body-lg {
    font-size: 26px !important;
    line-height: 1.9 !important;
}

html.a11y-text-2xl .text-headline-sm {
    font-size: 32px !important;
}

html.a11y-text-2xl .text-headline-md {
    font-size: 44px !important;
}

html.a11y-text-2xl .text-headline-lg {
    font-size: 60px !important;
}

html.a11y-text-2xl .text-display-lg {
    font-size: 84px !important;
    line-height: 1.08 !important;
}

