:root{
    --usb-red:#a53131;
    --usb-red-dark:#842323;
    --text:#191919;
    --muted:#555;
    --bg:#f4f4f4;
    --card:#fff;
    --border:#e2e2e2;
    --max:1320px;
}
*{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}
body{font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text);line-height:1.45;}
a{text-decoration:none;color:inherit;}
img{max-width:100%;display:block;}
.tpl-wrap{max-width:var(--max);margin:0 auto;padding:0 20px;}

/* Header globale */
.tpl-header{background:#fff;border-bottom:1px solid var(--border);}
.tpl-header-inner{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:10px 20px;}
.tpl-brand{display:flex;align-items:center;gap:16px;min-width:0;}
.tpl-logo{width:74px!important;height:74px!important;object-fit:contain!important;flex:0 0 74px;}
.tpl-brand-text strong{display:block;color:var(--usb-red);font-size:1.58rem;line-height:1.08;letter-spacing:.02em;font-weight:900;}
.tpl-brand-text span{display:block;color:#111;font-size:1.02rem;font-weight:800;margin-top:5px;}
.tpl-social{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.tpl-social a{width:34px;height:34px;border-radius:50%;background:var(--usb-red);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:.78rem;box-shadow:0 3px 7px rgba(0,0,0,.14);}
.tpl-social a:hover{background:var(--usb-red-dark);}

/* Nav globale */
.tpl-nav{background:#fff;border-bottom:1px solid var(--border);}
.tpl-nav-inner{min-height:56px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;}
.tpl-menu{grid-column:2;list-style:none;display:flex;align-items:center;justify-content:center;gap:8px;}
.tpl-menu li{display:block;}
.tpl-menu a{display:block;padding:17px 18px 14px;font-weight:900;color:#111;border-bottom:3px solid transparent;}
.tpl-menu a:hover,.tpl-menu a.active{color:var(--usb-red);border-bottom-color:var(--usb-red);}
.tpl-nav-search{grid-column:3;justify-self:end;display:flex;align-items:center;}
.tpl-nav-search input{width:220px;height:38px;border:3px solid var(--usb-red);border-radius:2px;background:#fff;padding:0 12px;font-size:.96rem;outline:none;}

/* Spazi e contenuti pagina generici */
main,.page-main{background:var(--bg);}
.container,.content-wrap,.page-content,.content-text{max-width:var(--max);margin:0 auto;padding:32px 20px;}
.content-text{max-width:900px;}
h1,h2,h3{line-height:1.18;}
.section-title,.page-title,.content-text h1,.content-text h2{color:var(--usb-red);margin:0 0 22px;border-bottom:3px solid var(--usb-red);padding-bottom:12px;font-weight:900;}
p{margin:0 0 16px;}
ul,ol{margin:0 0 18px 22px;}

/* Home v5, se usata da file separati */
.tpl-hero{padding:24px 0 22px;}
.tpl-hero-grid{display:grid;grid-template-columns:minmax(0,1.62fr) minmax(360px,.92fr);gap:14px;align-items:stretch;}
.tpl-hero-image{position:relative;height:360px;border-radius:8px;overflow:hidden;background:#111;box-shadow:0 5px 16px rgba(0,0,0,.12);}
.tpl-hero-image img{width:100%;height:100%;object-fit:cover;filter:brightness(.78);}
.tpl-arrow{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:46px;border:0;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:36px;font-weight:900;display:flex;align-items:center;justify-content:center;cursor:pointer;}
.tpl-arrow.left{left:18px;}.tpl-arrow.right{right:18px;}
.tpl-dots{position:absolute;left:0;right:0;bottom:18px;display:flex;justify-content:center;gap:10px;}
.tpl-dot{width:12px;height:12px;border-radius:50%;border:2px solid #fff;background:transparent;}.tpl-dot.active{background:#fff;}
.tpl-hero-card{height:360px;background:#fff;border:1px solid var(--border);border-radius:8px;padding:30px 34px;display:flex;flex-direction:column;justify-content:center;box-shadow:0 5px 16px rgba(0,0,0,.08);overflow:hidden;}
.tpl-badge,.tpl-cat{align-self:flex-start;display:inline-flex;background:var(--usb-red);color:#fff;text-transform:uppercase;font-weight:900;font-size:.78rem;letter-spacing:.03em;border-radius:3px;padding:5px 9px;margin-bottom:14px;}
.tpl-hero-card h1{font-size:1.75rem;margin-bottom:14px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.tpl-hero-card p{font-size:1rem;color:#333;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;}
.tpl-meta{display:flex;gap:22px;flex-wrap:wrap;font-weight:800;font-size:.9rem;margin:8px 0 22px;}
.tpl-meta span::before{content:'▣';font-size:.68rem;margin-right:7px;color:#111;}
.tpl-btn{align-self:flex-start;background:var(--usb-red);color:#fff;padding:12px 18px;border-radius:4px;font-weight:900;}
.tpl-btn:hover{background:var(--usb-red-dark);}
.tpl-section{padding:26px 0 18px;}
.tpl-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;}
.tpl-section-title{display:flex;align-items:center;gap:12px;font-size:1.75rem;color:#000;border:0;margin:0;padding:0;}
.tpl-section-title::before{content:'';width:4px;height:24px;border-radius:4px;background:var(--usb-red);display:inline-block;}
.tpl-all{color:var(--usb-red);font-weight:900;}
.tpl-featured-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;}
.tpl-news-card{background:#fff;border:1px solid var(--border);border-radius:8px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.06);}
.tpl-news-img{display:block;height:145px;overflow:hidden;background:#ddd;}
.tpl-news-img img{width:100%;height:100%;object-fit:cover;}
.tpl-news-body{padding:14px 16px 16px;}
.tpl-news-body h3{font-size:1.02rem;margin:8px 0 10px;font-weight:900;}
.tpl-news-body p{font-size:.9rem;color:#444;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.tpl-news-meta{display:flex;gap:16px;flex-wrap:wrap;font-size:.85rem;font-weight:700;color:#333;margin:10px 0;}
.tpl-read{color:var(--usb-red);font-weight:900;}
.tpl-quick{padding-bottom:34px;}
.tpl-quick-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;}
.tpl-quick-card{background:#fff;border:1px solid var(--border);border-radius:8px;min-height:126px;padding:18px 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-shadow:0 4px 12px rgba(0,0,0,.05);}
.tpl-quick-icon{width:46px;height:46px;margin-bottom:8px;color:var(--usb-red);}
.tpl-quick-icon svg{width:100%;height:100%;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
.tpl-quick-card strong{font-size:1.05rem;margin-bottom:4px;}
.tpl-quick-card span:last-child{font-size:.88rem;color:#333;}

/* Footer globale */
.tpl-footer{background:#1f1f1f;color:#ddd;margin-top:40px;}
.tpl-footer-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:36px;padding-top:40px;padding-bottom:34px;}
.tpl-footer h3{color:#fff;font-size:1.05rem;margin-bottom:12px;}
.tpl-footer p,.tpl-footer li{color:#ddd;font-size:.95rem;line-height:1.55;}
.tpl-footer ul{margin:0;padding-left:18px;}
.tpl-footer a{color:#ddd;}.tpl-footer a:hover{color:#fff;text-decoration:underline;}
.tpl-footer-bottom{border-top:1px solid #333;text-align:center;padding:18px 20px 24px;color:#ddd;font-size:.9rem;}
.tpl-footer-bottom p{margin:4px 0;}

@media(max-width:950px){
    .tpl-header-inner{flex-direction:column;align-items:flex-start;}
    .tpl-social{justify-content:flex-start;}
    .tpl-nav-inner{grid-template-columns:1fr;gap:8px;padding-top:8px;padding-bottom:12px;}
    .tpl-menu{grid-column:auto;justify-content:flex-start;flex-wrap:wrap;}
    .tpl-nav-search{grid-column:auto;justify-self:stretch;}
    .tpl-nav-search input{width:100%;}
    .tpl-hero-grid{grid-template-columns:1fr;}
    .tpl-hero-card{height:auto;min-height:260px;}
    .tpl-featured-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .tpl-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .tpl-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:600px){
    .tpl-wrap{padding:0 14px;}
    .tpl-logo{width:64px!important;height:64px!important;flex-basis:64px;}
    .tpl-brand-text strong{font-size:1.25rem;}
    .tpl-brand-text span{font-size:.94rem;}
    .tpl-menu{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:0;}
    .tpl-menu a{text-align:center;padding:13px 8px;}
    .tpl-hero-image{height:255px;}
    .tpl-arrow{width:38px;height:38px;font-size:30px;}
    .tpl-hero-card{padding:22px;}
    .tpl-hero-card h1{font-size:1.42rem;}
    .tpl-section-head{align-items:flex-start;flex-direction:column;}
    .tpl-featured-grid,.tpl-quick-grid,.tpl-footer-grid{grid-template-columns:1fr;}
}
