/* ----------------------------------------------------------
   UNIT 74 - AREA DI TEST CSS (DIAGNOSTICA)
   Version: TANK_V2 (Clean & Tactical)
---------------------------------------------------------- */

/* === VARIABILI DI SISTEMA === */
:root {
    --bg-deep: #0f172a;       /* Slate 900 (Sfondo) */
    --bg-card: #1e293b;       /* Slate 800 (Card) */
    --accent: #fbbf24;        /* Amber 400 (Accento Attivo) */
    --accent-dim: #b45309;    /* Amber 700 (Accento Spento) */
    --text-main: #f1f5f9;     /* Slate 100 */
    --text-muted: #94a3b8;    /* Slate 400 */
    
    --font-sans: 'Lato', system-ui, -apple-system, sans-serif;
    --radius: 16px;
    --border-tech: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-glow: 0 0 20px rgba(251, 191, 36, 0.15);
}

/* === BASE & RESET === */
* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-deep);
    color: var(--text-main);
    /* Sfondo "Radar" sfumato */
    background-image: radial-gradient(circle at 50% 0%, #334155 0%, #0f172a 70%);
    background-attachment: fixed;
    background-size: cover;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === HEADER (GLOSSY STYLE) === */
.app-header {
    position: sticky; top: 0; z-index: 100; height: 70px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-tech);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-wrap { width: 100%; display: flex; justify-content: center; align-items: center; }

/* Animazione Titolo Glossy */
.title--gloss { position: relative; font-weight: 900; letter-spacing: 1px; }
.title--gloss strong { color: var(--accent); }
.title--gloss::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(251,191,36,0.4) 15%, transparent 30%);
    background-size: 200% 100%; mix-blend-mode: overlay;
    animation: gloss-anim 6s linear infinite; pointer-events: none;
}
@keyframes gloss-anim { from { background-position-x: 200%; } to { background-position-x: -200%; } }

/* === SEZIONE INTRO (DIAGNOSTICA) === */
.intro {
    text-align: center; padding: 50px 20px;
    margin-bottom: 30px;
    background: radial-gradient(circle, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0) 70%);
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}
.intro h2 {
    font-size: 1.8rem; margin: 0 0 15px 0; color: #fff;
    text-transform: uppercase; letter-spacing: 2px;
}
.intro p { font-size: 1.1rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; }

/* === GRIGLIA CARDS === */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 60px;
}

/* === CARD DESIGN (HUD STYLE) === */
.card {
    position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center;
    background: var(--bg-card);
    border: var(--border-tech);
    border-radius: var(--radius);
    padding: 35px 25px; text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Hover Effect: Illuminazione */
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(145deg, #1e293b, #253349);
}

/* Icona SVG Container */
.icon {
    width: 80px; height: 80px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.4s ease;
}
.card:hover .icon { transform: scale(1.1); }
.card svg { filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.2)); transition: filter 0.3s ease; }
.card:hover svg { filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.6)); }

/* Testi Card */
.card h2 {
    margin: 10px 0; font-size: 1.25rem; font-weight: 700; color: #fff;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.card p {
    font-size: 0.95rem; line-height: 1.5; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1;
}

/* Call to Action (Aggiunta Nuova) */
.card-action {
    margin-top: auto; /* Spinge in basso */
    font-size: 0.85rem; font-weight: 900;
    color: var(--accent); opacity: 0.7;
    text-transform: uppercase; letter-spacing: 1px;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}
.card:hover .card-action {
    opacity: 1; border-bottom-color: var(--accent); padding-bottom: 2px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* === CARD PRO (VERSIONE SPECIALE) === */
.card--pro {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.05) 0%, rgba(15, 23, 42, 1) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
}
.card--pro h2 { color: var(--accent); text-shadow: 0 0 10px rgba(251, 191, 36, 0.3); }
.card--pro:hover {
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.2);
    border-color: var(--accent) !important;
}
.card--pro .card-action {
    background: var(--accent); color: var(--bg-deep);
    padding: 6px 12px; border-radius: 4px;
    opacity: 1;
}
.card--pro:hover .card-action {
    background: #fff; color: var(--bg-deep);
    box-shadow: 0 0 15px var(--accent);
}

/* === FOOTER === */
.footer {
    padding: 40px 0;
    text-align: center; color: var(--text-muted);
    border-top: 1px dashed rgba(255,255,255,0.1);
    margin-top: auto;
}

/* === UTILITY === */
.ripple {
    position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}
@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .intro h2 { font-size: 1.5rem; }
    .grid { grid-template-columns: 1fr; gap: 20px; } /* Una colonna su mobile */
    .card { flex-direction: column; text-align: center; padding: 30px 20px; }
}
/* === ANIMAZIONI JS (DA AGGIUNGERE) === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}
