/* ==============================================
   COLOMBINI LELIO SRL - Custom Styles
   ============================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ==============================================
   CSS Variables - Brand Colors
   ============================================== */
:root {
    /* Primary Colors */
    --color-primary: #1E773B;
    /* Verde primario */
    --color-primary-dark: #145228;
    /* Verde scuro */
    --color-primary-light: #2A9A4E;
    /* Verde chiaro */

    /* Secondary Colors */
    --color-secondary: #C5CBAB;
    /* Salvia/Verde oliva chiaro */
    --color-secondary-dark: #9AA685;
    /* Salvia scuro */
    --color-secondary-light: #D8DCC5;
    /* Salvia chiaro */
    --color-accent: #D4A84B;
    /* Oro/Accento */

    /* Neutral Colors */
    --color-white: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ==============================================
   Base Styles
   ============================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-gray-800);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
}

/* ==============================================
   Custom Utility Classes
   ============================================== */

/* Gradient overlays */
.gradient-overlay {
    position: relative;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(45, 90, 39, 0.85), rgba(45, 90, 39, 0.4));
    z-index: 1;
}

.gradient-overlay>* {
    position: relative;
    z-index: 2;
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==============================================
   Animations
   ============================================== */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

/* Pulse */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-pulse-hover:hover {
    animation: pulse 0.5s ease-in-out;
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* ==============================================
   Component Styles
   ============================================== */

/* Header */
.header-sticky {
    transition: all var(--transition-normal);
}

.header-sticky.scrolled {
    box-shadow: var(--shadow-lg);
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform var(--transition-normal);
}

.mobile-menu.active {
    transform: translateX(0) !important;
}

/* Hide mobile menu on desktop */
@media (min-width: 1024px) {
    #mobile-menu {
        display: none !important;
    }
}

/* Hamburger Menu */
.hamburger-line {
    transition: all var(--transition-fast);
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Cards */
.service-card {
    transition: all var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    background-color: var(--color-primary);
    color: var(--color-white);
}

.service-icon {
    transition: all var(--transition-normal);
}

/* Value Cards */
.value-card {
    transition: all var(--transition-normal);
}

.value-card:hover {
    transform: translateY(-5px);
}

/* Testimonial Cards */
.testimonial-card {
    transition: all var(--transition-normal);
}

.testimonial-card:hover {
    transform: scale(1.02);
}

/* ==============================================
   Form Styles
   ============================================== */

.form-input {
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.form-input.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
    border-color: var(--color-primary);
}

.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.visible {
    display: block;
}

/* ==============================================
   Button Styles
   ============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

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

.btn-white:hover {
    background-color: var(--color-gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* WhatsApp Button */
.whatsapp-btn {
    background-color: #25D366;
    color: var(--color-white);
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: var(--color-white);
}

/* ==============================================
   FAQ Accordion
   ============================================== */

.faq-item {
    border-bottom: 1px solid var(--color-gray-200);
}

.faq-question {
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-answer.open {
    max-height: 1000px;
    padding: 0 1.5rem 1rem 1.5rem;
}

.faq-icon {
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

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

/* ==============================================
   Partner Logos
   ============================================== */

.partner-logo {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition-normal);
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ==============================================
   Brand Carousel
   ============================================== */

.brand-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.brand-carousel::before,
.brand-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.brand-carousel::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.brand-carousel::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.brand-track {
    display: flex;
    gap: 3rem;
    animation: scroll 40s linear infinite;
    width: max-content;
}

.brand-track:hover {
    animation-play-state: paused;
}

.brand-logo {
    height: 50px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.brand-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ==============================================
   Hero Section
   ============================================== */

.hero-section {
    min-height: 90vh;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--color-white), transparent);
    z-index: 2;
}

/* ==============================================
   Scroll Animations (Intersection Observer)
   ============================================== */

.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.js-enabled .reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.js-enabled .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.js-enabled .reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.js-enabled .reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.js-enabled .reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ==============================================
   BLOG STYLES - Nuove aggiunte per il blog
   ============================================== */

/* Blog Cards */
.blog-card {
    background: var(--color-white);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.blog-card .aspect-video {
    position: relative;
    overflow: hidden;
}

.blog-card img {
    transition: transform 0.5s ease;
}

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

.blog-card .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog Post Content */
.blog-post {
    max-width: 100%;
}

.blog-post .prose {
    max-width: none;
}

.blog-post .prose h2 {
    color: var(--color-primary);
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-post .prose h3 {
    color: var(--color-gray-700);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-post .prose p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--color-gray-600);
}

.blog-post .prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.blog-post .prose ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.blog-post .prose li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--color-gray-600);
}

.blog-post .prose strong {
    color: var(--color-primary);
    font-weight: 600;
}

.blog-post .prose figure {
    margin: 2rem 0;
}

.blog-post .prose figcaption {
    font-style: italic;
    color: var(--color-gray-500);
    font-size: 0.875rem;
}

.blog-post .prose img {
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}

/* Table of Contents */
.toc-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--color-gray-600);
    border-left: 2px solid var(--color-gray-200);
    padding-left: 1rem;
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.toc-link:hover {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.toc-link.active {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    font-weight: 500;
}

.toc-sidebar {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Search Input */
.search-input {
    transition: all var(--transition-fast);
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 119, 59, 0.1);
}

/* Tag Cloud */
.tag-cloud a {
    display: inline-block;
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    margin: 0.25rem;
}

.tag-cloud a:hover {
    background: rgba(30, 119, 59, 0.1);
    color: var(--color-primary);
}

/* Responsive Blog */
@media (max-width: 1024px) {
    .toc-sidebar {
        display: none;
    }
    
    .blog-post .prose h2 {
        font-size: 1.5rem;
    }
    
    .blog-post .prose h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .blog-card {
        margin-bottom: 1.5rem;
    }
    
    .blog-post .prose h2 {
        font-size: 1.375rem;
        margin-top: 1.5rem;
    }
    
    .blog-post .prose h3 {
        font-size: 1.125rem;
    }
}

/* ==============================================
   Responsive Adjustments
   ============================================== */

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
    }

    .whatsapp-float {
        bottom: 80px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* ==============================================
   Print Styles
   ============================================== */

@media print {

    .whatsapp-float,
    .mobile-menu,
    .hamburger,
    .cookie-banner,
    .toc-sidebar {
        display: none !important;
    }
    
    .blog-post .prose h2,
    .blog-post .prose h3 {
        color: #000;
    }
}

/* ==============================================
   Cookie Consent Banner
   ============================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(31, 41, 55, 0.97);
    backdrop-filter: blur(10px);
    padding: 1rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-banner-text {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 280px;
}

.cookie-icon {
    width: 40px;
    height: 40px;
    color: #10B981;
    flex-shrink: 0;
}

.cookie-banner-title {
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.cookie-banner-desc {
    color: #9CA3AF;
    font-size: 0.85rem;
    line-height: 1.5;
}

.cookie-link {
    color: #10B981;
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-link:hover {
    color: #34D399;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cookie-btn-accept {
    background: #10B981;
    color: white;
}

.cookie-btn-accept:hover {
    background: #059669;
    transform: translateY(-1px);
}

.cookie-btn-necessary {
    background: transparent;
    color: #9CA3AF;
    border: 1px solid #4B5563;
}

.cookie-btn-necessary:hover {
    border-color: #9CA3AF;
    color: white;
}

@media (max-width: 640px) {
    .cookie-banner {
        padding: 1rem 0.75rem;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-text {
        flex-direction: column;
        align-items: center;
    }

    .cookie-icon {
        width: 32px;
        height: 32px;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}

/* ==============================================
   Utility Classes
   ============================================== */

/* Hide scrollbar for horizontal scroll areas */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Improve touch responsiveness on mobile */
.touch-manipulation {
    touch-action: manipulation;
}

/* Toast slide-up animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
