/* ============================================
RESET & VARIABLES - TEOXQUANT STYLE
============================================ */
:root {
    --bg: #ffffff;
    --bg-secondary: #f8f9fc;
    --bg-card: #ffffff;
    /* Colori brand TeoxQuant */
    --text: #2d2b55;       /* Viola scuro (parte "Quant") */
    --text-secondary: #64748b;
    --accent: #7c5cfc;     /* Viola chiaro (parte "Teox") */
    --accent-hover: #6a4ce0;
    --border: #e2e8f0;
    --font: 'Inter', -apple-system, sans-serif;
    
    /* Variabili di compatibilità per Vecchio Sito (Cart/Marketplace) */
    --card-bg: #ffffff;
    --text-main: #2d2b55;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --bg-dark: #ffffff;
    --danger: #e04040;
    --danger-red: #e04040;
    --group-bg: #f8f9fc;
    
    /* Font Sizes Compatibilità */
    --fs-titolo: 2rem;
    --fs-testo: 1rem;
    --fs-piccolo: 0.9rem;
    --fs-minuscolo: 0.8rem;
    --fs-valore: 1.25rem;
    --fs-icon: 3rem;
    --fs-xs: 0.75rem;
    
    /* Dimensions Compatibilità */
    --navbar-height: 80px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --search-pad-v: 12px;
    --search-btn-pad-v: 12px;
    --search-btn-pad-h: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    overflow-y: scroll; /* Previene salti layout */
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding-bottom: 60px; /* Spazio per il disclaimer fisso */
}

a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul { list-style: none; }

/* ============================================
NAVBAR
============================================ */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 1rem 0; background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

.nav-container {
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 1.5rem;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    gap: 1.5rem;
}

/* LOGO IMMAGINE NAVBAR */
.nav-logo { 
    display: flex; 
    align-items: center; 
    flex-shrink: 0;
}
.nav-logo img {
    height: 34px;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav-menu { 
    display: flex; 
    gap: 1.1rem; 
    align-items: center; 
    flex-wrap: nowrap;
}
.nav-link { 
    font-size: 0.88rem; 
    font-weight: 500; 
    color: var(--text-secondary); 
    white-space: nowrap;
    padding: 0.3rem 0;
}
.nav-link:hover, .nav-link.active { color: var(--accent); font-weight: 500; }

/* Stile Badge Carrello */
.nav-cart-link { 
    position: relative; 
    display: flex !important; 
    align-items: center; 
    gap: 6px; 
    padding: 0 !important;
}
.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

.nav-hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 5px;
}
.nav-hamburger span { width: 24px; height: 2px; background: var(--text); transition: 0.3s; }

/* NAV CTA (bottone "Inizia Ora") */
.nav-cta {
    padding: 0.6rem 1.3rem;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================
BUTTONS
============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.8rem 1.8rem; border-radius: 50px;
    font-size: 0.95rem; font-weight: 600; transition: all 0.3s;
    border: none; cursor: pointer;
}
.btn-primary {
    background: var(--accent); color: #fff;
    box-shadow: 0 4px 14px rgba(124, 92, 252, 0.3);
}
.btn-primary:hover {
    background: var(--accent-hover); transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 92, 252, 0.4);
}
.btn-outline {
    background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
HERO SECTION
============================================ */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding: 8rem 2rem 4rem;
    background: radial-gradient(circle at top right, #f3f0ff 0%, transparent 40%);
}
.hero-container {
    max-width: 1200px; margin: 0 auto; width: 100%;
    display: grid; grid-template-columns: 1fr 1.2fr 1fr;
    gap: 2rem; align-items: center;
}
.hero-content { text-align: center; }
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800;
    line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 1.5rem; color: var(--text);
}
.hero-title .accent { color: var(--accent); }
.hero-subtitle {
    font-size: 1.25rem; color: var(--text-secondary); font-weight: 400;
    margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-buttons { display: flex; justify-content: center; gap: 1rem; }

/* EA CARDS */
.card-link { text-decoration: none; color: inherit; display: block; width: 100%; }
.ea-card {
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    padding: 1.8rem; transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); height: 100%;
}
.card-link:hover .ea-card {
    transform: translateY(-5px); border-color: var(--accent);
    box-shadow: 0 20px 25px -5px rgba(124, 92, 252, 0.15);
}
.ea-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.ea-name { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.ea-pairs { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.ea-badge {
    background: rgba(124, 92, 252, 0.1); color: var(--accent);
    padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}
.ea-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.ea-stat { text-align: center; padding: 0.6rem 0.2rem; background: #f8fafc; border-radius: 8px; }
.stat-val { display: block; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.stat-val.green { color: var(--accent); }
.stat-lbl { font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase; }

/* ============================================
STATS SECTION
============================================ */
.stats-section {
    padding: 4rem 2rem; background: var(--bg-secondary);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stats {
    max-width: 900px; margin: 0 auto;
    display: flex; justify-content: center; align-items: center;
    gap: 3rem; flex-wrap: wrap;
}
.stat {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; min-width: 150px;
}
.stat-number {
    color: var(--accent); font-size: 3rem; font-weight: 800;
    line-height: 1.1; margin-bottom: 0.5rem;
}
.stat-label { color: var(--text-secondary); font-size: 1rem; font-weight: 500; }
.stat-divider { width: 1px; height: 60px; background: var(--border); display: block; }

/* ============================================
SECTIONS GENERALI
============================================ */
.section { padding: 6rem 2rem; background: var(--bg); }
.content-center { max-width: 1100px; margin: 0 auto; text-align: center; }
.section-title { font-size: 2.5rem; font-weight: 700; letter-spacing: -1px; margin-bottom: 1rem; color: var(--text); }
.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 4rem; }
.features-grid, .steps-grid, .testimonials-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.feature, .step, .testimonial {
    padding: 2.5rem; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; text-align: left; transition: transform 0.3s;
}
.feature:hover, .step:hover { transform: translateY(-5px); border-color: var(--accent); }
.feature h3, .step h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.step-number { color: var(--accent); font-size: 1rem; font-weight: 800; display: block; margin-bottom: 1rem; }
.testimonial-text { font-style: italic; color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.7; }
.author-name { font-weight: 600; font-size: 0.9rem; display: block; }
.author-role { font-size: 0.8rem; color: var(--text-secondary); }

/* CTA */
.cta { background: var(--bg-secondary); }
.cta-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* ============================================
FOOTER
============================================ */
.footer { background: #fff; border-top: 1px solid var(--border); padding: 5rem 2rem 2rem; }
.footer-content {
    max-width: 1100px; margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-logo { display: flex; align-items: center; }
.footer-logo img { height: 32px; width: auto; object-fit: contain; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; max-width: 300px; line-height: 1.5; }
.footer-col h4 {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 1.2rem; color: var(--text); font-weight: 700;
}
.footer-col a { display: block; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.6rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    max-width: 1100px; margin: 0 auto; padding-top: 2rem;
    border-top: 1px solid var(--border); text-align: center; color: var(--text-secondary); font-size: 0.85rem;
}

/* ============================================
RESPONSIVE
============================================ */
@media (max-width: 1024px) {
    .hero-container { 
        grid-template-columns: 1fr; 
        gap: 2rem; 
        text-align: center; 
    }
    /* Su mobile/tablet: prima il testo, poi le card */
    .hero-content   { order: 1; }
    .hero-cards-left  { order: 2; }
    .hero-cards-right { order: 3; }

    .features-grid, .steps-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; gap: 3rem; }
    .footer-links { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: #fff; flex-direction: column; padding: 2rem;
        border-bottom: 1px solid var(--border);
        gap: 1.5rem;
    }
    .nav-menu.active { display: flex; }
    .nav-hamburger { display: flex; }
    .nav-cta { display: none; }
    .hero-title { font-size: 2.5rem; }
    .features-grid, .steps-grid, .testimonials-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
    .footer-links { grid-template-columns: 1fr; gap: 2rem; }
    .cta-buttons { flex-direction: column; }
    .stats { flex-direction: column; gap: 2rem; }
    .stat-divider { width: 60px; height: 1px; margin: 0.5rem 0; }

    #global-disclaimer {
        font-size: 0.6rem !important;
        padding: 6px 10px !important;
        line-height: 1.3 !important;
    }

    body {
        padding-bottom: 70px;
    }
}

/* ============================================
DISCLAIMER GLOBALE FISSO IN BASSO
============================================ */
#global-disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(45, 43, 85, 0.95);
    color: #e2e8f0;
    font-size: 0.7rem;
    line-height: 1.4;
    text-align: center;
    padding: 8px 16px;
    z-index: 9999;
    border-top: 1px solid rgba(124, 92, 252, 0.3);
    backdrop-filter: blur(6px);
    font-family: var(--font, 'Inter', sans-serif);
}

#global-disclaimer strong {
    color: #a78bfa;
}

/* ============================================
DISCLAIMER CARD MARKETPLACE
============================================ */
.mkt-card-disclaimer {
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    text-align: center;
    font-style: italic;
}

/* ============================================
   CARD HERO — VERSIONE CON BOX BIANCO
   ============================================ */
.hero-cards-left,
.hero-cards-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-variant {
  background: #fff !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  padding: 1.5rem !important;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05) !important;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.hero-variant:hover {
  transform: translateY(-5px) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 20px 25px -5px rgba(124, 92, 252, 0.15) !important;
}

/* Nascondi gli elementi che non servono nella hero */
.hero-variant .mkt-card-chart,
.hero-variant .mkt-card-desc,
.hero-variant .mkt-card-footer,
.hero-variant .mkt-card-disclaimer,
.hero-variant .mkt-featured-label,
.hero-variant .mkt-card-badge {
  display: none !important;
}

/* Ridimensiona le statistiche per la hero */
.hero-variant .mkt-card-stats {
  border: none;
  gap: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-variant .mkt-stat {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 4px;
  background: #f8fafc;
}

.hero-variant .mkt-stat:last-child {
  border-right: 1px solid var(--border-color);
}

/* Ridimensiona header e titolo */
.hero-variant .mkt-card-icon {
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
}

.hero-variant .mkt-card-meta h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.hero-variant .mkt-card-author {
  font-size: 0.75rem;
}

/* Se vuoi mostrare solo 2 statistiche (come nell'originale) 
   decommenta questa regola:
*/
/*
.hero-variant .mkt-stat:nth-child(3) {
  display: none;
}
.hero-variant .mkt-card-stats {
  grid-template-columns: 1fr 1fr;
}
*/

/* ============================================
   MOBILE OVERRIDES GLOBALI — Pagine interne
   (contact, about, collabora, signup, login, privacy)
   ============================================ */
@media (max-width: 768px) {

    /* --- AUTH (signup.html, login.html) --- */
    .auth-wrapper {
        padding: 100px 16px 60px !important;
        align-items: flex-start !important;
    }
    .auth-box {
        padding: 24px 20px !important;
        border-radius: 14px !important;
    }
    .auth-box h1 {
        font-size: 1.6rem !important;
    }
    .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }
    .form-row .form-input {
        margin-bottom: 0 !important;
    }
    .form-row .form-input + .form-input {
        margin-top: 0 !important;
    }
    /* Se .form-row è un flex con due input, li spazio io sotto */
    .form-row > * {
        width: 100% !important;
    }
    .form-row > *:not(:last-child) {
        margin-bottom: 16px !important;
    }

    /* --- CONTACT.HTML --- */
    #contact-form {
        padding: 1.5rem 1.25rem !important;
    }
    #contact-form label {
        font-size: 0.85rem !important;
    }
    .features-grid[style*="repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* --- ABOUT.HTML / COLLABORA.HTML / Privacy --- */
    .hero[style*="padding-top: 10rem"] {
        padding-top: 7rem !important;
        min-height: auto !important;
    }
    .hero-title[style*="clamp"] {
        font-size: 2rem !important;
    }
    .section-title {
        font-size: 1.75rem !important;
    }
    .section {
        padding: 3.5rem 1.25rem !important;
    }
    .content-center {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .feature, .step, .testimonial {
        padding: 1.75rem !important;
    }

    /* --- PRIVACY --- */
    .legal-page {
        padding: 6rem 1.25rem 3rem !important;
    }
    .legal-page h1 {
        font-size: 1.75rem !important;
    }
    .legal-page h2 {
        font-size: 1.1rem !important;
    }
    .legal-page .info-box {
        padding: 1rem 1.15rem !important;
    }

    /* --- COLLABORA (le 3 card profilo) --- */
    .features-grid[style*="minmax(280px, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

/* Schermi molto piccoli (iPhone SE) */
@media (max-width: 400px) {
    .hero-title { font-size: 1.8rem !important; }
    .auth-box { padding: 20px 16px !important; }
    .cart-item-name { font-size: 0.9rem !important; }
    .cart-item-price { font-size: 1rem !important; }
    .cart-summary-inner { padding: 18px !important; }
}