/* ==========================================================================
   Bolit.in — design system
   Mobile-first. Brand palette from the Bolit identity.
   ========================================================================== */

:root {
  --navy: #073b75;
  --navy-deep: #052c58;
  --blue: #1677d2;
  --blue-soft: #e8f2fe;
  --orange: #ff7900;
  --orange-soft: #fff1e3;
  --red: #ff0033;
  --red-soft: #ffe8ed;
  --bg: #f5f9ff;
  --card: #ffffff;
  --text: #102a43;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --success: #0c7a54;
  --success-soft: #e7f8f1;
  --danger: #c0263d;
  --danger-soft: #fdecef;
  --shadow-xs: 0 1px 2px rgba(7, 59, 117, 0.06);
  --shadow-sm: 0 2px 8px rgba(7, 59, 117, 0.07);
  --shadow-md: 0 12px 32px rgba(7, 59, 117, 0.1);
  --shadow-lg: 0 24px 60px rgba(7, 59, 117, 0.14);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --container: 1180px;
  --header-h: 68px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  padding: 0;
  max-width: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--navy);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2rem, 5.2vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(22, 119, 210, 0.45);
  outline-offset: 2px;
}

::selection {
  background: rgba(255, 121, 0, 0.25);
  color: var(--navy-deep);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (max-width: 520px) {
  .container {
    padding-inline: 16px;
  }
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  transform: translateY(-150%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn,
.btn-secondary,
.btn-ghost,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--navy-deep);
  box-shadow: 0 6px 16px rgba(255, 121, 0, 0.24);
}

.btn:hover {
  background: #ff8b1f;
  border-color: #ff8b1f;
  color: var(--navy-deep);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(255, 121, 0, 0.3);
}

.btn-submit {
  border-color: #E80000;
  background: #E80000;
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 0, 0, 0.24);
}

.btn-submit:hover {
  border-color: #c70000;
  background: #c70000;
  color: #fff;
  box-shadow: 0 9px 20px rgba(232, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--card);
  border-color: var(--border-strong);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--blue-soft);
  border-color: #b7d4f5;
  color: var(--navy);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--blue);
  min-height: 40px;
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--blue-soft);
  text-decoration: none;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn-secondary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--navy);
  transition: background 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.icon-btn:hover {
  background: var(--blue-soft);
  border-color: #b7d4f5;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--navy);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 56px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(7, 59, 117, 0.12);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.brand-dot {
  color: var(--orange);
}

.brand-tagline {
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}

.nav-link {
  padding: 9px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  background: var(--blue-soft);
  color: var(--navy);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-cta {
  display: none;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 11px;
  font-size: 0.9rem;
}

.header-account {
  display: none;
  width: 42px;
  height: 42px;
}

.header-account img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hamburger {
  display: inline-flex;
  width: 42px;
  height: 42px;
}

.hamburger svg {
  width: 22px;
  height: 22px;
}

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 110;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
}

.mobile-link:hover,
.mobile-link:focus-visible {
  background: var(--blue-soft);
  color: var(--navy);
}

.mobile-link-accent {
  background: var(--orange-soft);
  color: var(--navy);
}

.mobile-menu-sep {
  height: 1px;
  margin: 6px 8px;
  border: 0;
  background: var(--border);
}

.mobile-menu-note {
  padding: 10px 14px 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .desktop-nav,
  .header-cta,
  .header-account {
    display: inline-flex;
  }

  .hamburger {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Layout / views
   -------------------------------------------------------------------------- */

main {
  display: block;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

.page-shell {
  padding-block: 28px 48px;
}

#videos-view .page-shell {
  padding-top: 0;
}

.explore-floater {
  position: sticky;
  top: 0;
  z-index: 80;
  margin: 0;
  padding: env(safe-area-inset-top, 0px) 0 2px;
  background: var(--bg);
}

.explore-floater .explore-topbar {
  margin-bottom: 10px;
}

.explore-floater .filter-row {
  margin-bottom: 10px;
}

@media (max-width: 640px) {
  .explore-floater {
    margin-inline: -20px;
    padding-inline: 20px;
  }
}

@media (max-width: 520px) {
  .explore-floater {
    margin-inline: -16px;
    padding-inline: 16px;
  }
}

.explore-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  margin: 0 0 16px;
}

.explore-logo {
  flex: 0 0 auto;
  width: 116px;
  height: 44px;
  object-fit: cover;
  object-position: center;
}

.explore-banner {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 56px;
  border-radius: 10px;
  background: #fff;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 640px) {
  .explore-banner {
    height: 68px;
  }
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin-bottom: 6px;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.page-head p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 5px 11px;
  border: 1px solid #d7e7fa;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.section {
  padding-block: 40px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0 0 6px;
}

.section-head p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

.section-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 34px 46px;
  background:
    radial-gradient(circle at 8% 4%, rgba(22, 119, 210, 0.11), transparent 34%),
    radial-gradient(circle at 94% 16%, rgba(255, 121, 0, 0.13), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(22, 119, 210, 0.18),
    transparent
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: center;
}

.hero-copy h1 {
  margin-bottom: 16px;
  max-width: 14ch;
}

.hero-copy h1 .accent {
  color: var(--blue);
}

.hero-lede {
  margin-bottom: 24px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.hero-actions .btn,
.hero-actions .btn-secondary {
  min-height: 50px;
  padding-inline: 22px;
  font-size: 1rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-stats li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-stats svg {
  flex: 0 0 auto;
  color: var(--blue);
}

.hero-preview-wrap {
  position: relative;
  min-width: 0;
}

.hero-preview {
  position: relative;
  z-index: 1;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.hero-preview::before {
  content: "";
  position: absolute;
  inset: 18px -12px -14px 18px;
  z-index: -1;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(22, 119, 210, 0.1), rgba(255, 121, 0, 0.1));
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 12px;
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 800;
}

.preview-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preview-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(15, 138, 95, 0.12);
}

.preview-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.preview-search svg {
  flex: 0 0 auto;
  color: var(--muted);
}

.preview-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.86rem;
}

.preview-search input::placeholder {
  color: var(--muted);
}

.preview-district {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 44%;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.preview-video {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.preview-video:hover {
  background: var(--bg);
  border-color: var(--border);
  text-decoration: none;
}

.preview-thumb {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #0b1b2b;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumb .mini-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(5, 18, 35, 0.14);
}

.preview-thumb .mini-play svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 50%;
  background: rgba(100, 100, 100, 0.55);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85);
  box-sizing: content-box;
}

.preview-video-body {
  min-width: 0;
}

.preview-video-title {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-video-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (min-width: 900px) {
  .hero {
    padding-block: 54px 64px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 52px;
  }
}

/* --------------------------------------------------------------------------
   Search card
   -------------------------------------------------------------------------- */

.search-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.search-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 16px;
}

.search-card-head h2 {
  margin: 0 0 4px;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
}

.search-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.search-field {
  min-width: 0;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-input-wrap input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(22, 119, 210, 0.14);
}

.select-field {
  position: relative;
  min-width: 0;
}

.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.select-trigger:hover {
  border-color: #b7c6d8;
}

.select-trigger[aria-expanded="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(22, 119, 210, 0.14);
}

.select-trigger .placeholder {
  color: var(--muted);
  font-weight: 500;
}

.select-trigger svg {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.select-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.select-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 90;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.select-panel[hidden] {
  display: none;
}

.select-search {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  outline: 0;
  font-size: 0.9rem;
}

.select-options {
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
  overscroll-behavior: contain;
}

.select-option {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  text-align: left;
}

.select-option:hover,
.select-option:focus-visible {
  background: var(--blue-soft);
  color: var(--navy);
}

.select-option[aria-selected="true"] {
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 700;
}

.select-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.native-select {
  width: 100%;
  min-height: 50px;
  padding: 11px 36px 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.native-select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(22, 119, 210, 0.14);
}

.search-submit {
  min-height: 50px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.search-meta .active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 700;
}

.search-clear {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
}

@media (min-width: 720px) {
  .search-form {
    grid-template-columns: minmax(0, 1.6fr) minmax(150px, 0.7fr) minmax(180px, 0.9fr) auto;
    align-items: center;
  }

  .search-submit {
    padding-inline: 24px;
  }
}

/* --------------------------------------------------------------------------
   Video grid / cards
   -------------------------------------------------------------------------- */

.video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

@media (min-width: 620px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

.video-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  border-color: #cfdff2;
  box-shadow: var(--shadow-md);
}

.video-card:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(22, 119, 210, 0.14);
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b1b2b;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.025);
}

.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 18, 35, 0.04), rgba(5, 18, 35, 0.28));
  pointer-events: none;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(100, 100, 100, 0.55);
  color: #fff;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-play svg {
  width: 28px;
  height: 28px;
}

.video-card:hover .video-play {
  background: rgba(100, 100, 100, 0.72);
  transform: translate(-50%, -50%) scale(1.06);
}

.video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(5, 18, 35, 0.14);
}

.video-badge svg {
  flex: 0 0 auto;
  color: var(--blue);
}

.video-source-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(5, 18, 35, 0.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 14px 16px 16px;
}

.video-card-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -0.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-card-title a {
  color: inherit;
  text-decoration: none;
}

.video-card-title a:hover {
  color: var(--navy);
  text-decoration: none;
}

.video-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.video-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.video-card-meta svg {
  flex: 0 0 auto;
}

.video-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.video-watch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.video-watch svg {
  transition: transform 0.18s ease;
}

.video-card:hover .video-watch svg {
  transform: translateX(2px);
}

.video-clicks {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

/* Skeleton */

.skeleton {
  background-color: #e9eff7;
  background-image: linear-gradient(90deg, #e9eff7 0, #f7faff 40px, #e9eff7 80px);
  background-repeat: no-repeat;
  background-size: 1000px 100%;
  border-radius: 8px;
  animation: skeletonShimmer 1.4s linear infinite;
}

@keyframes skeletonShimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.s-circle {
  border-radius: 50% !important;
}

.s-line {
  height: 12px;
  border-radius: 6px;
}

.s-media {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.video-card-skeleton {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.video-card-skeleton .skeleton-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.video-card-skeleton .skeleton-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

/* --------------------------------------------------------------------------
   Feed cards (Explore / profile)
   -------------------------------------------------------------------------- */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
  margin-inline: auto;
}

#videos-container.feed-list {
  max-width: none;
}

@media (max-width: 640px) {
  #videos-container.feed-list {
    gap: 14px;
    margin-inline: -20px;
  }
}

@media (max-width: 520px) {
  #videos-container.feed-list {
    margin-inline: -16px;
  }
}

.post {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.post:hover {
  border-color: #d4e3f4;
  box-shadow: var(--shadow-sm);
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
  margin: 0;
}

.post-author {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.post-author img {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

.post-time {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  margin: 0;
  padding-top: 14px;
  padding-bottom: 10px;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border: 1px solid #182864;
  border-radius: 999px;
  background: #fff;
  color: #182864;
  font-size: 0.73rem;
  font-weight: 700;
}

.post-tag-mandal {
  border-color: #E80000;
  background: #fff;
  color: #E80000;
}

.post-text {
  padding: 0 18px;
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-media {
  margin: 0;
  width: 100%;
}

.post-media img,
.post-media iframe {
  display: block;
  width: 100%;
}

.campaign-media {
  padding: 0 18px 4px;
}

.campaign-media-inner {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f0f4f9;
}

.campaign-media-inner img {
  width: 100%;
  display: block;
}

.empty-state .btn,
.empty-state .btn-secondary {
  margin-top: 14px;
}

.preview-card-thumb a {
  text-decoration: none;
}

.preview-card-thumb img[hidden],
.video-thumb img[hidden] {
  display: none;
}

.video-box {
  border: 0;
  background: transparent;
}

.video-box-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0b1b2b;
  cursor: pointer;
}

.video-box-media img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0b1b2b;
}

.video-box-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.video-box-media .play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(100, 100, 100, 0.55);
  color: #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.video-box-title {
  padding: 12px 18px 2px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.4;
}

.video-box-source {
  padding: 2px 18px 12px;
  color: var(--muted);
  font-size: 0.73rem;
}

.video-box-source svg {
  vertical-align: -3px;
  margin-left: 4px;
}

.video-box-title {
  padding: 12px 18px 0;
}

.post-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 12px;
}

.post-channel-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
}

.post-channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-channel-name {
  min-width: 0;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-channel-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.post-channel-badge svg {
  display: block;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px 14px;
  border-top: 1px solid #f0f4f9;
  margin-top: 4px;
}

.post-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  transition: background 0.18s ease, color 0.18s ease;
}

.post-action:hover {
  background: var(--blue-soft);
  color: var(--navy);
}

.post-action svg {
  flex: 0 0 auto;
}

.post-action.liked {
  color: var(--red);
}

.post-action.raise-demand {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
}

.post-action.raise-demand:hover {
  background: #0a2f5c;
  color: #fff;
}

.like-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.post-actions .spacer {
  flex: 1;
}

.post-meta-right {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.post-actions .dots-wrapper {
  margin-left: auto;
}

.dots-wrapper {
  position: relative;
  flex: 0 0 auto;
}

.dots-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.dots-btn:hover {
  background: var(--blue-soft);
  color: var(--navy);
}

.dots-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 150px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.dots-menu.show {
  display: block;
}

.post-actions .dots-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

.menu-item {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text);
  font-size: 0.85rem;
  text-align: left;
}

.menu-item:hover {
  background: var(--bg);
}

.menu-item.danger {
  color: var(--danger);
}

.menu-item.danger:hover {
  background: var(--danger-soft);
}

/* Campaign / poster posts keep their artwork readable */
.poster-post .post-media {
  padding: 0 18px;
}

.poster-post .post-media > div {
  border-radius: 12px !important;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Explore filters
   -------------------------------------------------------------------------- */

.filter-card {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .filter-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.filter-label {
  display: block;
  margin: 0 0 5px 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#videos-view .filter-row {
  max-width: 520px;
  margin: 0 0 14px;
}

#videos-view .filter-row .select-trigger {
  border-color: var(--border-strong);
  background: #fff;
  color: var(--muted);
  box-shadow: none;
}

.filter-trigger-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#videos-view .filter-row .select-trigger .filter-trigger-label svg {
  flex: 0 0 auto;
  transform: none;
}

.filter-trigger-label #videos-district-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#videos-view .filter-row .select-trigger:hover {
  border-color: #94a3b8;
  background: #fff;
}

#videos-view .filter-row .select-trigger[aria-expanded="true"] {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}

#videos-view .filter-row .select-trigger .placeholder {
  color: var(--muted);
  opacity: 1;
}

#videos-view .filter-row .select-trigger svg {
  color: var(--muted);
}

#videos-district-clear-btn {
  color: var(--muted) !important;
}

.greeting {
  min-height: 0;
  margin: 0 0 14px;
  padding: 0;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 650;
  text-align: center;
}

.greeting:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   Creator CTA
   -------------------------------------------------------------------------- */

.creator-cta {
  position: relative;
  overflow: hidden;
  padding: 28px 22px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 121, 0, 0.32), transparent 34%),
    radial-gradient(circle at 8% 92%, rgba(22, 119, 210, 0.35), transparent 38%),
    linear-gradient(135deg, var(--navy-deep), var(--navy) 55%, #0b4d91);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.creator-cta::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.05),
    0 0 0 58px rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.creator-cta-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: center;
}

.creator-cta h2 {
  margin-bottom: 10px;
  color: #fff;
}

.creator-cta p {
  margin-bottom: 0;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.82);
}

.creator-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.creator-cta-actions .btn {
  min-height: 50px;
  padding-inline: 24px;
}

@media (min-width: 800px) {
  .creator-cta {
    padding: 38px 40px;
  }

  .creator-cta-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 36px;
  }
}

/* --------------------------------------------------------------------------
   India identity strip
   -------------------------------------------------------------------------- */

.india-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
}

.tricolor {
  display: inline-flex;
  gap: 4px;
}

.tricolor span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tricolor .saffron {
  background: #ff9933;
}

.tricolor .white {
  background: #fff;
  border: 1px solid var(--border-strong);
}

.tricolor .green {
  background: #138808;
}

.india-strip strong {
  color: var(--navy);
}

.india-strip span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   About / footer
   -------------------------------------------------------------------------- */

.about-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 96% 0%, rgba(255, 121, 0, 0.08), transparent 30%),
    #fff;
}

.about-card h2 {
  margin-bottom: 10px;
}

.about-card p {
  color: var(--muted);
}

.about-points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-points li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.9rem;
}

.about-points svg {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--blue);
}

@media (min-width: 760px) {
  .about-card {
    grid-template-columns: 1.2fr 0.8fr;
    padding: 34px;
  }
}

.site-footer {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-block: 34px;
}

.footer-brand p {
  max-width: 34ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-col h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-link {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: left;
}

.footer-link:hover {
  color: var(--navy);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

@media (min-width: 760px) {
  .footer-main {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
  }
}

/* --------------------------------------------------------------------------
   Bottom navigation (mobile)
   -------------------------------------------------------------------------- */

.bottom-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 24px rgba(7, 59, 117, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overscroll-behavior: contain;
}

.bottom-bar button {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 4px 2px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 0.18s ease, background 0.18s ease;
}

.bottom-bar button:hover {
  background: var(--bg);
}

.bottom-bar button.active {
  color: var(--navy);
}

.bottom-bar button svg {
  width: 21px;
  height: 21px;
}

.bottom-bar .nav-submit {
  flex: 0 0 auto;
  width: 58px;
  color: #E80000;
}

.bottom-bar .nav-submit .submit-orb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: -14px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #E80000;
  color: #fff;
  box-shadow: 0 6px 14px rgba(232, 0, 0, 0.34);
}

.bottom-bar .nav-submit .submit-orb svg {
  width: 22px;
  height: 22px;
}

.bottom-bar .nav-submit span:last-child {
  margin-top: 1px;
}

body {
  padding-bottom: 76px;
}

@media (min-width: 900px) {
  .bottom-bar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   Modals / forms
   -------------------------------------------------------------------------- */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 24, 48, 0.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: min(92vh, 900px);
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 30px 80px rgba(5, 24, 48, 0.34);
  overscroll-behavior: contain;
}

.modal h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.modal-subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.modal input[type="text"],
.modal input[type="url"],
.modal input[type="search"],
.modal textarea,
.modal select {
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #fff;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(22, 119, 210, 0.14);
}

.modal textarea {
  resize: vertical;
  min-height: 96px;
}

.form-label {
  display: block;
  margin: 0 0 6px 1px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.form-hint {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.form-error,
.form-success {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.form-error.show,
.form-success.show {
  display: flex;
}

.form-error {
  border: 1px solid #f5c2cc;
  background: var(--danger-soft);
  color: #8e1c30;
}

.form-success {
  border: 1px solid #b9e6d5;
  background: var(--success-soft);
  color: #0a6b4a;
}

.modal-preview {
  margin: 4px 0 14px;
  min-height: 0;
}

.preview-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
}

.preview-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b1b2b;
}

.preview-card-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.preview-card-thumb .preview-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--red);
  transform: translate(-50%, -50%);
}

.preview-card-body {
  padding: 10px 12px 11px;
}

.preview-card-title {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.preview-card-source {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.73rem;
}

.preview-valid {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--success);
  font-size: 0.74rem;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions .btn,
.modal-actions .btn-secondary {
  min-width: 112px;
}

.modal-close-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.modal-close:hover {
  background: var(--blue-soft);
  color: var(--navy);
}

/* --------------------------------------------------------------------------
   Profile / secondary views
   -------------------------------------------------------------------------- */

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px 22px;
  text-align: center;
}

.profile-header .avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 8px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 1.8rem;
  font-weight: 800;
}

.profile-header .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header .name {
  color: var(--navy);
  font-size: 1.18rem;
  font-weight: 800;
}

.profile-header .district {
  color: var(--muted);
  font-size: 0.86rem;
}

.profile-seg-row {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto 18px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.profile-seg {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-seg.active {
  background: var(--navy);
  color: #fff;
}

.profile-posts-header {
  max-width: 760px;
  margin: 0 auto 10px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 800;
}

.empty-state {
  max-width: 560px;
  margin: 18px auto;
  padding: 32px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.feed-end {
  padding: 32px 16px;
  text-align: center;
}

.feed-end-title {
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
}

.feed-end-text {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Feedback */

.feedback-layout.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h) - 76px);
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 10px;
}

.feedback-layout h2 {
  margin-bottom: 4px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  align-self: flex-start;
}

.chat-msg .msg-author {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
}

.chat-msg .msg-time {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.68rem;
}

.chat-msg .msg-text {
  margin-top: 2px;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.chat-input-area input {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  outline: none;
  font-size: 0.92rem;
}

.chat-input-area input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(22, 119, 210, 0.14);
}

.chat-input-area button {
  padding: 11px 18px;
  border: 0;
  border-radius: 11px;
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Campaigns / templates */

.campaigns-list,
#campaigns-list,
#my-templates-list,
#profile-templates-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin-inline: auto;
}

.campaign-card {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.campaign-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.campaign-card img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.campaign-card .campaign-cta {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 11px 0;
  border: 0;
  border-radius: 11px;
  background: var(--navy);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.village-hero {
  padding: 4px 16px 14px;
  text-align: center;
}

.village-hero .village-hero-title {
  color: var(--navy);
  font-size: 1.3rem;
  font-weight: 800;
}

.village-hero .village-hero-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.village-preview-hint {
  padding: 30px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.village-preview-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

#village-preview img,
#issue-preview img {
  display: block;
  width: 100%;
}

.village-posts-heading {
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */

.spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 250;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #dbe7f5;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.feed-spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto;
  border: 3px solid #dbe7f5;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  left: 16px;
  z-index: 320;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.toast.success {
  border-color: #b9e6d5;
  background: var(--success-soft);
  color: #0a6b4a;
}

.toast.error {
  border-color: #f5c2cc;
  background: var(--danger-soft);
  color: #8e1c30;
}

.toast svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

@media (min-width: 900px) {
  .toast {
    right: 24px;
    bottom: 24px;
    left: auto;
    margin: 0;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

/* Cropper overlay keeps its own dark presentation */
#campaign-crop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 220;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.92);
  touch-action: none;
}

#campaign-crop-overlay.open {
  display: flex;
}

.crop-topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: #fff;
}

.crop-topbar button {
  padding: 8px 10px;
  border: 0;
  background: none;
  color: #cfd2d6;
  font-size: 0.95rem;
}

.crop-topbar .crop-title {
  font-size: 1rem;
  font-weight: 600;
}

.crop-topbar #crop-done {
  color: #7ea6ff;
  font-size: 1.05rem;
  font-weight: 700;
}

.crop-stage-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

#crop-container {
  position: relative;
  background: #000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

#crop-container img {
  display: block;
}

.crop-hint {
  flex: 0 0 auto;
  padding: 8px 16px 6px;
  color: #cfd2d6;
  font-size: 0.8rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
