/* Custom styles per sorveglianzasanitaria.com */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus styles accessibili */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Typography migliorata */
.prose {
    line-height: 1.75;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.prose h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Animazioni */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Mega menu dropdown moderno */
.mega-menu-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    top: 80px;
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-top: 1px solid #e5e7eb;
    z-index: 50;
    padding: 1.5rem 2rem 2rem;
}

/* Tab navigation styling */
.mega-menu-dropdown button[class*="border-b-2"] {
    margin-bottom: -1px;
}

/* Animazioni hover per le card del menu */
.mega-menu-dropdown a.group:hover {
    transform: translateX(4px);
}

.mega-menu-dropdown a.group {
    transition: transform 0.15s ease, background-color 0.15s ease;
}

/* x-cloak per Alpine.js */
[x-cloak] {
    display: none !important;
}

/* Cards hover effect */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-accent {
    background-color: #059669;
    color: white;
}

.btn-accent:hover {
    background-color: #047857;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
}

.btn-outline:hover {
    background-color: #2563eb;
    color: white;
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
}

/* Stats counter animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

/* Skip to content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.badge-accent {
    background-color: #d1fae5;
    color: #047857;
}

/* Testimonial card */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 80px;
    color: #dbeafe;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Mobile menu */
@media (max-width: 1023px) {
    .mobile-menu {
        position: fixed;
        left: 0;
        right: 0;
        top: 64px;
        bottom: 0;
        background: white;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-menu.open {
        transform: translateX(0);
    }

    /* Backdrop effect when mobile menu is open */
    .mobile-menu::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: -1;
    }

    .mobile-menu.open::before {
        opacity: 1;
    }
}

/* Alpine.js collapse transition */
[x-collapse] {
    overflow: hidden;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}
