@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg-950: #e9f4fb;
  --bg-900: #fff4dd;
  --bg-800: #ffffff;
  --text-100: #123140;
  --text-300: #4b6570;
  --text-500: #4b6570;
  --gold-500: #0f7e9b;
  --gold-400: #0b5f77;
  --gold-300: #d67b19;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-alt: rgba(247, 252, 255, 0.98);
  --border: #c8dbe3;
  --shadow-lg: 0 12px 24px rgba(12, 54, 68, 0.12);
  --app-bg:
    radial-gradient(1200px 700px at 8% 2%, rgba(19, 143, 176, 0.18), transparent 62%),
    radial-gradient(900px 600px at 92% 98%, rgba(220, 132, 32, 0.18), transparent 66%),
    linear-gradient(165deg, #e9f4fb, #fff4dd);
  --panel-text-strong: #123140;
  --rail-tick: #123140;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Inter", "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text-100);
  background: var(--app-bg);
  line-height: 1.45;
  overflow-x: hidden;
}

/* ===== Background Grid ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(15, 126, 155, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 123, 25, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 95%);
}

/* ===== Shell ===== */
.shell { width: min(1480px, calc(100% - 2rem)); margin-inline: auto; }

/* ===== Hero ===== */
.hero {
  margin-top: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(160deg, #ffffff, #f7fbfd);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: 12px; background: var(--gold-500); border-radius: 14px 0 0 14px;
}
.kicker {
  margin: 0; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--gold-400); font-weight: 700;
}
.hero h1 {
  font-size: clamp(1.8rem, 2.4vw, 3rem);
  margin-top: 0.35rem; color: var(--panel-text-strong);
  line-height: 1.05; overflow-wrap: anywhere;
}
.subtitle { margin: 0.38rem 0 0; color: var(--text-300); max-width: 75ch; }
.hero-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.hero-top > :first-child { flex: 1 1 auto; min-width: 0; padding-left: 0.4rem; }

/* ===== Panels ===== */
.panel {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); padding: 1rem;
  box-shadow: 0 6px 16px rgba(12, 54, 68, 0.08);
}
.full { grid-column: span 12; }

/* ===== Hub Specific ===== */
.topics-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.9rem;
}

.topic-chip {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text-100);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.topic-chip:hover {
    border-color: var(--gold-500);
    background: #f0f8fb;
}

.topic-section {
    grid-column: span 12;
    margin-top: 0.9rem;
}

.topic-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.topic-head h2 { font-size: 1.5rem; color: var(--panel-text-strong); }
.topic-head p { color: var(--text-300); font-size: 0.9rem; margin: 0; }

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0.9rem;
}

.sim-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    min-height: 220px;
    box-shadow: 0 4px 12px rgba(12, 54, 68, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sim-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-500);
    box-shadow: var(--shadow-lg);
}

.sim-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.55rem;
    gap: 0.8rem;
}

.sim-card h3 {
    font-size: 1.22rem;
    line-height: 1.25;
    margin: 0;
    flex: 1;
    color: var(--panel-text-strong);
}

.category {
    background: #f0f8fb;
    color: var(--gold-500);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid var(--border);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.description {
    color: var(--text-300);
    margin-bottom: 0.9rem;
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.45;
}

/* ===== Buttons ===== */
.btn {
    padding: 0.58rem 0.82rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.89rem;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: filter 0.15s;
    border: 1px solid var(--gold-500);
}

.btn-primary {
    background: linear-gradient(160deg, #0d839f, #0b5f77);
    color: #ffffff;
    border-color: #0a5d74;
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
    background: #f6fbfd;
    color: var(--text-100);
    border-color: #9dbac5;
}

.btn-ghost:hover { background: #dff0f6; }

.button-row {
    margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.55rem;
}

/* ===== Layout ===== */
.app-layout {
  margin-top: 0.9rem; margin-bottom: 0.6rem;
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

/* ===== Footer ===== */
footer {
  text-align: center; color: var(--text-500); padding: 1.5rem;
  margin-top: 1rem; font-size: 0.88rem;
}

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .hero { padding-right: 1.4rem; }
  .hero-top { flex-direction: column; }
}

@media (max-width: 780px) {
  .shell { width: min(1480px, calc(100% - 1rem)); }
  .hero { padding: 1rem 1rem 1.1rem; }
  .hero h1 { font-size: clamp(1.7rem, 10vw, 2.8rem); }
  .topic-grid { grid-template-columns: 1fr; }
  .button-row { flex-direction: column; }
  .btn { width: 100%; }
}
