:root {
      --bg: #f5f3ff;
      --surface: #ffffff;
      --text: #111827;
      --sub: #6b7280;
      --primary: #551fbd;
      --accent: #69e4f5;
      --border: #e5e7eb;
      --shadow: 0 18px 45px rgba(88, 28, 135, 0.12);
    }

    /* Skeleton Loader Styles */.skeleton {
  border-radius: 8px;
}
.skeleton-card { height: 400px; width: 100%; border-radius: 18px; margin-bottom: 20px; }
    .skeleton-field { height: 18px; width: 40%; margin-bottom: 8px; border-radius: 4px; }
    .skeleton-input { height: 44px; width: 100%; margin-bottom: 16px; border-radius: 12px; }

    /* Hide real content initially */
    .content-hidden { 
      display: none !important; 
      opacity: 0; 
    }
    .content-reveal { 
      display: grid !important; 
      animation: fadeIn 0.4s ease forwards; 
    }
    @keyframes fadeIn { 
      from { opacity: 0; transform: translateY(5px); } 
      to { opacity: 1; transform: translateY(0); } 
    }

    body {
      margin: 0;
      background: url('/RipNews/assets/background.jpg');
      background-size: cover;
      background-repeat: repeat;
      background-position: center;
      color: var(--text);
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    }


    main.page {
      max-width: 1200px;
      margin: 20px auto 40px;
      padding: 0 16px 40px;
      display: grid;
      grid-template-columns: minmax(0, 740px) 1fr;
      gap: 18px;
      box-sizing: border-box;
      min-height: 100vh;
    }

    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: var(--shadow);
    }

    .pad {
      padding: 18px 18px 28px;
    }

    h1 {
      font-size: 26px;
      margin: 0 0 12px;
      color: var(--primary);
      letter-spacing: 0.02em;
      font-weight: 800;
    }

    h2 {
      font-size: 18px;
      margin: 18px 0 10px;
      color: var(--primary);
      font-weight: 700;
    }

    label {
      font-size: 13px;
      color: var(--sub);
      display: flex;
      flex-direction: column;
      gap: 6px;
      /* space between label text and field */
      margin-bottom: 16px;
      /* ✅ space before next field */
    }

    /* Give space between label text and the field */
    label>.label-text {
      display: inline-flex;
      margin-bottom: 8px;
      /* ✅ gap between label and input */
    }

    /* Keep inputs/selects/textarea from touching the label when inside label */
    label input,
    label select,
    label textarea,
    label .custom-select,
    label .phone-input-wrap {
      margin-top: 0;
      /* avoid random extra gaps */
    }

    /* For Lived Place: add spacing between search and dropdown list */
    #lived_place_search {
      margin-bottom: 8px;
    }


    input,
    select,
    textarea {
      width: 100%;
      padding: 11px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #f9fafb;
      outline: none;
      box-sizing: border-box;
      font-size: 14px;
      color: var(--text);
      transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.08s ease;
    }

    input::placeholder,
    textarea::placeholder {
      color: #9ca3af;
    }

    input:hover,
    select:hover,
    textarea:hover {
      border-color: #c4b5fd;
      background: #ffffff;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--primary);
      background: #ffffff;
      box-shadow: 0 0 0 2px rgba(85, 31, 189, 0.15);
    }

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

    .btn {
      display: inline-block;
      border: 1px solid var(--primary);
      background: var(--primary);
      color: #fff;
      border-radius: 999px;
      padding: 11px 20px;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      box-shadow: 0 12px 30px rgba(88, 28, 135, 0.35);
      transition:
        transform 0.08s ease,
        box-shadow 0.12s ease,
        background 0.12s ease;
    }

    .btn:hover {
      background: #4b1ab0;
      box-shadow: 0 16px 40px rgba(88, 28, 135, 0.45);
      transform: translateY(-1px);
    }

    .btn:active {
      transform: translateY(0);
      box-shadow: 0 10px 24px rgba(88, 28, 135, 0.3);
    }

    .btn.outline {
      background: #ffffff;
      color: var(--primary);
      box-shadow: none;
    }

    .btn.outline:hover {
      background: #f3e8ff;
    }

    .notice {
      background: linear-gradient(135deg, #f3e8ff, #e0faff);
      border: 1px solid #ddd6fe;
      color: #312e81;
      border-radius: 14px;
      padding: 12px 14px;
      margin-bottom: 10px;
      font-size: 13px;
    }

    .error {
      background: #feecec;
      border: 1px solid #f5b3b3;
      color: #7a1f1f;
      border-radius: 12px;
      padding: 12px;
      margin-bottom: 10px;
    }

    .sidebar {
      position: sticky;
      top: 18px;
      height: fit-content;
    }

    .help {
      font-size: 12px;
      color: #9aa1a9;
      margin-top: 4px;
    }

    .step {
      display: none;
      min-height: 520px;
      box-sizing: border-box;
    }

    @media (min-width: 601px) {
      .step {
        min-height: calc(100vh - 220px);
      }
    }

    .step.active {
      display: block;
    }

    label>span.label-text {
      display: flex;
      align-items: center;
      gap: 4px;
      font-weight: 500;
      color: var(--sub);
    }

    label span[style*="color:#c00"] {
      color: #dc2626 !important;
      font-weight: 600;
      margin-left: 4px;
    }

    .services-inline {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 34px;
      white-space: nowrap;
      margin-top: 8px;
    }

    .no-underline {
      text-decoration: none !important;
    }

    .readmore-inline {
      color: var(--primary);
      font-weight: 600;
      text-decoration: none !important;
      margin-left: 4px;
    }

    @media(max-width:1024px) {
      main.page {
        grid-template-columns: 1fr;
      }

      main.page>.sidebar {
        order: -1;
        margin-bottom: 18px;
        position: static;
      }
    }

    @media(max-width:600px) {
      main.page {
        max-width: 100%;
        margin: 12px auto 24px;
        padding: 0 16px 32px !important;
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
      }

      .card {
        border-radius: 16px;
        width: 100%;
        box-sizing: border-box;
      }

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

      .services-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }

      .hide-mobile {
        display: none !important;
      }
    }

    /* --- Custom dropdown --- */
    .custom-select {
      position: relative;
      width: 100%;
    }

    .custom-select-trigger {
      width: 100%;
      padding: 11px 40px 11px 11px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: #f9fafb;
      font-size: 14px;
      color: var(--text);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
    }

    .custom-select-trigger:hover {
      border-color: #c4b5fd;
      background: #ffffff;
    }

    .custom-select-trigger::after {
      content: "";
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid #6b7280;
      margin-left: 8px;
      transition: transform 0.15s ease;
    }

    .custom-select.open .custom-select-trigger::after {
      transform: rotate(180deg);
    }

    .custom-select-text {
      flex: 1;
      text-align: left;
    }

    .custom-options {
      position: absolute;
      left: 0;
      top: 100%;
      width: 100%;
      margin-top: 4px;
      background: #ffffff;
      border-radius: 12px;
      border: 1px solid #e5e7eb;
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
      max-height: 260px;
      overflow-y: auto;
      z-index: 40;
      display: none;
    }

    .custom-select.open .custom-options {
      display: block;
    }

    .custom-option {
      padding: 9px 14px;
      font-size: 14px;
      color: #111827;
      cursor: pointer;
    }

    .custom-option:hover {
      background-color: #eef2ff;
    }

    .custom-option.is-selected {
      background-color: #ede9fe;
      color: #4338ca;
      font-weight: 500;
    }

    .phone-input-wrap .custom-options {
      width: 260px;
      left: -10px;
    }

    .native-select-hidden {
      position: absolute;
      opacity: 0;
      pointer-events: none;
      height: 0;
      width: 0;
    }

    .phone-input-wrap {
      display: grid;
      grid-template-columns: 120px minmax(0, 1fr);
      gap: 8px;
      align-items: center;
    }

    .phone-input-wrap .custom-select-trigger {
      padding-right: 30px;
    }

    html,
    body {
      height: auto;
      overflow-y: auto;
    }

    main.page {
      max-height: none;
      overflow: visible;
    }

    /* Desktop + Tablet only: card scroll */
    /* @media (min-width: 601px) {

      html,
      body {
        height: 100%;
        overflow: hidden;
      }

      main.page {
        max-height: 100vh;
        overflow: hidden;
      }

      main.page>section.card {
        max-height: calc(90vh - 100px);
        overflow-y: auto;
        padding-right: 6px;
      }

      main.page>section.card::-webkit-scrollbar {
        width: 0;
        height: 0;
      }

      main.page>section.card {
        scrollbar-width: none;
      }
    } */

    /* --- POPUP STYLES --- */
    .popup-overlay {
      position: fixed;
      inset: 0;

      background: color-mix(in srgb, var(--primary) 45%, transparent);
      backdrop-filter: blur(6px);

      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 5000;
    }


    .popup-box {
      background: var(--surface);
      padding: 28px 26px;
      width: 92%;
      max-width: 420px;
      border-radius: 18px;
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      text-align: center;
      animation: popupFade 0.25s ease;
    }

    .popup-box h2 {
      margin: 0 0 10px;
      font-size: 20px;
      color: var(--primary);
      font-weight: 800;
    }

    .popup-box p {
      font-size: 14px;
      color: var(--sub);
      margin: 0 0 18px;
    }

    .popup-buttons {
      display: flex;
      gap: 12px;
      justify-content: center;
    }

    .btn.call {
      background: var(--primary);
      color: #fff;
    }

    @keyframes popupFade {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    body.popup-open .top-stepper-wrap {
      pointer-events: none;
      opacity: .85;
    }


    .btn .btn-text-short {
      display: none;
    }

    @media (max-width:600px) {
      .btn .btn-text-full {
        display: none;
      }

      .btn .btn-text-short {
        display: inline;
      }
    }

    /* OTP specific tweaks */
    #otpPopup .popup-box h2 {
      font-size: 20px;
    }

    /* =======================
       TOAST NOTIFICATIONS
       ======================= */
    .toast-wrap {
      position: fixed;
      right: 18px;
      bottom: 18px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: none;
    }

    .toast-item {
      pointer-events: auto;
      min-width: 260px;
      max-width: 360px;
      padding: 12px 14px;
      border-radius: 14px;
      color: #fff;
      box-shadow: 0 14px 40px rgba(2, 6, 23, 0.22);
      transform: translateY(6px);
      opacity: 0;
      transition: opacity .25s ease, transform .25s ease;
      font-size: 14px;
      font-weight: 600;
    }

    .toast-item.show {
      opacity: 1;
      transform: translateY(0);
    }

    .toast-success {
      background: #16a34a;
    }

    .toast-error {
      background: #dc2626;
    }

    .toast-info {
      background: #551fbd;
    }

    .toast-close {
      float: right;
      cursor: pointer;
      font-weight: 800;
      margin-left: 10px;
      opacity: 0.9;
    }

    .field-error {
      border-color: #dc2626 !important;
      box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12) !important;
      background: #fff !important;
    }

    /* ===========================
   Language Switcher (Top Right)
   =========================== */
    .lang-switch {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px;
      border-radius: 999px;
      background: rgba(85, 31, 189, 0.08);
      border: 1px solid rgba(85, 31, 189, 0.18);
      box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    }

    .lang-btn {
      appearance: none;
      border: 1px solid rgba(85, 31, 189, 0.25);
      background: #fff;
      color: var(--primary);
      font-size: 13px;
      font-weight: 800;
      letter-spacing: 0.02em;
      padding: 7px 12px;
      border-radius: 999px;
      cursor: pointer;
      line-height: 1;
      transition: transform .08s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    }

    .lang-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 12px 26px rgba(85, 31, 189, 0.18);
      background: rgba(85, 31, 189, 0.06);
    }

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

    .lang-btn.is-active {
      background: var(--primary);
      color: #fff;
      border-color: var(--primary);
      box-shadow: 0 16px 34px rgba(85, 31, 189, 0.28);
    }

    /* mobile smaller */
    @media (max-width: 600px) {
      .lang-switch {
        padding: 5px;
        gap: 5px;
      }

      .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
      }
    }

    /* ===========================
   TOP WIZARD STEPPER (like image)
   =========================== */
    .top-stepper-wrap {
      grid-column: 1 / -1;
      /* span both columns */
      display: flex;
      justify-content: center;
      margin: 10px 0 18px;
    }

    .wizard {
      width: min(720px, 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 18px;
      padding: 10px 12px;
    }

    .wizard-step {
      display: flex;
      flex-direction: column;
      align-items: center;
      min-width: 140px;
      position: relative;
      text-align: center;
    }

    .wizard-icon {
      font-size: 26px;
      line-height: 1;
      margin-bottom: 6px;
      opacity: .35;
      transition: .2s ease;
      color: inherit;
    }

    .wizard-label {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .04em;
      color: #6b7280;
      margin-bottom: 10px;
      transition: .2s ease;
      text-transform: uppercase;
    }

    .wizard-circle {
      width: 28px;
      height: 28px;
      border-radius: 999px;
      border: 2px solid #cbd5e1;
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 900;
      color: #94a3b8;
      transition: .2s ease;
    }

    /* connector line */
    .wizard-line {
      height: 3px;
      width: 120px;
      border-radius: 999px;
      background: #e5e7eb;
      position: relative;
      overflow: hidden;
    }

    .wizard-line::after {
      content: "";
      position: absolute;
      inset: 0;
      width: 0%;
      background: var(--primary);
      transition: width .25s ease;
    }

    /* ACTIVE + DONE states */
    .wizard-step.is-active .wizard-icon,
    .wizard-step.is-done .wizard-icon {
      opacity: 1;
    }

    .wizard-step.is-active .wizard-label,
    .wizard-step.is-done .wizard-label {
      color: var(--primary);
    }

    .wizard-step.is-active .wizard-circle {
      border-color: var(--primary);
      color: var(--primary);
      box-shadow: 0 0 0 3px rgba(85, 31, 189, .12);
    }

    .wizard-step.is-done .wizard-circle {
      background: var(--primary);
      border-color: var(--primary);
      color: #fff;
    }

    /* line fill control via class on wrapper (correct) */
    .wizard.progress-1 .wizard-line:nth-child(2)::after {
      width: 100%;
    }

    .wizard.progress-2 .wizard-line:nth-child(4)::after {
      width: 100%;
    }

    .wizard.progress-3 .wizard-line:nth-child(6)::after {
      width: 100%;
    }

    .wizard.progress-4 .wizard-line:nth-child(8)::after {
      width: 100%;
    }


    @media(max-width:600px) {
      .wizard {
        gap: 10px;
      }

      .wizard-line {
        width: 70px;
      }

      .wizard-step {
        min-width: 110px;
      }
    }

    .wizard.wizard-5 {
      width: min(980px, 100%);
    }

    .top-stepper-wrap {
      position: sticky;
      top: 0;
      z-index: 2000;
      background: transparent !important;
      /* ✅ no background */
      backdrop-filter: none !important;
      /* ✅ remove blur */
      padding: 10px 0;
    }

    /* ===========================
   IMAGE-STYLE STEPPER (PILL)
   =========================== */

    .top-stepper-wrap {
      grid-column: 1 / -1;
      display: flex;
      justify-content: center;
      margin: 10px 0 18px;

      position: sticky;
      top: 0;
      z-index: 2000;

      /* no blur, no background */
      background: transparent !important;
      backdrop-filter: none !important;
      padding: 10px 0;
    }

    .stepper {
      width: min(820px, 100%);
      background: transparent !important;
      border: 0 !important;
      border-radius: 18px;
      box-shadow: none !important;
      padding: 0 !important;
    }

    .stepper-track {
      position: relative;
      display: flex;
      justify-content: space-between;
      align-items: center;

      /* leave space for labels under */
      padding-bottom: 18px;
    }

    /* base line */
    .stepper-track::before {
      content: "";
      position: absolute;
      left: 10px;
      right: 10px;
      top: 9px;
      /* aligns to dot center */
      height: 2px;
      background: #e5e7eb;
      border-radius: 999px;
    }

    /* filled progress line */
    .stepper-fill {
      position: absolute;
      left: 10px;
      top: 9px;
      height: 2px;
      width: 0%;
      background: var(--primary);
      border-radius: 999px;
      transition: width .25s ease;
    }

    .stepper-step {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      min-width: 90px;
      z-index: 2;
      /* keep dots above line */
    }

    .stepper-step .dot {
      width: 18px;
      height: 18px;
      border-radius: 999px;
      background: #fff;
      border: 2px solid #d1d5db;
      display: inline-block;
      box-sizing: border-box;
      transition: .2s ease;
    }

    /* labels */
    .stepper-step .label {
      font-size: 11px;
      letter-spacing: .06em;
      font-weight: 800;
      text-transform: uppercase;
      color: #9ca3af;
      white-space: nowrap;
    }

    /* DONE */
    .stepper-step.is-done .dot {
      background: var(--primary);
      border-color: var(--primary);
    }

    .stepper-step.is-done .label {
      color: var(--primary);
      opacity: .9;
    }

    /* ACTIVE */
    .stepper-step.is-active .dot {
      border-color: var(--primary);
      box-shadow: 0 0 0 4px rgba(85, 31, 189, .12);
    }

    .stepper-step.is-active .label {
      color: var(--primary);
    }

    /* DISABLED (future steps) */
    .stepper-step.is-disabled {
      opacity: .55;
      pointer-events: none;
    }

    /* Mobile: tighter */
    @media (max-width:600px) {
      .stepper {
        padding: 14px 12px 16px;
        border-radius: 16px;
      }

      .stepper-step {
        min-width: 70px;
      }

      .stepper-step .label {
        font-size: 10px;
      }
    }

    @media (max-width: 600px) {
      .stepper-track {
        padding-bottom: 44px;
      }

      .stepper-step {
        min-width: 0;
        flex: 1;
      }

      .stepper-step .label {
        font-size: 10px;
        line-height: 1.1;
        white-space: nowrap;
        text-align: center;
        position: relative;
      }

      /* Force exact pattern using data-step (BEST) */
      .stepper-step[data-step="1"] .label,
      .stepper-step[data-step="3"] .label,
      .stepper-step[data-step="5"] .label {
        transform: translateY(18px);
      }

      .stepper-step[data-step="2"] .label,
      .stepper-step[data-step="4"] .label {
        transform: translateY(-60px);
      }
    }

    .page-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    /* Mobile: put language buttons UNDER heading */
    @media (max-width: 600px) {
      .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
      }

      /* ✅ shrink the language bar */
      .page-head .lang-switch {
        width: fit-content;
        /* don’t stretch full width */
        max-width: 260px;
        /* control pill size */
        padding: 5px;
        justify-content: flex-start;
      }
    }

    /* Hide city dropdown by default */
    #lived_place_list {
      display: none;
    }

    /* When active, show it */
    #lived_place_list.is-open {
      display: block;
    }

    #lived_place_list {
      max-height: 220px;
      overflow-y: auto;
    }
