/* 
    Studio Legale Santoro - 2026 Design System 
    High-End | Authoritative | Modern
*/

:root {
    /* Palette - Deep Navy & Muted Gold */
    --primary-dark: #0b1c2c;
    --primary-light: #1a3a52;
    --accent-gold: #c5a059;
    --accent-gold-hover: #d4af6a;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --bg-light: #ffffff;
    --bg-offwhite: #f9f9f9;
    --bg-dark: #07121d;
    
    /* Tech / Cyber Accents */
    --cyber-blue: #00f2ff;
    --cyber-gradient: linear-gradient(135deg, #0b1c2c 0%, #162d42 100%);
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Components --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 2px; /* Sharp edges for authority */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

.btn-outline:hover {
    background-color: #fff;
    color: var(--primary-dark);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.section-title.center {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(11, 28, 44, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-sub {
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-menu a:hover, .nav-menu a.highlight-link {
    color: var(--accent-gold);
}

.btn-nav {
    padding: 10px 20px;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold) !important;
    border-radius: 2px;
}

.btn-nav:hover {
    background: var(--accent-gold);
    color: var(--primary-dark) !important;
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    min-height: 600px;
    background-color: var(--primary-dark); /* Fallback */
    background-image: url('/assets/hero.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Overlay uniforme: la sfumatura verso il testo e' gia' incisa
       nell'immagine (hero.jpg), qui serve solo il velo di contrasto finale. */
    background: linear-gradient(rgba(7, 18, 29, 0.62), rgba(11, 28, 44, 0.42));
}

.hero-content {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    text-align: left;
    padding-top: 60px;
}

.eyebrow {
    display: block;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.05s forwards;
}

.hero h1 {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.15s forwards;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.25s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.35s forwards;
    display: flex;
    gap: 1rem;
}

/* --- Trust Bar --- */
.trust-bar {
    background-color: var(--primary-light);
    padding: 40px 0;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.trust-item h3 {
    color: var(--accent-gold);
    font-size: 2rem;
    margin-bottom: 5px;
}

.trust-item p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- About Section --- */
.about {
    padding: 100px 0;
    background: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.lead {
    font-size: 1.3rem;
    color: var(--primary-dark);
    font-weight: 500;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-gold);
    padding-left: 20px;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.visual-card {
    background: var(--bg-offwhite);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    position: relative;
}

.visual-card::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--accent-gold);
    z-index: 0;
}

.icon-large {
    font-size: 5rem;
    z-index: 1;
}

/* --- Areas (Bento Grid) --- */
.areas {
    padding: 100px 0;
    background-color: var(--bg-offwhite);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 25px;
}

.bento-card {
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Layout Spans */
.bento-card.penale {
    grid-column: span 2;
    background: linear-gradient(to right, #fff, #fcfcfc);
    border-left: 4px solid var(--primary-dark);
}

.bento-card.civile {
    grid-column: span 1;
    grid-row: span 2;
    border-top: 4px solid var(--accent-gold);
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    font-size: 1.5rem;
}

.bento-card ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    color: var(--text-muted);
}

.bento-card ul li::before {
    content: '•';
    color: var(--accent-gold);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- Cyber Section --- */
.cyber-section {
    padding: 100px 0;
    background-color: var(--bg-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Abstract bg element */
.cyber-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.05) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.cyber-content {
    position: relative;
    z-index: 1;
}

.cyber-badge {
    display: inline-block;
    background: rgba(0, 242, 255, 0.1);
    color: var(--cyber-blue);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.cyber-section h2 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cyber-section p {
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin-bottom: 3rem;
}

.cyber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.cyber-card {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: var(--transition);
}

.cyber-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--cyber-blue);
    transform: translateY(-5px);
}

.cyber-card h4 {
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.cyber-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- Contacts --- */
.contacts {
    padding: 100px 0;
    background: #fff;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-top: 40px;
}

.location-card {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.location-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-family: 'Manrope', sans-serif;
}

.location-card p {
    margin-bottom: 5px;
    color: var(--text-muted);
}

.digital-contacts a {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Modern Form */
.modern-form {
    background: var(--bg-offwhite);
    padding: 40px;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: #fff;
    font-family: 'Manrope', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.full-width {
    width: 100%;
}

.privacy-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 15px;
    text-align: center;
}

/* --- Footer --- */
footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

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

.footer-col ul li a {
    color: rgba(255,255,255,0.6);
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

/* --- Animations --- */
/* fadeUp: opacity + spostamento verticale + leggero zoom.
   Le varianti sotto coprono gli altri ingressi (lato, zoom, fade puro). */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Blog Section --- */
.blog-hero {
    height: 60vh; /* Smaller header for blog */
    min-height: 400px;
}

.blog-section {
    padding: 80px 0;
    background-color: var(--bg-offwhite);
}

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

.blog-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Featured Article (First one spans full width on desktop) */
@media (min-width: 992px) {
    .blog-card.featured {
        grid-column: span 2; /* Or full width depending on grid */
        display: grid;
        grid-template-columns: 1fr 1.5fr;
    }
    
    .blog-card.featured .blog-content {
        justify-content: center;
    }
}

.blog-image {
    background-color: var(--primary-light);
    height: 200px;
    position: relative;
    /* Placeholder image logic or actual img tag inside */
    background-image: url('/assets/blog-card.jpg');
    background-size: cover;
    background-position: center;
}

.blog-card.featured .blog-image {
    height: 100%;
    min-height: 300px;
}

.blog-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-badge {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-content .date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.blog-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--primary-dark);
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    margin-top: auto; /* Push to bottom */
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    width: fit-content;
}

.read-more:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Lang Switcher */
.lang-switch {
    margin-left: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.active-lang {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
}

.lang-switch .sep {
    color: rgba(255,255,255,0.3);
}

.lang-switch a {
    color: rgba(255,255,255,0.6);
}

.lang-switch a:hover {
    color: #fff;
}

/* --- Floating Elements --- */

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1002;
    transition: var(--transition);
    animation: floatIn 1s ease 1s backwards;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: white;
}

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

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%; /* Hidden by default */
    left: 20px;
    right: 20px;
    background: rgba(11, 28, 44, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    z-index: 2000;
    transition: bottom 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #fff;
    font-size: 0.9rem;
}

.cookie-content a {
    color: var(--accent-gold);
    text-decoration: underline;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* --- Mobile Responsive --- */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 1.5rem;
    }
    .nav-menu a {
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-card.penale, 
    .bento-card.civile {
        grid-column: span 1;
        grid-row: auto;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }
    
    .hamburger span {
        display: block;
        width: 25px;
        height: 2px;
        background: #fff;
        margin: 5px 0;
        transition: var(--transition);
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary-dark);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        padding: 40px;
    }
    
    .nav-menu.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem; /* Smaller title for small screens */
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about, .areas, .cyber-section, .contacts {
        padding: 60px 0; /* Reduce vertical spacing */
    }
    
    .bento-card, .cyber-card, .modern-form {
        padding: 25px; /* Reduce card padding */
    }
    
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }
    
    .trust-grid {
        grid-template-columns: 1fr; /* Stack trust indicators */
        gap: 30px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
}
/* === Sezione pubblicazione (libro di riferimento) === */
.publication-section {
    background: var(--bg-offwhite);
    padding: 90px 20px;
    border-top: 1px solid #e8e8e8;
}
.publication-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    gap: 60px;
    align-items: center;
    flex-wrap: wrap;
}
.publication-cover {
    flex: 0 0 300px;
    filter: drop-shadow(0 18px 35px rgba(11, 28, 44, 0.22));
}
.publication-cover img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #d8d8d8;
}
.publication-content {
    flex: 1 1 480px;
}
.publication-content h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin: 14px 0 18px;
}
.publication-lead {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #333;
}
.publication-content p {
    line-height: 1.75;
    color: #444;
    margin-bottom: 16px;
}
.publication-note {
    font-size: 0.95rem;
    color: var(--text-muted);
    border-left: 3px solid var(--accent-gold);
    padding-left: 14px;
    margin: 22px 0;
}
.publication-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 26px;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
    padding: 14px 28px;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all .25s ease;
}
.btn-outline:hover {
    background: var(--primary-dark);
    color: #fff;
}
@media (max-width: 768px) {
    .publication-container { gap: 34px; }
    .publication-cover { flex: 0 0 220px; margin: 0 auto; }
    .publication-content h2 { font-size: 1.55rem; }
}

/* ============================================================
   PAGINA ARTICOLO
   ============================================================
   Queste regole erano prima negli <style> inline di ogni singolo
   articolo. Sono state spostate qui perche' i nuovi articoli
   (generati da build/build_blog.py) non hanno piu' style inline:
   senza questo blocco, le pagine articolo si renderizzerebbero
   senza intestazione scura e senza riquadro CTA.
   ============================================================ */
.article-page {
    background: var(--bg-light);
}
.article-header {
    background: var(--primary-dark);
    color: #fff;
    padding: 120px 0 60px;
    text-align: center;
}
.article-header h1 {
    color: #fff;
    font-size: 2.5rem;
    margin: 20px 0;
    line-height: 1.2;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.article-header .category-badge {
    display: inline-block;
}
.article-meta {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}
.article-content {
    max-width: 800px;
    padding: 60px 20px 90px;
    font-size: 1.1rem;
    color: #333;
    margin: 0 auto;
}
.article-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-dark);
    font-size: 1.6rem;
    line-height: 1.3;
}
.article-content p {
    line-height: 1.85;
    margin-bottom: 18px;
}
.article-content ul {
    margin: 18px 0 24px 24px;
}
.article-content li {
    line-height: 1.75;
    margin-bottom: 10px;
}
.article-content strong {
    color: var(--primary-dark);
}
.article-content .lead {
    font-size: 1.2rem;
    line-height: 1.75;
    color: var(--primary-light);
    font-weight: 500;
    border-left: 4px solid var(--accent-gold);
    padding-left: 22px;
    margin-bottom: 30px;
}
.article-content .quote {
    border-left: 4px solid var(--accent-gold);
    padding-left: 20px;
    font-style: italic;
    color: #555;
    margin: 30px 0;
    font-size: 1.15rem;
}
.article-content .cta-box {
    background: var(--bg-offwhite);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-top: 60px;
    border: 1px solid #ddd;
}
.article-content .cta-box h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.35rem;
}
.article-content .cta-box p {
    margin-bottom: 18px;
}
.contact-form-wrapper {
    background: var(--bg-offwhite);
    padding: 34px;
    border-radius: 8px;
    border: 1px solid #e4e4e4;
}
@media (max-width: 768px) {
    .article-header { padding: 90px 0 48px; }
    .article-header h1 { font-size: 1.85rem; }
    .article-content { font-size: 1.02rem; padding: 44px 18px 70px; }
    .article-content h2 { font-size: 1.35rem; margin-top: 32px; }
    .article-content .lead { font-size: 1.08rem; padding-left: 16px; }
    .article-content .cta-box { padding: 24px 18px; }
}

/* ============================================================
   ACCESSIBILITA': ANIMAZIONI E CONTENUTO NASCOSTO
   ============================================================
   Alcuni elementi (titolo hero, paragrafo, pulsanti) partono da
   opacity: 0 e si rivelano con un'animazione CSS. Se l'animazione
   non viene eseguita - perche' l'utente ha "riduci animazioni"
   attivo, perche' si stampa la pagina, o perche' il browser non
   la supporta - quegli elementi resterebbero INVISIBILI.

   Le regole sotto garantiscono che il contenuto sia sempre
   leggibile, animazione o no. Il contenuto non deve mai dipendere
   da un'animazione per essere letto.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }

    /* Contenuto che si rivela con animazione: resta visibile. */
    .hero h1,
    .hero p,
    .hero-buttons,
    .eyebrow,
    .blog-card,
    .about-content > *,
    .areas-grid > *,
    .cyber-card,
    .contact-form-wrapper > *,
    [data-reveal],
    .blog-image::after {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    /* Overlay decorativi: non sono contenuto, ma devono restare
       fermi. Lo sweep del bottone sparisce del tutto (sarebbe un
       lampo improvviso), la linea della navbar resta statica. */
    .btn::after {
        opacity: 0 !important;
        animation: none !important;
    }

    .navbar::before,
    .navbar::after {
        animation: none !important;
    }

    /* La barra centrale dell'hamburger sparisce di proposito quando
       il menu e' aperto (diventa una X): non e' contenuto nascosto,
       e va mantenuta cosi'. */
}

/* Fallback: se il browser non supporta le animazioni CSS,
   il contenuto deve comunque essere visibile. */
@supports not (animation-name: fadeUp) {
    .hero h1,
    .hero p,
    .hero-buttons,
    .eyebrow,
    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* Stampa: il contenuto dell'hero non e' animato. */
@media print {
    .hero h1,
    .hero p,
    .hero-buttons,
    .eyebrow,
    [data-reveal] {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
    }
}

/* Variante per sfondi scuri (hero): bordo e testo chiari.
   Va dichiarata DOPO .btn-outline perche' altrimenti, con la stessa
   specificita', l'ultima regola vince e sovrascrive il tema del tema. */
.btn-outline-light {
    background: rgba(11, 28, 44, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.75);
    color: #fff;
}
.btn-outline-light:hover {
    background: #fff;
    border-color: #fff;
    color: var(--primary-dark);
}

/* ============================================================
   MOTION DESIGN SYSTEM - v20261110b
   ============================================================
   1. Reveal on scroll (IntersectionObserver, pattern "enhanced")
   2. Micro-interazioni premium (hover / focus)
   3. Animazioni d'atmosfera (sfondo, navbar)
   4. Le varianti di entrata (fadeUp, fadeIn, slideInLeft,
      slideInRight, zoomIn) sono definite piu' in alto, insieme
      alla keyframe fadeUp originale.

   REGOLA FONDAMENTALE: il contenuto non deve MAI dipendere da
   un'animazione per essere letto.

   Il blocco [data-reveal] viene nascosto SOLO se la classe `.js`
   e' presente su <html>. La classe la aggiunge lo script inline
   in <head>, che la toglie di nuovo se reveal.js non parte
   (file mancante, bloccato o in errore). Se il JavaScript non
   gira, `.js` non viene mai applicata e il contenuto resta
   immediatamente visibile.
   ============================================================ */

/* ------------------------------------------------------------
   1. REVEAL ON SCROLL
   ------------------------------------------------------------ */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition-property: opacity, transform;
    transition-duration: .75s, .75s;
    transition-timing-function: cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--reveal-delay, 0s), var(--reveal-delay, 0s);
}

.js [data-reveal="left"] {
    transform: translateX(-32px);
}

.js [data-reveal="right"] {
    transform: translateX(32px);
}

.js [data-reveal="scale"] {
    transform: scale(.94);
}

.js [data-reveal="fade"] {
    transform: none;
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Stagger: 120ms per unita'. */
.js [data-reveal-delay="1"] { --reveal-delay: 120ms; }
.js [data-reveal-delay="2"] { --reveal-delay: 240ms; }
.js [data-reveal-delay="3"] { --reveal-delay: 360ms; }
.js [data-reveal-delay="4"] { --reveal-delay: 480ms; }

/* ------------------------------------------------------------
   2. MICRO-INTERAZIONI PREMIUM
   ------------------------------------------------------------ */

/* 2.1 Blog card: lift + ombra profonda + zoom dell'immagine */
.blog-card[data-reveal] {
    transition-property: opacity, transform, box-shadow;
    transition-duration: .75s, .75s, .35s;
    transition-timing-function: cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--reveal-delay, 0s), var(--reveal-delay, 0s), 0s;
}

.blog-card[data-reveal]:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(11, 28, 44, .18), 0 8px 16px rgba(11, 28, 44, .07);
}

.blog-image {
    position: relative;
    overflow: hidden;
}

.blog-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/assets/blog-card.jpg');
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
    pointer-events: none;
}

.blog-card:hover .blog-image::after {
    transform: scale(1.06);
}

/* Il badge dentro l'immagine resta leggibile sopra lo zoom. */
.blog-image > .category-badge {
    position: relative;
    z-index: 2;
}

/* 2.2 Pulsanti: sweep di luce diagonale + sollevamento */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 45%;
    height: 200%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-160%) rotate(12deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.btn:hover::after {
    opacity: 1;
    animation: btnSweep .6s cubic-bezier(.22, .61, .36, 1) forwards;
}

.btn:hover {
    transform: translateY(-2px);
}

@keyframes btnSweep {
    from { transform: translateX(-160%) rotate(12deg); }
    to   { transform: translateX(420%) rotate(12deg); }
}

/* Bottone oro: lo sweep deve risultare in contrasto sul fondo pieno. */
.btn-primary::after {
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .62) 50%, rgba(255, 255, 255, 0) 100%);
}

/* Bottone outline su fondo chiaro: uno sweep bianco sarebbe invisibile. */
.btn-outline::after {
    background: linear-gradient(100deg, rgba(197, 160, 89, 0) 0%, rgba(197, 160, 89, .42) 50%, rgba(197, 160, 89, 0) 100%);
}

/* Bottone outline chiaro su fondo scuro: serve lo sweep bianco. */
.btn-outline-light::after {
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, 0) 100%);
}

/* 2.3 Menu di navigazione: underline che cresce da sinistra */
.nav-menu a:not(.btn-nav) {
    position: relative;
}

.nav-menu a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 1px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

.nav-menu a:not(.btn-nav):hover::after,
.nav-menu a.highlight-link::after,
.nav-menu a.active::after {
    transform: scaleX(1);
}

/* 2.4 Logo: il letter-spacing si allarga al passaggio del mouse */
.logo-text {
    transition: letter-spacing .3s cubic-bezier(.22, .61, .36, 1);
}

.logo a:hover .logo-text {
    letter-spacing: 3px;
}

/* 2.5 Cyber card: il bordo si illumina */
.cyber-card[data-reveal] {
    transition-property: opacity, transform, background-color, border-color, box-shadow;
    transition-duration: .75s, .75s, .3s, .3s, .3s;
    transition-timing-function: cubic-bezier(.22, .61, .36, 1), cubic-bezier(.22, .61, .36, 1), ease, ease, ease;
    transition-delay: var(--reveal-delay, 0s), var(--reveal-delay, 0s), 0s, 0s, 0s;
}

.cyber-card[data-reveal]:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: inset 0 0 26px rgba(197, 160, 89, .12), 0 0 0 1px rgba(0, 242, 255, .14), 0 18px 42px rgba(0, 0, 0, .38);
}

/* 2.6 Bento card: stessa logica di stagger e sollevamento */
.bento-card[data-reveal] {
    transition-property: opacity, transform, box-shadow;
    transition-duration: .75s, .75s, .35s;
    transition-timing-function: cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--reveal-delay, 0s), var(--reveal-delay, 0s), 0s;
}

.bento-card[data-reveal]:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 2.7 Category badge: sollevamento e cambio colore */
.category-badge {
    transition: transform .3s cubic-bezier(.22, .61, .36, 1), color .3s ease;
}

.blog-card:hover .category-badge,
.blog-image .category-badge:hover,
.article-header .category-badge:hover {
    transform: translateY(-2px);
    color: var(--accent-gold-hover);
}

/* 2.8 Read more: la freccia scorre a destra */
.read-more {
    transition: color .3s ease, border-color .3s ease, transform .35s cubic-bezier(.22, .61, .36, 1);
}

.read-more:hover {
    transform: translateX(4px);
}

/* 2.9 Link dentro gli articoli: underline oro che cresce */
.article-content a:not(.btn):not(.read-more) {
    position: relative;
}

.article-content a:not(.btn):not(.read-more)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

.article-content a:not(.btn):not(.read-more):hover::after {
    transform: scaleX(1);
}

/* 2.10 Copertina del manuale: micro-zoom */
.publication-cover img {
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}

.publication-cover:hover img {
    transform: scale(1.03);
}

/* ------------------------------------------------------------
   3. ANIMAZIONI D'ATMOSFERA
   ------------------------------------------------------------ */

/* 3.1 Parallax dello sfondo dell'hero: solo su schermi larghi,
       per non penalizzare il repaint sui dispositivi mobili. */
@media (min-width: 1024px) {
    .hero,
    .blog-hero {
        background-attachment: fixed;
    }
}

/* 3.2 Pulsazione lentissima del velo dell'hero */
@keyframes pulseSoft {
    from { opacity: .86; }
    to   { opacity: 1; }
}

.hero-overlay {
    animation: pulseSoft 8s ease-in-out infinite alternate;
}

/* 3.3 Linea oro al bottom della navbar quando la pagina scorre */
.navbar::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(197, 160, 89, 0) 0%, rgba(197, 160, 89, .8) 50%, rgba(197, 160, 89, 0) 100%);
    transform: scaleX(.2);
    opacity: 0;
    transition: transform .55s cubic-bezier(.22, .61, .36, 1), opacity .45s ease;
    pointer-events: none;
}

.navbar.scrolled::before {
    transform: scaleX(1);
    opacity: .85;
}

/* Shimmer: una banda di luce che attraversa la linea. */
.navbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(212, 175, 106, 0) 0%, rgba(212, 175, 106, .95) 50%, rgba(212, 175, 106, 0) 100%);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    background-position: 50% 0;
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.navbar.scrolled::after {
    opacity: 1;
    animation: navShimmer 7s linear infinite;
}

@keyframes navShimmer {
    from { background-position: -60% 0; }
    to   { background-position: 160% 0; }
}

/* ============================================================
   CORREZIONE CONTRASTO: H1 SU FONDO SCURO
   ============================================================
   La regola generale `h1, h2, h3, h4 { color: var(--primary-dark) }`
   vinceva sul colore ereditato da `.lp-hero { color: #fff }`: il titolo
   della guida crypto risultava navy su fondo navy, quindi illeggibile.
   Il colore si applica all'elemento, non ai figli: serve una regola
   esplicita per l'h1 dentro il contenitore scuro.
   ============================================================ */
.lp-hero h1,
.lp-hero h2,
.lp-hero .lp-subtitle {
    color: #fff;
}
