/* Orizzonte Insegnanti - public site visual layer.
   Applies only to pages whose body has .oi-public-modern. */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400..900;1,14..32,400..700&display=swap');

:root {
  --oi-ink: #0b1220;
  --oi-ink-soft: #314158;
  --oi-muted: #64748b;
  --oi-surface: rgba(255, 255, 255, 0.93);
  --oi-blue: #1d4ed8;
  --oi-cyan: #0891b2;
  --oi-green: #059669;
  --oi-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --oi-shadow: 0 18px 50px rgba(15, 23, 42, 0.13);
  --oi-shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.18);
  --oi-radius: 8px;
  --oi-radius-lg: 12px;
}

body.oi-public-modern {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  color: var(--oi-ink);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.86) 44%, #fff 100%),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.028) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.022) 0 1px, transparent 1px 72px);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body.oi-public-modern ::selection {
  background: rgba(29, 78, 216, 0.18);
  color: var(--oi-ink);
}

body.oi-public-modern button,
body.oi-public-modern input,
body.oi-public-modern textarea,
body.oi-public-modern select {
  letter-spacing: 0;
}

body.oi-public-modern img {
  max-width: 100%;
}

body.oi-public-modern a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

body.oi-public-modern header,
body.oi-public-modern nav[aria-label],
body.oi-public-modern .navbar,
body.oi-public-modern .site-header {
  backdrop-filter: blur(18px) saturate(150%);
}

body.oi-public-modern header.fixed,
body.oi-public-modern header.sticky,
body.oi-public-modern .site-header,
body.oi-public-modern .navbar {
  border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08) !important;
}

body.oi-public-modern .container,
body.oi-public-modern .max-w-7xl,
body.oi-public-modern .max-w-6xl,
body.oi-public-modern .max-w-5xl {
  width: min(100%, calc(100vw - 32px));
}

body.oi-public-modern h1,
body.oi-public-modern h2,
body.oi-public-modern h3,
body.oi-public-modern .hero-title,
body.oi-public-modern .section-title {
  color: var(--oi-ink);
  letter-spacing: -0.015em;
}

/* Scrollbar discreta e coerente su tutto il sito */
body.oi-public-modern::-webkit-scrollbar {
  width: 10px;
}

body.oi-public-modern::-webkit-scrollbar-track {
  background: #f1f5f9;
}

body.oi-public-modern::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
  border: 2px solid #f1f5f9;
}

body.oi-public-modern::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Focus ring accessibile e moderno */
body.oi-public-modern a:focus-visible,
body.oi-public-modern button:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.65);
  outline-offset: 2px;
  border-radius: 6px;
}

body.oi-public-modern h1 {
  text-wrap: balance;
}

body.oi-public-modern h2,
body.oi-public-modern h3 {
  text-wrap: pretty;
}

body.oi-public-modern .prose,
body.oi-public-modern article,
body.oi-public-modern .article-content,
body.oi-public-modern .post-content {
  color: var(--oi-ink-soft);
}

body.oi-public-modern .prose p,
body.oi-public-modern article p,
body.oi-public-modern .article-content p,
body.oi-public-modern .post-content p {
  line-height: 1.78;
}

body.oi-public-modern .prose a,
body.oi-public-modern article a,
body.oi-public-modern .article-content a,
body.oi-public-modern .post-content a {
  color: var(--oi-blue);
  font-weight: 700;
}

body.oi-public-modern .prose blockquote,
body.oi-public-modern article blockquote,
body.oi-public-modern .article-content blockquote,
body.oi-public-modern .post-content blockquote {
  border-left: 4px solid var(--oi-blue);
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.08), rgba(8, 145, 178, 0.04));
  border-radius: 0 var(--oi-radius) var(--oi-radius) 0;
  padding: 18px 22px;
}

body.oi-public-modern .hero,
body.oi-public-modern .hero-section,
body.oi-public-modern [class*="hero"],
body.oi-public-modern section:first-of-type {
  overflow: hidden;
}

body.oi-public-modern .hero,
body.oi-public-modern .hero-section,
body.oi-public-modern .landing-hero {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(29, 78, 216, 0.90) 46%, rgba(5, 150, 105, 0.78)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px 52px);
  color: #fff;
}

body.oi-public-modern .hero *,
body.oi-public-modern .hero-section *,
body.oi-public-modern .landing-hero * {
  color: inherit;
}

body.oi-public-modern .hero h1,
body.oi-public-modern .hero-section h1,
body.oi-public-modern .landing-hero h1 {
  color: #fff;
  text-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
}

body.oi-public-modern .hero p,
body.oi-public-modern .hero-section p,
body.oi-public-modern .landing-hero p {
  color: rgba(255, 255, 255, 0.86);
}

body.oi-public-modern .oi-home-hero {
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(239, 246, 255, 0.96) 42%, rgba(236, 253, 245, 0.92) 100%),
    repeating-linear-gradient(90deg, rgba(29, 78, 216, 0.08) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(8, 145, 178, 0.06) 0 1px, transparent 1px 68px) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.20);
}

body.oi-public-modern .oi-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(15, 23, 42, 0.06), transparent 34%),
    linear-gradient(290deg, rgba(5, 150, 105, 0.10), transparent 40%);
}

body.oi-public-modern .oi-home-hero > * {
  position: relative;
  z-index: 1;
}

body.oi-public-modern .oi-home-hero .animate-blob {
  display: none;
}

body.oi-public-modern .oi-home-hero h1 {
  letter-spacing: 0;
  text-shadow: 0 18px 52px rgba(15, 23, 42, 0.08);
}

body.oi-public-modern .oi-home-hero p {
  color: #334155;
}

body.oi-public-modern .oi-home-hero iframe {
  background: #020617;
}

body.oi-public-modern .bg-gradient-to-br.from-slate-900,
body.oi-public-modern .bg-gradient-to-br.from-slate-800,
body.oi-public-modern .bg-gradient-to-br.from-blue-900 {
  background: linear-gradient(135deg, #07111f 0%, #14346c 48%, #05706f 100%) !important;
}

body.oi-public-modern .bg-white,
body.oi-public-modern .card,
body.oi-public-modern article,
body.oi-public-modern .news-card,
body.oi-public-modern .feature-card,
body.oi-public-modern .pricing-card,
body.oi-public-modern .faq-item,
body.oi-public-modern .rounded-2xl,
body.oi-public-modern .rounded-3xl {
  box-shadow: var(--oi-shadow-sm);
}

body.oi-public-modern article,
body.oi-public-modern .card,
body.oi-public-modern .news-card,
body.oi-public-modern .feature-card,
body.oi-public-modern .pricing-card,
body.oi-public-modern .faq-item {
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: var(--oi-surface);
}

body.oi-public-modern article:hover,
body.oi-public-modern .card:hover,
body.oi-public-modern .news-card:hover,
body.oi-public-modern .feature-card:hover,
body.oi-public-modern .pricing-card:hover {
  border-color: rgba(29, 78, 216, 0.22);
  box-shadow: var(--oi-shadow);
}

body.oi-public-modern .rounded-xl,
body.oi-public-modern .rounded-2xl,
body.oi-public-modern .rounded-3xl,
body.oi-public-modern .card,
body.oi-public-modern article,
body.oi-public-modern .news-card,
body.oi-public-modern .feature-card,
body.oi-public-modern .pricing-card {
  border-radius: var(--oi-radius-lg) !important;
}

body.oi-public-modern .rounded-full {
  border-radius: 999px !important;
}

body.oi-public-modern button,
body.oi-public-modern .btn,
body.oi-public-modern [class*="btn-"],
body.oi-public-modern a[class*="bg-slate-900"],
body.oi-public-modern a[class*="bg-brand"],
body.oi-public-modern a[class*="bg-blue"],
body.oi-public-modern a[class*="bg-indigo"],
body.oi-public-modern a[class*="bg-emerald"] {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

body.oi-public-modern button:hover,
body.oi-public-modern .btn:hover,
body.oi-public-modern [class*="btn-"]:hover,
body.oi-public-modern a[class*="bg-slate-900"]:hover,
body.oi-public-modern a[class*="bg-brand"]:hover,
body.oi-public-modern a[class*="bg-blue"]:hover,
body.oi-public-modern a[class*="bg-indigo"]:hover,
body.oi-public-modern a[class*="bg-emerald"]:hover {
  transform: translateY(-1px);
}

body.oi-public-modern a[class*="bg-slate-900"],
body.oi-public-modern .btn-primary,
body.oi-public-modern button[type="submit"] {
  background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0891b2) !important;
  box-shadow: 0 16px 38px rgba(29, 78, 216, 0.24);
}

body.oi-public-modern a[class*="bg-slate-900"]:hover,
body.oi-public-modern .btn-primary:hover,
body.oi-public-modern button[type="submit"]:hover {
  box-shadow: 0 22px 52px rgba(29, 78, 216, 0.34);
}

body.oi-public-modern input,
body.oi-public-modern select,
body.oi-public-modern textarea {
  border-radius: var(--oi-radius) !important;
  border-color: rgba(100, 116, 139, 0.32) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.oi-public-modern input:focus,
body.oi-public-modern select:focus,
body.oi-public-modern textarea:focus {
  border-color: rgba(29, 78, 216, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12) !important;
  outline: none;
}

body.oi-public-modern .category-pill,
body.oi-public-modern .tag,
body.oi-public-modern .badge,
body.oi-public-modern [class*="badge"],
body.oi-public-modern [class*="pill"] {
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.oi-public-modern table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--oi-radius);
}

body.oi-public-modern th {
  background: rgba(15, 23, 42, 0.04);
  color: var(--oi-ink);
}

body.oi-public-modern footer {
  background: linear-gradient(135deg, #07111f 0%, #12316a 52%, #075e63 100%) !important;
}

body.oi-public-modern footer a {
  text-decoration: none;
}

body.oi-public-modern footer a:hover {
  text-decoration: underline;
}

body.oi-public-modern .news-grid article,
body.oi-public-modern .articles-grid article,
body.oi-public-modern .grid article {
  min-height: 100%;
}

body.oi-public-modern .news-grid img,
body.oi-public-modern .articles-grid img,
body.oi-public-modern article img {
  transition: transform 420ms ease, filter 420ms ease;
}

body.oi-public-modern .news-grid article:hover img,
body.oi-public-modern .articles-grid article:hover img,
body.oi-public-modern article:hover img {
  filter: saturate(1.06) contrast(1.03);
}

body.oi-public-modern .breadcrumb,
body.oi-public-modern nav[aria-label="Breadcrumb"],
body.oi-public-modern nav[aria-label="breadcrumb"] {
  color: var(--oi-muted);
}

body.oi-public-modern .article-shell,
body.oi-public-modern .post-shell,
body.oi-public-modern .content-shell {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--oi-radius-lg);
  box-shadow: var(--oi-shadow);
}

body.oi-public-modern .article-meta,
body.oi-public-modern .post-meta,
body.oi-public-modern time {
  color: var(--oi-muted);
}

body.oi-public-modern .sidebar,
body.oi-public-modern aside {
  border-color: rgba(148, 163, 184, 0.20) !important;
}

body.oi-public-modern aside .card,
body.oi-public-modern aside article {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body.oi-public-modern .modal,
body.oi-public-modern [role="dialog"] {
  border-radius: var(--oi-radius-lg);
}

@media (min-width: 768px) {
  body.oi-public-modern .hero h1,
  body.oi-public-modern .hero-section h1,
  body.oi-public-modern .landing-hero h1 {
    max-width: 13ch;
  }

  body.oi-public-modern .prose,
  body.oi-public-modern .article-content,
  body.oi-public-modern .post-content {
    font-size: 1.06rem;
  }
}

@media (max-width: 767px) {
  body.oi-public-modern .container,
  body.oi-public-modern .max-w-7xl,
  body.oi-public-modern .max-w-6xl,
  body.oi-public-modern .max-w-5xl {
    width: min(100%, calc(100vw - 24px));
  }

  body.oi-public-modern h1 {
    font-size: clamp(2rem, 10vw, 3.25rem) !important;
    line-height: 1.05 !important;
  }

  body.oi-public-modern h2 {
    font-size: clamp(1.55rem, 7vw, 2.2rem) !important;
    line-height: 1.15 !important;
  }

  body.oi-public-modern .rounded-2xl,
  body.oi-public-modern .rounded-3xl,
  body.oi-public-modern .card,
  body.oi-public-modern article {
    border-radius: var(--oi-radius) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.oi-public-modern *,
  body.oi-public-modern *::before,
  body.oi-public-modern *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
