/* ====================================
   RESET & VARIABLES
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    /* Colors */
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --border-subtle: rgba(17, 24, 39, .08);
    --bg-elev: #ffffff;
    
    /* Status Colors */
    --warning-bg: #fef3c7;
    --warning-border: #f59e0b;
    --info-bg: #dbeafe;
    --info-border: #3b82f6;
    --danger-bg: #fee2e2;
    --danger-border: #ef4444;
    --success-bg: #d1fae5;
    --success-border: #10b981;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 6px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 14px 40px rgba(0,0,0,.14);
    
    /* Gradients */
    --gradient-1: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --gradient-2: radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,.18), transparent 60%);
}

/* ====================================
   BASE TYPOGRAPHY
   ==================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: clamp(17px, 0.95rem + 0.30vw, 19px);
    line-height: 1.6;
    color: var(--text-color);
    background: #ffffff;
}

h1 {
    font-size: clamp(32px, 3.8vw, 52px);
}

h2 {
    font-size: clamp(24px, 2.8vw, 36px);
}

h3 {
    font-size: clamp(20px, 2.2vw, 28px);
}

/* Links */
a {
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .3s ease, color .3s ease, opacity .3s ease, transform .2s ease;
}

a:hover {
    background-size: 100% 2px;
}

/* Sempre sottolineati i link nellÃ¢â‚¬â„¢articolo per chiarezza */
.article-body a { text-decoration: underline; }

/* Focus accessibility */
:focus-visible {
    outline: 3px solid rgba(59,130,246,.55);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ====================================
   LAYOUT
   ==================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3.2vw, 28px);
}

/* ====================================
   HEADER
   ==================================== */
.site-header {
    background: #ffffff;
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    text-decoration: none;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

a.logo {
    font-weight: 600;
    text-decoration: none;
}

a.logo:hover {
	text-decoration: none !important;
    border: none !important;
    background: none;
}

.main-nav {
    display: flex;
    gap: 25px;
}

.main-nav a {
    position: relative;
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(59,130,246,.08);
    color: var(--secondary-color);
}

/* ====================================
   MAIN CONTENT
   ==================================== */
.site-main {
    min-height: calc(100vh - 300px);
}

/* Breadcrumb */
.breadcrumb {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    margin-top: 20px;
}

.breadcrumb a {
    color: var(--secondary-color);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Article Header */
.article-header {
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.article-meta {
    color: var(--text-light);
    font-size: 14px;
}

/* Table of Contents */
.table-of-contents {
    background: var(--bg-light);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 25px;
    margin-bottom: 40px;
}

@media (min-width: 1024px) {
    .table-of-contents {
        position: solid;
            }
}

.table-of-contents h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: 10px;
}

.table-of-contents a {
    color: var(--secondary-color);
    transition: color 0.3s;
}

.table-of-contents a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Article Body */
.article-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: clamp(18px, 1.00rem + 0.50vw, 20px);
}

.article-body h2 {
    font-size: clamp(22px, 2.4vw, 32px);
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
    scroll-margin-top: 100px;
}

.article-body h3 {
    font-size: clamp(18px, 1.8vw, 24px);
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-color);
    scroll-margin-top: 100px;
}

.article-body p {
    margin-bottom: 20px;
    line-height: 1.85;
    letter-spacing: .005em;
}

.article-body ul,
.article-body ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.article-body li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-body strong {
    color: var(--primary-color);
    font-weight: 600;
    display: inline; /* Forza inline per evitare problemi */
}

/* Strong in tabelle deve rimanere inline */
table strong,
td strong,
th strong {
    display: inline;
    font-weight: 600;
}

/* Strong in liste deve rimanere inline */
li strong,
ol strong,
ul strong {
    display: inline;
    font-weight: 600;
}

.article-body a {
    color: var(--secondary-color);
    text-decoration: underline;
}

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

/* Info Boxes */
.info-box,
.warning-box,
.tip-box,
.danger-box {
    position: relative;
    padding: 20px;
    border-radius: var(--radius-sm);
    margin: 30px 0;
    border: 1px solid var(--border-subtle);
    border-left: 6px solid currentColor;
    box-shadow: var(--shadow-sm);
    background: #fff;
}

.info-box {
    color: var(--info-border);
    background: #f8fbff;
}

.warning-box {
    color: var(--warning-border);
    background: #fff9ee;
}

.tip-box {
    color: var(--success-border);
    background: #f6fef9;
}

.danger-box {
    color: var(--danger-border);
    background: #fff5f5;
}

/* Titolo degli info box (solo il primo strong) */
.info-box > strong:first-child,
.warning-box > strong:first-child,
.tip-box > strong:first-child,
.danger-box > strong:first-child {
    display: block;
    margin-bottom: 10px;
    font-size: 17px;
    font-weight: 700;
}

/* Strong normali dentro i box rimangono inline */
.info-box strong,
.warning-box strong,
.tip-box strong,
.danger-box strong {
    font-weight: 600;
}

/* CTA Box */
.cta-box {
    background: var(--bg-light);
    border: 2px solid var(--secondary-color);
    border-radius: var(--radius-sm);
    padding: 30px;
    margin: 40px 0;
}

.cta-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.related-links {
    list-style: none;
    padding: 0;
}

.related-links li {
    margin-bottom: 12px;
}

.related-links a {
    color: var(--secondary-color);
    font-weight: 500;
}

.related-links a:hover {
    text-decoration: underline;
}

/* FAQ Items */
.faq-item {
    padding: 18px 22px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-elev);
    box-shadow: var(--shadow-sm);
}

.faq-item + .faq-item {
    margin-top: 16px !important;
}

/* Related Articles */
.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.related-articles h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--bg-elev);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s;
}

.related-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.related-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.related-card p {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* ====================================
   FOOTER
   ==================================== */
.site-footer {
    color: white;
    margin-top: 60px;
    position: relative;
    background: linear-gradient(rgb(23, 37, 84) 0%, rgb(11, 22, 53) 100%);
    padding: 40px 0px 20px;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: -1px 0 auto 0;
    height: 1px;
    background: var(--border-color);
    opacity: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffffff;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ffffff;
    font-size: 14px;
    opacity: 0.95;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

.footer-bottom .disclaimer {
    margin-top: 10px;
    opacity: 0.9;
    font-size: 13px;
}

.footer-bottom .disclaimer-legal {
    margin-top: 15px;
    font-weight: 600;
    font-size: 13px;
    color: #b45309; /* ambrato visibile su chiaro */
}

/* ====================================
   HOMEPAGE SPECIFIC
   ==================================== */
.hero {
    background: #363656; /* chiaro */
    color: var(--text-color);
    padding: 20px 20px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0px 5px 12px rgb(0 0 0 / 8%);
}

.hero::after {
    content: none; /* rimosso velo scuro */
}

.hero h1 {
    font-size: clamp(36px, 4.2vw, 56px);
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 5rem;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.95;
    color: #ffffff;
}

.hero-cta {
    display: inline-block;
    background: #3b82f6; /* bottone blu su bianco */
    color: #ffffff;
    padding: 15px 35px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: 1px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    transition: all 0.3s;
}

.hero-cta:hover {
    transform: translateY(-3px);
    background: #6ca0f5;
}

.section-title {
    font-size: clamp(26px, 2.6vw, 36px);
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    opacity: .35;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: var(--bg-elev);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    transform: translateZ(0);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    gap: 8px;
    align-items: center;
}

.card h3::before {
    font-weight: 700;
    transform: translateY(-1px);
    opacity: .25;
}

.card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.card-link {
    color: var(--secondary-color);
    font-weight: 600;
}

.card-link::after {
    content: " »";
    transition: transform .25s ease;
    display: inline-block;
}

.card-link:hover::after {
    transform: translateX(2px);
}

/* ====================================
   BUTTONS
   ==================================== */
.btn {
    display: inline-block;
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    background: #fff;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

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

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        font-size: 14px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
	
	.hero h1 {
    font-size: clamp(36px, 4.2vw, 56px);
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 2.8rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(10px, 3.2vw, 20px);
}
	
}

/* Extra tweak per schermi molto piccoli */
@media (max-width: 640px) {
    .logo h1 { font-size: 20px; }
    .header-content { padding: 10px 0; }
    .article-body { padding: 0 4px; }
    .footer-content { gap: 20px; }
}

/* ====================================
   ACCESSIBILITY
   ==================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ====================================
   DARK MODE
   ==================================== */
/* Dark mode disattivato: manteniamo sempre tema chiaro per massima leggibilitÃƒÂ  */
/* (Se in futuro vorrai riattivarlo, ripristina questa sezione con palette scure coerenti) */
