/* Variante 4: Design scuro e moderno - VERSIONE MOBILE OTTIMIZZATA */
html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    color: #e5e5e5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dark-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* CORREZIONE MOBILE: Container senza padding su schermi piccoli */
@media (max-width: 768px) {
    .dark-container {
        padding: 0;
    }
    
    /* REGOLA GLOBALE: previeni overflow su mobile */
    * {
        max-width: 100% !important;
    }
    
    /* Eccezioni per elementi che devono essere full width */
    body, html {
        max-width: none !important;
    }
}

.neon-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.dark-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 100px 0;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

/* CORREZIONE MOBILE: Hero con padding ridotto */
@media (max-width: 768px) {
    .dark-hero {
        padding: 60px 20px;
        margin-bottom: 40px;
    }
}

.dark-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

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

/* CORREZIONE MOBILE: Box video con larghezza completa su mobile */
.hero-content > div {
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 30px;
    margin: 40px auto;
    max-width: 600px;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .hero-content > div {
        margin: 20px 0;
        padding: 20px;
        border-radius: 0;
        max-width: 100%;
    }
}

.price-badge-dark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6); }
}

.dark-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #a3a3a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    line-height: 1.1;
}

/* CORREZIONE MOBILE: Titolo più piccolo su mobile */
@media (max-width: 768px) {
    .dark-hero h1 {
        font-size: clamp(29px, 5vw, 37px);
        padding: 0 10px;
    }
}

.dark-hero .subtitle {
    font-size: 20px;
    color: #b3b3b3;
    margin-bottom: 40px;
    font-weight: 300;
}

@media (max-width: 768px) {
    .dark-hero .subtitle {
        font-size: 17px;
        padding: 0 10px;
    }
}

.dark-section {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 60px 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* CORREZIONE MOBILE: Sezioni senza bordi su mobile */
@media (max-width: 768px) {
    .dark-section {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 40px 20px;
        margin-bottom: 20px;
    }
}

.dark-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.dark-section h2 {
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 20px;
    color: #ffffff;
    text-align: center;
}

@media (max-width: 768px) {
    .dark-section h2 {
        font-size: 25px;
    }
}

.problem-grid-dark {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .problem-grid-dark {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 20px 0;
    }
}

.problem-card-dark {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s;
}

.problem-card-dark:hover {
    border-color: #667eea;
    transform: translateY(-4px);
}

.problem-card-dark .icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.problem-card-dark h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #ffffff;
}

.problem-card-dark p {
    color: #b3b3b3;
    line-height: 1.5;
}

.highlight-dark {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid #667eea;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .highlight-dark {
        border-radius: 8px;
        padding: 20px;
        margin: 20px 0;
    }
}

.highlight-dark::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: 12px;
    z-index: -1;
    animation: border-glow 3s ease-in-out infinite;
}

@keyframes border-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.solution-grid-dark {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .solution-grid-dark {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
}

.before-dark, .after-dark {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px;
}

.before-dark {
    border-color: #dc2626;
}

.after-dark {
    border-color: #10b981;
}

@media (max-width: 768px) {
    .before-dark, .after-dark {
        padding: 20px;
    }
}

.example-label-dark {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

.testimonial-dark {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px;
    margin: 40px 0;
    text-align: center;
}

@media (max-width: 768px) {
    .testimonial-dark {
        padding: 20px;
        margin: 20px;
    }
}

.gpt-grid-dark {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .gpt-grid-dark {
        gap: 20px;
        margin: 20px 0;
    }
}

.gpt-card-dark {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

/* Desktop: Assicuro altezza uniforme per allineamento verticale */
@media (min-width: 769px) {
    .gpt-card-dark {
        min-height: 400px;
    }
    
    .gpt-info-section,
    .gpt-video-section {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* Desktop: Alterna video a sinistra per carte pari */
.gpt-card-dark:nth-child(even) {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

.gpt-card-dark:nth-child(even) > * {
    direction: ltr;
}

/* CORREZIONE MOBILE COMPLETA: Override totale per mobile */
@media (max-width: 768px) {
    .gpt-card-dark,
    .gpt-card-dark:nth-child(even),
    .gpt-card-dark:nth-child(odd) {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        direction: ltr !important;
        border-radius: 8px;
        margin: 0 10px 20px 10px;
        width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
    }
    
    .gpt-card-dark > *,
    .gpt-card-dark:nth-child(even) > *,
    .gpt-card-dark:nth-child(odd) > * {
        direction: ltr !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

.gpt-card-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.gpt-card-dark:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

@media (max-width: 768px) {
    .gpt-card-dark:hover {
        transform: none;
    }
}

.gpt-info-section {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

/* Desktop: Assicuro che i bottoni CTA non escano dal contenitore */
@media (min-width: 769px) {
    .gpt-info-section .cyber-button {
        margin-top: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* MOBILE: Info section con padding ridotto e layout forzato */
@media (max-width: 768px) {
    .gpt-info-section,
    .gpt-card-dark:nth-child(even) .gpt-info-section,
    .gpt-card-dark:nth-child(odd) .gpt-info-section {
        padding: 20px !important;
        order: 1 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .gpt-video-section,
    .gpt-card-dark:nth-child(even) .gpt-video-section,
    .gpt-card-dark:nth-child(odd) .gpt-video-section {
        order: 2 !important;
        padding: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix bottone che NON esce dal bordo */
    .gpt-info-section .cyber-button {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        padding: 10px 8px !important;
        font-size: 12px !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }
}

.gpt-video-section {
    padding: 40px;
    background: #111111;
    border-left: 1px solid #333;
}

/* Desktop: Alterna video section per carte pari */
.gpt-card-dark:nth-child(even) .gpt-video-section {
    border-left: none;
    border-right: 1px solid #333;
}

/* MOBILE: Override completo per video section */
@media (max-width: 768px) {
    .gpt-video-section,
    .gpt-card-dark:nth-child(even) .gpt-video-section,
    .gpt-card-dark:nth-child(odd) .gpt-video-section {
        padding: 20px !important;
        border-left: none !important;
        border-right: none !important;
        border-top: 1px solid #333 !important;
        background: #111111;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Centro il titolo del video */
    .gpt-video-section h4 {
        text-align: center;
        margin-bottom: 12px;
    }
    
    /* Fix container del video per evitare overflow */
    .youtube-container {
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

.gpt-header-dark {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .gpt-header-dark {
        gap: 12px;
        margin-bottom: 12px;
    }
}

.gpt-avatar-dark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #667eea;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .gpt-avatar-dark {
        width: 60px;
        height: 60px;
    }
}

.gpt-avatar-dark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gpt-title-dark {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #ffffff;
}

@media (max-width: 768px) {
    .gpt-title-dark {
        font-size: 19px;
        margin-bottom: 4px;
    }
}

.gpt-tagline-dark {
    color: #667eea;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

@media (max-width: 768px) {
    .gpt-tagline-dark {
        font-size: 15px;
    }
}

.gpt-description-dark {
    color: #b3b3b3;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .gpt-description-dark {
        font-size: 15px;
        margin-bottom: 16px;
    }
}

.features-dark {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .features-dark {
        gap: 4px;
        margin-bottom: 12px;
        display: flex;
        flex-wrap: wrap;
    }
    
    /* Feature tags 2 per riga su mobile */
    .feature-tag-dark {
        width: calc(50% - 2px) !important;
        box-sizing: border-box;
        text-align: center;
        margin: 0 !important;
    }
}

.feature-tag-dark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .feature-tag-dark {
        font-size: 12px;
        padding: 5px 10px;
    }
}

.video-container-dark {
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-container-dark iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder-dark {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #888;
    font-style: italic;
}

.cyber-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

/* CORREZIONE MOBILE: Bottoni ottimizzati nelle card GPT */
@media (max-width: 768px) {
    .cyber-button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .gpt-info-section .cyber-button {
        font-size: 13px;
        padding: 10px 12px;
    }
}

.cyber-button:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.author-section-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 80px 40px;
    text-align: center;
    margin: 60px 0;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .author-section-dark {
        padding: 60px 20px;
        margin: 40px 0;
        border-radius: 0;
        /* SFONDO FORZATO SU MOBILE */
        background: #1a1a2e !important;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    }
    
    /* Aggiungo uno pseudo-elemento per garantire lo sfondo */
    .author-section-dark::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(26, 26, 46, 0.8);
        z-index: 0;
    }
    
    /* Assicuro che tutto il contenuto sia sopra lo sfondo */
    .author-section-dark * {
        position: relative;
        z-index: 1;
    }
    
    /* Testo sempre leggibile */
    .author-section-dark h2,
    .author-section-dark p {
        color: #ffffff !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
}

.author-section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.stats-dark {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .stats-dark {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin: 30px 0;
    }
}

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

.stat-number-dark {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .stat-number-dark {
        font-size: 29px;
    }
}

.stat-text-dark {
    color: #b3b3b3;
    font-size: 14px;
}

@media (max-width: 768px) {
    .stat-text-dark {
        font-size: 13px;
    }
}

.faq-dark {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item-dark {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .faq-item-dark {
        margin: 0 10px 12px 10px;
        border-radius: 8px;
    }
}

.faq-question-dark {
    background: #222;
    color: #ffffff;
    padding: 20px 30px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .faq-question-dark {
        padding: 16px 20px;
        font-size: 17px;
    }
}

.faq-question-dark:hover {
    background: #333;
}

.faq-answer-dark {
    padding: 20px 30px;
    color: #b3b3b3;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .faq-answer-dark {
        padding: 16px 20px;
        font-size: 15px;
    }
}

.final-cta-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 80px 40px;
    text-align: center;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

@media (max-width: 768px) {
    .final-cta-dark {
        padding: 60px 20px;
        border-radius: 0;
    }
}

.final-cta-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: -1;
}

/* CORREZIONE MOBILE: Box finale CTA con padding ridotto */
#iscriviti > div {
    background: #0a0a0a;
    border-radius: 13px;
    padding: 40px;
    text-align: center;
}

@media (max-width: 768px) {
    #iscriviti {
        margin: 20px 5px;
    }
    
    #iscriviti > div {
        padding: 25px 15px;
    }
}

/* Stili per YouTube container */
.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
}

/* CORREZIONE MOBILE: Bottone finale ottimizzato per 2 righe */
@media (max-width: 768px) {
    #iscriviti .cyber-button {
        font-size: 16px;
        padding: 16px 20px;
        letter-spacing: 0;
        line-height: 1.3;
        white-space: normal;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .youtube-container {
        border-radius: 8px;
    }
}

.youtube-container:hover .youtube-play-button {
    background-color: #cc0000;
}

.youtube-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: #ff0000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.youtube-play-button::before {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

.youtube-container.loaded {
    padding-bottom: 56.25%;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    display: none;
}

.youtube-container.loading .video-loading {
    display: block;
}

.youtube-container.loading .youtube-play-button,
.youtube-container.loading .youtube-thumbnail {
    opacity: 0.5;
}