/* CSS Variables for Luxury Automotive Theme */
:root {
    --primary-black: #050505;
    --charcoal: #141414;
    --dark-grey: #222222;
    --gold: #d4af37; /* Metallic Gold */
    --gold-hover: #f1cf59;
    --silver: #e0e0e0;
    --white: #ffffff;
    --text-muted: #a0a0a0;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font-main: 'Outfit', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-black);
    color: var(--white);
    line-height: 1.6;
    position: relative;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Layout Classes */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.padding-y {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.bg-dark {
    background-color: var(--charcoal);
}

.bg-darker {
    background-color: var(--primary-black);
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--gold);
}

.hero .text-gold {
    display: inline !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    margin: 0 !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title span {
    color: var(--gold);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.title-underline {
    width: 60px;
    height: 3px;
    background-color: var(--silver);
    margin: 0 0 2rem 0;
}

.title-underline.center {
    margin: 0 auto 2rem auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-black);
}

.btn-primary:hover {
    background-color: var(--silver);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-black);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--silver);
    color: var(--white);
    padding: 0.6rem 1.5rem;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-black);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
}

.btn-text i {
    transition: var(--transition);
}

.btn-text:hover i {
    transform: translateX(5px);
}

.full-width {
    width: 100%;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

header.scrolled {
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--white);
}

.logo span {
    color: var(--gold);
    font-weight: 300;
}

.logo-subtitle {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 0.75rem;
    text-transform: lowercase;
    color: var(--gold);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 2px;
    margin-top: -6px;
    text-align: center;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-menu ul li a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    position: relative;
}

.nav-menu ul li a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--gold);
    transition: var(--transition);
}

.nav-menu ul li a:not(.btn):hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(5, 5, 5, 0.9)), url('Img/Rosso/ferlorUPDHORv2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

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

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero h1 span {
    font-weight: 300;
    color: var(--silver);
    display: block;
    font-size: 2.5rem;
    margin-top: 10px;
}

.hero p {
    font-size: 1.4rem;
    color: var(--silver);
    margin-bottom: 3rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Split Layouts (About & Contact) */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.split-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.split-content p strong {
    color: var(--white);
}

.feature-list {
    margin: 2rem 0;
}

.feature-list li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-list li i {
    color: var(--white);
    font-size: 1.2rem;
}

.image-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
    pointer-events: none;
}

.image-wrapper img {
    transition: transform 0.8s ease;
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--dark-grey);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border-top: 3px solid transparent;
    transition: var(--transition);
}

.service-card:hover {
    border-top-color: var(--gold);
    transform: translateY(-10px);
    background-color: #2a2a2a;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Gallery / Masonry */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 250px;
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item.large {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

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

.gallery-info h4 {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.gallery-info p {
    font-size: 0.9rem;
    color: var(--white);
    transform: translateY(20px);
    transition: all 0.4s ease 0.2s;
}

.gallery-item:hover .gallery-info h4,
.gallery-item:hover .gallery-info p {
    transform: translateY(0);
}

/* Reviews / Recensioni */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.review-card {
    background-color: var(--charcoal);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.review-stars {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 5px;
}

.review-text {
    font-size: 1.05rem;
    color: var(--silver);
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--dark-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.author-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--white);
}

.author-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Parallax Section - Perché Sceglierci */
.parallax-section {
    position: relative;
    padding: 8rem 0;
    text-align: center;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* For parallax scroll */
    background-image: url('Img/insidelor.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(5, 5, 5, 0.85);
    z-index: 2;
}

.parallax-content {
    position: relative;
    z-index: 3;
}

.parallax-content h2 {
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--white);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.benefit-item {
    text-align: center;
}

.benefit-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

.benefit-item h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.benefit-item p {
    color: var(--silver);
    font-size: 0.9rem;
}

/* Partners */
.eyebrow {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.partner-desc {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.partner-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.partner-box {
    background-color: var(--dark-grey);
    padding: 3rem 2rem;
    border-radius: 8px;
    max-width: 400px;
    transition: var(--transition);
}

.partner-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.brand-logo {
    max-width: 150px;
    margin: 0 auto 1.5rem auto;
    filter: brightness(0) invert(1);
}

/* Contatti */
.info-items {
    margin-top: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--gold);
    margin-top: 5px;
}

.info-item h4 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.info-item p, .info-item a {
    color: var(--text-muted);
}

.info-item a:hover {
    color: var(--gold);
}

.contact-form {
    background-color: var(--dark-grey);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

input, textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--charcoal);
    border: 1px solid #333;
    color: var(--white);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

/* Footer */
footer {
    background-color: #030303;
    border-top: 1px solid #222;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding: 5rem 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.footer-brand span {
    color: var(--gold);
    font-weight: 300;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 300px;
    margin-top: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--dark-grey);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--gold);
    color: var(--primary-black);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: #000;
    padding: 1.5rem 0;
    border-top: 1px solid #111;
}

.footer-bottom p {
    color: #555;
    font-size: 0.85rem;
}

/* Animation Classes */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Chatbot Widget */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--font-main);
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background-color: var(--gold);
    color: var(--primary-black);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: var(--transition);
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-toggle .tooltip {
    position: absolute;
    right: 75px;
    background-color: var(--dark-grey);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.chatbot-toggle:hover .tooltip {
    opacity: 1;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background-color: var(--dark-grey);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid #333;
    pointer-events: none;
}

.chatbot-window.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.chatbot-header {
    background-color: var(--charcoal);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    font-weight: 600;
}

.chatbot-header i {
    color: var(--gold);
    margin-right: 8px;
}

#chatbotClose {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

#chatbotClose:hover {
    color: var(--white);
}

.chatbot-messages {
    height: 350px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #1a1a1a;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 3px;
}

.msg {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.ai-msg {
    align-self: flex-start;
    background-color: var(--charcoal);
    color: var(--silver);
    border-bottom-left-radius: 5px;
}

.user-msg {
    align-self: flex-end;
    background-color: var(--gold);
    color: var(--primary-black);
    border-bottom-right-radius: 5px;
    font-weight: 500;
}

.chatbot-input {
    display: flex;
    padding: 15px;
    background-color: var(--charcoal);
    border-top: 1px solid #333;
}

.chatbot-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--white);
    padding: 8px 12px;
    font-size: 0.95rem;
}

.chatbot-input input:focus {
    outline: none;
    box-shadow: none;
}

.chatbot-input button {
    background-color: var(--gold);
    color: var(--primary-black);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.chatbot-input button:hover {
    transform: scale(1.1);
}

/* Portfolio Before / After Sliders */
.portfolio-sliders {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 3rem;
}

.ba-slider-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.slider-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--white);
    font-size: 1.5rem;
}

.ba-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    user-select: none;
    cursor: ew-resize;
}

.ba-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-after {
    z-index: 1;
}

.ba-before {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--white);
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    pointer-events: none;
}

.ba-handle-btn {
    width: 50px;
    height: 50px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-black);
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: transform 0.2s;
}

.ba-slider:hover .ba-handle-btn {
    transform: scale(1.1);
}

.ba-labels {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    z-index: 4;
    pointer-events: none;
}

.ba-labels span {
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
}

/* Cookie Banner (GDPR 2026) */
.cookie-banner {
    position: fixed;
    bottom: -400px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-banner.show {
    bottom: 30px;
}

.cookie-banner-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--silver);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.cookie-banner-close:hover {
    color: var(--white);
    transform: scale(1.1);
}

.cookie-banner-header h4 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.cookie-banner-header p {
    color: var(--silver);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-header a {
    color: var(--gold);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.cookie-buttons .btn {
    flex: 1;
    min-width: 150px;
    padding: 10px 15px;
    font-size: 0.9rem;
    text-align: center;
}

/* Cookie Modal (Personalizza) */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.cookie-modal {
    background: var(--darker);
    border: 1px solid var(--anthracite);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    padding: 30px;
    color: var(--white);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.cookie-modal-overlay.show .cookie-modal {
    transform: scale(1);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--anthracite);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.cookie-modal-header h3 {
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: var(--silver);
    font-size: 1.5rem;
    cursor: pointer;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cookie-option-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.cookie-option-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--silver);
    max-width: 400px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--anthracite);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--gold);
}

input:disabled + .slider {
    background-color: #555;
    cursor: not-allowed;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.cookie-modal-footer {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

@media screen and (max-width: 768px) {
    .cookie-banner {
        width: 95%;
        padding: 15px;
        bottom: -500px;
    }
    .cookie-buttons {
        flex-direction: column;
    }
    .cookie-buttons .btn {
        width: 100%;
    }
}

/* Responsive Media Queries */
@media screen and (max-width: 1024px) {
    /* Fix for iOS/mobile background-attachment: fixed issue */
    .hero-bg, 
    .parallax-bg, 
    .parallax-section,
    [style*="background-attachment: fixed"] {
        background-attachment: scroll !important;
    }

    .hero h1 { font-size: 3.5rem; }
    .hero h1 span { font-size: 2rem; }
    .split-layout { gap: 2rem; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .ba-slider { aspect-ratio: 4 / 3; }
}

@media screen and (max-width: 768px) {
    .hero-bg {
        background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(5, 5, 5, 0.9)), url('Img/Rosso/ferlorUPDVERT.jpeg');
    }

    .container {
        padding: 0 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: 150px !important;
        gap: 0.5rem !important;
    }
    
    .gallery-item.large {
        grid-row: span 2;
    }
    
    .service-card {
        cursor: pointer;
        position: relative;
    }
    .service-card p {
        display: none;
    }
    .service-card.expanded p {
        display: block;
        margin-top: 1rem;
        animation: fadeIn 0.3s ease;
    }
    .service-card::after {
        content: '\f0d7'; /* fa-caret-down */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        position: absolute;
        top: 2.8rem;
        right: 2rem;
        color: var(--gold);
        transition: transform 0.3s ease;
        font-size: 1.5rem;
    }
    .service-card.expanded::after {
        transform: rotate(180deg);
    }
    
    .btn {
        width: 100%;
        text-align: center;
        padding: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .hero-actions {
        width: 100%;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--charcoal);
        padding: 5rem 2rem;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .split-image {
        order: -1;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero h1 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    .grid-4 { grid-template-columns: 1fr; }
    .parallax-content h2 { font-size: 2rem; }
    .padding-y { padding-top: 4rem; padding-bottom: 4rem; }
}

/* Language Selector */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-selector a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.lang-selector a:hover {
    opacity: 1;
    color: var(--gold);
}

.lang-selector a.active {
    opacity: 1;
    color: var(--gold);
    font-weight: 700;
}

.lang-selector span {
    color: var(--silver);
    opacity: 0.5;
}

@media (max-width: 992px) {
    .lang-selector {
        margin-left: auto;
        margin-right: 20px;
    }
}


/* Infinite Slider */
.infinite-slider-section {
    position: relative;
    overflow: hidden;
}

.infinite-slider {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.infinite-slider::before,
.infinite-slider::after {
    background: linear-gradient(to right, var(--darker) 0%, rgba(10, 10, 10, 0) 100%);
    content: "";
    height: 100%;
    position: absolute;
    width: 10% !important; /* using percentage for mobile responsiveness */
    z-index: 2;
    top: 0;
}
@media (min-width: 768px) {
    .infinite-slider::before,
    .infinite-slider::after {
        width: 150px !important;
    }
}

.infinite-slider::before {
    left: 0;
}

.infinite-slider::after {
    right: 0;
    transform: rotateZ(180deg);
}

.slide-track {
    display: flex;
    width: max-content; /* Dynamic width since we duplicate slides in JS/HTML */
    gap: 20px;
    will-change: transform;
}

.slide-track.transitioning {
    transition: transform 0.4s ease-in-out;
}

/* Freccette slider JS */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    border: 1px solid var(--gold);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--gold);
    color: var(--primary-black);
}

.slider-btn.prev-btn {
    left: 20px;
}

.slider-btn.next-btn {
    right: 20px;
}


.slide {
    height: 200px;
    width: 250px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevents ghost drag */
}

.slide:hover {
    transform: scale(1.05);
}



/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-controls {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: var(--white);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 10000;
    pointer-events: auto;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--gold);
    transform: scale(1.1);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .lightbox-close { top: 10px; right: 10px; width: 40px; height: 40px; font-size: 1.2rem; }
    .lightbox-prev { left: 10px; width: 40px; height: 40px; font-size: 1.2rem; }
    .lightbox-next { right: 10px; width: 40px; height: 40px; font-size: 1.2rem; }
}

/* WhatsApp Popup */
.wa-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--dark-grey);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    z-index: 10000;
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
    max-width: 320px;
    border-left: 4px solid #25D366;
}

.wa-popup.show {
    transform: translateY(0);
    opacity: 1;
}

.wa-popup-content {
    position: relative;
}

.wa-popup-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.wa-popup-close:hover {
    color: var(--white);
}

.wa-popup p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--white);
    line-height: 1.4;
}

.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-wa:hover {
    background-color: #128C7E;
    color: white;
}

/* FAQ Section */
.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #333;
    padding: 1.5rem 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--gold);
}

.faq-question i {
    color: var(--gold);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer p {
    padding-top: 1rem;
    color: var(--silver);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-answer a {
    color: var(--gold);
    text-decoration: underline;
    font-weight: 500;
}

.faq-answer a:hover {
    color: var(--white);
}

.footer-faq-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
    display: block;
    margin-bottom: 0.8rem;
}

.footer-faq-link:hover {
    color: var(--gold);
    padding-left: 5px;
}
