@import "animation.css";

/* ===================================
   CSS VARIABLES
=================================== */
:root {
    /* Colors */
    --primary-color: #FF3333;
    --secondary-color: #CC0000;
    --accent-color: #FF6666;
    --dark-bg: #0a0a0a;
    --darker-bg: #000000;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #999999;
    --border-color: #333333;
    --success-color: #FF3333;
    --error-color: #FF3333;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #FF3333, #CC0000);

    /* Spacing */
    --section-padding: 100px 0;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===================================
   UTILITY CLASSES
=================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #FF3333 0%, #FF6666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   LOADING SCREEN ANIMATIONS
=================================== */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.loading-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.loading-text {
    margin-bottom: 60px;
}

.loading-line {
    font-size: clamp(24px, 4.5vw, 52px);
    font-weight: 600;
    /* era 800, ora più elegante */
    letter-spacing: 7px;
    /* era 3px, ora più ariosa */
    line-height: 1.3;
    margin: 10px 0;
    opacity: 0;
    transform: translateY(40px);
}

.loading-line.line1 {
    background: linear-gradient(135deg, #FF3333 0%, #CC0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.loading-line.line2 {
    background: linear-gradient(135deg, #ffffff 0%, #FF3333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.6s forwards;
    /* era 1.1s, ora 0.6s */
}

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

.progress-container {
    width: 100%;
    max-width: 500px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FF3333 0%, #CC0000 100%);
    border-radius: 10px;
    transition: width 0.05s linear;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.3);
    /* era 20px/0.6, ora più sobrio */
}

.loading-percentage {
    margin-top: 20px;
    font-size: 20px;
    color: #FF3333;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
}

/* ===================================
   NAVIGATION
   MODIFICHE:
   - Trasparente di default (era 0.9)
   - Border-bottom neutro (era rosso)
   - Gap link 32px (era 40px)
   - Font-weight 400 (era 500)
   - Underline attivo 1px (era 2px)
=================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    /* era rgba(10,10,10,0.9) */
    backdrop-filter: none;
    /* nessun blur di default */
    z-index: 1000;
    padding: 24px 0;
    transition: background 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
    /* era rgba(255,51,51,0.1) */
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* neutro, non rosso */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    /* era 24px */
    font-weight: 700;
}

.logo img {
    height: 36px;
    /* era 40px */
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 32px;
    /* era 40px */
    align-items: center;
}

.nav-link {
    position: relative;
    font-weight: 400;
    /* era 500 */
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    /* leggermente smorzato */
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    /* era 2px */
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    /* era 3px */
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition-normal);
}

/* ===================================
   HERO SECTION CON VIDEO BACKGROUND
=================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    /* era contain — eliminava le bande nere */
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.50) 50%,
            rgba(0, 0, 0, 0.75) 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 2;
}

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

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-text {
    max-width: 900px;
}

.hero-subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    /* era pill rosso, ora label pulita */
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    /* rimosso: background, border, border-radius, padding */
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    max-width: 900px;
    color: #ffffff;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-value-props {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    align-items: center;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 8px;
    /* rimosso: background, border, border-radius, padding box */
    transition: opacity 0.3s ease;
}

.value-item:hover {
    opacity: 0.8;
}

.value-item i {
    font-size: 16px;
    color: var(--primary-color);
}

.value-item span {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    font-size: 14px;
}

/* separatore visivo tra value items */
.value-item+.value-item::before {
    content: '·';
    color: rgba(255, 255, 255, 0.2);
    margin-right: 30px;
    font-size: 18px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    /* era 16px 32px */
    border-radius: 8px;
    /* era 12px */
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-normal);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 51, 51, 0.3);
    /* era 0.4 */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 51, 51, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* era 2px rosso */
    color: rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
    z-index: 10;
}

@keyframes float {

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

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

@media (max-width: 768px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-value-props {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .value-item+.value-item::before {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 10px;
    }
}

/* ===================================
   SECTIONS
=================================== */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   ABOUT SECTION
   MODIFICHE:
   - Layout full-width (rimossa colonna immagine)
   - about-text centrato con max-width
   - cred-item: da card a riga con border-left
   - tech-stack: niente box contenitore
   - tech-badge: icone monocromatiche
   - value-proposition: 3 voci orizzontali, no lista puntata
=================================== */
.about {
    background: var(--dark-bg);
}

/* Layout full-width centrato, nessuna colonna immagine */
.about-content {
    display: block;
    max-width: 720px;
    margin: 0 auto;
}

.about-image {
    display: none;
}

.about-text h3 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 16px;
}

/* Credenziali: righe pulite con border-left, niente card */
.credentials {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 36px 0;
}

.cred-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 0 16px 20px;
    border-left: 2px solid var(--primary-color);
    margin-bottom: 16px;
    background: none;
    /* rimosso background rosso */
    border-radius: 0;
    /* rimosso border-radius */
    transition: border-color 0.3s ease, padding-left 0.3s ease;
}

.cred-item:hover {
    border-left-color: var(--accent-color);
    padding-left: 28px;
    /* leggero indent su hover */
}

.cred-item i {
    font-size: 22px;
    /* era 32px, ora più contenuto */
    color: var(--primary-color);
    width: 24px;
    flex-shrink: 0;
}

.cred-item strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.cred-item span {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

/* Tech stack: niente box contenitore */
.tech-stack {
    margin: 36px 0;
    padding: 0;
    /* rimosso padding */
    background: none;
    /* rimosso background */
    border: none;
    /* rimosso border */
    border-radius: 0;
}

.tech-stack h4 {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: left;
    /* era center */
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    /* era center */
}

/* Badge monocromatici: tutte le icone allo stesso colore */
.tech-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    transition: all var(--transition-normal);
    cursor: default;
}

.tech-badge:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Forza colore uniforme su TUTTE le icone — sovrascrive gli stili inline */
.tech-badge i {
    font-size: 16px;
    color: var(--text-muted) !important;
    /* !important per battere gli style="" inline */
}

.tech-badge span {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .tech-badges {
        gap: 8px;
    }

    .tech-badge {
        padding: 7px 12px;
    }

    .tech-badge i {
        font-size: 14px;
    }

    .tech-badge span {
        font-size: 12px;
    }
}

/* Value proposition: 3 voci orizzontali senza lista puntata */
.value-proposition {
    margin: 36px 0;
    padding: 0;
    /* rimosso padding */
    background: none;
    /* rimosso background */
    border-left: none;
    /* rimosso border-left spesso */
    border-radius: 0;
}

.value-proposition h4 {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Trasforma la lista in flex row */
.value-proposition ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
}

.value-proposition li {
    padding: 0;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Piccolo punto accento davanti a ogni voce */
.value-proposition li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .value-proposition ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===================================
   SERVICES SECTION
   MODIFICHE:
   - Card: bordo 1px neutro (era 2px)
   - Hover: solo ombra, niente bordo rosso
   - Icon: flat senza bordo né background
   - Hover icon: solo scale, no rotazione
   - btn-service: testo + freccia inline, no box
   - coming-soon badge: più sobrio
   - Dots: linee invece di cerchi
=================================== */
.services {
    background: var(--darker-bg);
    position: relative;
    overflow: hidden;
}

.services .section-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.02em;
}

.services-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 60px auto 40px;
    padding: 0 60px;
}

.services-carousel {
    display: flex;
    gap: 24px;
    /* era 30px */
    overflow: hidden;
    scroll-behavior: smooth;
    padding: 20px 0;
}

/* Card: bordo sottile neutro, niente rosso di default */
.service-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 300px;
    padding: 36px 28px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.07);
    /* era 2px solid #333 */
    border-radius: 12px;
    /* era 16px */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

/* Hover: solo lift + ombra, niente bordo rosso */
.service-card:hover {
    transform: translateY(-6px);
    /* era -8px */
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    /* ombra neutra, non rossa */
}

.service-card.coming-soon {
    opacity: 0.5;
    position: relative;
}

/* Badge coming soon: più sobrio, no gradient rosso acceso */
.coming-soon-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
}

/* Icon: flat, solo icona senza box */
.service-icon {
    width: auto;
    height: auto;
    margin: 0 0 20px 0;
    /* sinistra allineato, non centrato */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: none;
    /* rimosso background rosso */
    border: none;
    /* rimosso bordo rosso */
    border-radius: 0;
    transition: transform 0.3s ease;
}

/* Hover icon: solo scale, no rotazione */
.service-card:hover .service-icon:not(.disabled) {
    transform: scale(1.1);
}

.service-icon.disabled {
    opacity: 0.35;
}

.service-icon i {
    font-size: 32px;
    /* era 36px */
    color: var(--primary-color);
}

/* Titolo e descrizione allineati a sinistra */
.service-card h3 {
    font-size: 20px;
    /* era 24px */
    font-weight: 600;
    /* era 700 */
    margin-bottom: 10px;
    text-align: left;
    /* era center */
    color: var(--text-primary);
}

.service-description {
    color: var(--text-muted);
    /* era text-secondary */
    text-align: left;
    /* era center */
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 14px;
}

.service-features {
    list-style: none;
    margin-bottom: 28px;
    flex-grow: 1;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.service-features li:last-child {
    border-bottom: none;
}

.service-features i {
    color: var(--primary-color);
    font-size: 11px;
    flex-shrink: 0;
}

.service-features.disabled li {
    opacity: 0.4;
}

.service-features.disabled i {
    color: var(--text-muted);
}

/* btn-service: link testo + freccia, niente box */
.btn-service {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    /* era 100% */
    padding: 0;
    /* rimosso padding */
    background: none;
    /* rimosso background rosso */
    border: none;
    /* rimosso bordo */
    border-radius: 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.03em;
    transition: gap 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    margin-top: auto;
    text-transform: uppercase;
}

.btn-service:hover {
    gap: 10px;
    /* la freccia si allontana */
    opacity: 0.8;
    transform: none;
    /* rimosso translateY */
    box-shadow: none;
}

.btn-service i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.btn-service:hover i {
    transform: translateX(3px);
}

.btn-service:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    color: var(--text-muted);
}

.btn-service:disabled:hover {
    gap: 6px;
    opacity: 0.3;
}

/* Frecce carousel: più sottili */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    /* era 50px */
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    /* era 20px */
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-50%);
    box-shadow: none;
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Dots: linee invece di cerchi */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.carousel-dot {
    width: 24px;
    /* era 12px cerchio */
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    /* rimosso border */
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 40px;
    /* si allunga quando attivo */
    transform: none;
    box-shadow: none;
}

@media (max-width: 1200px) {
    .service-card {
        flex: 0 0 calc(50% - 12px);
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .services-carousel-wrapper {
        padding: 0 44px;
    }

    .service-card {
        flex: 0 0 100%;
        min-width: 0;
        padding: 28px 22px;
    }

    .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .services-carousel-wrapper {
        padding: 0 28px;
    }

    .carousel-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

/* ===================================
   PORTFOLIO SECTION
   MODIFICHE:
   - Card centrata e larga (max 700px) — un progetto non deve sembrare sperduto
   - object-fit: cover (era contain)
   - Altezza immagine aumentata a 400px
   - Overlay meno opaco (0.75 invece di 0.95)
   - portfolio-link: ghost neutro bianco, non rosso
   - Aggiunto .portfolio-note sotto la grid
=================================== */
.portfolio {
    background: var(--dark-bg);
    padding: 100px 0;
}

.portfolio-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 700px;
    /* centrata, non full-width */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.portfolio-image {
    position: relative;
    width: 100%;
    height: 400px;
    /* era 280px */
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* era contain */
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
    /* era 1.1, più sobrio */
}

/* Overlay: sempre leggermente visibile in basso, non solo su hover */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 28px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

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

.portfolio-content {
    width: 100%;
}

/* Tag categoria: piccolo uppercase sopra il titolo */
.portfolio-content p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portfolio-content p i {
    color: var(--primary-color);
    font-size: 10px;
}

.portfolio-content h3 {
    font-size: 22px;
    margin-bottom: 16px;
    color: #fff;
    font-weight: 600;
}

/* Link: ghost bianco neutro */
.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 9px 18px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.25s ease;
}

.portfolio-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    transform: none;
    box-shadow: none;
}

.portfolio-link i {
    font-size: 13px;
}

/* Nota sotto la grid quando i progetti sono pochi */
.portfolio-note {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.03em;
}

.portfolio-note a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 768px) {
    .portfolio-image {
        height: 260px;
    }

    .portfolio-overlay {
        padding: 20px;
    }

    .portfolio-content h3 {
        font-size: 18px;
    }
}

/* ===================================
   CONTACT SECTION
   MODIFICHE:
   - Grid leggermente più bilanciata (1fr 1.2fr)
   - contact-item: no icon box, solo icona inline + separatore
   - Form: no card box (no background, no border, no padding)
   - Campi: stile underline (solo border-bottom, bg trasparente)
   - Select: appearance:none + freccia custom SVG
   - Focus: solo border-bottom colorato
=================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

.contact-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.contact-info>p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 14px;
    line-height: 1.7;
}

.contact-details {
    margin-bottom: 0;
}

/* Item: icona piccola inline, niente box */
.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-item:last-child {
    border-bottom: none;
}

/* Rimuovi il vecchio icon box */
.contact-icon {
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 16px;
    color: var(--primary-color);
    width: 18px;
    text-align: center;
}

.contact-text h4 {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.contact-text a,
.contact-text p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.contact-text a:hover {
    color: var(--text-primary);
}

/* Form aperto: niente card */
.contact-form {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

.form-group {
    margin-bottom: 32px;
}

/* Campi stile underline */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-bottom-color: var(--primary-color);
    background: transparent;
    outline: none;
    box-shadow: none;
}

.form-group textarea {
    resize: none;
    min-height: 100px;
}

/* Select custom: freccia SVG, niente appearance nativa */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 24px;
    color: var(--text-muted);
}

.form-group select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Quando ha un valore selezionato */
.form-group select:not([value=""]) {
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

/* ===================================
   FOOTER
   MODIFICHE:
   - Padding 30px (era 80px dalla v3 — codice morto)
   - Social: solo icona, niente box background
   - Copyright più piccolo e muted
   - Rimosso tutto il CSS footer-grid inutilizzato
=================================== */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 32px 0;
}

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

.footer-content p {
    color: var(--text-muted);
    font-size: 13px;
}

.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Solo icona, niente box */
.social-links a {
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    color: var(--text-muted);
    font-size: 17px;
    transition: color 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    background: none;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ===================================
   WHATSAPP FLOAT BUTTON
=================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: #25D366;
    /* verde WhatsApp per riconoscibilità */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
    z-index: 998;
    transition: var(--transition-normal);
}

.whatsapp-float:hover {
    transform: translateY(-4px);
    /* era -5px + scale */
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float i {
    font-size: 28px;
    color: white;
}

/* ===================================
   SCROLL TO TOP
=================================== */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 997;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-4px);
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        padding: 30px;
        gap: 20px;
        transform: translateX(-100%);
        transition: var(--transition-normal);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-value-props {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        font-size: 32px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .scroll-to-top {
        bottom: 90px;
        right: 20px;
    }
}

/* ===================================
   NUOVE AGGIUNTE V3
=================================== */
.navbar.sticky {
    position: fixed;
    top: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

section {
    padding: 100px 0;
}

section:nth-child(even) {
    background: var(--dark-bg);
}

section:nth-child(odd) {
    background: var(--darker-bg);
}

.section-header {
    margin-bottom: 70px;
}

@media (max-width: 768px) {
    .hero-value-props {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .value-item+.value-item::before {
        display: none;
    }

    .credentials {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }
}

/* ===================================
   ANIMATIONS & POLISH
=================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.service-pricing-card,
.portfolio-item,
.cred-item {
    animation: fadeInUp 0.6s ease;
}

.service-pricing-card:hover {
    transform: translateY(-12px);
}

.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.fas,
.fab,
.far {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

/* ===================================
   ACCESSIBILITY
=================================== */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   PRINT
=================================== */
@media print {

    .navbar,
    .whatsapp-float,
    .scroll-to-top,
    .loading-screen {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .hero-background {
        display: none;
    }
}