/* Egonex Website - Main Styles */
/* Sistema colori da EmergencySystem */

:root {
    /* Colori principali */
    --primary-blue: #4472C4;
    --egonex-orange: #9a3412; /* Arancione più scuro per contrasto superiore */
    --success-green: #10b981;
    
    /* Colori testo */
    --text-primary: #000000;
    --text-secondary: #000000;
    --text-light: #111827;
    --text-dark: #000000;
    
    /* Colori sfondo */
    --bg-light: #F5F5F5;
    --bg-dark: #252525;
    --bg-white: #ffffff;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    
    /* Colori bordi */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    
    /* Ombre */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* AI Card specific positioning - REMOVED: Now identical to other cards */
    
    /* Typography */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Breakpoints */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
}

/* Reset e base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--egonex-orange);
}

/* Layout containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

/* Grid system */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .grid-cols-2 { grid-template-columns: 1fr; }
    /* .grid-cols-3 rimosso - ora gestito con flexbox scroll in innovation.css */
    .grid-cols-4 { grid-template-columns: 1fr; }
    
    /* Prevent horizontal overflow */
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .container, .container-fluid {
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }
}

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Spacing utilities */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-light { color: var(--text-light); }

/* Button styles */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch friendly */
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: #3a5fb8;
    color: var(--bg-white);
}

.btn-secondary {
    background-color: var(--egonex-orange);
    color: var(--bg-white);
}

.btn-secondary:hover {
    background-color: #d97706;
    color: var(--bg-white);
}

.btn-orange {
    background-color: var(--egonex-orange);
    color: var(--bg-white);
}

.btn-orange:hover {
    background-color: #d97706;
    color: var(--bg-white);
}

.btn-outline {
    background-color: transparent;
    color: var(--bg-white);
    border: 1px solid var(--bg-white);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--bg-white);
    border: 1px solid var(--bg-white);
}

/* Card styles moved to components.css to avoid duplication */

/* Section styles */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-light {
    /* Sfondo gradiente per sezione Market - Stesso di Innovazione */
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
}

/* Sfondo gradiente per sezione Innovazione - FIX DIRETTO */
section#innovation {
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%) !important;
}

/* Sfondo gradiente per sezione Contattaci - Stesso delle altre sezioni */
section#contacts {
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%) !important;
}

/* Titolo verde per sezione Market */
#market h2 {
    color: #065f46 !important; /* Verde scuro - coerente con box PMI */
}

/* Titolo blu per sezione Contatti */
#contacts h2 {
    color: var(--primary-blue) !important; /* Blu aziendale */
}

.section-dark {
    background-color: var(--bg-dark);
    color: var(--bg-white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
    color: var(--bg-white);
}

.section-dark p {
    color: var(--text-light);
}

/* Responsive utilities */
.hidden { display: none; }
.visible { display: block; }

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--egonex-orange);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
