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

/* Indian Bike Driving 3D Guide — modern clean theme */
:root {
  --color-primary: #16a34a;
  --color-primary-dark: #14532d;
  --color-primary-light: #dcfce7;
  --color-accent: #eab308;
  --color-accent-light: #fef9c3;
  --color-background: #f0fdf4;
  --color-surface: #ffffff;
  --color-text-dark: #14532d;
  --color-text-body: #1e293b;
  --color-text-muted: #6b7280;
  --color-border: #d1fae5;
  --color-footer-text: #bbf7d0;
  --color-badge-update-text: #854d0e;
  --radius: 8px;
  --radius-card: 12px;
  --max: 1100px;
  /* Header row: same pattern as indianbikecheats.com (.navbar__inner + .navbar__links) */
  --header-inner-max: 1200px;
  --header-nav-link-gap: 2rem;
  --layout-pad: 20px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  width: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text-body);
  background: #f0fdf4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Default links (content areas) */
main a:not(.site-title a):not(.nav-main a):not(.footer-nav a):not(.btn):not(.btn--secondary):not(.hero-cta-primary):not(.hero-cta-secondary) {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

main a:not(.site-title a):not(.nav-main a):not(.footer-nav a):not(.btn):not(.btn--secondary):not(.hero-cta-primary):not(.hero-cta-secondary):hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 1001;
  padding: 0.5rem 0.75rem;
  background: var(--color-primary-dark);
  color: var(--color-surface);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  transition: none;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

/* --- HEADER — full viewport width bar --- */
.site-header {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  border-bottom: 1px solid #d1fae5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  text-align: left;
}

.header-inner {
  max-width: var(--header-inner-max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.site-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-align: left;
}

.site-title a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #14532d;
  text-decoration: none;
  transition: color var(--transition);
}

.site-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.site-title a:hover {
  color: #16a34a;
}

.nav-toggle {
  display: none;
  background: #f0fdf4;
  border: 1px solid #d1fae5;
  color: #14532d;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-main {
  text-align: left;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-main ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem var(--header-nav-link-gap);
  align-items: center;
}

.nav-main a {
  color: #374151;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 4px;
  box-sizing: border-box;
}

.nav-main a:hover {
  color: #16a34a;
}

.nav-main a[aria-current="page"] {
  color: #16a34a;
  font-weight: 600;
}

/* --- HERO BAND (homepage) — light panel + green accents (not full green wall) --- */
.hero-band {
  position: relative;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  background: linear-gradient(165deg, #ffffff 0%, #f8fdf9 35%, #f0fdf4 100%);
  border-bottom: 1px solid #d1fae5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.hero-band::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #14532d 0%, #16a34a 45%, #22c55e 100%);
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  text-align: center;
}

.hero-band .breadcrumb {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 14px;
  padding: 0;
  text-align: center;
}

.hero-band .breadcrumb ol {
  justify-content: center;
}

.hero-band .breadcrumb a {
  color: #15803d;
}

.hero-band .breadcrumb a:hover {
  color: #14532d;
  text-decoration: underline;
}

.hero-band .breadcrumb li[aria-current="page"] {
  color: #374151;
}

.hero-band .page-title {
  color: #14532d;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin: 0 auto 14px;
  text-align: center;
  max-width: 38ch;
}

.hero-band .lead {
  color: #4b5563;
  font-size: 17px;
  line-height: 1.65;
  max-width: 38rem;
  margin: 0 auto 26px;
  text-align: center;
}

.hero-band .hero-actions {
  max-width: 1100px;
  margin: 0 auto;
  justify-content: center;
}

/* Hero CTAs on light background */
.hero-band .hero-cta-secondary,
.hero-band a.hero-cta-secondary {
  background: #ffffff;
  color: #14532d !important;
  border: 2px solid #16a34a;
  box-shadow: 0 1px 2px rgba(20, 83, 45, 0.06);
}

.hero-band .hero-cta-secondary:hover,
.hero-band a.hero-cta-secondary:hover {
  background: #ecfdf5;
  color: #14532d !important;
  border-color: #15803d;
}

.section-overview {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #d1fae5;
  padding: 28px 32px;
  margin-bottom: 48px;
}

/* --- MAIN LAYOUT --- */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding-top: 40px;
  padding-right: 24px;
  padding-bottom: 64px;
  padding-left: 24px;
  background: transparent;
  box-sizing: border-box;
  min-width: 0;
  text-align: left;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
}

.hero-cta-primary,
a.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-primary-dark) !important;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  min-height: 44px;
  padding: 12px 28px;
  text-decoration: none !important;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background var(--transition), transform var(--transition);
}

.hero-cta-primary:hover {
  background: #ca8a04;
  color: var(--color-primary-dark) !important;
  text-decoration: none !important;
  transform: scale(1.02);
}

.hero-cta-secondary,
a.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid #ffffff;
  border-radius: 8px;
  min-height: 44px;
  padding: 12px 28px;
  text-decoration: none !important;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  text-decoration: none !important;
}

/* --- BREADCRUMB --- */
.breadcrumb {
  font-family: var(--font-ui);
  font-size: 13px;
  color: #6b7280;
  padding: 12px 0;
  margin-bottom: 0;
  background: transparent;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: " › ";
  margin: 0 0.15rem;
  color: #6b7280;
  font-weight: 400;
}

.breadcrumb a {
  color: #6b7280;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 500;
}

/* Inner pages: H1 */
.page-title {
  margin: 0 0 0.65rem;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  font-family: var(--font-ui);
  color: var(--color-text-dark);
  letter-spacing: -0.5px;
  text-align: left;
}

.lead {
  font-size: 17px;
  line-height: 1.7;
  color: #374151;
  margin: 0 0 1.5rem;
  max-width: 60ch;
  text-align: left;
}

.section-title {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  color: #14532d;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #dcfce7;
  text-align: left;
}

/* --- CARD GRID & CARDS --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 28px 0;
}

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.12);
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--color-text-dark);
}

.card h3 a {
  text-decoration: none;
  color: var(--color-text-dark);
  font-weight: 600;
  transition: color var(--transition);
}

.card h3 a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.card .meta {
  margin-top: 0.5rem;
  font-size: 13px;
  color: #6b7280;
}

article img:first-of-type {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 28px;
  display: block;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
  display: block;
}

/* --- ARTICLE LIST --- */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  border-bottom: 1px solid var(--color-border);
  padding: 18px 12px;
  margin: 0;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.article-list li:hover {
  background: #ecfdf5;
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list h2,
.article-list h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-family: var(--font-ui);
  font-weight: 600;
  line-height: 1.35;
}

.article-list h2 a,
.article-list h3 a {
  color: var(--color-text-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.article-list h2 a:hover,
.article-list h3 a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.article-list li > p:not(.byline) {
  font-size: 14px;
  color: #374151;
  margin: 0;
  line-height: 1.6;
}

.byline {
  font-family: var(--font-ui);
  font-size: 13px;
  color: #6b7280;
  margin: 4px 0;
}

.byline strong {
  color: var(--color-text-body);
  font-weight: 600;
}

/* --- PROSE --- */
.prose {
  max-width: 72ch;
  text-align: left;
}

main section {
  margin-bottom: 56px;
}

main section:last-of-type {
  margin-bottom: 0;
}

.prose h2 {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--color-text-dark);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary-light);
}

.prose h3 {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 600;
  margin: 1.35rem 0 0.5rem;
  color: var(--color-text-body);
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
}

.prose ul {
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose code {
  background: var(--color-primary-light);
  color: var(--color-text-dark);
  padding: 0.1rem 0.35rem;
  font-size: 0.92em;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

/* --- NOTE BOX --- */
.note-box {
  background: var(--color-primary-light);
  border: none;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 1.25rem 0;
  font-size: 14px;
  color: var(--color-text-dark);
  line-height: 1.65;
}

/* --- FEATURE CODES TABLE --- */
.codes-table-wrap {
  overflow: hidden;
  margin: 1.25rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}

.codes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--font-ui);
}

.codes-table th,
.codes-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.codes-table th {
  background: var(--color-primary);
  font-weight: 600;
  font-size: 13px;
  color: #ffffff;
}

.codes-table tbody tr:nth-child(odd) td {
  background: #ffffff;
}

.codes-table tbody tr:nth-child(even) td {
  background: var(--color-background);
}

.codes-table tbody tr:hover td {
  background: var(--color-primary-light);
}

.codes-table tr:last-child td {
  border-bottom: none;
}

.codes-table code {
  background: var(--color-primary-light);
  color: var(--color-text-dark);
  padding: 2px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  border: none;
}

/* --- AD SLOTS --- */
/* Placeholders hidden — delete this rule when you insert real AdSense/units */
.ad-label,
.ad-slot,
.ad-slot--leaderboard,
.ad-slot--rectangle,
.ad-slot--in-article {
  display: none !important;
}

.ad-slot {
  background: var(--color-background);
  border: 1.5px dashed #86efac;
  border-radius: 8px;
  padding: 16px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 13px;
  margin: 1.25rem 0;
  box-sizing: border-box;
}

/* Leaderboard: stretch full width of main column (no narrow column) */
main .ad-slot--leaderboard {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 2rem;
  align-self: stretch;
}

.ad-slot--leaderboard {
  min-height: 90px;
}

/* Extra air between first ad block and following section (e.g. Game overview) */
main > .ad-label:first-of-type {
  margin-bottom: 0.5rem;
}

.ad-slot--rectangle {
  min-height: 250px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.ad-slot--in-article {
  min-height: 280px;
  max-width: 100%;
}

.ad-label {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 0.35rem;
  text-align: center;
  width: 100%;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--color-primary-dark);
  border-top: 3px solid var(--color-primary);
  margin-top: auto;
  padding: 48px 0;
  box-sizing: border-box;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: flex-end;
}

.footer-nav li {
  margin-bottom: 0;
}

.footer-nav a {
  font-family: var(--font-ui);
  color: var(--color-footer-text);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-copy {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-footer-text);
  margin: 0;
  opacity: 0.8;
}

/* --- FORMS --- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 14px;
  color: var(--color-text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  max-width: 480px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-body);
  font-family: var(--font-ui);
  font-size: 15px;
  transition: border-color var(--transition);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  background: var(--color-primary);
  color: #ffffff !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-ui);
  text-decoration: none !important;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--color-primary-dark);
  color: #ffffff !important;
  transform: scale(1.02);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn--secondary {
  background: var(--color-accent);
  color: var(--color-primary-dark) !important;
  font-weight: 700;
}

.btn--secondary:hover {
  background: #ca8a04;
  color: var(--color-primary-dark) !important;
  transform: scale(1.02);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius);
}

.badge--new {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge--update {
  background: var(--color-accent-light);
  color: var(--color-badge-update-text);
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .page-title {
    font-size: 26px;
  }

  .hero-inner {
    padding: 24px 20px 32px;
  }

  .hero-band .page-title {
    font-size: 26px;
    line-height: 1.25;
    max-width: none;
  }

  main {
    padding-top: 24px;
    padding-right: 16px;
    padding-bottom: 48px;
    padding-left: 16px;
  }

  html {
    scroll-padding-top: 64px;
  }

  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 0.75rem 1rem;
  }

  .site-title {
    flex: 1;
    min-width: 0;
  }

  .nav-toggle {
    display: block;
    flex-shrink: 0;
  }

  .nav-main {
    width: 100%;
    flex-basis: 100%;
    display: none;
  }

  .nav-main.is-open {
    display: block;
  }

  .nav-main ul {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.5rem;
    gap: 0.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .footer-nav ul {
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-cta-primary,
  .hero-cta-secondary,
  a.hero-cta-primary,
  a.hero-cta-secondary {
    width: 100%;
    display: flex;
  }

  /* page-header mobile */
  .page-header {
    padding: 24px 16px 20px;
  }

  .page-header .page-title {
    font-size: 22px;
  }

  .page-header-inner {
    padding: 0;
  }

  /* codes table horizontal scroll on mobile */
  .codes-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* prose full width on mobile */
  .prose {
    max-width: 100%;
  }

  .lead {
    max-width: 100%;
    font-size: 15px;
  }

  /* form full width on mobile */
  .form-group input,
  .form-group textarea {
    max-width: 100%;
  }

  /* article images full width */
  article img {
    border-radius: 8px;
  }

  /* section overview padding */
  .section-overview {
    padding: 20px 16px;
  }

  /* code category grid single col already set */
  .code-cat-title {
    font-size: 14px;
    padding: 10px 14px;
  }

  /* section title smaller on mobile */
  .section-title {
    font-size: 18px;
  }

  /* footer nav centered */
  .footer-copy {
    text-align: center;
  }

  /* hide long ad on mobile */
  .ad-slot--leaderboard {
    min-height: 60px;
  }

}

/* --- INNER PAGE HEADER --- */
.page-header {
  background: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
  width: 100%;
  padding: 32px 24px 28px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.page-header-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-header .breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  padding: 0;
  margin-bottom: 10px;
}

.page-header .breadcrumb a {
  color: rgba(255,255,255,0.75);
}

.page-header .breadcrumb a:hover {
  color: #ffffff;
}

.page-header .breadcrumb li:not(:last-child)::after {
  color: rgba(255,255,255,0.5);
}

.page-header .breadcrumb li[aria-current="page"] {
  color: rgba(255,255,255,0.95);
}

.page-header .page-title {
  color: #ffffff;
  margin: 0;
  font-size: 28px;
  text-align: left;
}

/* --- MAIN TOP PADDING WHEN NO PAGE-HEADER --- */
main > .breadcrumb:first-child {
  padding-top: 8px;
}

/* --- SECTION SPACING IMPROVEMENT --- */
main > section + section {
  margin-top: 8px;
}

/* --- CONTENT MAX WIDTH FOR READABILITY --- */
main > .prose,
main > section > .prose {
  max-width: 72ch;
}

/* --- CODE CATEGORY GRID (homepage) --- */
.code-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.code-category {
  background: #ffffff;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  overflow: hidden;
}

.code-cat-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  background: #16a34a;
  margin: 0;
  padding: 12px 16px;
  font-family: var(--font-ui);
}

.code-category .codes-table-wrap {
  margin: 0;
  border: none;
  border-radius: 0;
}

.code-category .codes-table th {
  background: #dcfce7;
  color: #14532d;
  font-size: 12px;
}

@media (max-width: 768px) {
  .code-category-grid {
    grid-template-columns: 1fr;
  }
}

/* --- ARTICLE CARD GRID (latest articles) --- */
.article-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 24px 0 16px;
}

.article-card {
  background: #ffffff;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(22,163,74,0.13);
}

.article-card-img-link {
  display: block;
  overflow: hidden;
  line-height: 0;
}

.article-card-img-link img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-img-link img {
  transform: scale(1.04);
}

.article-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  width: fit-content;
  letter-spacing: 0.02em;
}

.badge--beginner {
  background: #DCFCE7;
  color: #14532D;
}

.badge--missions {
  background: #FEF9C3;
  color: #854D0E;
}

.badge--controls {
  background: #EFF6FF;
  color: #1D4ED8;
}

.badge--tips {
  background: #FEF3C7;
  color: #92400E;
}

.article-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #14532D;
  margin: 0 0 8px;
  line-height: 1.35;
  font-family: var(--font-ui);
}

.article-card h3 a {
  color: #14532D;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-card h3 a:hover {
  color: #16a34a;
}

.article-card p {
  font-size: 13px;
  color: #374151;
  margin: 0 0 12px;
  line-height: 1.6;
  flex: 1;
}

.article-card-meta {
  font-size: 12px !important;
  color: #6b7280 !important;
  margin: 0 !important;
  flex: none !important;
}

.article-card-meta strong {
  color: #1e293b;
  font-weight: 600;
}

@media (max-width: 768px) {
  .article-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .article-card-img-link img {
    height: 140px;
  }

  .article-card-body {
    padding: 12px 14px 14px;
  }

  .article-card h3 {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .article-card-grid {
    grid-template-columns: 1fr;
  }

  .article-card-img-link img {
    height: 180px;
  }
}

/* --- CONTACT CARD --- */
.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #ffffff;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  padding: 24px 28px;
  margin: 24px 0;
}

.contact-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}

.contact-label {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 4px;
  font-weight: 500;
}

.contact-email {
  font-size: 18px;
  font-weight: 700;
  color: #16a34a;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
}

.contact-email:hover {
  color: #14532d;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .contact-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 12px;
  }
}
