:root {
  --yellow: #ffd54f;
  --yellow-soft: #fff3bf;
  --blue: #00305d;
  --bg: #fff8e1;
  --text: #212121;
  --muted: #757575;
  --card: #ffffff;
  --border: #f0e2a8;
  --shadow: 0 10px 25px rgba(0,0,0,.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
  font-family: "Huninn", sans-serif;
}

body {
  margin: 0;
  direction: rtl;
  /*font-family: Arial, "Assistant", sans-serif;*/
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 18px;
  color: var(--blue);
  font-weight: 700;
}

.header-search {
  margin-right: auto;
  display: flex;
  gap: 8px;
}

.header-search input {
  width: 260px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 16px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--yellow);
  color: var(--blue);
}

.btn-secondary {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--border);
}

.hero {
  padding: 54px 0 34px;
}

.hero-box {
  background: linear-gradient(135deg, #fff 0%, #fff3bf 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 42px;
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 30px;
  align-items: center;
}

.hero h1 {
  font-size: 46px;
  line-height: 1.12;
  margin: 0 0 14px;
  color: var(--blue);
}

.hero p {
  font-size: 20px;
  color: #555;
  margin: 0 0 24px;
}

.hero-emoji {
  font-size: 115px;
  text-align: center;
}

.big-search {
  display: flex;
  gap: 10px;
  max-width: 650px;
}

.big-search input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 16px 20px;
  font-size: 18px;
}

.section {
  padding: 28px 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  color: var(--blue);
  font-size: 28px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  padding: 20px;
}

.category-card {
  min-height: 118px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-icon {
  font-size: 34px;
  margin-bottom: 10px;
}

.category-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--blue);
}

.joke-card h3 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 21px;
}

.joke-card p {
  margin: 0 0 16px;
  line-height: 1.75;
  color: #333;
}

.joke-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  margin-top: 50px;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
}

.centered-content
{
	text-align: center;
}

.card-warning
{
	background-color: #ffca8b;
}

@media (max-width: 850px) {
  .header-inner {
    height: auto;
    padding: 16px 0;
    flex-wrap: wrap;
  }

  .header-search {
    width: 100%;
    margin-right: 0;
  }

  .header-search input {
    width: 100%;
  }

  .hero-box {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .big-search {
    flex-direction: column;
  }

  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.joke-page {
  max-width: 980px;
}

.joke-full-card {
  padding: 34px;
}

.joke-full-card h1 {
  margin: 10px 0 22px;
  color: var(--blue);
  font-size: 38px;
  line-height: 1.2;
}

.joke-content {
  font-size: 22px;
  line-height: 1.9;
  margin-bottom: 26px;
}

.joke-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.joke-cats a {
  background: var(--yellow-soft);
  color: var(--blue);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 14px;
}

.joke-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.sensitive-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sensitive-box {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}

.sensitive-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.sensitive-box h2 {
  margin: 0 0 12px;
  color: var(--blue);
}

.sensitive-box p {
  line-height: 1.7;
  color: #444;
}

.sensitive-check {
  display: block;
  margin: 18px 0;
  color: #333;
}

.sensitive-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-hero {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-bottom: 28px;
  padding: 30px;
}

.category-hero-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: var(--yellow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  flex: 0 0 auto;
}

.category-hero h1 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 38px;
}

.category-hero p {
  margin: 0 0 12px;
  color: #444;
  line-height: 1.7;
  font-size: 18px;
}

.category-count {
  color: var(--muted);
  font-weight: 700;
}

.pagination {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--blue);
  font-weight: 700;
}

@media (max-width: 650px) {
  .category-hero {
    align-items: flex-start;
    padding: 22px;
  }

  .category-hero h1 {
    font-size: 30px;
  }
}

.search-header {
  padding: 28px;
  margin-bottom: 24px;
}

.search-header h1 {
  margin: 0 0 16px;
  color: var(--blue);
}

.search-results-count {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.submit-page {
  max-width: 860px;
}

.submit-hero {
  padding: 30px;
  margin-bottom: 22px;
}

.submit-hero h1 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 38px;
}

.submit-hero p {
  margin: 0;
  color: #444;
  font-size: 18px;
  line-height: 1.7;
}

.submit-form {
  padding: 28px;
}

.submit-form label {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 800;
}

.submit-form input,
.submit-form textarea,
.submit-form select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 17px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

.submit-form textarea {
  resize: vertical;
  line-height: 1.7;
}

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

.notice {
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  font-weight: 800;
}

.notice.success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
}

.notice.error {
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ffcdd2;
}

@media (max-width: 650px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-submission {
  margin-bottom: 20px;
}

.admin-submission-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--blue);
}

.admin-submission label {
  display: block;
  margin-bottom: 16px;
  color: var(--blue);
  font-weight: 800;
}

.admin-submission input,
.admin-submission textarea,
.admin-submission select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
}

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

.admin-small {
  color: var(--muted);
  font-size: 14px;
}

.admin-note {
  background: var(--yellow-soft);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
}

.admin-results-title {
	background-color: #c4ffc4;
	margin: 20px 0;
}

.admin-filter {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.admin-filter input,
.admin-filter select {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
}

.admin-filter input {
  flex: 1;
}

@media (max-width: 650px) {
  .admin-filter {
    flex-direction: column;
  }
}

.checkbox-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: auto !important;
  margin: 0 !important;
}

.import-results {
  margin-top: 20px;
  line-height: 1.8;
}

.import-results h2 {
  margin-top: 0;
  color: var(--blue);
}

.category-card {
  text-align: center;
  padding: 26px;
}

.category-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.category-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
}

.category-count {
  color: var(--muted);
  font-weight: 700;
}

.page-narrow {
  max-width: 860px;
}

.static-page {
  padding: 34px;
  line-height: 1.9;
  font-size: 18px;
}

.static-page h1,
.static-page h2 {
  color: var(--blue);
}

.static-page h1 {
  margin-top: 0;
}

@media (max-width: 650px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 14px;
  }

  .header-inner {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  .logo {
    width: 100%;
    text-align: center;
    font-size: 22px;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
  }

  .header-search {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .header-search input {
    flex: 1;
    min-width: 0;
  }

  .header-search .btn {
    flex: 0 0 auto;
    padding: 10px 14px;
  }

  .hero {
    padding: 26px 0 20px;
  }

  .hero-box {
    width: 100%;
    padding: 24px 18px;
    border-radius: 22px;
    overflow: hidden;
  }

  .hero h1 {
    font-size: 30px;
    line-height: 1.25;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .hero p {
    font-size: 16px;
    line-height: 1.6;
  }

  .big-search {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .big-search input,
  .big-search .btn {
    width: 100%;
    max-width: 100%;
  }

  .hero-emoji {
    font-size: 78px;
  }

  .card {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .joke-card h3,
  .category-name,
  .section-title h2 {
    overflow-wrap: anywhere;
  }
  
	.site-header {
		background: #fff;
		border-bottom: 1px solid var(--border);
		position: sticky;
		top: 0;
		z-index: 20;
		padding-top: 20px;
	}
}