:root {
  --brand: #c8102e;
  --brand-ink: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --ink: #1a1a1a;
  --ink-soft: #5a5f66;
  --line: #e6e8ec;
  --chip: #eef0f4;
  --radius: 10px;
  --pad: 14px;
  --max: 720px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.04);
  /* Monospace for Latin/digits (matches the admin "Body" textarea) + Indic Noto
     fonts so Telugu/Hindi/Bengali/etc. still render properly via fallback. */
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "Noto Sans Telugu", "Noto Sans Devanagari", "Noto Sans Bengali",
    "Noto Sans Malayalam", "Noto Sans Tamil", "Noto Sans Kannada",
    "Noto Sans Gujarati",
    monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-soft); color: var(--ink); }
body { line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 80px; background: var(--bg); }

/* Notify bar */
.notify-bar[hidden] { display: none !important; }
.notify-bar {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 10px var(--pad); background: #fff7d6; border-bottom: 1px solid #f0e3a3;
}
.notify-bar__text { font-size: 14px; }
.notify-bar__actions { display: flex; gap: 8px; align-items: center; }
.notify-bar__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.06); border: 0; color: inherit;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
}
.notify-bar__close:hover { background: rgba(0,0,0,.12); }

/* Header */
.site-header { background: var(--brand); color: var(--brand-ink); position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow); }
.site-header__row { display: flex; align-items: center; gap: 8px; padding: 10px var(--pad); max-width: var(--max); margin: 0 auto; }
.site-header__brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.site-header__logo {
  height: 44px;
  width: auto;
  max-width: 150px;           /* generous cap — preserves landscape aspect */
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  background: #fff;
  padding: 3px 6px;
  border-radius: 6px;
}
.site-header__text {
  display: flex; flex-direction: column;
  align-items: center;          /* center align the stacked name + tag */
  text-align: center;
  flex: 1; min-width: 0;
  line-height: 1.1;
}
.site-header__name {
  font-weight: 800;
  font-size: 22px;              /* +3px from previous 19px */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.site-header__tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-top: 2px;
  font-weight: 600;
  white-space: nowrap;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); color: inherit; border: 0;
}
.icon-btn:active { background: rgba(255,255,255,.22); }

/* Hamburger dropdown — hidden by default, slides open when .is-open is set. */
.primary-nav[hidden] { display: none; }
.primary-nav {
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(0,0,0,.22); padding: 10px var(--pad) 14px;
  max-width: var(--max); margin: 0 auto;
}
.primary-nav__lang {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.lang-pill {
  display: inline-flex; align-items: center; padding: 6px 14px;
  border-radius: 999px; background: rgba(255,255,255,.12);
  font-size: 14px; font-weight: 600; white-space: nowrap; color: inherit;
}
.lang-pill.is-active { background: #fff; color: var(--brand); }
.primary-nav__item {
  display: block; padding: 10px 4px; font-size: 15px; color: inherit;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.primary-nav__item:last-child { border-bottom: 0; }
.primary-nav__item:active { background: rgba(255,255,255,.10); }
.primary-nav__item--secondary { font-size: 13px; opacity: .82; padding-top: 8px; padding-bottom: 8px; }

/* Hero on home */
.hero { display: block; margin: 14px 0; border-radius: var(--radius); overflow: hidden; background: #111; color: #fff; box-shadow: var(--shadow); }
.hero__media {
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Cap height so a tall portrait doesn't dominate the screen; landscape sits naturally below the cap. */
  max-height: 70vh;
}
.hero__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;   /* never crop — preserve aspect ratio */
}
.hero__body { padding: 14px; background: linear-gradient(180deg, rgba(0,0,0,.0), rgba(0,0,0,.6)); }
.hero__cat { display: inline-block; background: var(--brand); color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.hero__title { margin: 0 0 6px; font-size: 22px; line-height: 1.3; }
.hero__sub { margin: 0; opacity: .9; font-size: 14px; }

/* Card list */
.section { margin: 22px 0; }
.section__title { font-size: 18px; margin: 0 0 12px; padding-left: 10px; border-left: 4px solid var(--brand); }
.list { display: flex; flex-direction: column; gap: 12px; }
.card { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card__media { flex: 0 0 110px; }
.card__media img { width: 110px; height: 100%; min-height: 90px; object-fit: cover; }
.card__body { flex: 1; min-width: 0; padding: 10px 12px 10px 0; }
.card__cat { font-size: 11px; color: var(--brand); font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.card__title { font-size: 15px; margin: 4px 0; line-height: 1.35; }
.card__sub { display: none; }
.card__meta { font-size: 12px; color: var(--ink-soft); }

/* Article */
.crumbs { font-size: 12px; color: var(--ink-soft); display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.crumbs a { color: var(--brand); }
.article { padding-top: 4px; }
.article__title { font-size: 22px; line-height: 1.3; margin: 6px 0 8px; }
.article__sub { font-size: 16px; color: var(--ink-soft); margin: 0 0 12px; }
.article__meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.article__author { display: inline-flex; align-items: center; gap: 6px; }
.article__author-pic {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  background: var(--line); display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line);
}
.article__author-pic--placeholder { line-height: 24px; text-align: center; }
.article__author-name { color: var(--ink); }
.article__dot { opacity: .5; }
.article__hero { margin: 0 -14px 14px; }
.article__hero img {
  display: block;
  width: 100%;          /* fit container */
  height: auto;          /* preserve native aspect ratio */
  max-height: 80vh;      /* don't let portrait images dominate */
  object-fit: contain;   /* never crop */
  margin: 0 auto;
  background: #f3f4f6;
}

/* Multi-image hero — horizontal snap scroller */
.hero-gallery { position: relative; margin: 0 -14px 14px; }
.hero-gallery__scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 14px;
}
.hero-gallery__scroll::-webkit-scrollbar { display: none; }
.hero-gallery__item {
  flex: 0 0 92%;
  margin: 0;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Cap height so portrait images don't push the gallery off the screen.
     Width × max ratio (~16:9) is the upper bound; tall images get letterboxed. */
  max-height: 70vh;
}
.hero-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;   /* keep aspect ratio, never crop */
}
.hero-gallery__count {
  position: absolute;
  bottom: 10px;
  right: 22px;
  padding: 2px 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.article__body { font-size: 17px; line-height: 1.7; }
.article__body h2, .article__body h3 { margin: 22px 0 8px; line-height: 1.3; }
.article__body p { margin: 0 0 14px; }
.article__body img { border-radius: var(--radius); margin: 14px 0; }
.article__body blockquote { margin: 16px 0; padding: 10px 14px; border-left: 4px solid var(--brand); background: var(--bg-soft); color: var(--ink-soft); }

.share-row { display: flex; gap: 8px; margin: 18px 0; }

/* Tags / chips */
.tags { margin: 18px 0; }
.tags__title { font-size: 14px; margin: 0 0 8px; color: var(--ink-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 6px 10px; background: var(--chip); border-radius: 999px; font-size: 13px; color: var(--ink); }

/* Article tags as inline hashtags — wraps naturally on the space between tags,
   each "#tagname" stays unbroken thanks to white-space: nowrap on the span. */
.hashtag-row {
  margin: 0;
  padding: 0;
  line-height: 1.8;
  word-spacing: 0.1em;
  overflow-wrap: anywhere;     /* break extremely long single tags if absolutely needed */
}
.hashtag {
  display: inline;
  color: var(--brand);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;          /* keep one tag together; break BETWEEN tags */
}
.hashtag:not(:last-child)::after { content: ""; }

/* Category header */
.category-head { padding: 14px 0 4px; }
.category-head__title { margin: 6px 0 0; font-size: 22px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; border: 0; cursor: pointer; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--ghost { background: var(--chip); color: var(--ink); }
.btn--block { display: flex; width: 100%; padding: 14px; }

/* Footer */
.site-footer { background: #15171b; color: #d6d8de; padding: 24px var(--pad); margin-top: 30px; }
.site-footer > section { max-width: var(--max); margin: 0 auto 18px; }
.footer-cats__title { font-size: 14px; color: #fff; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid #2a2d33; }
.footer-cats__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; }
.footer-cats__item { font-size: 13px; color: #d6d8de; padding: 4px 0; }
.footer-langs__grid { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-langs__item { padding: 6px 10px; background: #23262d; border-radius: 999px; font-size: 12px; }
.footer-langs__item.is-active { background: var(--brand); color: #fff; }
.footer-meta__copy { font-size: 12px; color: #8b8f96; margin: 14px 0 0; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.footer-links a { color: #cfd2d7; }
.footer-links a:hover { color: #fff; }

/* 404 */
.not-found { text-align: center; padding: 60px 0; }
.not-found__code { font-size: 60px; margin: 0; color: var(--brand); }
.not-found__msg { color: var(--ink-soft); }

.empty { color: var(--ink-soft); padding: 12px 0; }

.coming-soon {
  text-align: center; padding: 48px 20px 60px; max-width: 480px; margin: 0 auto;
}
.coming-soon__icon { font-size: 56px; line-height: 1; margin-bottom: 12px; }
.coming-soon__title { font-size: 26px; margin: 4px 0 8px; color: var(--brand); }
.coming-soon__sub { color: var(--ink-soft); margin: 0 0 18px; line-height: 1.55; }
.coming-soon .btn { display: inline-flex; }

/* --- Static info pages ----------------------------------------------- */
.static-page { padding: 6px 14px 60px; max-width: 720px; margin: 0 auto; }
.static-page h1 { font-size: 26px; margin: 14px 0 4px; line-height: 1.2; }
.static-page h2 { font-size: 18px; margin: 24px 0 8px; line-height: 1.3; }
.static-page p, .static-page ul, .static-page address { font-size: 16px; line-height: 1.65; color: var(--ink); }
.static-page ul { padding-left: 22px; }
.static-page li { margin-bottom: 4px; }
.static-page a { color: var(--brand); text-decoration: underline; }
.static-page__meta { color: var(--ink-soft); font-size: 13px; margin: 0 0 14px; }
.static-page code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0; }
@media (min-width: 560px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card {
  display: block; padding: 14px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; text-decoration: none !important;
}
.contact-card__label { display: block; font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.contact-card strong { color: var(--brand); word-break: break-all; }

/* --- Ad slots ---------------------------------------------------------
   Reserve a min-height so AdSense unit load doesn't cause CLS.
   Show nothing when slot has no markup (env unset) — there's no container at all in that case. */
.ad-slot {
  display: block;
  margin: 18px -14px;        /* breathe out to viewport edge on mobile */
  padding: 18px 14px;
  background: #f9fafb;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 100px;         /* reserve space before AdSense paints */
  text-align: center;
}
.ad-slot__label {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ad-slot--article_top { margin-top: 4px; }
.ad-slot--listing_inline { min-height: 240px; }
.ad-slot--article_end { margin-top: 22px; }
.ad-slot--taboola { background: #fff; }
@media (min-width: 760px) {
  .ad-slot { margin-left: 0; margin-right: 0; border-radius: 8px; }
}

/* --- Join page (content creator signup) ------------------------------ */
.join { padding: 16px 14px 60px; max-width: 560px; margin: 0 auto; }
.join__title { font-size: 22px; margin: 0 0 6px; }
.join__intro { color: var(--ink-soft); margin: 0 0 18px; font-size: 15px; line-height: 1.5; }
.join__form label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 14px; color: var(--ink-soft); }
.join__optional { color: var(--ink-soft); font-weight: 400; opacity: .7; }
.join__form input, .join__form textarea {
  font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); width: 100%;
}
.join__form input:focus, .join__form textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.join__form small { color: var(--ink-soft); font-size: 12px; }
.join__submit { width: 100%; padding: 12px; margin-top: 6px; }
.join__error { background: #fde2e4; color: #842029; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.join__success { padding: 24px; text-align: center; background: #d8f4e3; color: #14532d; border-radius: 12px; }
.join__success h2 { margin: 0 0 6px; }

/* --- Like + share row ------------------------------------------------ */
.engage-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 14px 0;
}
.like-btn, .share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
  min-height: 40px;
}
.like-btn.is-liked { background: #ffe4ea; color: var(--brand); border-color: var(--brand); }
.like-btn:disabled { opacity: .6; cursor: progress; }
.share-btn--wa  { background: #25D366; color: #fff; border-color: #1fb255; }
.share-btn--fb  { background: #1877F2; color: #fff; border-color: #0c5fc9; }
.share-btn--tw  { background: #0f1419; color: #fff; border-color: #000; }
.share-btn--ig  {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 20%, #dc2743 45%, #cc2366 70%, #bc1888 100%);
  color: #fff; border-color: #bc1888;
}
.share-btn--ig.is-copied { background: #2ecc71; border-color: #27a25b; }
.share-btn--more { background: var(--brand); color: #fff; border-color: var(--brand); }
.engage-row__spacer { flex: 1; }
.engage-row__views { color: var(--ink-soft); font-size: 13px; }

/* Per-image like overlay in the hero gallery */
.hero-gallery__item { position: relative; }
.img-like {
  position: absolute; bottom: 8px; left: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; border: 0;
  background: rgba(0,0,0,0.55); color: #fff; font: inherit; font-size: 13px; cursor: pointer;
}
.img-like.is-liked { background: var(--brand); }
.img-like:disabled { opacity: .6; cursor: progress; }
.img-like__icon { font-size: 14px; line-height: 1; }
