/* =========================================
   DESIGN TOKENS
   ========================================= */
:root {
  --bg: #f5f3ee;
  --card: #ffffff;
  --green-dark: #1a3c28;
  --green: #2d6a3f;
  --green-light: #e8f0e9;
  --green-accent: #168a3a;
  --gold: #c9a14a;
  --gold-light: #d9bd6a;
  --text: #1a2e1f;
  --text-muted: #6b756d;
  --border: rgba(16, 32, 21, 0.10);
  --shadow-sm: 0 2px 8px rgba(18, 61, 36, 0.06);
  --shadow-md: 0 8px 32px rgba(18, 61, 36, 0.08);
  --shadow-lg: 0 18px 50px rgba(18, 61, 36, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

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

button, input, textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

/* =========================================
   NAVBAR
   ========================================= */
.premium-navbar {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(30, 30, 28, 0.82);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.nav-item {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #10160f;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 16px rgba(201, 161, 74, 0.35);
}

/* =========================================
   PAGE WRAPPER
   ========================================= */
.page-wrapper {
  max-width: 1300px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

/* =========================================
   CONTACT HERO SECTION
   ========================================= */
.contact-hero {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.contact-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 620px;
}

/* --- Image Side --- */
.contact-hero__image-side {
  position: relative;
  overflow: hidden;
}

.contact-hero__image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.contact-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-hero__image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 32px;
  background: linear-gradient(to top, rgba(10, 30, 15, 0.92) 0%, rgba(10, 30, 15, 0.6) 60%, transparent 100%);
}

.contact-hero__image-overlay p {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.contact-hero__image-overlay strong {
  color: var(--gold-light);
  font-weight: 800;
}

/* --- Form Side --- */
.contact-hero__form-side {
  padding: 44px 42px 38px;
}

.contact-hero__title {
  font-size: 32px;
  font-weight: 900;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.contact-hero__subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* =========================================
   FORM STYLES
   ========================================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
  z-index: 1;
}

.input-icon.whatsapp-icon {
  color: #25D366;
  font-size: 18px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafbf8;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--green-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 138, 58, 0.08);
}

.input-group input:focus ~ .input-icon,
.input-group textarea:focus ~ .textarea-icon {
  color: var(--green-accent);
}

/* Textarea specifics */
.textarea-group {
  position: relative;
}

.textarea-icon {
  top: 18px;
  transform: none;
}

.input-group textarea {
  resize: vertical;
  min-height: 90px;
  padding-right: 44px;
}

/* =========================================
   SERVICE CHIPS
   ========================================= */
.chips-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: -4px;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fafbf8;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.chip-icon {
  font-size: 14px;
  opacity: 0.6;
  transition: var(--transition);
}

.chip:hover {
  border-color: rgba(22, 138, 58, 0.3);
  background: rgba(22, 138, 58, 0.04);
}

.chip.active {
  border-color: var(--green-accent);
  background: rgba(22, 138, 58, 0.1);
  color: var(--green-accent);
  box-shadow: 0 2px 10px rgba(22, 138, 58, 0.12);
}

.chip.active .chip-icon {
  opacity: 1;
  color: var(--green-accent);
}

.chips-row.is-invalid .chip {
  border-color: rgba(190, 58, 58, 0.55);
  background: rgba(190, 58, 58, 0.04);
}

/* =========================================
   SUBMIT BUTTON
   ========================================= */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2d7a45, var(--green-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 24px rgba(26, 60, 40, 0.25);
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.5s;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(26, 60, 40, 0.35);
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn i {
  font-size: 14px;
}

/* =========================================
   BOTTOM GRID
   ========================================= */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

/* --- Steps Card --- */
.steps-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 42px 36px;
  box-shadow: var(--shadow-md);
}

.steps-card__title {
  font-size: 26px;
  font-weight: 900;
  color: var(--green-dark);
  text-align: center;
  margin-bottom: 36px;
}

.steps-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  max-width: 160px;
}

.step-icon-wrap {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 22px;
  margin-bottom: 14px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.step-item:hover .step-icon-wrap {
  background: var(--green-dark);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(26, 60, 40, 0.22);
}

.step-item h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.step-item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 140px;
}

/* Connector */
.step-connector {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 30px;
  padding: 0 6px;
}

.connector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-accent);
  flex-shrink: 0;
}

.connector-line {
  width: 40px;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--green-accent) 0px,
    var(--green-accent) 4px,
    transparent 4px,
    transparent 8px
  );
}

/* --- Location Card --- */
.location-card {
  background: var(--green-dark);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.location-card__content {
  padding: 36px 32px 24px;
  color: #fff;
}

.location-card__title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 6px;
}

.location-card__subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 18px;
}

.location-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
}

.location-card__btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.location-card__btn i {
  color: var(--gold-light);
}

.location-card__map {
  flex: 1;
  min-height: 220px;
  position: relative;
}

.location-card__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.8) brightness(0.95);
}

/* =========================================
   SOCIAL MEDIA SECTION
   ========================================= */
.contact-social {
  position: relative;
  max-width: 620px;
  margin: 32px auto 0;
  padding: 28px 20px 6px;
  text-align: center;
}

.contact-social::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(220px, 54vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(201, 161, 74, 0.55), transparent);
}

.contact-social__title {
  margin: 0;
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.35;
}

.contact-social__subtitle {
  margin: 8px 0 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.contact-social__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.contact-social__link {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(201, 161, 74, 0.42);
  border-radius: 50%;
  background: rgba(26, 60, 40, 0.045);
  color: var(--gold);
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease, background 300ms ease, color 300ms ease;
}

.contact-social__link:hover,
.contact-social__link:focus-visible {
  transform: translateY(-4px) scale(1.05);
  border-color: rgba(201, 161, 74, 0.78);
  background: rgba(26, 60, 40, 0.075);
  color: var(--gold-light);
  box-shadow:
    0 12px 26px rgba(201, 161, 74, 0.16),
    0 0 0 6px rgba(201, 161, 74, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.contact-social__link i {
  line-height: 1;
  transition: transform 300ms ease;
}

.contact-social__link:hover i,
.contact-social__link:focus-visible i {
  transform: scale(1.08);
}

.contact-tilvix-card {
  width: min(360px, 100%);
  min-height: 74px;
  margin: 22px auto 0;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(201, 161, 74, 0.32);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(18, 61, 36, 0.96), rgba(20, 77, 43, 0.9)),
    rgba(18, 61, 36, 0.92);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(16, 32, 21, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.contact-tilvix-card:hover,
.contact-tilvix-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(201, 161, 74, 0.72);
  box-shadow: 0 22px 52px rgba(16, 32, 21, 0.22), 0 0 28px rgba(201, 161, 74, 0.16);
}

.contact-tilvix-card__logo-wrap {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(16, 32, 21, 0.08), 0 10px 24px rgba(0, 0, 0, 0.18);
}

.contact-tilvix-card__logo {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
}

.contact-tilvix-card__content {
  min-width: 0;
  display: grid;
  gap: 2px;
  line-height: 1.35;
  text-align: right;
}

.contact-tilvix-card__content span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 700;
}

.contact-tilvix-card__content strong {
  color: var(--gold-light);
  font-size: 16px;
  font-weight: 900;
}

.contact-tilvix-card > i {
  color: var(--gold-light);
  font-size: 13px;
  transition: transform 300ms ease;
}

.contact-tilvix-card:hover > i,
.contact-tilvix-card:focus-visible > i {
  transform: translateX(-4px);
}

/* =========================================
   SUCCESS MODAL
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.95);
  transition: var(--transition);
}

.modal-overlay.is-visible .modal-content {
  transform: translateY(0) scale(1);
}

.modal-icon {
  font-size: 56px;
  color: var(--green-accent);
  margin-bottom: 18px;
  animation: popIn 0.4s ease;
}

.modal-overlay.is-error .modal-icon {
  color: #b84b4b;
}

.modal-overlay.is-error .modal-close-btn {
  background: linear-gradient(135deg, #b84b4b, #7f2525);
}

@keyframes popIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.modal-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-close-btn {
  padding: 12px 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2d7a45, var(--green-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(26, 60, 40, 0.2);
}

.modal-close-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(26, 60, 40, 0.3);
}

/* =========================================
   FORM VALIDATION STATES
   ========================================= */
.input-group input.is-invalid {
  border-color: #e74c3c;
  background: #fef5f5;
}

.input-group input.is-invalid ~ .input-icon {
  color: #e74c3c;
}

.input-error {
  display: none;
  font-size: 12px;
  color: #e74c3c;
  margin-top: 4px;
  padding-right: 4px;
}

.input-group.has-error .input-error {
  display: block;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-hero {
  animation: fadeInUp 0.6s ease both;
}

.steps-card {
  animation: fadeInUp 0.6s ease 0.15s both;
}

.location-card {
  animation: fadeInUp 0.6s ease 0.3s both;
}

.contact-social {
  animation: fadeInUp 0.6s ease 0.4s both;
}

/* Chip animation */
.chip {
  animation: fadeInUp 0.4s ease both;
}

.chip:nth-child(1) { animation-delay: 0.1s; }
.chip:nth-child(2) { animation-delay: 0.15s; }
.chip:nth-child(3) { animation-delay: 0.2s; }
.chip:nth-child(4) { animation-delay: 0.25s; }
.chip:nth-child(5) { animation-delay: 0.3s; }
.chip:nth-child(6) { animation-delay: 0.35s; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .contact-hero__inner {
    grid-template-columns: 1fr;
  }

  .contact-hero__image-side {
    max-height: 340px;
    order: -1;
  }

  .contact-hero__form-side {
    padding: 32px 28px 32px;
  }

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

  .steps-track {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    flex-direction: column;
    margin-top: 0;
    padding: 8px 0;
  }

  .connector-line {
    width: 2px;
    height: 30px;
    background: repeating-linear-gradient(
      180deg,
      var(--green-accent) 0px,
      var(--green-accent) 4px,
      transparent 4px,
      transparent 8px
    );
  }

  .location-card__map {
    min-height: 260px;
  }

  .contact-social {
    margin-top: 26px;
  }
}

@media (max-width: 640px) {
  .page-wrapper {
    padding: 90px 14px 40px;
  }

  .contact-hero__form-side {
    padding: 24px 18px 28px;
  }

  .contact-hero__title {
    font-size: 26px;
  }

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

  .chips-row {
    gap: 8px;
  }

  .chip {
    flex: 1 1 calc(50% - 8px);
    font-size: 12px;
    padding: 8px 14px;
  }

  .steps-card {
    padding: 28px 20px;
  }

  .steps-card__title {
    font-size: 22px;
  }

  .contact-social {
    margin-top: 24px;
    padding: 24px 10px 0;
  }

  .contact-social__title {
    font-size: 20px;
  }

  .contact-social__subtitle {
    margin-bottom: 16px;
    font-size: 12.5px;
  }

  .contact-social__links {
    gap: 10px;
  }

  .contact-social__link {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .contact-tilvix-card {
    width: 100%;
    min-height: 64px;
    margin-top: 18px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .contact-tilvix-card__logo-wrap {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .contact-tilvix-card__logo {
    width: 35px;
    height: 35px;
  }

  .contact-tilvix-card__content span {
    font-size: 10px;
  }

  .contact-tilvix-card__content strong {
    font-size: 14px;
  }

  .premium-navbar {
    top: 14px;
    gap: 2px;
    padding: 5px 6px;
  }

  .nav-item {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .premium-navbar {
    width: calc(100% - 28px);
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 22px;
    gap: 4px;
    padding: 8px;
  }

  .nav-item {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 10px;
    font-size: 11px;
  }

  .chip {
    flex-basis: 100%;
  }
}
