/* Base CSS - Reset, variables, typography */

/* CSS Variables */
:root {
    /* Colors - mantenuti originali */
    --primary-blue: #3E5F8A;
    --secondary-blue: #32A2E3;
    --accent-blue: #3776BC;
    --dark-blue: #228AC6;
    --light-blue: #52ABDF;
	--medio-blue: #F0F8FF;
    --header-bg: #AABF64;
    --main-bg: #F1F3E9;
    --footer-bg: #ffffff;
    --text-primary: #202020;
    --text-secondary: #6b6b6b;
    --text-light: #9c9c9c;
    --border-color: #DFDFDF;
    --shadow-color: rgba(97, 97, 97, 0.3);
    
    /* Typography - mantenuti originali */
    --font-family: 'Open Sans', sans-serif;
    --font-size-base: 1em;
    --font-size-small: 0.8725em;
    --font-size-large: 1.5em;
    --font-size-xl: 2em;
    --line-height-base: 1.8em;
    --line-height-tight: 1.5em;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Layout */
    --container-width: min(90vw, 1200px);
    --border-radius: 4px;
    --border-radius-small: 3px;
    --transition: all 0.3s ease-in-out;
    --transition-fast: all 0.15s ease-in-out;
    --z-fixed: 100;
}

/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h5 { font-size: clamp(1rem, 1.5vw, 1.25rem); }
h6 { font-size: 1rem; }

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

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

a:hover {
    color: var(--accent-blue);
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Form elements */
input, select, textarea, button {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
}

/* Accessibility */
.visually-hidden {
    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(--secondary-blue);
    outline-offset: 2px;
}

/* Skip to main content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--text-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--border-radius);
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Utility classes */
.clear::after {
    content: "";
    display: table;
    clear: both;
}

.container {
    width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.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); }

.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); }