/* =========================================
   RAGFISCALE.IT - STYLESHEET UNIFICATO
   Assistente AI per Commercialisti
   Ultimo aggiornamento: Novembre 2025
   =========================================
   INDICE SEZIONI
   1. GLOBAL RESET & VARIABLES
   2. HEADER & NAVIGATION
   3. AI ASSISTANT SECTION
   4. CALCULATOR SECTION
   5. FEATURES SECTION
   6. FAQ SECTION
   7. CONTATTI SECTION
   8. GLOSSARIO SECTION
   9. FOOTER
   10. RESPONSIVE RULES
   11. ACCESSIBILITY & PRINT
   ========================================= */


@charset "UTF-8";

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #8B1A1A;  /* Rosso Bordeaux - Professionale ed elegante */
    --secondary-blue: #B52F2F; /* Rosso Rubino - Complementare */
    --background-light: #f0f2f5;
    --text-dark: #333;
    --border-light: #e0e0e0;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: var(--background-light);
    margin: 0;
    padding: 0;
    padding-top: 110px;
    line-height: 1.6;
}

/* Improved smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 130px;
}

/* ========== HEADER ========== */
.compact-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    padding: 1.2rem 2.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    z-index: 1000;
    will-change: transform;
}

.center-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 85px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
    border-radius: 8px;
}

.header-text {
    color: white;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    gap: 0.3rem;
}

.header-title {
    font-size: 2.1rem;
    font-weight: 600;
}

.header-subtitle {
    font-size: 1.05rem;
    opacity: 0.95;
}

.nav-buttons {
    display: flex;
    gap: 0.8rem;
    margin-left: auto;
    position: relative;
    z-index: 1;
    padding-right: 1rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.7rem 1.3rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.nav-btn i {
    font-size: 1.1rem;
}

.dropdown {
    position: relative;
    padding-bottom: 6px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    min-width: 240px;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}
      
.dropdown.show .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
  
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.8rem 1.2rem;
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--background-light);
    color: var(--primary-blue);
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    color: var(--secondary-blue);
}

/* =========================================
   BETA NOTICE - AVVISO VERSIONE BETA
   ========================================= */

.beta-notice {
    background: #fff8d6;
    border-left: 4px solid #f7b500;
    padding: 0.8rem 1.2rem;
    margin: 1rem 0 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(247, 181, 0, 0.15);
    text-align: center;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
}

.beta-notice strong {
    color: #1e3c72;
}

.beta-notice a {
    color: var(--secondary-blue);
    font-weight: 600;
    text-decoration: none;
}

.beta-notice a:hover {
    text-decoration: underline;
}


/* ========== AI ASSISTANT SECTION ========== */
.assistant-section {
    padding: 3rem 1rem;
    background: var(--background-light);
    margin: 2rem auto;
    max-width: 1300px;
    width: 100%;
    min-height: calc(100vh - 200px);
}

.main-container {
    display: flex;
    height: 100%;
    min-height: calc(100vh - 280px);
    width: 100%;
}

.history-sidebar {
    position: fixed;
    left: 0;
    top: 110px;
    width: 280px;
    height: calc(100vh - 200px);
    background: white;
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
    padding: 1rem;
    transition: transform var(--transition-normal);
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.history-sidebar.collapsed {
    transform: translateX(-280px);
}

.history-header {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-item {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-item:hover {
    background: #e8f0fe;
    transform: translateX(5px);
}

.history-date {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.history-preview {
    font-size: 0.85rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 1rem;
    width: 100%;
}

.chat-wrapper {
    flex: 1;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    background: #fafbfc;
    scroll-behavior: smooth;
}

.welcome-screen {
    text-align: center;
    padding: 3rem;
}

.example-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.example-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.15);
    border-color: var(--primary-blue);
}

.example-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 20px;
}

.input-container {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid var(--border-light);
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #f8f9fa;
    border-radius: 28px;
    padding: 0.8rem 0.8rem 0.8rem 1.5rem;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
}

.input-wrapper:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.1);
}

.input-field {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 1rem;
    resize: none;
    font-family: inherit;
    min-height: 60px;
    padding: 0.5rem 0;
}

.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
    z-index: 998;
    transition: all var(--transition-normal);
}

.toggle-sidebar:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.6);
}

.toggle-sidebar.sidebar-open {
    left: 300px;
}

.toggle-sidebar i {
    font-size: 1.2rem;
    transition: transform var(--transition-normal);
}

.toggle-sidebar.sidebar-open i {
    transform: rotate(180deg);
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

.message.user {
    background: #e8f0fe;
    text-align: right;
    margin-left: 20%;
}

.message.assistant {
    background: white;
    border: 1px solid var(--border-light);
    margin-right: 20%;
}

.message-content {
    line-height: 1.6;
    color: var(--text-dark);
}

/* Enhanced loading animation */
.loading-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 8px 0;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
    animation: loadingPulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0; }

@keyframes loadingPulse {
    0%, 80%, 100% {
        transform: scale(0.7);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

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

.sources-container {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-blue);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.sources-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.source-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 14px;
}

.source-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.source-link:hover {
    color: var(--primary-blue);
}

.followup-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.followup-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--primary-blue);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* ========== Calculator Section ========== */
.calculator-section {
    padding: 3rem 1rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    margin: 2rem auto;
    border-radius: 20px;
    max-width: 1200px;
    width: 100%;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.calculator-header p {
    font-size: 1.1rem;
    color: #666;
}

#calcolatoreForm {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    border: 2px solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
}

.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border-light);
}

.section-header h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-blue);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.form-group input, .form-group select {
    padding: 0.8rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
}

.form-submit {
    text-align: center;
    margin-top: 2rem;
}

#calcolaBtn {
    background: linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(30,60,114,0.4);
}

#calcolaBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30,60,114,0.6);
}

#calcolaBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.info-tooltip { 
    position: relative; 
    margin-left: 5px; 
    cursor: help; 
    display: inline-block;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    transition: all var(--transition-normal);
}

.info-icon:hover { 
    background: var(--secondary-blue); 
    transform: scale(1.1); 
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-dark);
}

.info-tooltip:hover .tooltip-content { 
    visibility: visible; 
    opacity: 1; 
}

#risultatoContainer {
    margin-top: 2rem;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: none;
}

#risultatoContainer.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

#risultatoFrame {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 10px;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner.show {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== Feature Cards ========== */
.features {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-blue);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 1.8rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.feature-icon { 
    font-size: 2rem; 
    margin-bottom: 1rem; 
    display: inline-block; 
}

.feature-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.feature-link {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-normal);
}

.feature-link:hover { 
    color: var(--secondary-blue); 
}

/* ========== Footer ========== */
.site-footer {
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 1rem 1rem;
    text-align: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    margin-top: 2rem;
}

.site-footer p { 
    margin: 0.5rem 0; 
    font-size: 1rem; 
    color: white;
}

/* ========== FAQ Section ========== */
.faq-section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--background-light);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.faq-section > p {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item:hover {
    box-shadow: 0 6px 25px rgba(30, 60, 114, 0.2);
}

.faq-question {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.faq-question:hover {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
}

.faq-question i {
    font-size: 1.2rem;
    transition: transform var(--transition-normal);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 2rem;
    background: white;
}

.faq-answer.active {
    max-height: 1000px;
    padding: 1.5rem 2rem;
}

.faq-answer p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.faq-answer ul {
    list-style: none;
    padding-left: 0;
}

.faq-answer li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: var(--text-dark);
    list-style: none; /* evita doppio pallino */
}

.faq-answer li::before {
    content: "\2713"; /* ✓ check mark sicuro */
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: bold;
}

.faq-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.faq-category-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.faq-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(30, 60, 114, 0.2);
}

.faq-category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.faq-category-card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.faq-category-card p {
    color: #666;
    font-size: 0.9rem;
}

/* ========== Contatti Section ========== */
.contatti-section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--background-light);
}

.contatti-section h1 {
    text-align: center;
    font-size: 3.0rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.contatti-section > p {
    text-align: center;
    font-size: 1.6rem;
    color: #666;
    margin-bottom: 3rem;
}

.contatti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.contatto-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.contatto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(30, 60, 114, 0.2);
}

.contatto-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.contatto-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contatto-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.contatto-card a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-normal);
}

.contatto-card a:hover {
    color: var(--secondary-blue);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-normal);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.6);
}

.disclaimer {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    color: #856404;
}

.disclaimer strong {
    display: block;
    margin-bottom: 0.5rem;
}

.print-container {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-light);
}

#printPdfBtn {
    background: white;
    color: var(--primary-blue);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--primary-blue);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(30,60,114,0.2);
}

#printPdfBtn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30,60,114,0.6);
}

/* Remove spinners from number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Mobile subtitle (nascosta su desktop) */
.mobile-subtitle {
    display: none;
}

/* Error state */
.error-message {
    background: #fee;
    border-left: 4px solid #f44;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    color: #c00;
    animation: fadeIn 0.3s ease;
}

/* Success state */
.success-message {
    background: #efe;
    border-left: 4px solid #4f4;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    color: #060;
    animation: fadeIn 0.3s ease;
}

/* ========== RESPONSIVE TABLET ========== */
@media (max-width: 1200px) {
    .header-title {
        font-size: 1.6rem;
    }
    
    .header-subtitle {
        font-size: 0.9rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .header-text {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 768px) {
    body {
        padding-top: 130px;
    }

    html {
        scroll-padding-top: 150px;
    }

    .compact-header {
        height: auto;
        min-height: 130px;
        padding: 0.8rem 0.5rem;
        flex-direction: column;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .compact-header::before {
        content: '';
        display: block;
        width: 100%;
        height: 60px;
    }

    .center-section {
        position: absolute;
        top: 0.8rem;
        left: 0.5rem;
        transform: none;
        flex-direction: row;
        gap: 0;
        width: auto;
    }

    .logo-container {
        display: flex;
        align-items: center;
    }

    .logo-container img {
        height: 55px;
        max-width: 180px;
    }

    .header-text {
        display: none;
    }

    .nav-buttons {
        position: absolute;
        top: 0.8rem;
        right: 0.5rem;
        margin: 0;
        padding: 0;
        gap: 0.4rem;
        flex-direction: row;
    }

    .nav-btn {
        padding: 0.6rem;
        min-width: 42px;
        height: 42px;
    }

    .nav-btn span {
        display: none;
    }

    .nav-btn i {
        margin: 0;
        font-size: 1.1rem;
    }

    .mobile-subtitle {
        display: block;
        position: absolute;
        bottom: 0.5rem;
        left: 0;
        right: 0;
        text-align: center;
        color: white;
        font-size: 0.7rem;
        line-height: 1.3;
        padding: 0 0.5rem;
        font-weight: 500;
    }

    .compact-header::after {
        content: 'Assistente AI su Regime Forfettario - Aggiornato al 07 Nov 2025';
        display: block;
        position: absolute;
        bottom: 0.5rem;
        left: 0;
        right: 0;
        text-align: center;
        color: white;
        font-size: 0.7rem;
        line-height: 1.3;
        padding: 0 0.5rem;
        font-weight: 500;
    }

    .dropdown-menu {
        position: fixed;
        left: 0;
        right: 0;
        top: 130px;
        min-width: 100%;
        border-radius: 0;
        max-height: calc(100vh - 130px);
        overflow-y: auto;
    }

    .history-sidebar {
        top: 130px;
        height: calc(100vh - 130px);
        width: 100%;
        max-width: 280px;
    }

    .history-sidebar.collapsed {
        transform: translateX(-100%);
    }

    .toggle-sidebar {
        left: 10px;
        width: 45px;
        height: 45px;
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .toggle-sidebar:hover {
        transform: scale(1.05);
    }

    .toggle-sidebar.sidebar-open {
        left: calc(280px + 10px);
    }

    .assistant-section {
        padding: 1rem 0;
        margin: 1rem 0;
    }

    .chat-container {
        padding: 0.5rem;
    }

    .chat-messages {
        padding: 1rem;
    }

    .welcome-screen {
        padding: 1.5rem 1rem;
    }

    .welcome-screen h3 {
        font-size: 1.5rem !important;
    }

    .example-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .example-card {
        padding: 1rem;
    }

    .example-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 0.5rem;
    }

    .input-container {
        padding: 1rem;
    }

    .input-wrapper {
        padding: 0.6rem 0.6rem 0.6rem 1rem;
    }

    .input-field {
        min-height: 40px;
        font-size: 0.95rem;
    }

    .send-btn {
        width: 40px;
        height: 40px;
    }

    .message.user {
        margin-left: 10%;
    }

    .message.assistant {
        margin-right: 10%;
    }

    .calculator-section {
        padding: 2rem 0.5rem;
        margin: 1rem 0.5rem;
        border-radius: 15px;
    }
    
    .calculator-header h2 {
        font-size: 1.6rem;
    }

    .calculator-header p {
        font-size: 0.95rem;
    }
    
    #calcolatoreForm {
        padding: 1rem;
        border: 1px solid var(--primary-blue);
    }
    
    .form-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .section-header h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .form-group input, 
    .form-group select {
        padding: 0.75rem 0.5rem;
        font-size: 0.95rem;
        width: 100%;
        box-sizing: border-box;
        min-height: 48px;
    }

    .form-group label {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    #calcolaBtn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    #risultatoFrame {
        height: 60vh;
    }

    #printPdfBtn {
        width: 100%;
        padding: 0.9rem;
    }

    .features {
        padding: 2rem 0.5rem;
    }

    .features h2 {
        font-size: 1.8rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .faq-section {
        padding: 2rem 0.5rem;
    }

    .faq-section h2 {
        font-size: 1.8rem;
    }

    .faq-question {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
    }

    .faq-answer {
        padding: 0 1.2rem;
        font-size: 0.9rem;
    }

    .faq-answer.active {
        padding: 1rem 1.2rem;
    }

    .faq-categories {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .faq-category-card {
        padding: 1.5rem;
    }

    .contatti-section {
        padding: 2rem 0.5rem;
    }

    .contatti-section h2 {
        font-size: 1.8rem;
    }

    .contatti-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contatto-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .site-footer {
        padding: 2rem 1rem;
    }

    .site-footer p {
        font-size: 0.9rem;
    }

    .tooltip-content {
        white-space: normal;
        max-width: 200px;
        font-size: 11px;
    }

    .sources-container {
        padding: 0.8rem;
    }

    .source-item {
        font-size: 13px;
        flex-direction: column;
        gap: 0.3rem;
    }

    .followup-btn {
        font-size: 12px;
        padding: 0.4rem 0.8rem;
    }
}

/* ========== EXTRA SMALL DEVICES ========== */
@media (max-width: 480px) {
    body {
        padding-top: 120px;
    }

    html {
        scroll-padding-top: 140px;
    }

    .compact-header {
        min-height: 120px;
    }

    .compact-header::before {
        height: 55px;
    }

    .logo-container img {
        height: 50px;
        max-width: 150px;
    }

    .nav-btn {
        padding: 0.5rem;
        min-width: 40px;
        height: 40px;
    }

    .compact-header::after {
        font-size: 0.65rem;
    }

    .example-cards {
        grid-template-columns: 1fr;
    }

    .calculator-header h2 {
        font-size: 1.4rem;
    }

    .features h2,
    .faq-section h2,
    .contatti-section h2 {
        font-size: 1.5rem;
    }

    .message.user,
    .message.assistant {
        margin-left: 0;
        margin-right: 0;
    }
  
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.8rem;
    }

    .form-group input, 
    .form-group select {
        padding: 0.7rem 0.4rem;
        font-size: 14px;
        min-height: 44px;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-section {
        padding: 12px;
    }

    .section-header h3 {
        font-size: 1.1rem;
    }

    .info-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .tooltip-content {
        max-width: 180px;
        font-size: 10px;
        padding: 6px 10px;
    }

    .dropdown-menu,
    .history-sidebar {
        top: 120px;
        height: calc(100vh - 120px);
    }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .nav-btn,
    .example-card,
    .feature-card {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {
    .compact-header,
    .nav-buttons,
    .toggle-sidebar,
    .input-container,
    .site-footer {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
    
    .message {
        page-break-inside: avoid;
    }
}

/* ========================================
   FAQ PAGE ADDITIONAL STYLES
   Da aggiungere a styles.css
   ======================================== */

/* ========== BREADCRUMB ========== */
.breadcrumb {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.breadcrumb a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-dark);
    font-weight: 500;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========== ARTICLE HEADER ========== */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.article-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.faq-stats {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.faq-stats:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ========== SEARCH AND FILTERS ========== */
.search-and-filters {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.search-container {
    margin-bottom: 1.5rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.search-box button {
    padding: 1rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-box button:hover {
    background: var(--secondary-blue);
    transform: scale(1.05);
}

.search-results {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.search-results.active {
    display: block;
}

.article-header {
    margin-top: 120px; /* distanza dall'header fisso */
    text-align: center;
    padding: 2.5rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.article-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.article-header p {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.article-header .article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.article-header .faq-stats {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.95rem;
}


/* ========== CATEGORY FILTERS ========== */
.category-filters {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-light);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* ========== FAQ CONTENT ========== */
.faq-content {
    margin-top: 2rem;
}

.faq-category {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-blue);
    font-weight: 700;
}

/* ========== FAQ ITEMS ========== */
.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-normal);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: left;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    min-width: 30px;
    text-align: center;
    transition: var(--transition-fast);
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer.active {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    animation: fadeIn 0.3s ease-in;
}

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

.faq-answer p {
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.faq-answer ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer li {
    line-height: 1.8;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.faq-answer strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* ========== COLORED BOXES ========== */
.success-box,
.warning-box,
.danger-box,
.highlight-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.success-box {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.success-box strong {
    color: #155724;
}

.warning-box {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.warning-box strong {
    color: #856404;
}

.danger-box {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.danger-box strong {
    color: #721c24;
}

.highlight-box {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.highlight-box strong {
    color: #0c5460;
}

.success-box ul,
.warning-box ul,
.danger-box ul,
.highlight-box ul {
    margin: 0.5rem 0 0 1.5rem;
}

.success-box li,
.warning-box li,
.danger-box li,
.highlight-box li {
    margin-bottom: 0.5rem;
}

/* ========== FAQ TABLES ========== */
.faq-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-table th {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.faq-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.faq-table tr:last-child td {
    border-bottom: none;
}

.faq-table tr:hover {
    background: #f8f9fa;
}

.faq-table strong {
    color: var(--primary-blue);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-header p {
        font-size: 1rem;
    }
    
    .article-meta {
        gap: 1rem;
    }
    
    .faq-stats {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .category-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .faq-question h3 {
        font-size: 1.05rem;
    }
    
    .faq-answer {
        padding: 1rem;
    }
    
    .success-box,
    .warning-box,
    .danger-box,
    .highlight-box {
        padding: 1rem;
    }
    
    .faq-table {
        font-size: 0.9rem;
    }
    
    .faq-table th,
    .faq-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 1.5rem 1rem;
    }
    
    .article-header h1 {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-toggle {
        font-size: 1.2rem;
    }
}

/* ========== ACCESSIBILITY ========== */
.faq-question:focus {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

.filter-btn:focus {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ========== PRINT STYLES ========== */
@media print {
    .search-and-filters,
    .category-filters,
    .breadcrumb {
        display: none;
    }
    
    .faq-answer {
        max-height: none !important;
        display: block !important;
    }
    
    .faq-toggle {
        display: none;
    }
}

/* ========== QUICK ACCESS (FAQ) ========== */
.quick-access {
    margin: 2rem auto 0;
    max-width: 1200px; /* 🔹 Aumentata larghezza (da 900px) */
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 0.8rem 1.5rem; /* 🔹 Altezza ridotta: meno padding verticale */
    border: 1px solid rgba(30, 60, 114, 0.08);
}

.quick-access h4 {
    font-size: 1.25rem;
    color: var(--primary-blue);
    margin-bottom: 1.2rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.quick-access ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;       /* ❗ Tutti i pulsanti in una sola riga */
    justify-content: center; /* 🔹 Centrati nella riga */
    align-items: center;
    gap: 0.85rem;
}

quick-access ul li {
    display: block;              /* ogni <li> come blocco all’interno del flex */
    padding: 0;                  /* rimuove padding extra se presente */
}

.quick-access .quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f4f6fb;
    border: 1px solid rgba(30, 60, 114, 0.05);
    border-radius: 12px;
    padding: 0.6rem 1rem;     /* 🔹 leggermente più compatto in altezza */
    text-decoration: none;
    color: #123;
    font-weight: 500;
    font-size: 0.95rem;       /* 🔹 dimensione testo bilanciata */
    transition: all 0.2s ease-in-out;
    white-space: nowrap;      /* evita che il testo vada a capo */
}

.quick-access .quick-link:hover {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 60, 114, 0.25);
}

.quick-access .quick-link:focus {
    outline: 3px solid rgba(30, 60, 114, 0.5);
    outline-offset: 2px;
}

/* mobile */
@media (max-width: 540px) {
    .quick-access {
        padding: 1.5rem 1.2rem 1.1rem;
    }
    .quick-access ul {
        grid-template-columns: 1fr 1fr;
    }
    .quick-access .quick-link {
        font-size: 0.9rem;
        gap: 0.4rem;
    }
}
@media (min-width: 1024px) {
    .quick-access {
        position: sticky;
        top: 140px; /* sotto l’header fisso */
        z-index: 10;
    }
}

/* =========================================
   8. GLOSSARIO SECTION
   ========================================= */

/* ChatForFettario.it - Unified Styles for All Pages */

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

/* Body uniforme come il resto del sito */
body {
    background: var(--background-light);
    color: var(--text-dark);
}


        /* Container principale */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
        }

        /* Header */
        .site-header {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 0;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            color: #1e3c72;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .logo:hover {
            color: #2a5298;
            transform: scale(1.05);
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 2rem;
        }

        .nav-menu a {
            color: #333;
            text-decoration: none;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: 25px;
            transition: all 0.3s ease;
        }

        .nav-menu a:hover {
            background: #1e3c72;
            color: white;
            transform: translateY(-2px);
        }

        .nav-menu a.active {
            background: #1e3c72;
            color: white;
        }

        /* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #333;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: #1e3c72;
    color: white;
    transform: none;
}

.dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: 0.5rem;
    border: 3px solid transparent;
    border-top: 3px solid currentColor;
    vertical-align: middle;
}


        /* Glossary Specific Styles */
        .glossary-section {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            padding: 2rem;
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.1);
            margin: 2rem 0;
        }

        .glossary-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .section-title {
            font-size: 2.5rem;
            color: #1e3c72;
            margin-bottom: 1rem;
        }

        .section-subtitle {
            font-size: 1.2rem;
            color: #666;
            margin-bottom: 2rem;
        }

        .glossary-az-links {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            justify-content: center;
            margin: 2rem 0;
        }

        .glossary-az-links a {
            background: rgba(30, 60, 114, 0.1);
            color: #1e3c72;
            text-decoration: none;
            padding: 0.5rem 1rem;
            border-radius: 25px;
            font-weight: 600;
            transition: all 0.3s ease;
            border: 2px solid #1e3c72;
        }

        .glossary-az-links a:hover {
            background: #1e3c72;
            color: white;
            transform: translateY(-2px);
        }

        .glossary-content {
            margin: 2rem 0;
        }

        .glossary-category {
            margin-bottom: 3rem;
        }

        .category-title {
            font-size: 2rem;
            color: #1e3c72;
            margin-bottom: 1.5rem;
            position: relative;
            padding-bottom: 0.5rem;
        }

        .category-title::after {
            content: '';
            width: 60px;
            height: 3px;
            background: linear-gradient(45deg, #1e3c72, #2a5298);
            position: absolute;
            bottom: 0;
            left: 0;
            border-radius: 2px;
        }

        .glossary-item {
            background: rgba(255, 255, 255, 0.8);
            padding: 1.5rem;
            border-radius: 10px;
            margin-bottom: 1.5rem;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            border-left: 4px solid #1e3c72;
        }

        .glossary-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
            background: white;
        }

        .glossary-item dt {
            font-size: 1.3rem;
            font-weight: 700;
            color: #1e3c72;
            margin-bottom: 0.8rem;
        }

        .glossary-item dd {
            color: #555;
            line-height: 1.7;
            font-size: 1rem;
        }

        /* Animazioni */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .glossary-item {
            animation: fadeInUp 0.6s ease-out;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .container {
                padding: 0 1rem;
            }
            
            .header-content {
                flex-direction: column;
                gap: 1rem;
            }
            
            .nav-menu {
                gap: 1rem;
                flex-wrap: wrap;
                justify-content: center;
            }

            .section-title {
                font-size: 2rem;
            }

            .section-subtitle {
                font-size: 1rem;
            }

            .category-title {
                font-size: 1.5rem;
            }

            .glossary-item {
                padding: 1rem;
            }

            .glossary-item dt {
                font-size: 1.1rem;
            }
        }

        @media (max-width: 480px) {
            .glossary-section {
                padding: 1rem;
                margin: 1rem 0;
            }

            .section-title {
                font-size: 1.8rem;
            }

            .glossary-az-links {
                justify-content: center;
            }

            .glossary-az-links a {
                padding: 0.4rem 0.8rem;
                font-size: 0.9rem;
            }
        }