/* ============================================
   Sito Web Professionale - CSS Moderno
   Schema Colori: Blu Navy e Gold
   ============================================ */

/* Palette Colori - Blu Navy & Gold */
:root {
    --primary-color: #1a365d;      /* Blu Navy */
    --primary-dark: #132a4a;        /* Blu Navy scuro */
    --primary-light: #EBF4FF;      /* Blu molto chiaro */
    --accent-color: #d69e2e;       /* Gold */
    --accent-light: #ecc94b;       /* Gold chiaro */
    --accent-bg: #FFFBEB;          /* Sfondo gold chiaro */
    --dark-color: #1a202c;         /* Grigio scurissimo */
    --text-dark: #1a202c;          /* Testo scuro */
    --text-medium: #4a5568;        /* Testo medio */
    --text-light: #718096;          /* Testo grigio */
    --bg-light: #F7FAFC;            /* Sfondo chiaro */
    --bg-white: #FFFFFF;             /* Bianco */
    --border-color: #E2E8F0;        /* Bordo grigio chiaro */

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fs-hero: clamp(2.5rem, 5vw, 3.75rem);
    --line-height-body: 1.75;
    --letter-spacing-tight: -0.025em;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 10px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.06), 0 20px 48px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.1), 0 30px 60px rgba(0,0,0,0.06);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Base Typography with Inter */
body {
    font-family: var(--font-body);
    line-height: var(--line-height-body);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: var(--letter-spacing-tight);
    font-weight: 700;
}

.display-4, .display-5, .display-6 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.lead {
    color: var(--text-medium);
    line-height: 1.8;
}

/* Testi su sfondo scuro */
.hero-section .lead,
.hero-section p,
.hero-section .text-white-75 {
    color: rgba(255, 255, 255, 0.85) !important;
}

.page-header .lead,
.page-header p {
    color: rgba(255, 255, 255, 0.85) !important;
}

.cta-section .lead,
.cta-section p {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Scroll Animations
   Gli elementi partono invisibili solo se il JS ha confermato di poterli
   rivelare (classe .js-anim sull'html): senza JavaScript, o senza
   IntersectionObserver, il contenuto resta visibile invece di sparire. */
.js-anim .animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.js-anim .animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Ingresso dell'hero: parte allo scroll zero, quindi non passa dall'observer.
   Lo stagger e' dichiarato qui e non calcolato in JS. */
.js-anim .hero-reveal > * {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.js-anim .hero-reveal > *:nth-child(1) { animation-delay: 0.05s; }
.js-anim .hero-reveal > *:nth-child(2) { animation-delay: 0.16s; }
.js-anim .hero-reveal > *:nth-child(3) { animation-delay: 0.27s; }
.js-anim .hero-reveal > *:nth-child(4) { animation-delay: 0.38s; }
.js-anim .hero-reveal > *:nth-child(5) { animation-delay: 0.49s; }
.js-anim .hero-reveal > *:nth-child(6) { animation-delay: 0.6s; }
.js-anim .hero-reveal > *:nth-child(7) { animation-delay: 0.71s; }

/* Rete di sicurezza applicata dal JS: se l'animazione non e' partita, il
   contenuto compare lo stesso invece di restare invisibile. */
.js-anim .hero-reveal.is-shown > * {
    opacity: 1;
    transform: none;
    animation: none;
}

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

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    cursor: pointer;
}

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

#back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Reset e Base */
main > .container, main > .container-fluid {
    padding: 0;
}

/* Hero Section - Gradiente verde moderno */
.hero-section {
    background: linear-gradient(135deg, #132a4a 0%, #1a365d 40%, #2c5282 100%);
    padding: 120px 0 !important;
    margin-top: 0px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(214,158,46,0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-icon {
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.hero-abstract {
    width: 320px;
    height: 320px;
    position: relative;
    margin: 0 auto;
}

.hero-abstract::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(214,158,46,0.2));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: morphBlob 8s ease-in-out infinite;
}

.hero-abstract::after {
    content: '</>';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    letter-spacing: -0.05em;
}

@keyframes morphBlob {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

.hero-icon .fas.fa-code {
    color: var(--accent-color) !important;
    opacity: 0.9;
}

/* Hero Section Buttons - Evidenziati e Differenziati */
.hero-buttons {
    margin-top: 2rem;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    border: none;
    color: #1a202c;
    font-weight: 600;
    font-size: 1.15rem;
    padding: 1.1rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(214, 158, 46, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-hero-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-hero-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(214, 158, 46, 0.5);
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-color) 100%);
}

.btn-hero-primary:hover::before {
    left: 100%;
}

.btn-hero-primary:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.15rem;
    padding: 1.1rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-hero-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.4s ease;
    z-index: -1;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.btn-hero-secondary:hover::before {
    width: 100%;
}

.btn-hero-secondary:active {
    transform: translateY(-2px) scale(1.02);
}

@media (max-width: 768px) {
    .btn-hero-primary,
    .btn-hero-secondary {
        font-size: 1rem;
        padding: 0.9rem 2rem;
        width: 100%;
        justify-content: center;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

/* Blog Section - Stile WordPress Professionale */
.blog-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.blog-sidebar {
    position: sticky;
    top: 100px;
}

.blog-widget {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(26, 54, 93, 0.08);
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-list a:hover {
    color: var(--primary-color);
}

.widget-list .count {
    color: var(--text-light);
    font-size: 0.85rem;
}

.widget-list small {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.blog-post-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(26, 54, 93, 0.15);
    border-color: var(--primary-color);
}

.blog-post-image {
    height: 100%;
    min-height: 200px;
    overflow: hidden;
}

.blog-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.blog-image-placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.blog-post-card:hover .blog-image-placeholder {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    transform: scale(1.05);
}

.blog-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.blog-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-date {
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.blog-post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.75rem 0;
    line-height: 1.3;
}

.blog-post-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-title a:hover {
    color: var(--primary-color);
}

.blog-post-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.blog-read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-top: auto;
}

.blog-read-more:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.blog-read-more i {
    transition: transform 0.3s ease;
}

.blog-read-more:hover i {
    transform: translateX(3px);
}

.blog-pagination {
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .blog-post-card .row {
        flex-direction: column;
    }
    
    .blog-post-image {
        min-height: 180px;
    }
    
    .blog-post-title {
        font-size: 1.25rem;
    }
    
    .blog-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(26, 54, 93, 0.15) !important;
    border-color: var(--primary-color);
}

.service-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.service-icon i {
    color: var(--primary-color) !important;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(26, 54, 93, 0.2));
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card:hover .service-icon i {
    color: var(--accent-color) !important;
    filter: drop-shadow(0 4px 8px rgba(214, 158, 46, 0.3));
}

/* Technologies Section */
.technologies-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.tech-item {
    transition: transform 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
}

.tech-item i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.tech-item:hover i {
    transform: scale(1.15);
    filter: brightness(1.2);
}

.tech-item h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.tech-item:hover h5 {
    color: var(--primary-color);
}

/* Colori specifici per ogni tecnologia */
.tech-php {
    color: #777BB4 !important; /* Colore ufficiale PHP */
}

.tech-yii2 {
    color: var(--primary-color) !important; /* Blu Navy */
}

.tech-html5 {
    color: #E34F26 !important; /* Colore ufficiale HTML5 */
}

.tech-css3 {
    color: #1572B6 !important; /* Colore ufficiale CSS3 */
}

.tech-js {
    color: #F7DF1E !important; /* Colore ufficiale JavaScript */
}

.tech-bootstrap {
    color: #7952B3 !important; /* Colore ufficiale Bootstrap */
}

.tech-mysql {
    color: #4479A1 !important; /* Colore ufficiale MySQL */
}

.tech-git {
    color: #F05032 !important; /* Colore ufficiale Git */
}

.tech-jquery {
    color: #0769AD !important; /* Colore ufficiale jQuery */
}

.tech-wordpress {
    color: #21759B !important; /* Colore ufficiale WordPress */
}

.tech-api {
    color: var(--accent-color) !important; /* Gold */
}

.tech-devops {
    color: var(--primary-dark) !important; /* Blu Navy scuro */
}

/* Effetti hover con colori più vivaci */
.tech-item:hover .tech-php {
    color: #8993C4 !important;
}

.tech-item:hover .tech-yii2 {
    color: var(--accent-color) !important;
}

.tech-item:hover .tech-html5 {
    color: #F16529 !important;
}

.tech-item:hover .tech-css3 {
    color: #33A9DC !important;
}

.tech-item:hover .tech-js {
    color: #FFE66D !important;
}

.tech-item:hover .tech-bootstrap {
    color: #9370DB !important;
}

.tech-item:hover .tech-mysql {
    color: #5D8DB8 !important;
}

.tech-item:hover .tech-git {
    color: #FF6B4A !important;
}

.tech-item:hover .tech-jquery {
    color: #0D7FC7 !important;
}

.tech-item:hover .tech-wordpress {
    color: #2E9CD4 !important;
}

.tech-item:hover .tech-api {
    color: var(--accent-light) !important;
}

.tech-item:hover .tech-devops {
    color: var(--primary-color) !important;
}

/* Plugin Cards */
.plugin-card {
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.plugin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(26, 54, 93, 0.15) !important;
    border-color: var(--primary-color);
}

.plugin-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.plugin-icon i {
    font-size: 1.4rem;
    color: #ffffff;
}

.plugin-card:hover .plugin-icon {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
}

.plugin-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.plugin-feature-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background: rgba(26, 54, 93, 0.08);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* CTA Section - Gradiente verde ufficiale */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    color: #ffffff;
    position: relative;
}

/* Bottone nella sezione CTA - stile specifico */
.cta-section .btn-light {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.cta-section .btn-light:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 158, 46, 0.4);
}

/* Page Header - Gradiente blu */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 80px 0 !important;
    margin-top: 0px;
    color: #ffffff;
}

/* Services Detail Page */
.services-detail {
    padding: 60px 0;
    background: linear-gradient(to bottom, var(--bg-light) 0%, var(--bg-white) 50%, var(--bg-light) 100%);
    position: relative;
}

.services-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="1" fill="rgba(26,54,93,0.05)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
    pointer-events: none;
}

.services-detail .container {
    position: relative;
    z-index: 1;
}

.services-detail .row {
    margin-bottom: 4rem;
}

.services-detail h2 {
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1rem;
}

.services-detail h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.services-detail .text-lg-end h2::after {
    left: auto;
    right: 0;
}

.services-detail .lead {
    color: var(--text-light);
    line-height: 1.8;
}

.services-detail .list-unstyled li {
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.services-detail .list-unstyled li:hover {
    transform: translateX(5px);
}

.services-detail .list-unstyled .text-lg-end li:hover {
    transform: translateX(-5px);
}

/* Card Manutenzione migliorata */
.services-detail .card.shadow-sm {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.05) 0%, rgba(214, 158, 46, 0.05) 100%);
    border: 2px solid var(--border-color);
}

.services-detail .card.shadow-sm:hover {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.1) 0%, rgba(214, 158, 46, 0.1) 100%);
    border-color: var(--primary-color);
}

.services-detail .card.shadow-sm .service-icon-large i {
    color: var(--primary-color) !important;
}

/* Nuovo Layout Servizi - Grid Moderno */
.services-grid-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.services-grid-section .row {
    align-items: flex-start;
}

.service-grid-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.08);
    position: relative;
    overflow: hidden;
}

.service-grid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.service-grid-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(26, 54, 93, 0.2);
    border-color: var(--primary-color);
}

.service-grid-card:hover::before {
    transform: scaleX(1);
}

.service-grid-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(26, 54, 93, 0.25);
}

.service-grid-card:hover .service-grid-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    box-shadow: 0 12px 30px rgba(214, 158, 46, 0.35);
}

.service-grid-icon i {
    font-size: 2.5rem;
    color: #ffffff;
}

.service-grid-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.service-grid-description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-grid-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.service-feature-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(26, 54, 93, 0.2);
    transition: all 0.2s ease;
}

.service-grid-card:hover .service-feature-badge {
    background: rgba(26, 54, 93, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.service-grid-toggle {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: auto;
}

.service-grid-toggle:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.3);
}

.service-grid-toggle i {
    transition: transform 0.3s ease;
}

.service-grid-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.service-grid-toggle[aria-expanded="true"] {
    background: var(--primary-color);
    color: #ffffff;
}

.service-grid-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.service-details-content h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.service-details-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.service-details-content ul li {
    padding: 0.6rem 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-details-content ul li i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.btn-service-cta {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

.btn-service-cta:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.4);
    color: #ffffff;
}

@media (max-width: 768px) {
    .service-grid-card {
        padding: 2rem 1.5rem;
    }
    
    .service-grid-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-grid-icon i {
        font-size: 2rem;
    }
    
    .service-grid-title {
        font-size: 1.3rem;
    }
}

/* ============================================
   NUOVO LAYOUT SERVIZI - GRIGLIA MODERNA
   ============================================ */

.services-grid-section {
    padding: 80px 0;
    background: var(--bg-light);
    position: relative;
}

.service-grid-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.08);
    position: relative;
    overflow: hidden;
}

.service-grid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-grid-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(26, 54, 93, 0.2);
    border-color: var(--primary-color);
}

.service-grid-card:hover::before {
    transform: scaleX(1);
}

.service-grid-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-grid-card:nth-child(even) .service-grid-icon {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
}

.service-grid-icon i {
    font-size: 2.5rem;
    color: #ffffff;
}

.service-grid-card:hover .service-grid-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.3);
}

.service-grid-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.service-grid-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-grid-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.service-feature-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(26, 54, 93, 0.2);
    transition: all 0.2s ease;
}

.service-grid-card:hover .service-feature-badge {
    background: rgba(26, 54, 93, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.service-grid-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: auto;
}

.service-grid-toggle:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

.service-grid-toggle i {
    transition: transform 0.3s ease;
}

.service-grid-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.service-grid-toggle[aria-expanded="true"] {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.service-grid-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.service-details-content h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.service-details-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.service-details-content ul li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-details-content ul li i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.btn-service-cta {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-service-cta:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.4);
    color: #ffffff;
}

@media (max-width: 768px) {
    .service-grid-card {
        padding: 2rem 1.5rem;
    }
    
    .service-grid-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-grid-icon i {
        font-size: 2rem;
    }
    
    .service-grid-title {
        font-size: 1.3rem;
    }
}

.services-detail hr {
    border-color: var(--border-color);
    opacity: 0.5;
    margin: 4rem 0;
}

.service-icon-large {
    opacity: 0.9;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.service-icon-large i {
    color: var(--primary-color) !important;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(26, 54, 93, 0.2));
}

.service-icon-large:hover i {
    color: var(--accent-color) !important;
    transform: scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(214, 158, 46, 0.3));
}

.service-card,
.skill-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
}

/* Card migliorate per pagina servizi */
.services-detail .card {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.services-detail .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.services-detail .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(26, 54, 93, 0.15);
    border-color: var(--primary-color);
}

.services-detail .card:hover::before {
    opacity: 1;
}

.services-detail .card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.services-detail .list-group-item {
    padding: 0.75rem 0;
    color: var(--text-dark);
    transition: all 0.2s ease;
    position: relative;
    padding-left: 1.5rem;
}

.services-detail .list-group-item::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    opacity: 0;
    transition: all 0.2s ease;
}

.services-detail .card:hover .list-group-item::before {
    opacity: 1;
    transform: translateX(3px);
}

.services-detail .list-group-item:hover {
    color: var(--primary-color);
    padding-left: 2rem;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(26, 54, 93, 0.15) !important;
    border-color: var(--primary-color);
}

.skill-icon i {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon i {
    color: var(--accent-color);
    transform: scale(1.1);
}

.service-card:hover,
.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(26, 54, 93, 0.15) !important;
    border-color: var(--primary-color);
}

/* Contact Page */
.contact-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.contact-info-card {
    padding: 2rem 1.5rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.contact-info-card i {
    transition: all 0.3s ease;
    color: var(--primary-color) !important;
}

.contact-info-card:hover i {
    transform: scale(1.1);
    color: var(--accent-color) !important;
}

/* About Page */
.about-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.about-stat {
    padding: 1.5rem 1rem;
}

.about-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.about-stat-label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

.about-step {
    padding: 2rem 1.5rem;
    position: relative;
}

.about-step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Portfolio Page */
.portfolio-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.portfolio-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.portfolio-image-wrapper {
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.portfolio-image-wrapper a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-image-logo {
    object-fit: contain;
    width: auto;
    height: auto;
    max-width: 65%;
    max-height: 65%;
    margin: auto;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-placeholder {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
}

.portfolio-card:hover .portfolio-placeholder {
    transform: scale(1.05);
}

.portfolio-tags .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-weight: 500;
}

/* Partner Page */
.partner-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.partner-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-lg);
    height: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.partner-logo {
    margin-bottom: 1.5rem;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo a {
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.partner-image {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.partner-card:hover .partner-image {
    transform: scale(1.05);
}

.partner-placeholder {
    transition: transform 0.3s ease;
    background: #f8f9fa;
    width: 100%;
    height: 100%;
}

.partner-card:hover .partner-placeholder {
    transform: scale(1.05);
}

.about-icon {
    opacity: 0.1;
    color: var(--primary-color);
}

.skill-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.skill-icon i {
    color: var(--primary-color) !important;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(26, 54, 93, 0.2));
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
}

.skill-card:hover .skill-icon i {
    color: var(--accent-color) !important;
    filter: drop-shadow(0 4px 8px rgba(214, 158, 46, 0.3));
}

/* Footer - Dark Gradient */
.footer {
    background: linear-gradient(135deg, #0f1729 0%, #1a365d 100%) !important;
    color: #CBD5E1 !important;
    padding: 60px 0 30px !important;
    height: auto !important;
    border-top: none;
}

.footer a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent-color);
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

.footer .text-muted {
    color: #64748B !important;
}

.footer h5 {
    color: #F1F5F9;
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.footer p {
    color: #94A3B8;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #94A3B8;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.footer-social a:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #94A3B8;
    font-size: 0.95rem;
}

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

/* Navbar - Glassmorphism */
.custom-navbar {
    box-shadow: none;
    background-color: rgba(255, 255, 255, 0.95) !important;
    padding: 1rem 0;
    min-height: 72px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.custom-navbar.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 0;
}

.custom-navbar .navbar-brand {
    color: var(--text-dark) !important;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-accent {
    color: var(--accent-color);
}

.custom-navbar .navbar-brand .brand-accent {
    color: var(--accent-color);
}

.custom-navbar .navbar-brand:hover {
    opacity: 0.8;
}

.navbar-cta-btn {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 0.5rem 1.25rem !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.navbar-cta-btn:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.custom-navbar .navbar-nav .nav-link:not(.navbar-cta-btn) {
    color: var(--text-dark) !important;
    font-weight: 400;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.custom-navbar .navbar-nav .nav-link:not(.navbar-cta-btn):hover {
    color: var(--primary-color) !important;
}

.custom-navbar .navbar-nav .nav-link.active:not(.navbar-cta-btn),
.custom-navbar .navbar-nav .nav-item.active .nav-link:not(.navbar-cta-btn) {
    color: var(--primary-color) !important;
    font-weight: 600;
    background-color: transparent !important;
}

.custom-navbar .navbar-nav .nav-link.active:not(.navbar-cta-btn)::after,
.custom-navbar .navbar-nav .nav-item.active .nav-link:not(.navbar-cta-btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px 2px 0 0;
}

.custom-navbar .navbar-toggler {
    border-color: var(--primary-color);
    padding: 0.25rem 0.5rem;
}

.custom-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2826, 54, 93, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991px) {
    .custom-navbar .navbar-nav {
        padding-top: 1rem;
    }
    
    .custom-navbar .navbar-nav .nav-link.active::after,
    .custom-navbar .navbar-nav .nav-item.active .nav-link::after {
        left: 0;
        right: 0;
    }
}

/* Cards */
.card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.card-body {
    padding: 2rem;
}

/* Buttons - Schema Colori Vivaci */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary,
.btn-dark {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
    position: relative;
    z-index: 1;
}

.btn-primary:hover,
.btn-dark:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    border: none;
    color: #1a202c;
    box-shadow: 0 4px 15px rgba(214, 158, 46, 0.3);
    position: relative;
    z-index: 1;
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-color) 100%);
    color: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 158, 46, 0.4);
}

.btn-light {
    background-color: #ffffff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-light:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 54, 93, 0.2);
}

.btn-outline-light {
    border-color: #ffffff;
    color: #ffffff;
    background-color: transparent;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    color: #ffffff;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 54, 93, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
    margin-bottom: 2rem;
}

.breadcrumb-item > a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.breadcrumb-item > a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-light);
}

/* Alert Messages */
.alert {
    border-radius: 8px;
    border: none;
}

/* Text Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%) !important;
}

.text-dark {
    color: var(--text-dark) !important;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-section,
    .page-header {
        padding: 60px 0 !important;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .hero-icon i,
    .about-icon i {
        font-size: 5rem !important;
    }
    
    .service-icon-large i {
        font-size: 3rem !important;
    }
    
    .services-section,
    .technologies-section,
    .cta-section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .hero-section,
    .page-header {
        padding: 40px 0 !important;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.skill-card,
.contact-info-card {
    animation: fadeIn 0.6s ease-out;
}

/* Grid View Styles (for backend compatibility) */
.grid-view th,
.grid-view td:last-child {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 50px;
}

/* Error Summary */
.error-summary {
    color: #721c24;
    background: #f8d7da;
    border-left: 3px solid #dc3545;
    padding: 10px 20px;
    margin: 0 0 15px 0;
    border-radius: 8px;
}

/* Hint Block */
.hint-block {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Not Set */
.not-set {
    color: #c55;
    font-style: italic;
}

/* Navbar Logout Button */
.navbar form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
    background: none;
    border: none;
}

@media(max-width: 767px) {
    .navbar form > button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.navbar form > button.logout:focus,
.navbar form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.navbar form > button.logout:focus {
    outline: none;
}

/* Captcha */
#contactform-verifycode-image {
    border-radius: 8px;
    cursor: pointer;
}

/* Links */
a {
    transition: color 0.3s ease;
    color: var(--primary-color);
}

a:hover {
    color: var(--accent-color);
}

/* Section Spacing */
section {
    position: relative;
}

/* Opacity Utilities */
.opacity-25 {
    opacity: 0.25;
}

.opacity-50 {
    opacity: 0.5;
}

/* Gap Utilities */
.gap-3 {
    gap: 1rem;
}

/* Text Decoration */
.text-decoration-none {
    text-decoration: none !important;
}

/* Override Bootstrap primary colors */
:root {
    --bs-primary: var(--primary-color);
    --bs-primary-rgb: 26, 54, 93;
    --bs-dark: var(--dark-color);
    --bs-dark-rgb: 30, 41, 59;
}

/* Pagination - Schema Colori Vivaci */
.pagination-custom .page-link {
    color: var(--primary-color);
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.pagination-custom .page-link:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(26, 54, 93, 0.2);
}

.pagination-custom .page-item.active .page-link {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(26, 54, 93, 0.3);
}

.pagination-custom .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #ffffff;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-custom .page-item.disabled .page-link:hover {
    color: #6c757d;
    background-color: #ffffff;
    border-color: #dee2e6;
    transform: none;
}

/* Social Share Buttons */
.social-share {
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.btn-social {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.btn-social i {
    font-size: 1rem;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-facebook {
    background-color: #1877F2;
    color: #ffffff;
}

.btn-facebook:hover {
    background-color: #166FE5;
    color: #ffffff;
}

.btn-twitter {
    background-color: #1DA1F2;
    color: #ffffff;
}

.btn-twitter:hover {
    background-color: #1A91DA;
    color: #ffffff;
}

.btn-linkedin {
    background-color: #0077B5;
    color: #ffffff;
}

.btn-linkedin:hover {
    background-color: #006399;
    color: #ffffff;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #ffffff;
}

.btn-whatsapp:hover {
    background-color: #20BA5A;
    color: #ffffff;
}

.btn-email {
    background-color: var(--text-light);
    color: #ffffff;
}

.btn-email:hover {
    background-color: var(--text-dark);
    color: #ffffff;
}

@media (max-width: 576px) {
    .social-share .btn-social {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .social-share .btn-social i {
        font-size: 0.9rem;
    }
}

/* ============================================
   TEMA CHIARO / SCURO
   Il tema si attiva con l'attributo data-bs-theme su <html>,
   impostato dallo script inline nel <head> (evita il flash iniziale).
   ============================================ */

/* Colori di marca: NON cambiano mai con il tema.
   Servono alle superfici piene navy con testo bianco (hero, page header, CTA,
   riquadri icona), che restano corrette anche su pagina scura. */
:root {
    --brand-navy: #1a365d;
    --brand-navy-dark: #132a4a;
}

/* Pulsante di cambio tema */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 0.75rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-medium);
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* In chiaro si vede la luna (cosa succede al clic), in scuro il sole.
   I selettori sono ancorati a i / span: icone ed etichette condividono la classe. */
.theme-toggle i.theme-toggle-light,
[data-bs-theme="dark"] .theme-toggle i.theme-toggle-dark {
    display: none;
}

[data-bs-theme="dark"] .theme-toggle i.theme-toggle-light {
    display: inline-block;
}

/* Da desktop il pulsante e' una pastiglia con la sola icona */
.theme-toggle span.theme-toggle-label {
    display: none;
    white-space: nowrap;
}

/* Da mobile il pulsante vive dentro il menu a panino, quindi diventa
   una voce a tutta larghezza con etichetta, coerente con le altre */
@media (max-width: 991.98px) {
    .theme-toggle {
        width: 100%;
        height: auto;
        margin: 0.75rem 0 0;
        padding: 0.6rem 1rem;
        gap: 0.6rem;
        border-radius: var(--radius-sm);
        justify-content: flex-start;
    }

    .theme-toggle:hover {
        transform: none;
    }

    .theme-toggle span.theme-toggle-dark {
        display: inline;
        font-size: 0.95rem;
        font-weight: 500;
    }

    [data-bs-theme="dark"] .theme-toggle span.theme-toggle-dark {
        display: none;
    }

    [data-bs-theme="dark"] .theme-toggle span.theme-toggle-light {
        display: inline;
        font-size: 0.95rem;
        font-weight: 500;
    }
}

/* Transizione morbida al cambio tema.
   Solo su body e navbar: le card hanno gia' un proprio "transition: all" per gli
   effetti hover e sovrascriverlo qui li disattiverebbe. */
body {
    transition: background-color 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    body,
    .theme-toggle {
        transition: none;
    }

    /* Chi ha ridotto le animazioni vede subito il contenuto al posto giusto:
       niente fade, niente slide, niente attesa dell'observer. */
    .js-anim .animate-on-scroll,
    .js-anim .animate-on-scroll.animate-in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .js-anim .hero-reveal > * {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .counter-value {
        transition: none;
    }

    /* Rete di sicurezza sul resto della pagina: le animazioni decorative
       in loop (blob dell'hero, float) si fermano, gli hover restano. */
    .hero-abstract,
    [class*="float"] {
        animation: none !important;
    }
}

/* --------------------------------------------
   Palette scura
   -------------------------------------------- */
[data-bs-theme="dark"] {
    /* Blu chiaro leggibile su fondo scuro: sostituisce il navy come colore
       interattivo (link, icone, bordi). Le superfici piene usano --brand-navy. */
    --primary-color: #6ea8fe;
    --primary-dark: #8ab4ff;
    --primary-light: #17233a;

    --accent-color: #e3b341;
    --accent-light: #f0cc6a;
    --accent-bg: #2a2313;

    /* Resta scuro: serve a .bg-dark e a --bs-dark, usati con testo bianco */
    --dark-color: #11161d;

    --text-dark: #e6edf3;
    --text-medium: #b8c4d0;
    --text-light: #94a3b8;

    --bg-light: #0d1117;
    --bg-white: #161b22;
    --border-color: #2a323d;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.35), 0 10px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45), 0 20px 48px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.5), 0 30px 60px rgba(0, 0, 0, 0.4);

    /* Bootstrap 5.3 */
    --bs-body-bg: #0d1117;
    --bs-body-color: #e6edf3;
    --bs-primary: #6ea8fe;
    --bs-primary-rgb: 110, 168, 254;
    --bs-emphasis-color: #f0f6fc;
    --bs-border-color: #2a323d;
}

/* --------------------------------------------
   Superfici che devono restare navy con testo bianco
   -------------------------------------------- */
[data-bs-theme="dark"] .page-header,
[data-bs-theme="dark"] .cta-section {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
    color: #ffffff;
}

[data-bs-theme="dark"] .blog-image-placeholder,
[data-bs-theme="dark"] .plugin-icon,
[data-bs-theme="dark"] .service-grid-icon {
    background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-dark));
}

/* --------------------------------------------
   Elementi pieni con il blu chiaro: il testo deve diventare scuro
   -------------------------------------------- */
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-dark,
[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-dark:hover,
[data-bs-theme="dark"] .btn-service-cta,
[data-bs-theme="dark"] .btn-service-cta:hover,
[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-light:hover,
[data-bs-theme="dark"] .service-grid-toggle:hover,
[data-bs-theme="dark"] .service-grid-toggle[aria-expanded="true"],
[data-bs-theme="dark"] .pagination-custom .page-link:hover,
[data-bs-theme="dark"] .pagination-custom .page-item.active .page-link {
    color: #0b1220 !important;
}

[data-bs-theme="dark"] .navbar-cta-btn {
    color: #0b1220 !important;
}

[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-dark,
[data-bs-theme="dark"] .btn-service-cta {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-dark:hover,
[data-bs-theme="dark"] .btn-service-cta:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
}

/* --------------------------------------------
   Navbar
   -------------------------------------------- */
[data-bs-theme="dark"] .custom-navbar {
    background-color: rgba(13, 17, 23, 0.92) !important;
}

[data-bs-theme="dark"] .custom-navbar.scrolled {
    background-color: rgba(13, 17, 23, 0.98) !important;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .custom-navbar .navbar-toggler {
    border-color: var(--primary-color);
}

[data-bs-theme="dark"] .custom-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28230, 237, 243, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --------------------------------------------
   Classi Bootstrap a colore fisso: .bg-light non segue data-bs-theme.
   E' la classe delle card "Approfondimenti" in fondo a ogni articolo.
   -------------------------------------------- */
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-white {
    background-color: var(--bg-white) !important;
}

[data-bs-theme="dark"] pre.bg-light,
[data-bs-theme="dark"] pre {
    background-color: #11161d !important;
    color: var(--text-dark);
}

[data-bs-theme="dark"] code {
    color: #f0a8a8;
}

/* --------------------------------------------
   Ombre delle card: su fondo scuro le ombre navy sono invisibili
   -------------------------------------------- */
[data-bs-theme="dark"] .blog-widget,
[data-bs-theme="dark"] .blog-post-card,
[data-bs-theme="dark"] .service-grid-card,
[data-bs-theme="dark"] .services-detail .card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .blog-post-card:hover,
[data-bs-theme="dark"] .service-grid-card:hover,
[data-bs-theme="dark"] .services-detail .card:hover,
[data-bs-theme="dark"] .service-card:hover,
[data-bs-theme="dark"] .skill-card:hover,
[data-bs-theme="dark"] .plugin-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
}

[data-bs-theme="dark"] .service-grid-icon,
[data-bs-theme="dark"] .service-grid-card:hover .service-grid-icon {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------
   Badge e tinte: erano navy trasparente su bianco, ora blu chiaro su scuro
   -------------------------------------------- */
[data-bs-theme="dark"] .blog-category,
[data-bs-theme="dark"] .service-feature-badge,
[data-bs-theme="dark"] .plugin-feature-badge {
    background: rgba(110, 168, 254, 0.14);
    color: var(--primary-dark);
    border-color: rgba(110, 168, 254, 0.3);
}

[data-bs-theme="dark"] .service-grid-card:hover .service-feature-badge {
    background: rgba(110, 168, 254, 0.22);
}

[data-bs-theme="dark"] .services-detail .card.shadow-sm {
    background: linear-gradient(135deg, rgba(110, 168, 254, 0.07) 0%, rgba(227, 179, 65, 0.07) 100%);
}

[data-bs-theme="dark"] .services-detail .card.shadow-sm:hover {
    background: linear-gradient(135deg, rgba(110, 168, 254, 0.12) 0%, rgba(227, 179, 65, 0.12) 100%);
}

/* --------------------------------------------
   Form, paginazione e residui a colore fisso
   -------------------------------------------- */
[data-bs-theme="dark"] .form-control {
    background-color: #11161d;
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #6b7684;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #11161d;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(110, 168, 254, 0.25);
    color: var(--text-dark);
}

[data-bs-theme="dark"] .pagination-custom .page-item.disabled .page-link,
[data-bs-theme="dark"] .pagination-custom .page-item.disabled .page-link:hover {
    color: var(--text-light);
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .partner-placeholder {
    background: #11161d;
}

[data-bs-theme="dark"] .error-summary {
    color: #f5b8bd;
    background: #3a1d21;
    border-left-color: #dc3545;
}

[data-bs-theme="dark"] .hint-block {
    color: var(--text-light);
}

[data-bs-theme="dark"] .btn-light {
    background-color: var(--bg-white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* btn-outline-dark eredita --bs-dark: su fondo scuro sarebbe bordo e testo scuri
   su scuro, quindi invisibile (usato nella CTA in fondo agli articoli) */
[data-bs-theme="dark"] .btn-outline-dark,
[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-bs-theme="dark"] .btn-outline-dark:hover,
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #0b1220;
}

/* Il bottone chiaro dentro la CTA resta bianco: la sezione e' navy in entrambi i temi */
[data-bs-theme="dark"] .cta-section .btn-light {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--brand-navy);
}

/* --------------------------------------------
   I colori ufficiali delle tecnologie non cambiano mai (loghi PHP, MySQL, ecc.):
   sono gia' definiti con !important e restano invariati.
   Qui si alza solo la leggibilita' di quelli troppo scuri su fondo nero.
   -------------------------------------------- */
[data-bs-theme="dark"] .tech-yii2,
[data-bs-theme="dark"] .tech-devops {
    color: var(--primary-color) !important;
}

[data-bs-theme="dark"] .tech-wordpress {
    color: #3499CD !important;
}

[data-bs-theme="dark"] .tech-jquery {
    color: #1289D8 !important;
}

/* ============================================
   Sezioni home 2026: riprova sociale, processo,
   testimonianze, prezzi, FAQ, CTA mobile
   ============================================ */

/* Il margine sotto la navbar segue l'altezza reale del componente, misurata
   dal JS. Il valore di scorta copre il primo paint e il caso senza JS. */
:root {
    --navbar-height: 72px;
}

/* --------------------------------------------
   Rassicurazioni sotto i bottoni dell'hero
   -------------------------------------------- */
.hero-reassurance {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.hero-reassurance i {
    color: var(--accent-light);
}

@media (max-width: 575.98px) {
    .hero-reassurance {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        align-items: flex-start;
    }

    .hero-reassurance span {
        display: none;
    }
}

/* --------------------------------------------
   Fascia loghi clienti
   -------------------------------------------- */
.clients-strip {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.clients-strip-title {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0;
}

.clients-marquee {
    display: flex;
    width: max-content;
    /* Le due copie della lista scorrono insieme: quando la prima e' uscita
       del tutto, la traslazione torna a zero e il ciclo riparte senza stacco. */
    animation: clientsScroll 45s linear infinite;
}

.clients-marquee:hover {
    animation-play-state: paused;
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 0 1.5rem;
    margin: 0;
    list-style: none;
}

/* Lo spazio di ogni logo e' fisso: i file hanno proporzioni molto diverse
   e senza un contenitore la fascia si riassesta man mano che caricano.
   Il fondo arriva dal backend, uno per logo: alcuni sono bianchi su
   trasparente e su una fascia chiara non si vedrebbero. */
.clients-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 62px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.clients-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.clients-item img {
    max-height: 38px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

@keyframes clientsScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Sul tema scuro le targhette restano quelle scelte nel backend: il bordo
   si smorza per non disegnare un rettangolo chiaro attorno a ognuna. */
[data-bs-theme="dark"] .clients-item {
    border-color: rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------
   Numeri
   -------------------------------------------- */
.stats-section {
    background: var(--bg-light);
}

/* --------------------------------------------
   Come lavoro
   -------------------------------------------- */
.process-card {
    position: relative;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.5rem 1.5rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.process-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.process-number {
    position: absolute;
    top: -18px;
    left: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: var(--shadow-sm);
}

[data-bs-theme="dark"] .process-number {
    color: var(--dark-color);
}

.process-icon {
    font-size: 1.75rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

/* --------------------------------------------
   Testimonianze
   -------------------------------------------- */
.testimonials-section {
    background: var(--bg-light);
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin: 0;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.testimonial-rating {
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.testimonial-star-off {
    color: var(--border-color);
}

.testimonial-quote {
    flex: 1 1 auto;
    margin: 0 0 1.25rem;
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.7;
}

.testimonial-quote::before {
    content: "\201C";
    color: var(--accent-color);
    font-size: 1.6em;
    line-height: 0;
    vertical-align: -0.35em;
    margin-right: 0.1em;
}

.testimonial-quote::after {
    content: "\201D";
    color: var(--accent-color);
    font-size: 1.6em;
    line-height: 0;
    vertical-align: -0.45em;
    margin-left: 0.05em;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
}

/* --------------------------------------------
   Trasparenza sui costi
   -------------------------------------------- */
.pricing-teaser-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.pricing-teaser-label {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-light);
}

.pricing-teaser-amount {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color);
    letter-spacing: var(--letter-spacing-tight);
}

/* --------------------------------------------
   Tecnologie in forma compatta
   -------------------------------------------- */
.tech-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
}

.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-white);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-medium);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tech-chip i {
    color: var(--primary-color);
}

.tech-chip:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--text-dark);
}

/* --------------------------------------------
   FAQ
   -------------------------------------------- */
.faq-section .accordion-item {
    background: var(--bg-white);
}

.faq-section .accordion-button {
    background: var(--bg-white);
    color: var(--text-dark);
}

.faq-section .accordion-button:not(.collapsed) {
    background: var(--primary-light);
    color: var(--primary-color);
    box-shadow: none;
}

.faq-section .accordion-body {
    background: var(--bg-white);
}

/* --------------------------------------------
   Barra CTA fissa su mobile
   -------------------------------------------- */
#mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1035;
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(110%);
    transition: transform 0.28s ease;
}

#mobile-cta.visible {
    transform: translateY(0);
}

#mobile-cta .btn {
    flex: 1 1 0;
    font-weight: 600;
    padding: 0.7rem 0.5rem;
}

/* Sopra il breakpoint la barra non serve: ci sono navbar e CTA in pagina */
@media (min-width: 768px) {
    #mobile-cta {
        display: none;
    }
}

/* --------------------------------------------
   Messa a fuoco da tastiera: visibile ovunque, senza
   comparire al click del mouse.
   -------------------------------------------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.accordion-button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.btn:active,
.tech-chip:active {
    transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
    .clients-marquee {
        animation: none;
        width: 100%;
        overflow-x: auto;
    }

    .clients-track:nth-child(2) {
        display: none;
    }

    #mobile-cta {
        transition: none;
    }
}

/* --------------------------------------------
   Font Awesome arriva dopo il primo render: lo spazio delle icone
   va riservato prima, altrimenti al loro arrivo il testo si sposta.
   -------------------------------------------- */
.btn > i,
.hero-reassurance i,
.navbar i,
#mobile-cta i {
    display: inline-block;
    width: 1em;
    text-align: center;
}

/* --------------------------------------------
   Convivenza degli elementi flottanti su mobile: quando la barra CTA
   e' a schermo, torna-su e widget WhatsApp salgono sopra di essa.
   -------------------------------------------- */
@media (max-width: 767.98px) {
    #mobile-cta.visible ~ #back-to-top {
        bottom: 152px;
    }

    #mobile-cta.visible ~ #whatsapp-widget {
        bottom: 82px;
    }
}

/* --------------------------------------------
   Modulo contatti: campo esca e oggetto facoltativo
   -------------------------------------------- */

/* Il campo esca esce dal flusso senza display:none, che alcuni bot
   riconoscono e saltano. Resta fuori dallo schermo e fuori dal tab order. */
.contact-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-optional > summary {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.contact-optional > summary::-webkit-details-marker {
    display: none;
}

.contact-optional > summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.85rem;
    line-height: 1;
    flex: 0 0 auto;
}

.contact-optional[open] > summary::before {
    content: "\2212";
}

/* --------------------------------------------
   Slider testimonianze

   Lo scorrimento e' quello nativo del browser: il dito e la rotellina
   funzionano da soli, il JS aggiunge solo frecce e indicatori. Se il JS
   non parte resta una lista scorrevole, non una lista tagliata.
   -------------------------------------------- */
.testimonials-slider {
    position: relative;
}

.testimonials-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* Spazio per l'ombra delle card sollevate all'hover, che altrimenti viene tagliata */
    padding: 0.5rem 0.25rem 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonials-track::-webkit-scrollbar {
    display: none;
}

.testimonial-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    min-width: 0;
}

@media (min-width: 768px) {
    .testimonial-slide {
        flex-basis: calc((100% - 1.5rem) / 2);
    }
}

@media (min-width: 992px) {
    .testimonial-slide {
        flex-basis: calc((100% - 3rem) / 3);
    }
}

/* --------------------------------------------
   Frecce
   -------------------------------------------- */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.slider-arrow:hover:not(:disabled) {
    background: var(--primary-color);
    color: #fff;
}

[data-bs-theme="dark"] .slider-arrow:hover:not(:disabled) {
    color: var(--dark-color);
}

.slider-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.slider-arrow-prev {
    left: -12px;
}

.slider-arrow-next {
    right: -12px;
}

/* Su schermi stretti le frecce coprirebbero le card: lo scorrimento a dito
   basta, e i puntini restano a indicare la posizione. */
@media (max-width: 767.98px) {
    .slider-arrow {
        display: none;
    }
}

/* Sotto i 1200px non c'e' margine fuori dal contenitore: le frecce rientrano */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .slider-arrow-prev {
        left: 4px;
    }

    .slider-arrow-next {
        right: 4px;
    }
}

/* --------------------------------------------
   Puntini
   -------------------------------------------- */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.slider-dot {
    position: relative;
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--border-color);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.slider-dot[aria-selected="true"] {
    background: var(--primary-color);
    transform: scale(1.35);
}

/* L'area cliccabile e' piu' grande del puntino visibile: 9px sono
   troppo pochi da centrare con il dito. */
.slider-dot::before {
    content: "";
    position: absolute;
    width: 32px;
    height: 32px;
    margin: -11.5px;
}

@media (prefers-reduced-motion: reduce) {
    .testimonials-track {
        scroll-behavior: auto;
    }

    .slider-dot {
        transition: none;
    }
}

/* Nota "prezzo finale" accanto alla tariffa: e' un vantaggio, non una
   postilla, quindi si legge con il colore dell'accento e non in grigio. */
.pricing-teaser-note {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-color);
    line-height: 1.4;
}

/* ============================================
   Hero della home, versione 2026

   Sostituisce il blocco di prosa + forma astratta con: etichetta di
   contesto, titolo, elenco dei domini realmente affrontati e un mockup
   di pannello gestionale costruito interamente in CSS.
   ============================================ */

/* Altezza calibrata perche' su un portatile da 900px entrino anche i bottoni
   e la riga delle garanzie: sono la parte che convince, tagliarla e' sprecarla. */
.hero-section {
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2.5rem, 4vw, 3.5rem) !important;
}

/* Griglia di sfondo appena accennata: da' profondita' senza rubare
   attenzione, e resta dietro alle due macchie radiali gia' presenti. */
.hero-section::before,
.hero-section::after {
    pointer-events: none;
}

.hero-section .container::before {
    content: "";
    position: absolute;
    inset: -100px 0 0 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* --------------------------------------------
   Etichetta di contesto
   -------------------------------------------- */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.hero-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.22);
}

/* --------------------------------------------
   Titolo
   -------------------------------------------- */
.hero-title {
    font-size: var(--fs-hero);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    color: #fff;
    text-wrap: balance;
}

/* Sottolineatura disegnata a mano dietro le due parole chiave */
.hero-title-accent {
    position: relative;
    white-space: nowrap;
    color: var(--accent-light);
}

.hero-title-accent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.06em;
    height: 0.28em;
    border-radius: 999px;
    background: rgba(214, 158, 46, 0.28);
    z-index: -1;
}

/* --------------------------------------------
   Testo di apertura
   -------------------------------------------- */
.hero-lead {
    max-width: 34rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82) !important;
}

.hero-lead strong {
    color: #fff;
}

/* --------------------------------------------
   Domini: cosa ho gia' costruito
   -------------------------------------------- */
.hero-domains {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.6rem;
    padding: 0;
}

.hero-domains li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.86rem;
    font-weight: 500;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.hero-domains li:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(214, 158, 46, 0.5);
}

.hero-domains i {
    color: var(--accent-light);
    font-size: 0.9em;
}

/* --------------------------------------------
   Inviti all'azione
   -------------------------------------------- */
.hero-buttons {
    margin-top: 0;
    position: relative;
    z-index: 2;
}

.hero-agency-link {
    margin: 1.1rem 0 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.68) !important;
}

.hero-agency-link a {
    color: var(--accent-light);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(236, 201, 75, 0.4);
    padding-bottom: 1px;
    transition: border-color 0.2s ease;
}

.hero-agency-link a:hover {
    border-bottom-color: var(--accent-light);
}

/* --------------------------------------------
   Rassicurazioni
   -------------------------------------------- */
.hero-reassurance {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    margin: 1.5rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75) !important;
}

.hero-reassurance li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.hero-reassurance i {
    color: var(--accent-light);
}

/* --------------------------------------------
   Mockup del pannello gestionale

   Tutto in CSS: nessuna immagine da scaricare, nessuno spostamento di
   layout al caricamento, e si adatta da solo ai due temi.
   -------------------------------------------- */
.hero-mock {
    perspective: 1400px;
}

.hero-mock-window {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(13, 20, 34, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px);
    transform: rotateY(-9deg) rotateX(4deg) translateZ(0);
    animation: heroMockFloat 7s ease-in-out infinite;
}

@keyframes heroMockFloat {
    0%, 100% { transform: rotateY(-9deg) rotateX(4deg) translateY(0); }
    50%      { transform: rotateY(-9deg) rotateX(4deg) translateY(-14px); }
}

.hero-mock-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-mock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.hero-mock-dot:first-child { background: #ff5f57; }
.hero-mock-dot:nth-child(2) { background: #febc2e; }
.hero-mock-dot:nth-child(3) { background: #28c840; }

.hero-mock-title {
    margin-left: auto;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.5);
}

.hero-mock-body {
    display: flex;
    min-height: 280px;
}

.hero-mock-side {
    flex: 0 0 74px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.1rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-mock-navline {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.hero-mock-navline.is-active {
    background: var(--accent-color);
    opacity: 0.85;
}

.hero-mock-navline:nth-child(2) { width: 80%; }
.hero-mock-navline:nth-child(3) { width: 65%; }
.hero-mock-navline:nth-child(4) { width: 88%; }
.hero-mock-navline:nth-child(5) { width: 55%; }

.hero-mock-main {
    flex: 1 1 auto;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-mock-tiles {
    display: flex;
    gap: 0.6rem;
}

.hero-mock-tile {
    flex: 1 1 0;
    padding: 0.65rem 0.7rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.2;
}

.hero-mock-tile b {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.hero-mock-tile i {
    font-style: normal;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.hero-mock-chart {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    min-height: 92px;
}

.hero-mock-chart span {
    flex: 1 1 0;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--accent-light), rgba(214, 158, 46, 0.32));
    transform-origin: bottom;
    animation: heroMockGrow 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}

.hero-mock-chart span:nth-child(1) { animation-delay: 0.5s; }
.hero-mock-chart span:nth-child(2) { animation-delay: 0.58s; }
.hero-mock-chart span:nth-child(3) { animation-delay: 0.66s; }
.hero-mock-chart span:nth-child(4) { animation-delay: 0.74s; }
.hero-mock-chart span:nth-child(5) { animation-delay: 0.82s; }
.hero-mock-chart span:nth-child(6) { animation-delay: 0.9s; }
.hero-mock-chart span:nth-child(7) { animation-delay: 0.98s; }

@keyframes heroMockGrow {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}

.hero-mock-rows {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.hero-mock-rows span {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.hero-mock-rows span:nth-child(2) { width: 82%; }
.hero-mock-rows span:nth-child(3) { width: 64%; }

/* --------------------------------------------
   Schermi stretti
   -------------------------------------------- */
@media (max-width: 575.98px) {
    .hero-domains li {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-reassurance {
        flex-direction: column;
        gap: 0.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-mock-window {
        animation: none;
    }

    .hero-mock-chart span {
        animation: none;
    }
}

/* ============================================
   Sezioni home: allineamento al linguaggio dell'hero

   Sotto l'hero la pagina cambiava registro: sezioni piatte, icone piccole
   tutte dello stesso colore, titoli tutti identici. Qui tornano la trama a
   griglia, l'accento oro e i riquadri arrotondati gia' usati sopra.
   ============================================ */

/* --------------------------------------------
   Occhiello sopra i titoli di sezione
   -------------------------------------------- */
.section-eyebrow {
    display: inline-block;
    margin-bottom: 0.6rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: var(--accent-bg);
    color: #8a6412;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

[data-bs-theme="dark"] .section-eyebrow {
    background: var(--accent-bg);
    color: var(--accent-light);
}

/* --------------------------------------------
   Numeri: fascia scura con la trama dell'hero
   -------------------------------------------- */
.stats-section {
    position: relative;
    padding: clamp(2.75rem, 5vw, 4rem) 0;
    background: linear-gradient(135deg, #132a4a 0%, #1a365d 55%, #22406e 100%);
    overflow: hidden;
}

.stats-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
    pointer-events: none;
}

.stats-section .container {
    position: relative;
    z-index: 1;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    height: 100%;
    padding: 1.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(214, 158, 46, 0.55);
    background: rgba(255, 255, 255, 0.08);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.4rem;
    border-radius: 50%;
    background: rgba(214, 158, 46, 0.16);
    color: var(--accent-light);
    font-size: 1.05rem;
}

.stat-number {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing-tight);
    color: #fff;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------
   Servizi: icona in un riquadro, bordo oro all'hover

   Le regole storiche di .service-card e .service-icon restano piu' in alto
   nel foglio: qui vengono sovrascritte quelle che servono.
   -------------------------------------------- */
.service-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Filo d'oro che si scopre da sinistra al passaggio del mouse */
.service-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

.services-section .service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 1.1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-color), #2c5282);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(26, 54, 93, 0.28);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

/* La regola storica piu' in alto nel foglio colora l'icona di navy con
   !important: sul riquadro navy sparirebbe. Va riscritta con lo stesso peso,
   e va tolta l'ombra scura che su fondo scuro sporca soltanto. */
.services-section .service-icon i {
    color: #fff !important;
    filter: none;
    transition: color 0.35s ease;
}

/* Al passaggio del mouse si ribalta il riquadro invece del solo colore
   dell'icona: da navy a oro, con l'icona che diventa scura. Cosi' il
   contrasto regge in tutti e due gli stati e l'effetto resta ben visibile. */
.services-section .service-card:hover .service-icon {
    transform: translateY(-3px) rotate(-4deg);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    box-shadow: 0 12px 26px rgba(214, 158, 46, 0.4);
}

.services-section .service-card:hover .service-icon i {
    color: #1a202c !important;
}

[data-bs-theme="dark"] .services-section .service-icon {
    background: linear-gradient(135deg, #22406e, #2c5282);
}

/* --------------------------------------------
   Come lavoro: i quattro passaggi diventano una sequenza

   Il filo orizzontale dietro i numeri li lega tra loro: senza, quattro
   riquadri affiancati non si leggono come un percorso.
   -------------------------------------------- */
.process-steps {
    position: relative;
}

@media (min-width: 992px) {
    .process-steps::before {
        content: "";
        position: absolute;
        top: 20px;
        left: 12%;
        right: 12%;
        height: 2px;
        background: repeating-linear-gradient(
            90deg,
            var(--border-color) 0 8px,
            transparent 8px 16px
        );
        z-index: 0;
    }
}

.process-card {
    position: relative;
    z-index: 1;
    background: var(--bg-white);
}

.process-number {
    background: linear-gradient(135deg, var(--primary-color), #2c5282);
    border: 3px solid var(--bg-white);
    color: #fff;
}

[data-bs-theme="dark"] .process-number {
    color: #fff;
    border-color: var(--bg-light);
}

.process-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--accent-bg);
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
}

/* --------------------------------------------
   Plugin WordPress: pari dignita' alle altre schede
   -------------------------------------------- */
.plugin-card {
    border-radius: var(--radius-lg) !important;
    border-left: 4px solid var(--accent-color) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plugin-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* --------------------------------------------
   Invito finale: stesso fondo dell'hero al posto del nero piatto
   -------------------------------------------- */
.cta-section {
    position: relative;
    background: linear-gradient(135deg, #132a4a 0%, #1a365d 45%, #2c5282 100%);
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 0%, transparent 72%);
    mask-image: radial-gradient(ellipse at 50% 50%, #000 0%, transparent 72%);
    pointer-events: none;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

/* Il pulsante finale usa l'oro come quello dell'hero: e' lo stesso invito */
.cta-section .btn-light {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    border: none;
    color: #1a202c;
    font-weight: 700;
    padding: 0.9rem 2.2rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(214, 158, 46, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta-section .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(214, 158, 46, 0.45);
    color: #1a202c;
}

@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .service-card,
    .service-card::after,
    .services-section .service-icon,
    .plugin-card,
    .cta-section .btn-light {
        transition: none;
    }
}

/* --------------------------------------------
   Racconto esteso del progetto, a piena larghezza
   -------------------------------------------- */
.project-story {
    padding: 2.25rem 2.5rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
}

.project-body p {
    margin-bottom: 1.1rem;
    line-height: 1.8;
    color: var(--text-medium);
}

.project-body p:last-child {
    margin-bottom: 0;
}

.project-body ul {
    margin: 0 0 1.1rem;
    padding-left: 0;
    list-style: none;
}

.project-body ul li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.55rem;
    line-height: 1.7;
    color: var(--text-medium);
}

/* Pallino in oro al posto del segno di elenco, come gli altri elenchi del sito */
.project-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-color);
}

.project-body strong {
    color: var(--text-dark);
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .project-story {
        padding: 1.5rem 1.25rem;
    }
}

/* --------------------------------------------
   Scheda tecnica nella colonna del progetto
   -------------------------------------------- */
.project-facts {
    margin: 0 0 1.75rem;
}

.project-facts dt {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-light);
}

.project-facts dd {
    margin: 0 0 0.9rem;
    font-size: 1.02rem;
    color: var(--text-dark);
    word-break: break-word;
}

.project-facts dd a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 54, 93, 0.25);
}

.project-facts dd a:hover {
    border-bottom-color: var(--primary-color);
}

/* --------------------------------------------
   Competenze raggruppate per categoria

   L'elenco unico reggeva quindici voci; con trenta serviva una struttura,
   altrimenti diventa un muro in cui non si distingue piu' nulla.
   -------------------------------------------- */
.tech-groups {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 60rem;
    margin: 0 auto;
}

.tech-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

/* Su schermi larghi l'etichetta sta a sinistra, cosi' le pillole di ogni
   categoria restano incolonnate e si leggono come blocchi distinti. */
@media (min-width: 768px) {
    .tech-group {
        grid-template-columns: 11rem 1fr;
        gap: 1.25rem;
        align-items: baseline;
    }
}

.tech-group-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}

@media (min-width: 768px) {
    .tech-group-title {
        text-align: right;
        padding-top: 0.5rem;
    }
}

/* Dentro un gruppo le pillole partono da sinistra: centrate perderebbero
   l'allineamento tra una categoria e l'altra. */
.tech-group .tech-chips {
    justify-content: flex-start;
}

.tech-group + .tech-group {
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
}
