:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --ink: #122033;
  --muted: #627084;
  --line: #dbe4ef;
  --primary: #0b74d1;
  --primary-dark: #09589f;
  --primary-soft: #e7f2ff;
  --accent: #13a36f;
  --accent-soft: #dcf8ed;
  --warning: #f59f00;
  --shadow-sm: 0 8px 24px rgba(18, 32, 51, 0.08);
  --shadow-md: 0 18px 48px rgba(18, 32, 51, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(11, 116, 209, 0.08), transparent 34rem),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 44rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(219, 228, 239, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(11, 116, 209, 0.24);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav a {
  padding: 8px 12px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.nav a:hover {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  min-height: 680px;
  align-items: center;
  padding: clamp(44px, 7vw, 92px) clamp(18px, 5vw, 64px);
  color: #fff;
  background:
    linear-gradient(105deg, rgba(14, 28, 47, 0.94), rgba(14, 28, 47, 0.78) 42%, rgba(11, 116, 209, 0.25)),
    url("assets/majstor-hero.png") center right / cover;
}

.hero-content {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  display: inline-flex;
  padding: 8px 11px;
  color: #dff0ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 28px;
  color: #e9f4ff;
  font-size: 1.16rem;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr auto;
  gap: 10px;
  max-width: 880px;
  padding: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(11, 116, 209, 0.72);
  box-shadow: 0 0 0 4px rgba(11, 116, 209, 0.12);
}

.search-panel button,
.request-form button,
.pro-form button,
.review-form button,
.custom-form button,
.price-card button,
.admin-item button,
.chat-widget button {
  min-height: 46px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(11, 116, 209, 0.2);
}

.search-panel button {
  align-self: end;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.trust-row span {
  padding: 8px 11px;
  color: #f4f9ff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-weight: 700;
}

.booking-card {
  padding: 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.status-pill {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 10px;
  color: #075c40;
  background: var(--accent-soft);
  border-radius: 999px;
  font-weight: 900;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.quick-actions button {
  padding: 12px 8px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: var(--radius);
  font-weight: 900;
}

.live-request,
output {
  min-height: 54px;
  padding: 14px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.5;
}

.form-output {
  grid-column: 1 / -1;
}

.inline-link,
.contact-section a {
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

.inline-link:hover,
.contact-section a:hover {
  text-decoration: underline;
}

.section {
  padding: 70px clamp(18px, 5vw, 64px);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 26px;
}

.category-grid,
.feature-grid,
.pricing-grid,
.local-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-card,
.feature-grid article,
.master-card,
.price-card,
.local-card,
.stat-card,
.request-card,
.review-card,
.admin-item {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.category-card {
  display: grid;
  gap: 10px;
  min-height: 188px;
}

.category-icon,
.avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  font-weight: 950;
}

.category-icon {
  width: 44px;
  height: 44px;
}

.split,
.request-section,
.admin-section,
.review-section,
.custom-module {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 28px;
  align-items: start;
}

.split,
.pricing-section,
.registration-section,
.review-section {
  background: #fff;
}

.masters-list,
.request-board,
.admin-dashboard,
.admin-list,
.reviews-list {
  display: grid;
  gap: 14px;
}

.master-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.avatar {
  width: 58px;
  height: 58px;
}

.rating {
  color: #9a6500;
  font-weight: 900;
}

.price {
  color: var(--accent);
  font-weight: 950;
}

.request-form,
.pro-form,
.review-form,
.custom-form {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.request-form,
.pro-form,
.review-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide-field,
.request-form button,
.pro-form button,
.review-form button {
  grid-column: 1 / -1;
}

#customTradeWrap {
  display: none;
}

#customTradeWrap.is-visible {
  display: grid;
}

.request-card,
.review-card,
.price-card {
  display: grid;
  gap: 10px;
}

.tag-row,
.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.price-card.highlight {
  border-color: rgba(11, 116, 209, 0.55);
  box-shadow: var(--shadow-md);
}

.price-card strong,
.stat-card strong {
  display: block;
  color: var(--primary-dark);
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.price-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.admin-section {
  background: #edf5ff;
}

.internal-only {
  display: none;
}

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

.admin-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.review-card blockquote {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.review-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.local-card a {
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

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

.workflow {
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(19, 163, 111, 0.22), transparent 22rem),
    linear-gradient(135deg, #102033, #15385d);
}

.workflow .eyebrow,
.workflow li {
  color: #d8e8ff;
}

.workflow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.workflow li {
  position: relative;
  padding: 52px 18px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.workflow li::before {
  position: absolute;
  top: 16px;
  left: 18px;
  color: #fff;
  font-weight: 950;
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: min(340px, calc(100vw - 36px));
  max-height: calc(100vh - 120px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  font-weight: 900;
}

.chat-header button {
  display: grid;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  box-shadow: none;
  font-size: 1.1rem;
  line-height: 1;
}

.chat-widget.is-minimized {
  width: min(260px, calc(100vw - 48px));
}

.chat-widget.is-minimized .chat-body,
.chat-widget.is-minimized .chat-attachment,
.chat-widget.is-minimized form {
  display: none;
}

.chat-body {
  max-height: 140px;
  overflow: auto;
  padding: 14px;
}

.chat-body p {
  margin-bottom: 10px;
}

.chat-attachment {
  padding: 0 14px 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.chat-photo {
  display: block;
  width: 100%;
  max-height: 150px;
  margin-top: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.download-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

.chat-widget form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.file-button {
  display: grid;
  min-height: 46px;
  padding: 0 12px;
  place-items: center;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 900;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .nav {
    display: none;
  }

  .chat-widget {
    width: min(260px, calc(100vw - 36px));
  }
}

@media (max-width: 980px) {
  .hero,
  .split,
  .custom-module,
  .request-section,
  .admin-section,
  .review-section {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .feature-grid,
  .pricing-grid,
  .local-grid,
  .workflow ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: center;
  }

  .brand span:last-child {
    display: none;
  }

  .ghost-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  .search-panel,
  .category-grid,
  .feature-grid,
  .pricing-grid,
  .local-grid,
  .stats-grid,
  .workflow ol,
  .master-card,
  .request-form,
  .pro-form,
  .review-form,
  .admin-item {
    grid-template-columns: 1fr;
  }

  .wide-field,
  .request-form button,
  .pro-form button,
  .review-form button,
  .form-output {
    grid-column: auto;
  }

  .master-card {
    align-items: start;
  }

  .chat-widget {
    position: static;
    width: auto;
    margin: 0 18px 18px;
  }

  .chat-widget form {
    grid-template-columns: 1fr;
  }
}
