/* =====================================================
   NIPIOGNOSI MODEL PAGE – REFINED CLEAN VERSION
===================================================== */

/* ================================
   BASE
================================ */

.nipio-container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 28px;
}

/* ================================
   ACCESSIBILITY
================================ */

.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 20px;
  background: #111827;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  z-index: 9999;
}

.skip-link:focus {
  top: 20px;
}

:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* ================================
   HERO
================================ */

.model-hero {
  padding: 70px 0 40px;
  text-align: center;
}

.model-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #0f172a;
  margin-bottom: 20px;
  line-height: 1.15;
}

.model-subtitle {
  font-size: 18px;
  color: #475569;
  max-width: 760px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ================================
   LAYOUT
================================ */

.model-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
  margin-top: 50px;
}

/* ================================
   TOC
================================ */

.model-toc {
  position: sticky;
  top: 120px;
  background: #ffffff;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.model-toc h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: #64748b;
}

.model-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.model-toc li {
  margin-bottom: 8px;
}

.model-toc a {
  display: block;
  padding: 6px 8px;
  text-decoration: none;
  font-size: 14px;
  color: #334155;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.model-toc a:hover,
.model-toc a:focus-visible {
  background: #eef2ff;
  color: #1d4ed8;
}

/* ================================
   SECTION CARDS
================================ */

.model-section {
  margin-bottom: 70px;
  scroll-margin-top: 120px;
}

.model-card {
  background: #ffffff;
  padding: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.04);
}

.model-section h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-bottom: 24px;
  font-weight: 600;
  color: #0f172a;
}

.model-section p {
  font-size: 16.5px;
  line-height: 1.8;
  color: #334155;
  max-width: 860px;
}

/* ================================
   DIAGRAM
================================ */

.model-diagram {
  text-align: center;
  padding: 0;
}

.model-diagram figure {
  margin: 0;
}

#model-radar {
  display: block;
  width: 100% !important;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

/* ================================
   AXES GRID
================================ */

.axes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 30px;
}

.axes-grid article {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  transition: box-shadow 0.25s ease;
}

.axes-grid article:hover {
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.axes-grid h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1e3a8a;
}

/* ================================
   TYPOLOGY
================================ */

.typology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.type-card {
  background: #ffffff;
  color: #0f172a;
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.6;
  transition: box-shadow 0.25s ease;
}

.type-card:hover {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

/* ================================
   CTA
================================ */

.model-cta {
  text-align: center;
  padding: 90px 0 60px;
}

.model-cta .cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 16px 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.model-cta .cta-button:hover,
.model-cta .cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 25px 60px rgba(37, 99, 235, 0.4);
}

/* ================================
   RTL SUPPORT
================================ */

[dir="rtl"] .model-layout {
  grid-template-columns: 280px 1fr;
}

[dir="rtl"] .model-toc,
[dir="rtl"] .model-section,
[dir="rtl"] .type-card,
[dir="rtl"] .axes-grid article {
  text-align: right;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 1000px) {
  .model-layout {
    grid-template-columns: 1fr;
  }

  .model-toc {
    position: relative;
    top: auto;
    margin-bottom: 40px;
  }

  .axes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  #model-radar {
    max-width: 340px;
  }
}