/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  min-height: 100%;
  background: #f0f2f5;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: #1a1d23;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #1a6ef5; text-decoration: none; transition: color 0.15s; }
a:hover { color: #0f4fc0; }
p { margin: 0; }

/* ─── Header ────────────────────────────────────────────────────────────────── */
#head {
  background: #0a3d2b;
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.logo_img {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

#logo_arabus { height: 36px; }

.site-name {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Body / Content ────────────────────────────────────────────────────────── */
#body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#content.center {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 20px 80px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── H1 (search/word pages) ────────────────────────────────────────────────── */
h1 {
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
  margin: 16px 0 20px;
  line-height: 1.5;
  text-align: right;
  letter-spacing: 0.01em;
}

/* ─── Hero (home page) ──────────────────────────────────────────────────────── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 0 0;
  text-align: center;
}

.hero__tagline {
  font-size: 13px;
  font-weight: 500;
  color: #0a3d2b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
  opacity: 0.7;
}

.hero__title {
  font-size: 52px;
  font-weight: 700;
  background: linear-gradient(135deg, #0a3d2b 0%, #1e7a4f 60%, #0f172a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .search-form--hero {
  width: 100%;
}

.hero .search-form--hero .form-input {
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.hero .search-form--hero .form-input input {
  line-height: 68px;
  font-size: 20px;
  padding: 0 24px;
}

.hero__book {
  margin-top: 44px;
  max-width: 100%;
}

.hero__hint {
  margin-top: 16px;
  font-size: 13px;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

/* ─── Search Form (compact — search/word pages) ──────────────────────────────── */
.form-input {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-input:focus-within {
  border-color: #1a6ef5;
  box-shadow: 0 0 0 3px rgba(26,110,245,0.1);
}

.form-input input {
  border: 0;
  background: transparent;
  padding: 0 18px;
  line-height: 54px;
  display: block;
  width: 100%;
  outline: 0;
  font-size: 18px;
  font-family: inherit;
  color: #1a1d23;
  border-radius: inherit;
  -webkit-appearance: none;
}

.form-input input::placeholder { color: #94a3b8; }

/* ─── Word List (search results) ─────────────────────────────────────────────── */
#words-list { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }

.word_in_list {
  position: relative;
  display: block;
  padding: 16px 64px 16px 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}


.word_in_list:hover,
.hovered {
  border-color: #93c5fd;
  box-shadow: 0 4px 20px rgba(26,110,245,0.08);
  transform: translateY(-1px);
  color: inherit;
}

/* ─── Word Single (detail page) ──────────────────────────────────────────────── */
.word_single {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 24px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

/* ─── Word Typography ────────────────────────────────────────────────────────── */
.word_div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.word_db {
  font-size: 28px;
  font-weight: 600;
  color: #c0392b;
  line-height: 1.3;
  direction: rtl;
  font-family: 'Scheherazade New', 'Amiri', Georgia, serif;
}

.word_single .word_db { font-size: 36px; }

.other_db {
  font-size: 22px;
  color: #64748b;
  line-height: 1.3;
  max-width: 100%;
  direction: rtl;
  font-family: 'Scheherazade New', 'Amiri', Georgia, serif;
}

.meaning_db {
  font-size: 14px;
  color: #334155;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.word_single .meaning_db {
  -webkit-line-clamp: unset;
  overflow: visible;
  font-size: 15px;
}

.clear { display: none; }

/* ─── Arrow ──────────────────────────────────────────────────────────────────── */
.arrow_right {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 10px 10px 0;
  color: #cbd5e1;
  font-size: 22px;
  font-weight: 300;
  transition: background 0.15s, color 0.15s;
  pointer-events: none;
}

.arrow_right::after { content: '›'; }

.word_in_list:hover .arrow_right {
  background: #eff6ff;
  color: #1a6ef5;
}

/* ─── Same-root heading ──────────────────────────────────────────────────────── */
h3.same_root {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 28px 0 14px;
  border: none;
}

/* ─── Messages ───────────────────────────────────────────────────────────────── */
.msg_error,
.msg_ok {
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin: 14px 0;
}

.msg_error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.msg_ok    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
#foot {
  background: #0a3d2b;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  flex-shrink: 0;
}

.appstore { display: flex; align-items: center; gap: 12px; }
.appstore .helper { display: flex; align-items: center; }
.appstore .helper:first-child { font-size: 12px; color: #6b9e87; margin-right: 4px; }
.appstore img { height: 26px; display: block; opacity: 0.8; transition: opacity 0.15s; }
.appstore img:hover { opacity: 1; }

/* ─── Keyboard ───────────────────────────────────────────────────────────────── */
.ui-keyboard {
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(0,0,0,0.13);
  background: #eef2f7;
  padding: 8px 13px;
  margin-top: 0;
}

.ui-keyboard .ui-keyboard-button {
  border-radius: 8px;
  font-size: 18px;
  font-family: 'Inter', system-ui, sans-serif;
  margin: 2px;
  height: 52px;
  line-height: 52px;
  background: #ffffff;
  border: 1px solid #dde3ed;
  box-shadow: 0 2px 0 #c8d0de;
  color: #1a1d23;
  transition: background 0.1s, box-shadow 0.08s, transform 0.08s;
  min-width: 56px;
}

.ui-keyboard .ui-keyboard-button span {
  font-size: 1em;
  position: static;
  top: auto;
  left: auto;
}

.ui-keyboard .ui-keyboard-button:not([disabled]):hover {
  background: #f4f7fb;
  border-color: #b0bdd0;
}

.ui-keyboard .ui-keyboard-button:not([disabled]):active {
  background: #eef2f7;
  box-shadow: none;
  transform: translateY(2px);
}

.ui-keyboard .ui-keyboard-actionkey:not(.ui-keyboard-dec):not(.ui-keyboard-combo):not(.ui-keyboard-accept) {
  background: #d5dce8;
  border-color: #c0cad8;
  box-shadow: 0 2px 0 #aab5c6;
  color: #374151;
  font-size: 11px;
}

.ui-keyboard .ui-keyboard-actionkey:not(.ui-keyboard-dec):not(.ui-keyboard-combo):not(.ui-keyboard-accept):not([disabled]):hover {
  background: #c8d2e0;
}

.ui-keyboard .ui-keyboard-actionkey:not(.ui-keyboard-dec):not(.ui-keyboard-combo):not(.ui-keyboard-accept):not([disabled]):active {
  box-shadow: none;
  transform: translateY(2px);
}

.ui-keyboard button.ui-keyboard-accept,
.ui-keyboard button.ui-keyboard-accept.ui-keyboard-valid-input {
  background: #4ade80;
  border-color: #22c55e;
  box-shadow: 0 2px 0 #16a34a;
  color: #14532d;
}

.ui-keyboard button.ui-keyboard-accept:not([disabled]):hover,
.ui-keyboard button.ui-keyboard-accept.ui-keyboard-valid-input:not([disabled]):hover {
  background: #86efac;
  border-color: #4ade80;
}

.ui-keyboard button.ui-keyboard-accept:not([disabled]):active,
.ui-keyboard button.ui-keyboard-accept.ui-keyboard-valid-input:not([disabled]):active {
  box-shadow: none;
  transform: translateY(2px);
}

/* ─── Misc admin / utilities ─────────────────────────────────────────────────── */
.share { padding: 20px 0 0; opacity: 0.4; }
.share_100 { opacity: 1; }
.centered { text-align: center; }
.sam_kontent { width: 240px; margin: 8% auto; border: 1px solid #e2e8f0; background: #fff; border-radius: 10px; padding: 28px; }
.msg_a { padding: 12px 18px; }
.needwidth { margin: 0 auto; max-width: 1400px; text-align: left; position: relative; }
.pages { color: #555; font-size: 12px; text-align: center; width: 260px; margin: 10px 0; padding: 5px 0; position: relative; }
.pages a { color: #555; font-size: 12px; margin: 0 4px; padding: 4px; }
.pages a:hover { color: #1a6ef5; }
.pages span.current_page { color: #fff; font-size: 12px; margin: 0 4px; padding: 2px 6px; background: #1a6ef5; border-radius: 4px; }
.per { position: absolute; left: 10px; top: 0; }
select.myselect1 { border: 1px solid #d0d8e8; border-radius: 6px; font-size: 13px; color: #333; padding: 3px 6px; height: 26px; background: #fafafa; }
.right_pl { float: right; margin: 9px 5px; }
.add_record { background: url(../img/add.png) no-repeat left center; padding: 5px 5px 5px 22px; cursor: pointer; color: #1a6ef5; }
.green { color: #16a34a; } .red { color: #dc2626; } .hide { display: none; } .w40 { width: 40px; } .w60 { width: 60px; }
.asc  { width: 8px; height: 8px; background: url(../img/asc.png)  no-repeat center; float: right; margin: 5px; }
.desc { width: 8px; height: 8px; background: url(../img/desc.png) no-repeat center; float: right; margin: 5px; }
.print { width: 16px; height: 16px; background: url(../img/printer.png) no-repeat center; float: left; margin: 5px; cursor: pointer; }
.loading { padding: 20px 10px; font-size: 15px; color: #666; }
.today { color: #666; font-size: 15px; padding: 24px 0; }
.my_form input { width: 110px; }
.form_div { padding: 20px; }
span.form_label { float: left; font-weight: 500; padding: 4px; width: 140px; }
.was_sent_pushes { padding: 20px 10px; font-size: 20px; color: #555; }
.begin_from { padding: 10px; font-size: 16px; color: #333; }
.begin_from_input { width: 70px; }
.msg_sent { padding: 20px 10px; font-size: 20px; }
button:disabled { background: #ccc !important; cursor: not-allowed; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #head { padding: 0 16px; }
  #content.center { padding: 24px 12px 60px; }
  .hero { padding: 32px 0 0; }
  .hero__title { font-size: 26px; }
  #foot { padding: 0 16px; }
}
