/* =========================================
   VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
    /* Colors - Warm Neutral Palette */
    --bg-primary: #faf9f7;
    --bg-secondary: #f3f1ed;
    --bg-card: #ffffff;
    --bg-tech: #1a1a2e;

    --text-primary: #2d2d2d;
    --text-secondary: #6b7280;
    --text-light: #faf9f7;

    --color-primary: #2563eb;
    /* Blue */
    --color-primary-dark: #1d4ed8;
    --color-accent: #0ea5e9;
    /* Aqua/Tech Blue */
    --color-success: #10b981;

    --border-color: #e5e1db;
    --border-color-light: #ece9e3;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing & Layout */
    --container-max: 1100px;
    --section-pad-y: 6rem;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.08), 0 4px 10px -4px rgb(0 0 0 / 0.04);
    --tech-glow: 0 0 20px rgba(14, 165, 233, 0.15);
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-pad-y) 0;
}

.bg-alt {
    background-color: var(--bg-secondary);
}

.highlight {
    color: var(--color-primary);
}

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

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    outline: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    background: var(--color-primary);
    color: white;
}

.btn-sm:hover {
    background: var(--color-primary-dark);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background-color: white;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background-color: var(--bg-secondary);
    transform: scale(1.05) translateY(-2px);
}

.btn-block {
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    transition: var(--transition-base);
    background: rgba(250, 249, 247, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color-light);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 70px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    /* A bit smaller than xxx-large to fit better in navbar */
    font-weight: 800;
    /* Extra bold */
    color: var(--color-primary);
    /* Use site blue */
    letter-spacing: -1.5px;
    line-height: 1;
    text-decoration: none;
    transition: var(--transition-base);
}

.logo-text:hover {
    color: var(--color-primary-dark, #1d4ed8);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn-sm) {
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:not(.btn-sm):hover {
    color: var(--color-primary);
}

/* Base utility for screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hamburger Menu Button */
.mobile-nav-toggle {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem;
    z-index: 2000;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    left: 0;
    transition: all 0.3s ease-in-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 6rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 70% 20%, rgba(37, 99, 235, 0.06), transparent 50%),
        radial-gradient(ellipse at 30% 80%, rgba(14, 165, 233, 0.05), transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-description {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: absolute;
    right: -10%;
    top: 20%;
    width: 50%;
    height: 80%;
    z-index: -1;
    opacity: 0.4;
}

/* tech grid pattern */
.tech-grid {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(45deg);
    transform-origin: top right;
}

/* Scroll Indicator / Bouncing Arrows */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-primary);
    animation: bounceArrows 2s infinite ease-in-out;
    opacity: 0.8;
    transition: var(--transition-base);
    z-index: 10;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

.scroll-text {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator:hover {
    color: var(--color-primary-dark);
    opacity: 1;
}

@keyframes bounceArrows {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -15px);
    }

    60% {
        transform: translate(-50%, -7px);
    }
}


/* =========================================
   SECTION HEADERS
   ========================================= */
.section-header {
    margin-bottom: 3rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

/* =========================================
   CHI SONO
   ========================================= */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.skill-item {
    background: var(--bg-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
    transition: var(--transition-base);
}

.skill-item:hover {
    border-color: var(--color-accent);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.approach-box {
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.mt-4 {
    margin-top: 2rem;
}

/* =========================================
   SERVIZI OFFERTI
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 1px solid var(--border-color-light);
    position: relative;
    overflow: hidden;
}

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

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

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

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
}

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

.service-list {
    margin-top: 1rem;
}

.service-list li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
}

.service-list li::before {
    content: "•";
    color: var(--color-accent);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* =========================================
   PERCHE SCEGLIEME (WHY ME)
   ========================================= */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.reason-item {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color-light);
    transition: var(--transition-fast);
}

.reason-item:hover {
    border-color: var(--color-accent);
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-success);
    color: white;
    border-radius: 50%;
    margin-right: 1rem;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.reason-item h4 {
    margin: 0;
    font-size: 1rem;
}

/* =========================================
   MODALITA DI LAVORO (WORKFLOW)
   ========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 65px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-number {
    position: absolute;
    left: 4px;
    top: 10px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.15rem;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--bg-secondary);
    transition: var(--transition-base);
}

.timeline-item:hover .timeline-number {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-content p {
    color: var(--text-secondary);
    margin: 0;
}


/* =========================================
   SERVIZI SPLIT LAYOUT
   ========================================= */

.services-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Colonna Sinistra (Ads) */
.services-info {
    background: linear-gradient(135deg, var(--color-primary), #1e40af);
    color: white;
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.services-info .info-content {
    position: relative;
    z-index: 2;
}

.services-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
}

.services-info p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Background Pattern/Immagine Placeholder per Ads */
.info-image-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.1;
    z-index: 1;
    background-image: radial-gradient(#ffffff 2px, transparent 2px);
    background-size: 20px 20px;
}

/* Colonna Destra (Accordion Rettangoli) */
.services-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-rectangle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.service-rectangle:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.1);
}

.rectangle-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--bg-card);
    transition: background 0.3s ease, color 0.3s ease;
}

.rectangle-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.rectangle-icon {
    color: var(--color-primary);
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
}

/* Hover Effect per il rettangolo: cambia colore */
.service-rectangle:hover .rectangle-header {
    background: rgba(37, 99, 235, 0.05);
    /* Sfondo blu leggero */
}

.service-rectangle:hover .rectangle-header h3 {
    color: var(--color-primary);
}

.service-rectangle.active .rectangle-header {
    background: var(--color-primary);
}

.service-rectangle.active .rectangle-header h3 {
    color: white;
}

.service-rectangle.active .rectangle-icon {
    transform: rotate(180deg);
    color: white;
}

.rectangle-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: var(--bg-card);
    padding: 0 2rem;
    /* padding x, while y is handled by active state to prevent jump */
}

.service-rectangle.active .rectangle-body {
    max-height: 800px;
    /* Abbastanza per mostrare tutto il contenuto */
    padding: 1.5rem 2rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
}

/* Restyling elementi vecchi testuali per i servizi interni ai box */
.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    min-height: auto;
    /* removed fixed height inside accordions */
}

.service-microcopy {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.05);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
    border: 1px dashed rgba(37, 99, 235, 0.2);
}

/* =========================================
   PRICING / CONSULENZA
   ========================================= */
.pricing-section {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.pricing-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Pricing Embla Base (Desktop) */
.pricing-embla {
    position: relative;
    max-width: 100%;
}

.pricing-embla__viewport {
    width: 100%;
}

.pricing-embla__buttons {
    display: none;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: center;
    /* This centers the smaller cards vertically next to the taller one */
    margin-bottom: 4rem;
}

.pricing-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition-base);
    text-align: center;
}

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

.pricing-card.featured {
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-lg);
    padding: 3.5rem 2rem;
    /* Make it slightly taller */
    z-index: 2;
    /* To pop over adjacent cards slightly if needed */
    transform: scale(1.05);
    /* Make it truly stand out on desktop */
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-card .badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-sm);
}

.pricing-card h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pricing-price {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.pricing-strike {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

.pricing-subdesc {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    text-align: left;
}

.pricing-card li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.pricing-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-success);
    font-weight: bold;
    font-size: 1.1rem;
}

.pricing-microcopy {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    border-top: 1px solid var(--border-color-light);
    padding-top: 1.5rem;
    margin-top: auto;
}

.services-cta {
    text-align: center;
    background: var(--color-primary);
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.services-cta p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.services-cta p:nth-child(2) {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 2.5rem;
}

.services-cta .btn {
    background: white;
    color: var(--color-primary);
    font-weight: bold;
}

.services-cta .btn:hover {
    background: var(--color-accent);
    color: var(--text-primary);
}


/* =========================================
   CONTACT
   ========================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.micro-copy {
    font-size: 0.875rem !important;
    font-weight: 500;
    color: var(--color-success) !important;
    margin-top: 1rem;
}

.direct-contacts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    background: var(--bg-secondary);
    transition: var(--transition-fast);
    width: fit-content;
}

.contact-link:hover {
    background: var(--color-primary);
    color: white;
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-fast);
    outline: none;
    background: var(--bg-card);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: var(--bg-tech);
    color: var(--text-light);
    padding: 2.5rem 0;
    text-align: center;
}

.footer-content p {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: underline;
}

.footer-links a:hover {
    color: white;
}

/* =========================================
   ACCORDIONS
   ========================================= */
.accordion-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color-light);
    transition: var(--transition-base);
    overflow: hidden;
    margin-bottom: 1rem;
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background: var(--bg-card);
    transition: var(--transition-base);
    user-select: none;
}

.accordion-card.active .accordion-header {
    border-bottom: 1px solid var(--border-color-light);
}

.accordion-header h4 {
    margin: 0;
    font-size: 1rem;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.accordion-inner {
    padding: 1.5rem;
}

.accordion-gallery {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.accordion-gallery img {
    flex: 1;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    max-height: 150px;
    box-shadow: var(--shadow-sm);
}

/* =========================================
   STORIE DI SUCCESSO (TABS & GRID CARDS)
   ========================================= */
.main-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.main-tab-btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.main-tab-btn.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}

.main-tab-btn:hover:not(.active) {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.main-tab-pane {
    display: none;
    animation: fadePane 0.4s ease-in-out forwards;
}

.main-tab-pane.active {
    display: block;
}

@keyframes fadePane {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.innovative-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.skills-highlight {
    margin-top: 1.5rem;
    font-size: 0.875rem !important;
    font-weight: 600;
    color: var(--color-primary) !important;
    background: rgba(37, 99, 235, 0.05);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px dashed rgba(37, 99, 235, 0.2);
}

.skills-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.chip {
    background: rgba(37, 99, 235, 0.08);
    color: var(--color-primary);
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.chip:hover {
    background: rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

/* =========================================
   EMBLA CAROUSEL – SCALE TWEEN EFFECT
   ========================================= */
.embla {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 0;
}

.embla__viewport {
    overflow: hidden;
}

.embla__container {
    display: flex;
    touch-action: pan-y pinch-zoom;
    backface-visibility: hidden;
}

.embla__slide {
    transform: translate3d(0, 0, 0);
    flex: 0 0 80%;
    min-width: 0;
    padding: 0 0.25rem;
    overflow: visible;
    position: relative;
}

@media (min-width: 768px) {
    .embla__slide {
        flex: 0 0 60%;
    }
}

@media (min-width: 1024px) {
    .embla__slide {
        flex: 0 0 55%;
    }
}

/* Inner card — scale/opacity set dynamically by JS tween */
.slide-card {
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    background: #0f172a;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.4s ease;
    transform-origin: center center;
}

.slide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 35%, transparent 100%);
    display: flex;
    align-items: flex-start;
    padding: 2rem 2rem;
    box-sizing: border-box;
    border-radius: 30px;
}

.slide-overlay h3 {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Navigation Buttons — centered below the carousel */
.embla__buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.embla__button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    padding: 0;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.embla__button svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.embla__button:hover {
    background: var(--color-primary-dark, #1d4ed8);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    transform: scale(1.08);
}

.embla__button:disabled {
    opacity: 0.3;
    cursor: default;
}

/* =========================================
   MODALS PER STORIE DI SUCCESSO
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
    width: 90%;
    max-width: 650px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: #64748b;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    padding-right: 30px;
    /* Spazio per la X di chiusura */
}

.modal-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.modal-content p strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* =========================================
   BACK TO TOP BUTTON
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: -60px;
    /* Hidden initially */
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.back-to-top.visible {
    bottom: 30px;
    opacity: 1;
}

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


/* =========================================
   ANIMATIONS (Intersection Observer)
   ========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-up.visible,
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}


/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100vw;
        /* Hide completely outside viewport */
        height: 100vh;
        width: 100%;
        max-width: 400px;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        padding: 4rem 2rem;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        z-index: 1500;
        margin: 0;
    }

    .nav-links[data-visible="true"] {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .hero {
        text-align: center;
        padding-bottom: 5rem;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-actions a {
        width: 100%;
        text-align: center;
    }

    .hero-visual {
        display: none;
        /* Hide visual on smaller screens */
    }

    .scroll-indicator {
        margin-top: 3rem;
        animation: bounceArrowsMobile 2s infinite ease-in-out;
    }

    @keyframes bounceArrowsMobile {

        0%,
        20%,
        50%,
        80%,
        100% {
            transform: translateY(0);
        }

        40% {
            transform: translateY(-15px);
        }

        60% {
            transform: translateY(-7px);
        }
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .stories-container {
        flex-direction: column;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .services-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-ad {
        padding: 2rem;
        /* Reduce padding on mobile */
    }

    /* Pricing Carousel on Mobile via Embla */
    .pricing-embla__viewport {
        overflow: hidden;
    }

    .pricing-grid.pricing-embla__container {
        display: flex;
        flex-direction: row;
        gap: 0;
        margin-bottom: 0;
        /* Remove the 4rem desktop margin to bring buttons closer */
    }

    .pricing-card.pricing-embla__slide {
        flex: 0 0 100%;
        min-width: 0;
        padding-left: 1rem;
        padding-right: 1rem;
        /* Using padding instead of margin avoids offset tracking issues in Embla centering */
    }

    .pricing-card.featured {
        transform: none !important;
        padding: 2.5rem 2rem;
    }

    .pricing-card.featured:hover {
        transform: translateY(-5px) !important;
    }

    /* Mobile Pricing Navigation Buttons */
    .pricing-embla__buttons {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 4rem;
        /* Distanzia dal blocco CTA sottostante */
    }

    .pricing-btn {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--color-primary);
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition-fast);
        padding: 0;
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
        color: white;
    }

    .pricing-btn svg {
        width: 22px;
        height: 22px;
        fill: none;
        /* Pricing uses stroke svg, not fill like embla__button */
        stroke: white;
    }

    .pricing-btn:active,
    .pricing-btn:hover {
        background: var(--color-primary-dark, #1d4ed8);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
        transform: scale(1.08);
    }

    .story-card {
        padding: 2.5rem 1.5rem;
    }

    .story-card p {
        font-size: 1rem;
    }

    .stories-tabs {
        flex: none;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .story-tab {
        border-left: none;
        border-bottom: 4px solid transparent;
        border-radius: 0;
        white-space: nowrap;
        padding: 1rem;
    }

    .story-tab.active {
        border-left-color: transparent;
        border-bottom-color: var(--color-primary);
    }
}

@media (max-width: 480px) {
    .section {
        padding: 4rem 0;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* =========================================
   FLOATING CONTACT BUTTONS
   ========================================= */
.floating-contacts {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 999;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.float-btn:hover {
    transform: scale(1.12);
}

.float-whatsapp {
    background-color: #25D366;
    width: 56px;
    height: 56px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    animation: whatsapp-pulse 2s infinite;
}

.float-whatsapp:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    animation: none;
}

.float-phone {
    background-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.float-phone:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.float-gmail {
    background-color: #EA4335;
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
}

.float-gmail:hover {
    box-shadow: 0 6px 20px rgba(234, 67, 53, 0.4);
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0.15);
    }

    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 20px rgba(37, 211, 102, 0);
    }
}

/* =========================================
   MOBILE CONTACTS ADJUSTMENT
   ========================================= */
.mobile-nav-contacts {
    display: none;
}

@media (max-width: 768px) {

    /* Hide the large floating contacts on mobile */
    .floating-contacts {
        display: none !important;
    }

    /* Show the contacts in the navbar */
    .mobile-nav-contacts {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-left: auto;
        margin-right: 1.5rem;
    }

    .mobile-nav-icon {
        color: var(--text-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

    .mobile-nav-icon svg {
        width: 22px;
        height: 22px;
    }

    .mobile-nav-icon.gmail {
        color: #EA4335;
    }

    .mobile-nav-icon.phone {
        color: var(--color-primary);
    }

    .mobile-nav-icon.whatsapp {
        color: #25D366;
    }

    /* Prevent the giant scroll arrow from overlapping buttons on short mobile screens */
    .scroll-indicator svg {
        width: 44px;
        height: 44px;
    }

    /* Move back-to-top button to the left on mobile to avoid overlapping pricing carousel arrow */
    .back-to-top {
        right: auto;
        left: 16px;
        width: 42px;
        height: 42px;
    }

    /* Give the timeline section extra left padding so numbers don't touch the screen edge */
    .timeline {
        padding-left: 10px;
    }
}