/* CertificazioneISO.com - Custom Styles */

/* Font smoothing */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* Custom colors as CSS variables */
:root {
    --color-primary: #2563EB;
    --color-primary-dark: #1E3A8A;
    --color-primary-light: #3B82F6;
    --color-secondary: #1E3A5F;
    --color-accent: #10B981;
    --color-accent-light: #34D399;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    --color-bg-light: #F8FAFC;
    --color-bg-alt: #F1F5F9;
}

/* Smooth transitions */
a, button, .transition-all {
    transition: all 0.2s ease-in-out;
}

/* Header sticky effect */
.header-fixed {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Mega menu dropdown */
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
}

.mega-menu-trigger:hover .mega-menu,
.mega-menu-trigger:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu.open {
    max-height: 100vh;
}

/* Search overlay */
.search-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, #059669 100%);
}

.gradient-hero {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cookie banner */
.cookie-banner {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

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

/* Form inputs */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button arrow animation */
.btn-arrow svg {
    transition: transform 0.2s ease;
}

.btn-arrow:hover svg {
    transform: translateX(4px);
}

/* Loading spinner */
.spinner {
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

/* Pulse animation for CTA */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Blog content styling */
.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

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

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.blog-content a:hover {
    color: var(--color-primary-dark);
}

/* Certification page content */
.cert-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-bg-alt);
}

.cert-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.cert-content strong {
    color: var(--color-secondary);
}

/* Search autocomplete dropdown */
.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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

    .container {
        max-width: 100% !important;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

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