/* ========================================
   GERIATRIKO 2025 - CSS MODULES
   Master file che importa tutti i moduli CSS
   ======================================== */

/* 1. Variabili CSS globali - SEMPRE per primo */
@import url('modules/variables.css');

/* 2. Layout e strutture di base */
@import url('modules/layout.css');

/* 3. Componenti card */
@import url('modules/cards.css');

/* 4. Bottoni e form */
@import url('modules/buttons.css');

/* 5. Utility classes - SEMPRE per ultimo per override */
@import url('modules/utilities.css');

/* ========================================
   STILI GLOBALI AGGIUNTIVI
   ======================================== */

/* Reset e normalizzazione */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    line-height: var(--line-height-base);
    color: var(--gray-800);
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

/* Heading styles globali */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-black);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

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

/* Link styles globali */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Immagini responsive di default */
img {
    max-width: 100%;
    height: auto;
}

/* Lista styles */
ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

li {
    margin-bottom: var(--spacing-xs);
}

/* Tabelle responsive */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--gray-300);
}

th {
    font-weight: var(--fw-semibold);
    background-color: var(--gray-100);
}

/* Code blocks */
pre, code {
    font-family: 'Courier New', monospace;
    background-color: var(--gray-100);
    border-radius: var(--border-radius-sm);
}

code {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--fs-sm);
}

pre {
    padding: var(--spacing-md);
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    font-style: italic;
    color: var(--gray-700);
}

/* HR separator */
hr {
    border: 0;
    height: 1px;
    background-color: var(--gray-300);
    margin: var(--spacing-xl) 0;
}

/* Focus states per accessibilità */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    .no-print {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
