/* Site chrome shared by the public pages: language button + picker dialog, footer. */

/* Language button (header and footer) */
.lang-button {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; cursor: pointer;
  font: 600 14px system-ui, sans-serif; color: var(--ink); background: #fff; border: 1px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lang-button:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(var(--accent-rgb), .12); }
.lang-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang-button svg:first-child { color: var(--accent); }
.lang-button .chev { width: 16px; height: 16px; opacity: .6; }
.site-bar .lang-button { margin-left: auto; }
.lang-button.footer { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; }
.lang-button.footer svg:first-child { color: #f7d98b; }

/* Picker dialog */
.lang-picker {
  width: min(680px, calc(100vw - 24px)); max-height: min(720px, calc(100vh - 40px)); padding: 0; border: 0; border-radius: 22px;
  overflow: hidden; display: none; flex-direction: column; box-shadow: 0 30px 80px rgba(20, 30, 30, .35);
  background: #fffdf9;
}
.lang-picker[open] { display: flex; }
.lang-picker::backdrop { background: rgba(10, 40, 38, .55); backdrop-filter: blur(3px); }
.lang-picker-head {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 18px;
  color: #fff; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
}
.lang-picker-head::before { content: ''; position: absolute; inset: 0; background-image: var(--star-pattern); background-size: 80px; opacity: .16; filter: brightness(1.8); pointer-events: none; }
.lang-picker-head h2 { position: relative; margin: 0; font-family: 'PT Serif', serif; font-size: 24px; }
.lang-picker-close {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .15); color: #fff;
}
.lang-picker-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.lang-search {
  display: flex; align-items: center; gap: 8px; margin: 14px 18px 4px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
}
.lang-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.ui .lang-search input { border: 0; padding: 10px 0; background: none; font-size: 15px; }
.ui .lang-search input:focus { outline: none; }
.lang-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }
.lang-picker-body { overflow: auto; padding: 4px 18px 20px; }
.lang-group-title {
  margin: 16px 4px 6px; padding-bottom: 6px; border-bottom: 1px solid #efe6d6;
  font: 700 12px system-ui, sans-serif; letter-spacing: .08em; color: #9a7428;
}
.lang-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 8px; }
@media (max-width: 520px) { .lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lang-item {
  text-align: start; padding: 8px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer;
  font: 15px system-ui, sans-serif; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lang-item:hover { background: #f3efe7; }
.lang-item.current { background: #fdf0d8; font-weight: 700; color: #6b4a12; }
.lang-empty { color: var(--muted); text-align: center; padding: 20px 0; }

/* Footer */
.site-footer {
  position: relative; overflow: hidden; margin-top: 40px; color: #e9f5f2;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-2) 45%, var(--night-2) 100%);
}
.footer-pattern { position: absolute; inset: 0; background-image: var(--star-pattern); background-size: 96px; opacity: .13; filter: brightness(1.8); }
.footer-moon { position: absolute; right: max(16px, calc(50% - 600px)); top: 26px; width: 70px; height: 70px; fill: #f7d98b; opacity: .9; }
.footer-inner { position: relative; max-width: 1248px; margin: 0 auto; padding: 44px 16px 22px; }
.footer-share { max-width: 720px; }
.footer-share h2 { margin: 0 0 8px; font-family: 'PT Serif', serif; font-size: clamp(26px, 3.6vw, 38px); color: #fff; line-height: 1.15; }
.footer-share p { margin: 0 0 18px; color: rgba(233, 245, 242, .85); font-size: 16px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 12px; cursor: pointer;
  font: 600 15px system-ui, sans-serif; text-decoration: none; color: #fff; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08); transition: transform .15s ease, background .15s ease;
}
.share-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .16); }
.share-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-btn.whatsapp { background: #25d366; border-color: #25d366; color: #073b1c; }
.share-btn.telegram { background: #2aabee; border-color: #2aabee; }
.share-btn.vk { background: #0077ff; border-color: #0077ff; }
.share-btn.copy { background: #f7d98b; border-color: #f7d98b; color: #3b2a08; }

.footer-cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; margin-top: 38px; padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .15);
}
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-logo { font-family: 'PT Serif', serif; font-weight: 700; font-size: 22px; color: #fff; text-decoration: none; }
.footer-brand p { margin: 8px 0 0; color: rgba(233, 245, 242, .75); font-size: 14px; max-width: 360px; }
.footer-label { display: block; margin-bottom: 10px; font: 700 12px system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #f7d98b; }
.footer-nav { display: grid; align-content: start; gap: 6px; }
.footer-nav a { color: #e9f5f2; text-decoration: none; font-size: 15px; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: rgba(233, 245, 242, .7);
}
.footer-dua { font-family: 'PT Serif', serif; font-size: 15px; color: #f7d98b; }
/* Leave room for the floating basket bar and the phone wizard nav. */
.home .footer-inner { padding-bottom: 90px; }
/* Phones: brand and language on the first row, sections below. */
@media (max-width: 600px) {
  .site-bar { gap: 6px 10px; padding-top: 8px; padding-bottom: 8px; }
  .site-bar .brand { order: 1; font-size: 18px; }
  .site-bar .lang-button { order: 2; padding: 6px 10px; font-size: 13px; }
  .site-bar .lang-button .chev { display: none; }
  .site-bar .site-nav { order: 3; width: 100%; margin-right: 0; }
}

/* ---- Footer, larger: share block in two columns, bigger type and spacing ---- */
.footer-inner { padding: 64px 16px 28px; }
.footer-share { max-width: none; display: grid; grid-template-columns: 1fr minmax(0, 560px); gap: 28px 48px; align-items: center; }
.footer-share h2 { font-size: clamp(30px, 4.2vw, 48px); margin-bottom: 12px; }
.footer-share p { font-size: 18px; line-height: 1.5; margin: 0; max-width: 520px; }
.share-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.share-btn { justify-content: center; padding: 15px 18px; font-size: 16px; border-radius: 14px; }
.share-btn svg { width: 22px; height: 22px; }
.share-btn.native { grid-column: 1 / -1; }
.footer-moon { width: 84px; height: 84px; top: 22px; }

.footer-cols { margin-top: 52px; padding-top: 34px; gap: 32px; }
.footer-logo { font-size: 28px; }
.footer-brand p { font-size: 16px; line-height: 1.55; margin-top: 10px; max-width: 400px; }
.footer-label { font-size: 13px; margin-bottom: 14px; }
.footer-nav { gap: 10px; }
.footer-nav a { font-size: 17px; }
.lang-button.footer { padding: 11px 18px; font-size: 16px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; font-size: 14px; }
.footer-dua { font-size: 18px; }
@media (max-width: 900px) {
  .footer-share { grid-template-columns: 1fr; }
  .footer-moon { width: 56px; height: 56px; opacity: .6; }
}
@media (max-width: 420px) { .share-buttons { grid-template-columns: 1fr; } }
/* Crescent sits in the empty lower-right corner, clear of the share buttons. */
.footer-moon { top: auto; bottom: 150px; }
@media (max-width: 900px) { .footer-moon { top: 18px; bottom: auto; } }

/* Theme switch: two colour swatches next to the language button */
.theme-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid var(--line); margin-left: auto; }
.site-bar .theme-switch + .lang-button { margin-left: 0; }
.theme-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .15s ease; }
.theme-dot.blue { background: radial-gradient(circle at 35% 35%, #4a86d8, #0a3a74 70%); }
.theme-dot.purple { background: radial-gradient(circle at 35% 35%, #c070d8, #5a1a6e 70%); }
.theme-dot:hover { transform: scale(1.08); }
.theme-dot[aria-pressed="true"] { border-color: var(--gold, #e9b46a); box-shadow: 0 0 0 2px #fff inset; }
@media (max-width: 600px) { .site-bar .theme-switch { order: 2; } .theme-dot { width: 22px; height: 22px; } }
.footer-voice { color: inherit; opacity: .7; text-decoration: none; font-size: 13px; }
.footer-voice:hover { opacity: 1; text-decoration: underline; }
.footer-free { color: inherit; opacity: .85; text-decoration: none; font-size: 13px; }
.footer-free:hover { opacity: 1; text-decoration: underline; }
/* Header: the 20px serif brand and the 15px menu are box-centred, which leaves the menu's text
   2-3px above the brand's baseline; nudge the menu down (on phones it has its own row). */
@media (min-width: 601px) { .site-bar .site-nav { position: relative; top: 2px; } }
