/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    --color-primary: #E10600;
    --color-primary-hover: #ff0b04;
    --color-bg: #0B0B0F;
    --color-surface: #1A1A1D;
    --color-text: #F0F0F0;
    --color-text-muted: #A0A0A5;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --glow-shadow: 0 0 15px rgba(225, 6, 0, 0.4);
    --glow-shadow-strong: 0 0 30px rgba(225, 6, 0, 0.7);
    --glass-bg: rgba(26, 26, 29, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

/* =========================================
   UTILITIES
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-red {
    color: var(--color-primary);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.w-100 {
    width: 100%;
}

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

/* Buttons */
.btn-primary, .btn-secondary, .btn-primary-small, .btn-secondary-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary:hover, .glow-effect:hover {
    background-color: var(--color-primary-hover);
    box-shadow: var(--glow-shadow-strong);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-surface);
    padding: 0.8rem 1.8rem;
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-primary-small {
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-primary-small:hover {
    background-color: var(--color-primary-hover);
    box-shadow: var(--glow-shadow);
}

.btn-secondary-small {
    background-color: var(--color-surface);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary-small:hover {
    background-color: #242429;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    border-radius: 4px;
    gap: 10px;
}

.btn-whatsapp:hover {
    background-color: #20bd5a;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.mt-1 {
    margin-top: 0.5rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 8px;
}

.border-glow {
    border: 1px solid rgba(225, 6, 0, 0.4);
    box-shadow: inset 0 0 20px rgba(225, 6, 0, 0.1);
}

/* =========================================
   HEADER & NAV
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 11, 15, 0.9);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.logo-img {
    height: 55px;
    object-fit: contain;
}

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

.nav-links a:not(.btn-primary-small) {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    transition: var(--transition);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for nav */
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    filter: brightness(0.7);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(11,11,15,0.4) 0%, rgba(11,11,15,1) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-block;
    background: rgba(225, 6, 0, 0.15);
    color: var(--color-primary);
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    border-radius: 30px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(225, 6, 0, 0.4);
}

.hero-title {
    font-size: 5.5rem;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-weight: 900;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.8;
}

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


/* =========================================
   FEATURES (Perché Scegliere TXXO)
   ========================================= */
.features-section {
    padding: 6rem 0;
    background-color: var(--color-bg);
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: var(--glow-shadow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(225,6,0,0.5));
}
.placeholder-icon {
    font-size: 3rem;
    line-height: 60px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* =========================================
   GALLERY
   ========================================= */
.gallery-section {
    padding: 5rem 0;
    background-color: var(--color-surface);
}

.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 0 var(--color-primary);
    transition: var(--transition);
}

.gallery-item:hover::after {
    box-shadow: inset 0 0 0 4px var(--color-primary);
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.services-section {
    padding: 6rem 0;
    background-color: var(--color-surface);
}

.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.service-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 0.8rem;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* =========================================
   PC CONFIGURATOR
   ========================================= */
.configuratore-section {
    padding: 6rem 0;
    background-color: var(--color-bg);
}

.configuratore-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 900px) {
    .configuratore-layout {
        grid-template-columns: 3fr 2fr;
    }
}

.configuratore-form {
    padding: 2.5rem;
}

.configuratore-form h3 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.config-step {
    margin-bottom: 1.5rem;
}

.config-step label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.custom-select, .custom-form input, .custom-form textarea, .custom-form select {
    width: 100%;
    background-color: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--color-text);
    padding: 1rem;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.custom-select:focus, .custom-form input:focus, .custom-form textarea:focus, .custom-form select:focus {
    border-color: var(--color-primary);
}

.custom-select option {
    background-color: var(--color-bg);
}

/* Configurator Preview */
.configuratore-preview {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.configuratore-preview h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.preview-image-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(225,6,0,0.3);
}

.preview-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recap-list {
    margin-bottom: 1.5rem;
}

.recap-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}

.recap-list li strong {
    color: var(--color-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.recap-list li span {
    font-weight: 500;
}

.compatibility-status {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.status-ok {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.status-warning {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
    border: 1px solid #f1c40f;
}

.price-estimate {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: right;
    margin-bottom: 1.5rem;
}

.hidden-form {
    display: none;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hidden-form.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   PREBUILT CONFIGURATIONS
   ========================================= */
.prebuilt-section {
    padding: 6rem 0;
    background-color: var(--color-surface);
}

.grid-prebuilt {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.prebuilt-card {
    position: relative;
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.prebuilt-card:hover {
    transform: translateY(-8px);
}

.badge-best-seller {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #fff;
    padding: 0.3rem 1rem;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 20px;
    letter-spacing: 1px;
}

.prebuilt-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}

.prebuilt-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.chip {
    display: inline-block;
    background: rgba(255,255,255,0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.prebuilt-card ul {
    text-align: left;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.prebuilt-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.95rem;
}

.prebuilt-card ul li::before {
    content: '▪';
    color: var(--color-primary);
    margin-right: 8px;
}

/* Accordion Dettagli Prestazioni */
.performance-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease, padding 0.4s ease;
    opacity: 0;
    text-align: left;
    background: rgba(0,0,0,0.4);
    border-radius: 6px;
    margin-top: 0;
    padding: 0 1rem;
    border: 1px solid transparent;
}

.performance-details.active {
    max-height: 300px;
    opacity: 1;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(225, 6, 0, 0.2);
}

.perf-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding: 0.6rem 0;
}

.perf-row:last-child {
    border-bottom: none;
}

.perf-row span {
    color: var(--color-text-muted);
}

.perf-row strong {
    color: var(--color-primary);
    font-weight: 800;
}

/* =========================================
   BONUS DOCENTI
   ========================================= */
.bonus-section {
    padding: 5rem 0;
    background-color: var(--color-bg);
}

.bonus-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 800px) {
    .bonus-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.bonus-text p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.bonus-image-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: var(--glass-border);
}

/* Use object fit trick since kit is a collage */
.object-fit-custom {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 80% 20%; 
}

/* =========================================
   CONTACTS & FOOTER
   ========================================= */
.contact-section {
    padding: 6rem 0;
    background-color: var(--color-surface);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info p {
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.method {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
}

.method-icon {
    font-size: 2rem;
}

.method h4 {
    margin-bottom: 0.2rem;
    color: #fff;
}

.contact-form-container {
    padding: 2.5rem;
}

.contact-form-container h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.border-bot {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}

.lead-text {
    font-size: 1.6rem;
    font-weight: 800;
}

/* =========================================
   FOOTER MASTER (NEW GRID)
   ========================================= */
.footer-master {
    background-color: #050508;
    padding: 5rem 0 2rem 0;
    border-top: 2px solid rgba(225,6,0,0.3);
}

.grid-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .grid-footer {
        grid-template-columns: 1fr 1fr 2fr;
    }
}

.footer-col .footer-data {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-heading {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

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

.footer-links a {
    color: var(--color-text-muted);
}

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

.footer-copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.hidden-mobile {
    display: none;
}

/* =========================================
   FLOATING ACTION BUTTONS (MIGLIORATI)
   ========================================= */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.fab-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 50px;
    color: white;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    text-transform: uppercase;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

.fab-button:hover {
    transform: translateY(-8px);
    color: white;
}

.fab-phone {
    background: linear-gradient(135deg, var(--color-primary), #9e0400);
    border: 2px solid rgba(255,255,255,0.1);
}

.fab-phone:hover {
    box-shadow: 0 15px 30px rgba(225, 6, 0, 0.5);
}

.fab-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: 2px solid rgba(255,255,255,0.1);
    animation: pulse-green 2s infinite;
}

.fab-whatsapp:hover {
    animation: none;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

.fab-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

@keyframes pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =========================================
   RESPONSIVE TABLET & MOBILE INTERFACE
   ========================================= */

/* Tablet (fino a 1024px) */
@media (max-width: 1024px) {
    .grid-features, .grid-services, .grid-prebuilt {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .configuratore-layout {
        grid-template-columns: 1fr; /* Stack configurator fields and recap */
    }

    .hero-title {
        font-size: 4rem !important;
    }

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

/* Smartphone (fino a 768px) */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .nav-content {
        height: 70px;
    }
    .hero-section {
        padding-top: 70px;
    }

    /* Grids to single column */
    .grid-features, .grid-services, .grid-prebuilt, .grid-footer {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* FAB Buttons Scaling per Smartphone (Circolari e non ingombranti) */
    .fab-container {
        bottom: 20px;
        right: 15px;
        gap: 15px;
        width: auto;
        align-items: flex-end;
    }
    
    .fab-button {
        padding: 0;
        width: 55px;
        height: 55px;
        justify-content: center;
        border-radius: 50%; /* Diventano cerchi perfetti */
    }

    .fab-icon {
        font-size: 1.6rem;
    }
    
    .fab-text {
        display: none; /* Nascondiamo il testo su cellulare per salvare spazio prezioso */
    }

    /* Navbar Dropdown */
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(11, 11, 15, 0.98);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid rgba(225,6,0,0.3);
        box-shadow: 0 15px 30px rgba(0,0,0,0.8);
    }

    .nav-links.active {
        display: flex;
    }

    /* Typography UI Shrink */
    .hero-title {
        font-size: 2.8rem !important;
        margin-top: 1rem;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
        text-align: center;
    }
    
    .hero-badge {
        display: block;
        margin: 0 auto 1.5rem auto;
        width: max-content;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .hero-actions .btn-primary, .hero-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Layout Spacing */
    .features-section, .services-section, .configuratore-section, .prebuilt-section, .bonus-section, .contact-section {
        padding: 3rem 0;
    }

    .configuratore-form, .configuratore-preview {
        padding: 1.2rem;
    }

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

    .service-card {
        padding: 1.5rem;
    }

    /* Contacts Mobile specific */
    .method {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 0.5rem;
    }
}
