/* ============================================
   STILE CONDIVISO PAGINE STATICHE
   Turni Farmacie - Provincia di Messina
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&display=swap');

:root{
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f141f;
  --card: rgba(20, 26, 39, 0.6);
  --card-hover: rgba(25, 32, 48, 0.8);
  --text: #e8eef5;
  --text-muted: #94a7be;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --success: #10b981;
  --border: rgba(148, 167, 190, 0.1);
  --radius: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

html, body {
  background: radial-gradient(ellipse at top, #1a1f35 0%, var(--bg-primary) 50%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  animation: rotate 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes rotate { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

a { color: var(--accent-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); text-decoration: underline; }

/* ====== HEADER & NAV ====== */
header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,26,.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.2);
}
.wrap{ max-width: 1100px; margin:0 auto; padding:20px 24px; position:relative; z-index:1; }
.header-content{ display:flex; align-items:center; gap:14px; justify-content:space-between; flex-wrap:wrap; }
.brand{ display:flex; align-items:center; gap:14px; text-decoration:none; }
.brand:hover{ text-decoration:none; }
.logo{
  width:44px; height:44px;
  background:linear-gradient(135deg,var(--accent),var(--accent-light));
  border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:22px;
  box-shadow:0 4px 16px var(--accent-glow);
  flex-shrink:0;
}
.brand-text h1, .brand-text .site-title{
  font-size:20px;
  font-weight:800;
  background:linear-gradient(135deg,var(--text),var(--text-muted));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  line-height:1.2;
}
.brand-text .subtitle{ color:var(--text-muted); font-size:13px; font-weight:400; }

nav.main-nav{ display:flex; gap:6px; flex-wrap:wrap; }
nav.main-nav a{
  color: var(--text-muted);
  font-size:14px;
  font-weight:600;
  padding:8px 14px;
  border-radius:10px;
  transition: all .25s;
}
nav.main-nav a:hover{
  background: var(--card);
  color: var(--text);
  text-decoration:none;
}
nav.main-nav a.active{
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
}

/* ====== MAIN CONTENT ====== */
main{
  max-width: 860px;
  margin: 40px auto 80px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.page-title{
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-lead{
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.65;
}

.content-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
}

.content-card h2{
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 28px 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.content-card h2:first-child{ margin-top: 0; }

.content-card h3{
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-light);
  margin: 22px 0 10px 0;
}

.content-card p{
  font-size: 16px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.7;
}

.content-card ul, .content-card ol{
  margin: 12px 0 18px 22px;
  color: var(--text);
}
.content-card li{
  margin-bottom: 8px;
  line-height: 1.65;
}

.content-card strong{ color: var(--text); font-weight: 700; }

.callout{
  margin: 18px 0;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.07);
  color: var(--text);
  font-size: 15px;
}
.callout.warning{
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.07);
}
.callout strong{ color: var(--accent-light); }

.meta-info{
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding: 12px 16px;
  background: rgba(148, 167, 190, 0.05);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

/* ====== INDICE / SOMMARIO ====== */
.toc{
  background: rgba(148, 167, 190, 0.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.toc-title{
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.toc ol{ margin: 0 0 0 20px; }
.toc li{ margin-bottom: 4px; font-size: 15px; }

/* ====== ARTICOLI HUB ====== */
.articles-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.article-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  display: block;
}
.article-card::before{
  content:'';
  position:absolute;
  top:0; left:0; right:0;
  height:3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0);
  transition: transform .35s;
}
.article-card:hover{
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  text-decoration: none;
}
.article-card:hover::before{ transform: scaleX(1); }
.article-card .tag{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-light);
  font-weight: 700;
  margin-bottom: 10px;
}
.article-card h3{
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}
.article-card p{
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ====== CTA / BOTTONI ====== */
.btn-primary{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all .25s;
  box-shadow: 0 4px 16px var(--accent-glow);
  margin-top: 16px;
}
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
  text-decoration: none;
  color: white;
}

/* ====== FOOTER ====== */
footer{
  position:relative;
  z-index:1;
  color:var(--text-muted);
  font-size:13px;
  margin: 40px auto 0;
  padding: 30px 24px;
  border-top:1px solid var(--border);
  max-width: 1100px;
  text-align: center;
}
footer .footer-links{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
}
footer .footer-links a{ color: var(--text-muted); }
footer .footer-links a:hover{ color: var(--accent-light); }
footer .copyright{ font-size: 12px; opacity: .7; }

/* ====== AD SLOT ====== */
.ad-slot{
  width: 100%;
  margin: 28px auto;
  text-align: center;
  min-height: 90px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
}
.ad-label{
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  text-align: center;
  opacity: 0.4;
  margin-bottom: 6px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px){
  .wrap{ padding: 16px 18px; }
  .header-content{ flex-direction: column; align-items: flex-start; gap: 12px; }
  nav.main-nav{ width: 100%; overflow-x: auto; padding-bottom: 4px; }
  nav.main-nav a{ padding: 7px 12px; font-size: 13px; white-space: nowrap; }
  main{ margin: 24px auto 60px; padding: 0 18px; }
  .content-card{ padding: 24px 20px; }
  .content-card h2{ font-size: 20px; }
  .page-title{ font-size: 28px; }
  .page-lead{ font-size: 16px; }
  .articles-grid{ grid-template-columns: 1fr; gap: 16px; }
}
