/* RoboticsHub India Design 1.0
   Tokens come from the logo: navy ink, cyan signal for originals, blue links. */

:root {
  --rh-ink: #0B1E3D;
  --rh-ink-2: #14305C;
  --rh-cyan: #00D9FF;
  --rh-link: #0063C2;
  --rh-paper: #F5F7FA;
  --rh-card: #FFFFFF;
  --rh-slate: #56677F;
  --rh-line: #DCE2EB;
  --rh-dek: #B9C7DD;
  --rh-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rh-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --rh-radius: 6px;
}

/* ---------- Base ---------- */
body.rh-site {
  background: var(--rh-paper);
  color: var(--rh-ink);
  font-family: var(--rh-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.rh-site h1, .rh-site h2, .rh-site h3, .rh-site h4,
.rh-site .main-title, .rh-site .main-navigation {
  font-family: var(--rh-sans);
  color: var(--rh-ink);
}
.rh-site a { color: var(--rh-link); }
.rh-site a:hover { color: var(--rh-ink); }
.rh-site a:focus-visible,
.rh-site button:focus-visible {
  outline: 3px solid var(--rh-cyan);
  outline-offset: 2px;
  border-radius: 2px;
}
.rh-site .site-header { border-bottom: 1px solid var(--rh-line); }
.rh-site .main-title a { color: var(--rh-ink); font-weight: 800; font-variation-settings: "wdth" 85; letter-spacing: -0.01em; }
.rh-site .site-description { color: var(--rh-slate); }
.rh-site .main-navigation .main-nav ul li a { font-weight: 600; }

/* ---------- Shared bits ---------- */
.rh-badge {
  display: inline-block;
  font: 700 0.75rem/1 var(--rh-sans);
  padding: 0.35em 0.6em;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: middle;
}
.rh-badge-original { background: var(--rh-cyan); color: var(--rh-ink); }
.rh-badge-news { background: transparent; color: var(--rh-slate); box-shadow: inset 0 0 0 1px #B7C2D2; }
.rh-badge-sm { font-size: 0.68rem; padding: 0.3em 0.5em; }

.rh-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: var(--rh-slate);
  margin-bottom: 0.4rem;
}
.rh-cat {
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
}
.rh-quiet { color: var(--rh-slate); font-size: 0.85rem; margin: 0; }

.rh-section-title {
  font-size: 1.4rem;
  font-weight: 750;
  font-variation-settings: "wdth" 90;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--rh-ink);
}
.rh-section-title span {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--rh-slate);
  letter-spacing: 0;
}

.rh-button {
  display: inline-block;
  background: var(--rh-ink);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7em 1.2em;
  border-radius: var(--rh-radius);
  text-decoration: none;
}
.rh-button:hover { background: var(--rh-ink-2); }
.rh-button-ghost { background: transparent; color: var(--rh-ink) !important; box-shadow: inset 0 0 0 1.5px var(--rh-ink); }
.rh-button-ghost:hover { background: var(--rh-ink); color: #fff !important; }
.rh-more { margin: 1.25rem 0 0; }
.rh-empty { color: var(--rh-slate); padding: 1rem 0; }

/* Topic tiles: each topic keeps one colour everywhere on the site */
.rh-tile, .rh-mini-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--t-bg, #EDF1F6);
  color: var(--t-fg, #33465F);
}
.rh-glyph { width: 46%; height: 46%; }
.rh-t-robotics, .rh-c-robotics     { --t-bg: #E3EEFB; --t-fg: #1F5FA8; }
.rh-t-ai, .rh-c-ai                 { --t-bg: #EEE8FB; --t-fg: #5B3FB0; }
.rh-t-automation, .rh-c-automation { --t-bg: #E2F3EC; --t-fg: #1B6E52; }
.rh-t-drones, .rh-c-drones         { --t-bg: #E2F4F8; --t-fg: #0B6A84; }
.rh-t-iot, .rh-c-iot               { --t-bg: #F4ECE2; --t-fg: #85551C; }
.rh-t-industrial, .rh-c-industrial { --t-bg: #E9EDF2; --t-fg: #3C495C; }
.rh-t-space, .rh-c-space           { --t-bg: #E7E9F7; --t-fg: #2C3889; }
.rh-t-ev, .rh-c-ev                 { --t-bg: #E8F4E0; --t-fg: #36701A; }
.rh-t-print, .rh-c-print           { --t-bg: #FAE8E6; --t-fg: #9E392F; }
.rh-t-vision, .rh-c-vision         { --t-bg: #F8EED8; --t-fg: #80590B; }
.rh-t-default, .rh-c-default       { --t-bg: #EDF1F6; --t-fg: #33465F; }
.rh-cat { color: var(--t-fg, var(--rh-link)); }
.rh-cat:hover { color: var(--rh-ink); text-decoration: underline; }

.rh-media { overflow: hidden; border-radius: var(--rh-radius); }
.rh-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Homepage ---------- */
.rh-site.home .inside-article { background: transparent; padding: 0; box-shadow: none; border: 0; }
.rh-site.home .site-content { padding-top: 0; }
.rh-site.home .entry-content { margin-top: 0; }
.rh-home { display: flex; flex-direction: column; gap: 2.75rem; padding: 1rem 0 3rem; }
.rh-home ul, .rh-home ol { list-style: none; margin: 0; padding: 0; }
.rh-home h3 { margin: 0; }

/* Topic bar */
.rh-topicbar { margin: 0 -4px; }
.rh-topicbar ul {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 4px 4px 8px;
}
.rh-topicbar a {
  display: block;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rh-ink);
  text-decoration: none;
  padding: 0.45em 0.9em;
  border-radius: 999px;
  background: var(--rh-card);
  box-shadow: inset 0 0 0 1px var(--rh-line);
}
.rh-topicbar a:hover { box-shadow: inset 0 0 0 1.5px var(--rh-ink); color: var(--rh-ink); }
.rh-topicbar a.rh-topicbar-orig { background: var(--rh-ink); color: #fff; box-shadow: none; }
.rh-topicbar a.rh-topicbar-orig::before {
  content: "";
  display: inline-block;
  width: 0.55em; height: 0.55em;
  margin-right: 0.45em;
  border-radius: 2px;
  background: var(--rh-cyan);
  vertical-align: 0.05em;
}

/* Original articles: the one bold block on the page */
.rh-originals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}
.rh-lead { background: var(--rh-ink); border-radius: 10px; overflow: hidden; }
.rh-lead-link { display: flex; flex-direction: column; height: 100%; color: #fff; text-decoration: none; }
.rh-lead-link:hover .rh-lead-title { text-decoration: underline; text-decoration-color: var(--rh-cyan); text-underline-offset: 0.15em; text-decoration-thickness: 2px; }
.rh-lead-media { aspect-ratio: 16 / 8; border-radius: 0; }
.rh-lead-media.rh-tile {
  --t-bg: var(--rh-ink-2);
  --t-fg: var(--rh-cyan);
  background-image:
    linear-gradient(rgba(0, 217, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}
.rh-lead-media .rh-glyph { width: 22%; height: 44%; }
.rh-lead-body { padding: 1.5rem 1.75rem 1.9rem; }
.rh-lead .rh-meta { color: var(--rh-dek); }
.rh-lead .rh-lead-title {
  color: #fff;
  font-size: clamp(1.7rem, 1.1rem + 2.1vw, 2.55rem);
  font-weight: 760;
  font-variation-settings: "wdth" 78;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0.35rem 0 0.8rem;
  max-width: 22ch;
}
.rh-lead .rh-lead-dek { color: var(--rh-dek); font-size: 1.02rem; margin: 0; max-width: 60ch; }

.rh-side-list { display: flex; flex-direction: column; }
.rh-side-list > li { padding: 1rem 0; border-bottom: 1px solid var(--rh-line); }
.rh-side-list > li:first-child { padding-top: 0.25rem; }
.rh-side h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.25; margin: 0.2rem 0 0.35rem; }
.rh-side h3 a { color: var(--rh-ink); text-decoration: none; }
.rh-side h3 a:hover { text-decoration: underline; }
.rh-side-list > li.rh-side-more { border-bottom: 0; padding-top: 1rem; }
.rh-side-more a { font-weight: 700; }

/* News + rail */
.rh-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
}
.rh-news-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rh-line);
}
.rh-news-item:first-child { padding-top: 0.2rem; }
.rh-news-media { width: 76px; height: 76px; }
.rh-news-body h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.28; margin: 0 0 0.3rem; }
.rh-news-body h3 a { color: var(--rh-ink); text-decoration: none; }
.rh-news-body h3 a:hover { text-decoration: underline; }
.rh-news-body p { margin: 0 0 0.3rem; font-size: 0.97rem; color: #33445C; max-width: 70ch; }
.rh-news-body p.rh-quiet { color: var(--rh-slate); font-size: 0.82rem; margin: 0; }

.rh-rail { display: flex; flex-direction: column; gap: 1.75rem; position: sticky; top: 1.5rem; }
.rh-rail-block { background: var(--rh-card); border: 1px solid var(--rh-line); border-radius: 10px; padding: 1.1rem 1.2rem; }
.rh-rail-title { font-size: 1rem; font-weight: 750; margin: 0 0 0.75rem; }
.rh-topic-index a {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0;
  color: var(--rh-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.rh-topic-index a:hover .rh-topic-name { text-decoration: underline; }
.rh-mini-tile { width: 30px; height: 30px; border-radius: 5px; flex: none; }
.rh-mini-tile .rh-glyph { width: 70%; height: 70%; }
.rh-count { color: var(--rh-slate); font-weight: 500; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.rh-howto p { font-size: 0.9rem; color: #33445C; margin: 0 0 0.75rem; }
.rh-howto p:last-child { margin-bottom: 0; }
.rh-howto .rh-badge { margin-right: 0.35rem; }

/* By topic */
.rh-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}
.rh-topic-block { border-top: 3px solid var(--t-fg); padding-top: 0.85rem; }
.rh-topic-head { font-size: 1.05rem; font-weight: 750; margin: 0 0 0.6rem; }
.rh-topic-head a { display: flex; align-items: center; gap: 0.55rem; color: var(--rh-ink); text-decoration: none; }
.rh-topic-head a:hover { text-decoration: underline; }
.rh-topic-block li { padding: 0.5rem 0; border-bottom: 1px solid var(--rh-line); font-size: 0.97rem; line-height: 1.35; }
.rh-topic-block li a { color: var(--rh-ink); text-decoration: none; font-weight: 500; }
.rh-topic-block li a:hover { text-decoration: underline; }
.rh-topic-more { display: inline-block; margin-top: 0.6rem; font-size: 0.88rem; font-weight: 700; color: var(--t-fg); }

/* ---------- Single posts ---------- */
.rh-site.single-post .inside-article {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--rh-line);
  border-radius: 10px;
}
.rh-site.single-post .entry-title {
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem);
  font-weight: 760;
  font-variation-settings: "wdth" 82;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.rh-site.single-post .entry-meta { color: var(--rh-slate); font-size: 0.88rem; }
.rh-site.single-post .entry-content {
  font-family: var(--rh-serif);
  font-size: 1.15rem;
  line-height: 1.75;
  color: #1C2B42;
}
.rh-site.single-post .entry-content > * { max-width: 68ch; }
.rh-site.single-post .entry-content h2,
.rh-site.single-post .entry-content h3 {
  font-family: var(--rh-sans);
  font-weight: 750;
  line-height: 1.2;
  margin: 2rem 0 0.75rem;
}
.rh-site.single-post .entry-content h2 { font-size: 1.55rem; }
.rh-site.single-post .entry-content h3 { font-size: 1.25rem; }
.rh-site.single-post .entry-content li { margin-bottom: 0.4rem; }

.rh-post-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  font-family: var(--rh-sans);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rh-line);
}

.rh-site .entry-content .rh-why {
  font-family: var(--rh-sans);
  background: #EAF8FC;
  border-left: 4px solid var(--rh-cyan);
  border-radius: 0 var(--rh-radius) var(--rh-radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}
.rh-site .entry-content .rh-why h3 { font-size: 1rem; margin: 0 0 0.35rem; }
.rh-site .entry-content .rh-why p { font-size: 1.02rem; line-height: 1.6; margin: 0; }

.rh-site .entry-content .rh-source {
  font-family: var(--rh-sans);
  font-size: 0.95rem;
  line-height: 1.55;
  background: var(--rh-paper);
  border: 1px solid var(--rh-line);
  border-radius: var(--rh-radius);
  padding: 0.9rem 1.1rem;
  margin: 1.75rem 0 0;
}
.rh-site .entry-content .rh-source a { font-weight: 700; }

/* More originals block under posts */
.rh-more-originals { font-family: var(--rh-sans); margin-top: 3rem; max-width: none !important; }
.rh-mo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.rh-mo a { display: block; color: var(--rh-ink); text-decoration: none; }
.rh-mo-media { aspect-ratio: 16 / 10; margin-bottom: 0.6rem; }
.rh-mo-cat { display: block; font-size: 0.8rem; font-weight: 700; color: var(--rh-slate); margin-bottom: 0.2rem; }
.rh-site .entry-content .rh-mo h3 { font-size: 1rem; line-height: 1.3; margin: 0; font-weight: 700; }
.rh-mo a:hover h3 { text-decoration: underline; }

/* ---------- Listings: topics, tags, search, news page ---------- */
.rh-listing .site-main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  align-content: start;
}
.rh-listing .site-main > .page-header,
.rh-listing .site-main > .paging-navigation,
.rh-listing .site-main > nav,
.rh-listing .site-main > .no-results { grid-column: 1 / -1; }
.rh-listing .site-main > article { margin: 0; }
.rh-listing .page-header { background: transparent; padding: 0.5rem 0 0; }
.rh-listing .page-header .page-title { font-size: 2rem; font-weight: 780; font-variation-settings: "wdth" 82; }
.rh-listing .taxonomy-description p { color: var(--rh-slate); max-width: 65ch; }
.rh-listing .inside-article {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.1rem 1.2rem 1.3rem;
  border: 1px solid var(--rh-line);
  border-radius: 10px;
}
.rh-listing .post-image { order: -1; margin: 0 0 0.85rem; }
.rh-listing .post-image img { border-radius: var(--rh-radius); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.rh-archive-media { display: block; margin-bottom: 0.85rem; }
.rh-archive-media .rh-media { aspect-ratio: 16 / 9; }
.rh-archive-media .rh-glyph { width: 20%; height: 36%; }
.rh-listing .entry-title { font-size: 1.15rem; font-weight: 700; line-height: 1.28; margin: 0.15rem 0 0.4rem; }
.rh-listing .entry-title a { color: var(--rh-ink); text-decoration: none; }
.rh-listing .entry-title a:hover { text-decoration: underline; }
.rh-listing .entry-meta { font-size: 0.82rem; color: var(--rh-slate); }
.rh-listing .entry-summary { font-size: 0.95rem; color: #33445C; margin-top: 0.5rem; }
.rh-listing .entry-summary p { margin: 0; }
.rh-listing .read-more-container, .rh-listing .entry-summary .read-more { display: none; }
.rh-listing footer.entry-meta { margin-top: auto; padding-top: 0.75rem; }
.rh-listing .rh-is-original .inside-article { border-color: var(--rh-ink); box-shadow: inset 0 3px 0 var(--rh-cyan); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .rh-split { grid-template-columns: 1fr; }
  .rh-rail { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .rh-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  body.rh-site { font-size: 16px; }
  .rh-home { gap: 2.25rem; padding-top: 0.5rem; }
  .rh-originals-grid { grid-template-columns: 1fr; }
  .rh-lead-body { padding: 1.2rem 1.25rem 1.5rem; }
  .rh-lead-media { aspect-ratio: 16 / 9; }
  .rh-section-title span { display: block; margin: 0.2rem 0 0; }
  .rh-rail { grid-template-columns: 1fr; }
  .rh-topic-grid { grid-template-columns: 1fr; }
  .rh-news-item { grid-template-columns: 56px minmax(0, 1fr); gap: 0.8rem; }
  .rh-news-media { width: 56px; height: 56px; }
  .rh-mo-grid { grid-template-columns: 1fr; }
  .rh-mo a { display: grid; grid-template-columns: 96px 1fr; gap: 0 0.8rem; align-items: start; }
  .rh-mo-media { grid-row: span 2; margin: 0; }
  .rh-site.single-post .inside-article { border-radius: 0; border-left: 0; border-right: 0; }
  .rh-site.single-post .entry-content { font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rh-site * { scroll-behavior: auto !important; transition: none !important; }
}
