/* ============================================
   CONVERSION FORMS — Optimized for mobile
   Form ripetuto + Sticky CTA + Modal
   ============================================ */

/* ========================================
   FORM RIPETUTO (dopo 3 sezioni)
   ======================================== */
.section-form-repeat {
    padding: 80px 0;
    background: linear-gradient(135deg, #2A1A12 0%, #1F1410 100%);
}

.form-repeat-card {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.form-repeat-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text-on-dark);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.form-repeat-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    line-height: 1.6;
}

.repeat-form-inline {
    max-width: 520px;
    margin: 0 auto;
}

.repeat-form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.repeat-form-group input[type="email"] {
    flex: 1;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-on-dark);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.repeat-form-group input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.repeat-form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--terracotta);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px var(--terracotta-soft);
}

.repeat-form-submit {
    padding: 16px 32px;
    background: var(--terracotta);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.repeat-form-submit:hover:not(:disabled) {
    background: var(--terracotta-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--terracotta-glow);
}

.repeat-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.repeat-form-note {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    text-align: center;
}

.repeat-form-error {
    display: none;
    color: #ff5f57;
    font-size: 0.85rem;
    margin-top: 8px;
    text-align: center;
}

.repeat-form-success {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(40, 200, 64, 0.15);
    border: 1px solid rgba(40, 200, 64, 0.3);
    border-radius: 6px;
    color: #28c840;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 16px;
}

.repeat-form-success.active {
    display: flex;
    animation: slideDown 0.4s ease;
}

/* ========================================
   STICKY CTA MOBILE
   ======================================== */
.sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(26, 14, 31, 0.98) 0%, rgba(26, 14, 31, 0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-cta-mobile.visible {
    transform: translateY(0);
}

.sticky-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.sticky-cta-text {
    flex: 1;
    min-width: 0;
}

.sticky-cta-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-on-dark);
    margin-bottom: 2px;
}

.sticky-cta-text span {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.sticky-cta-btn {
    padding: 12px 24px;
    background: var(--terracotta);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.sticky-cta-btn:hover {
    background: var(--terracotta-hover);
    transform: translateY(-2px);
}

/* Hide on desktop */
@media (min-width: 769px) {
    .sticky-cta-mobile {
        display: none;
    }
}

/* ========================================
   STICKY MODAL
   ======================================== */
.sticky-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sticky-modal.active {
    opacity: 1;
    pointer-events: all;
}

.sticky-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sticky-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #1F1410;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.sticky-modal.active .sticky-modal-content {
    transform: scale(1);
}

.sticky-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sticky-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-on-dark);
}

.sticky-modal-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-on-dark);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.sticky-modal-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    line-height: 1.5;
}

.sticky-form-group {
    margin-bottom: 16px;
}

.sticky-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.sticky-form-group input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-on-dark);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sticky-form-group input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.sticky-form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--terracotta);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px var(--terracotta-soft);
}

.sticky-form-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 20px;
}

.sticky-form-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.7;
}

.sticky-form-error {
    display: none;
    color: #ff5f57;
    font-size: 0.85rem;
    margin-top: 6px;
}

.sticky-form-submit {
    width: 100%;
    padding: 16px;
    background: var(--terracotta);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sticky-form-submit:hover:not(:disabled) {
    background: var(--terracotta-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--terracotta-glow);
}

.sticky-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sticky-form-success {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(40, 200, 64, 0.15);
    border: 1px solid rgba(40, 200, 64, 0.3);
    border-radius: 6px;
    color: #28c840;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 16px;
}

.sticky-form-success.active {
    display: flex;
    animation: slideDown 0.4s ease;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .section-form-repeat {
        padding: 60px 0;
    }

    .form-repeat-card {
        padding: 36px 24px;
    }

    .repeat-form-group {
        flex-direction: column;
        gap: 10px;
    }

    .repeat-form-submit {
        width: 100%;
        padding: 14px;
    }

    .sticky-modal-content {
        padding: 28px 24px;
    }

    .sticky-cta-text strong {
        font-size: 0.9rem;
    }

    .sticky-cta-text span {
        font-size: 0.75rem;
    }

    .sticky-cta-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

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