@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Manrope:wght@500;600;700&display=swap');

:root {
  --green: #0e9b72;
  --green-dark: #0b7b5a;
  --green-soft: #d7efe6;
  --ink: #0b1b15;
  --muted: #667279;
  --card: #ffffff;
  --bg: #f3f6f4;
  --shadow: 0 12px 30px rgba(6, 24, 17, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Cairo', 'Manrope', system-ui, sans-serif;
}

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

.cvs-shell,
.cv-detail-shell,
.booking-page,
.booking-success {
  padding: 42px 24px 64px;
  max-width: 1400px;
  margin: auto;
}

.page-header-block {
  margin-bottom: 32px;
}

.page-header-block h1 {
  margin: 0 0 12px 0;
  font-size: 32px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--green);
  color: #fff;
  line-height: 1;
}

.pill.soft {
  background: var(--green-soft);
  color: var(--green-dark);
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--green-dark);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 10px;
  background: #eef2f0;
  font-size: 13px;
  color: #1f2b28;
  line-height: 1;
}

.chip.soft {
  background: #f5f7f6;
  color: var(--muted);
}

.cvs-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* LTR: filters on left, results on right */
html[dir='ltr'] .cvs-layout {
  flex-direction: row;
}

/* RTL: filters on right, results on left */
html[dir='rtl'] .cvs-layout {
  flex-direction: row-reverse;
}

.filters-panel {
  width: 320px;
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 20px;
}

.filters-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.filters-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--green-soft);
  display: grid;
  place-items: center;
}

.filters-icon span {
  width: 16px;
  height: 16px;
  border: 3px solid var(--green);
  border-radius: 50%;
  position: relative;
}

.filters-icon span::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 960px) {
  html[dir='rtl'] .cvs-layout,
  html[dir='ltr'] .cvs-layout {
    flex-direction: column;
    gap: 16px;
  }

  .filters-panel,
  .results-panel {
    width: 100%;
    order: unset;
  }

  .filters-panel {
    position: relative;
    top: 0;
  }

  .results-panel {
    margin-top: 4px;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-weight: 600;
  color: #1a2a24;
  font-size: 14px;
}

.input select,
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: #f6f8f7;
  color: #0f1f19;
  outline: 0;
  font-size: 14px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.input select:focus,
.field input:focus,
.field textarea:focus {
  box-shadow: 0 0 0 2px rgba(14, 155, 114, 0.18);
  transform: translateY(-1px);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.link-reset {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--green-dark);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  margin-top: 4px;
}

.results-panel {
  flex: 1;
  min-width: 0;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.results-head h3 {
  margin: 0;
  font-size: 24px;
}

.cvs-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 1200px) {
  .cvs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cv-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.cv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(6, 24, 17, 0.11);
}

.card-image {
  position: relative;
  height: 280px;
  background: #e8eeeb;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.price-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 24px rgba(14, 155, 114, 0.25);
}

html[dir='rtl'] .price-badge {
  left: auto;
  right: 12px;
}

.card-body {
  padding: 12px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.name-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0;
}

.name-line h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.pill.success {
  background: rgba(14, 155, 114, 0.14);
  color: var(--green-dark);
}

.meta-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.fast-track {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--green-dark);
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px 6px;
  border-radius: 12px;
  border: 1px solid var(--green);
  background: #f6f8f7;
  margin: 0;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fast-track:hover {
  background: var(--green-soft);
  box-shadow: 0 10px 22px rgba(14, 155, 114, 0.16);
  transform: translateY(-1px);
}

.cta {
  font-weight: 700;
  color: var(--green-dark);
  margin: 0;
  line-height: 1.1;
  font-size: 14px;
  background: #fff;
  padding: 20px 20px;
  text-align: center;
}

.empty-state.hidden {
  display: none;
}

.empty-card {
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.empty-card .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.cv-detail-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-hero h1 {
  margin: 10px 0 8px;
  font-size: 32px;
}

.hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.detail-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.detail-image {
  position: relative;
  background: linear-gradient(140deg, #d5efe3, #f9fffc);
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.price-tag {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

html[dir='rtl'] .price-tag {
  left: auto;
  right: 18px;
}

.price-label {
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}

.price-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 18px;
}

.detail-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
}

.detail-name {
  margin: 0;
  font-size: 24px;
  color: var(--ink);
}

.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-top h2 {
  margin: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.info-tile {
  background: #f6f8f7;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.info-tile span {
  color: var(--muted);
  font-size: 13px;
}

.info-tile strong {
  font-size: 15px;
}

.notice-box {
  background: #fff7eb;
  border-radius: 14px;
  padding: 14px;
  border: 1px dashed #ffc977;
}

.notice-title {
  font-weight: 700;
  color: #b35c00;
  margin-bottom: 6px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn:hover {
  background: var(--green-dark);
  box-shadow: 0 12px 28px rgba(14, 155, 114, 0.25);
  transform: translateY(-1px);
}

.booking-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 24, 17, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 20;
}

.booking-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.result-dialog {
  text-align: center;
  padding: 28px 24px;
}

.result-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  background: #e8f7f0;
  color: var(--green-dark);
}

.result-icon.error {
  background: #fde8e8;
  color: #c0392b;
}

.booking-dialog {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
}

.close-btn {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: #f0f2f1;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
}

.dialog-header h3,
.dialog-header h1 {
  margin: 6px 0 8px;
}

.booking-form,
#booking-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-feedback {
  margin: 6px 0 0;
  font-weight: 600;
}

.form-feedback.success {
  color: var(--green-dark);
}

.form-feedback.error {
  color: #c0392b;
}

.booking-page .dialog-header {
  text-align: center;
}

.booking-page .booking-form {
  max-width: 560px;
  margin: 0 auto;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.captcha-question {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
}

.captcha-row input {
  flex: 1;
  min-width: 160px;
}

.booking-success {
  display: flex;
  justify-content: center;
  align-items: center;
}

.success-card {
  background: var(--card);
  padding: 30px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 420px;
}

.success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin: 0 auto 10px;
}

.alert {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.alert.error {
  background: #fdecea;
  color: #b03127;
}

@media (max-width: 1024px) {
  html[dir='rtl'] .cvs-layout,
  html[dir='ltr'] .cvs-layout {
    flex-direction: column;
  }

  .filters-panel {
    width: 100%;
    position: relative;
  }

  html[dir='rtl'] .filters-panel,
  html[dir='ltr'] .filters-panel {
    order: 1;
  }

  html[dir='rtl'] .results-panel,
  html[dir='ltr'] .results-panel {
    order: 2;
  }

  .detail-card {
    grid-template-columns: 1fr;
  }

  .detail-image {
    min-height: 300px;
  }

  .cvs-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 640px) {
  .page-header-block h1,
  .detail-hero h1 {
    font-size: 26px;
  }

  .card-image {
    height: 240px;
  }

  .cvs-shell,
  .cv-detail-shell,
  .booking-page,
  .booking-success {
    padding-inline: 16px;
    padding-top: 32px;
  }

  .cvs-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .captcha-row {
    flex-direction: column;
    align-items: stretch;
  }

  .captcha-question {
    text-align: center;
    width: 100%;
  }

  .booking-page .primary-btn {
    width: 100%;
  }
}
