/* ====================================
   SECUREPASS360 - ENHANCED PROFESSIONAL STYLES
   Perfezionamenti UX/UI e Accessibilità
   ==================================== */

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible Improvements (Accessibilità Tastiera) */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Enhanced Spinner Animation */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced Input States */
input[type="email"]:invalid:not(:placeholder-shown) {
    border-color: #ef4444 !important;
}

input[type="email"]:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* Loading State for Scan Button */
.btn-scan:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Enhanced Result Cards with Animation */
.scan-results {
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Trust Badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.badge-item:hover {
    color: rgba(255, 255, 255, 1);
}

.badge-item svg {
    flex-shrink: 0;
    color: #10b981;
}

/* Enhanced Feature Cards with Hover Effects */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Enhanced Step Cards */
.step-card {
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.step-card:hover::before {
    transform: scaleX(1);
}

/* Enhanced CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-box {
    position: relative;
    z-index: 1;
}

/* Pulse Animation for Live Badge */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Enhanced Background Glows */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.glow-1 {
    top: 10%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    animation-delay: 0s;
}

.glow-2 {
    bottom: 10%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Enhanced Tooltip System */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 1000;
    margin-bottom: 8px;
    animation: tooltipFade 0.2s ease;
}

@keyframes tooltipFade {
    from { opacity: 0; transform: translateX(-50%) translateY(5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Enhanced Price Display */
.price-block {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin: 1.5rem 0;
    font-weight: 700;
}

.currency {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.amount {
    font-size: 4rem;
    color: #fff;
    line-height: 1;
}

.period {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Enhanced Footer */
.footer {
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Enhanced Social Links */
.social-links a {
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: #3b82f6;
}

/* Loading Skeleton (for future enhancements) */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.05) 25%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Enhanced Navigation */
.navbar {
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Enhanced Button Interactions */
.btn-large,
.btn-nav,
.btn-scan {
    position: relative;
    overflow: hidden;
}

.btn-large::before,
.btn-nav::before,
.btn-scan::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-large:hover::before,
.btn-nav:hover::before,
.btn-scan:hover::before {
    width: 300px;
    height: 300px;
}

/* Pro Modal Styles */
.pro-modal {
    max-width: 500px;
    width: 90%;
    text-align: center;
    padding: 3rem 2.5rem;
    background: linear-gradient(145deg, #0f172a, #020617);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.15), 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

/* Glass effect background */
.pro-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15), transparent 70%);
    pointer-events: none;
}

.modal-close-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.pro-header {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.pro-logo-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pro-logo-full .logo-icon {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.pro-logo-full .logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.pro-logo-full .highlight {
    color: #3b82f6;
}

.verify-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.verify-desc {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.6;
}

.pro-benefits {
    text-align: left;
    margin: 2rem 0;
    background: rgba(15, 23, 42, 0.6);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(10px);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
    font-size: 1.05rem;
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.check-icon {
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.check-icon svg {
    width: 14px;
    height: 14px;
    color: #10b981;
}

.pro-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pro-btn {
    width: 100%;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pro-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.close-modal-text {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 100%;
    transition: color 0.2s;
    font-weight: 500;
}

.close-modal-text:hover {
    color: #94a3b8;
    text-decoration: none;
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .amount {
        font-size: 3rem;
    }
    
    .features-grid,
    .steps-grid {
        gap: 1.5rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-scan,
    .btn-large,
    .btn-nav {
        border: 2px solid currentColor;
    }
    
    .feature-card,
    .step-card {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* Dark Mode Enhancements (già implementato, ma rafforzato) */
@media (prefers-color-scheme: dark) {
    body {
        color-scheme: dark;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .cta-section,
    .footer,
    .bg-glow {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-title,
    .section-title {
        color: black;
    }
}
