html, body {
    min-width: 360px !important;
    overflow-x: hidden !important;
}

/* Logo Color Class */
.logo-color {
    color: var(--logo-color);
}

/* ============================================
   SERVICES SECTION: HOVER GLOW EFFECT
   ============================================ */

/* Service cards with smooth glow transition */
.grid > a.group {
    transition: filter 0.5s ease-in-out;
}

/* External glow effect on service card hover */
.grid > a.group:hover {
    filter: drop-shadow(0 0 15px rgba(163, 230, 53, 0.4))
            drop-shadow(0 0 25px rgba(163, 230, 53, 0.2));
}

/* ============================================
   PRIMA/DOPO SECTIONS: DYNAMIC FLOW CONNECTOR
   ============================================ */

/* Card base styles with transitions */
.prima-card,
.dopo-card {
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out, border-color 0.5s ease-in-out, filter 0.5s ease-in-out;
    position: relative;
}

/* Background radial glows (initially hidden) */
.prima-card::before {
    content: '';
    position: absolute;
    inset: -80px;
    background: radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.1) 0%, transparent 60%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.dopo-card::before {
    content: '';
    position: absolute;
    inset: -80px;
    background: radial-gradient(circle at 50% 50%, rgba(163, 230, 53, 0.15) 0%, transparent 60%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

/* Hover effects for Prima cards */
.prima-card:hover {
    transform: translateY(-8px);
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 20px 50px rgba(239, 68, 68, 0.15);
    filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.3));
}

.prima-card:hover::before {
    opacity: 1;
}

.prima-card:hover i[data-lucide="x-circle"] {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}

/* Hover effects for Dopo cards */
.dopo-card:hover {
    transform: translateY(-8px);
    border-color: rgba(163, 230, 53, 0.8);
    box-shadow: 0 20px 50px rgba(163, 230, 53, 0.25);
    filter: drop-shadow(0 0 25px rgba(163, 230, 53, 0.7)) drop-shadow(0 0 40px rgba(163, 230, 53, 0.5));
}

.dopo-card:hover::before {
    opacity: 1;
}

.dopo-card:hover i[data-lucide="check-circle"] {
    transform: scale(1.2);
    color: #ebff00;
    filter: drop-shadow(0 0 8px rgba(235, 255, 0, 0.6));
}

/* Connector line animation */
.connector-line {
    animation: connector-glow 3s ease-in-out infinite;
}

@keyframes connector-glow {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 0 0 10px rgba(163, 230, 53, 0.3);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 25px rgba(163, 230, 53, 0.6);
    }
}

.connector-arrow {
    animation: arrow-pulse 2s ease-in-out infinite;
    background: radial-gradient(circle, rgba(163, 230, 53, 0.2) 0%, transparent 70%);
    padding: 1.5rem;
    border-radius: 50%;
}

@keyframes arrow-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
    }
}



/* ============================================
   PROPOSAL 1: DYNAMIC FLOW CONNECTOR
   ============================================ */

.proposal-1 .prima-card-p1,
.proposal-1 .dopo-card-p1 {
	transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out, border-color 0.5s ease-in-out, filter 0.5s ease-in-out;
	position: relative;
}

/* Background radial glows for Prima cards */
.proposal-1 .prima-card-p1::before {
	content: '';
	position: absolute;
	inset: -60px;
	background: radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.1) 0%, transparent 40%);
	z-index: -1;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
	pointer-events: none;
}

/* Background radial glows for Dopo cards */
.proposal-1 .dopo-card-p1::before {
	content: '';
	position: absolute;
	inset: -60px;
	background: radial-gradient(circle at 50% 50%, rgba(163, 230, 53, 0.15) 0%, transparent 40%);
	z-index: -1;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
	pointer-events: none;
}

/* Hover effects for Prima cards */
.proposal-1 .prima-card-p1:hover {
	transform: translateY(-8px);
	border-color: rgba(239, 68, 68, 0.6);
	box-shadow: 0 20px 50px rgba(239, 68, 68, 0.15);
	filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.3));
}

.proposal-1 .prima-card-p1:hover::before {
	opacity: 1;
}

.proposal-1 .prima-card-p1:hover i[data-lucide="x-circle"] {
	transform: scale(1.2);
	filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}

/* Hover effects for Dopo cards */
.proposal-1 .dopo-card-p1:hover {
	transform: translateY(-8px);
	border-color: rgba(163, 230, 53, 0.8);
	box-shadow: 0 20px 50px rgba(163, 230, 53, 0.25);
	filter: drop-shadow(0 0 25px rgba(163, 230, 53, 0.5)) drop-shadow(0 0 40px rgba(163, 230, 53, 0.3));
}

.proposal-1 .dopo-card-p1:hover::before {
	opacity: 1;
}

.proposal-1 .dopo-card-p1:hover i[data-lucide="check-circle"] {
	transform: scale(1.2);
	color: #ebff00;
	filter: drop-shadow(0 0 8px rgba(235, 255, 0, 0.6));
}

/* Connector line animation */
.connector-line {
	animation: connector-glow 3s ease-in-out infinite;
}

@keyframes connector-glow {
	0%, 100% {
		opacity: 0.4;
		box-shadow: 0 0 10px rgba(163, 230, 53, 0.3);
	}
	50% {
		opacity: 0.8;
		box-shadow: 0 0 25px rgba(163, 230, 53, 0.6);
	}
}

.connector-arrow {
	animation: arrow-pulse 2s ease-in-out infinite;
	background: radial-gradient(circle, rgba(163, 230, 53, 0.2) 0%, transparent 70%);
	padding: 1.5rem;
	border-radius: 50%;
	transition: all 0.5s ease-in-out;
}

@keyframes arrow-pulse {
	0%, 100% {
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		transform: translate(-50%, -50%) scale(1.15);
	}
}

/* ============================================
   MARQUEE CONTAINER - DUAL CONTINUOUS SCROLLING
   ============================================ */

.marquee-container {
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Individual Swiper instances */
.swiper.marquee-slider {
    width: 100%;
    overflow: hidden;

    /* Optional: Fade effect on edges */
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        white 10%,
        white 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        white 10%,
        white 90%,
        transparent 100%
    );
}

/* CRITICAL: Linear timing for smooth continuous scroll */
.swiper-wrapper.marquee-wrapper {
    transition-timing-function: linear !important;
    align-items: stretch;
}

/* Individual slides */
.swiper-slide.marquee-slide {
    width: min(90%, 500px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

/* Card styling inside slide */
.swiper-slide.marquee-slide > div {
    width: 100%;
    height: 100%;
}

/* Performance optimization */
.swiper-wrapper.marquee-wrapper {
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
    .marquee-container {
        gap: 1.5rem;
    }

    .swiper-slide.marquee-slide {
        padding: 0 10px;
    }
}

/* ============================================
   LOGO SLIDES - COLLABORAZIONI SECTION
   ============================================ */

/* Override generic marquee-slide width for logo slides */
.swiper-slide.logo-slide {
    width: min(70%, 320px);
}

/* Ensure logo container maintains fixed 320x320px dimensions */
.swiper-slide.logo-slide > .logo-container {
    width: 100%;
}

/* ============================================
   MOBILE MENU - FULL SCREEN IMPLEMENTATION
   ============================================ */

/* Smooth transitions for menu animations */
#mobile-menu {
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    pointer-events: auto;
}

#mobile-menu-content {
    /* Smooth slide animation from left */
    will-change: transform;
}

/* Mobile menu link animations */
#mobile-menu-content a {
    position: relative;
    overflow: hidden;
}

#mobile-menu-content a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #a3e635, #ebff00);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

#mobile-menu-content a:hover::after {
    transform: translateX(0);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Enhanced accessibility for menu button */
#mobile-menu-button {
    position: relative;
}

#mobile-menu-button[aria-expanded="true"] i {
    transform: rotate(90deg);
}

/* Smooth icon rotation */
#mobile-menu-button i {
    transition: transform 0.3s ease-in-out;
}

/* ============================================
   PRELOADER - PAGE LOAD SPINNER
   ============================================ */

#preloader {
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Prevent body scroll while preloader is visible */
body.preloader-active {
    overflow: hidden;
}

/* Hide all content except preloader during loading */
body.preloader-active > :not(#preloader) {
    opacity: 0;
    visibility: hidden;
}
