/* ============================================================
   MERIDIAN GLOBAL RECRUITMENT — Mobile Stylesheet
   Covers: index.html, apply.html, payment.html
   Breakpoint: max-width 767px (phones)
               max-width 860px (tablets/small screens)
   ============================================================ */

/* ============================================================
   1. GLOBAL — applies to all pages
   ============================================================ */
@media (max-width: 767px) {

  /* Wrap padding */
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* All inputs & selects — prevent iOS zoom (must be 16px+) */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Buttons full width where inside a flex column */
  .hero__cta {
    flex-direction: column;
    gap: 12px;
  }
  .hero__cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 16px 20px;
    font-size: 16px;
  }

  /* ---- HEADER ---- */
  .site-header {
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--forest);
  }
  .site-header__inner {
    justify-content: space-between;
  }
  .brand img { height: 38px !important; }
  .nav__links { display: none !important; }
  .nav .btn--primary {
    padding: 10px 16px;
    font-size: 13px;
  }
  .nav .btn--ghost { display: none; }

  /* ---- HERO ---- */
  .hero {
    min-height: 85vh;
    padding: 0;
  }
  .hero__inner {
    padding: 56px 0 48px;
  }
  .hero__content h1 {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.2;
  }
  .hero__sub {
    font-size: 15px;
    line-height: 1.6;
    margin-top: 14px;
  }
  .hero__flags {
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero__flags .flag-row img {
    width: 28px;
    height: 28px;
  }

  /* ---- STATS ---- */
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .stat__num {
    font-size: clamp(28px, 7vw, 38px);
  }

  /* ---- INTRO GRID ---- */
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .intro-grid img {
    max-height: 240px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
  }

  /* ---- PROFESSIONS ---- */
  .prof-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .prof-card {
    padding: 16px 12px;
  }
  .prof-card .ico {
    font-size: 28px;
    margin-bottom: 8px;
  }
  .prof-card .name {
    font-size: 13px;
  }

  /* ---- COUNTRIES ---- */
  .country-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .country__flag {
    width: 56px;
    height: 56px;
    border-radius: 50%;
  }
  .country__name {
    font-size: 12px;
    margin-top: 8px;
  }

  /* ---- HOW IT WORKS ---- */
  .how-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .how-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
  }
  .how-step__num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  /* ---- GUARANTEE / CTA BAND ---- */
  .cta-band__inner {
    padding: 40px 0;
    text-align: center;
  }
  .cta-band h2 { font-size: 26px; }
  .cta-band p  { font-size: 15px; }
  .cta-band .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* ---- FOOTER ---- */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-brand p { display: none; }
  .footer-col { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
  .footer-col:first-child { border-top: none; padding-top: 0; }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .footer-bottom nav { justify-content: center; }

  /* Section headings */
  .section-head h2 { font-size: clamp(22px, 6vw, 28px); }
  .section { padding: 40px 0; }
}

/* ============================================================
   2. APPLY PAGE
   ============================================================ */
@media (max-width: 767px) {

  /* Hide sidebar — show mobile checklist instead */
  .apply-aside { display: none !important; }

  .apply-layout {
    grid-template-columns: 1fr !important;
    margin-top: 0 !important;
    padding: 0 0 48px !important;
    gap: 0 !important;
  }

  .apply-hero {
    padding: 28px 0 24px !important;
  }
  .apply-hero h1 { font-size: 24px !important; }
  .apply-hero p  { font-size: 14px !important; }

  /* Form card full width */
  .form-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 20px 16px 32px !important;
    margin-top: 0 !important;
  }

  .form-card__head h2 { font-size: 22px !important; }
  .form-card__head p  { font-size: 14px !important; }

  /* Fieldset */
  .fieldset { margin-bottom: 20px !important; }
  .fieldset__legend {
    font-size: 15px !important;
    margin-bottom: 16px !important;
  }

  /* Grid: single column */
  .grid-2 { grid-template-columns: 1fr !important; gap: 14px !important; }

  /* Profession choices: 2 columns */
  .choice-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .choice-grid.prof-choices { grid-template-columns: 1fr 1fr !important; }

  /* Choice cards on mobile */
  .choice {
    padding: 12px 10px !important;
    font-size: 13px !important;
    gap: 8px !important;
  }
  .choice__txt { font-size: 13px !important; line-height: 1.3 !important; }
  .choice__box { width: 18px !important; height: 18px !important; }

  /* Inputs */
  .input, .input[type="text"], .input[type="email"],
  .input[type="tel"], .input[type="date"], select.input {
    padding: 14px 14px !important;
    font-size: 16px !important;
    min-height: 52px !important;
    border-radius: 10px !important;
  }

  /* Labels */
  .field { margin-bottom: 14px !important; }
  .field label {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 7px !important;
    display: block !important;
  }

  /* Upload areas */
  .upload-grid { gap: 10px !important; }
  .upload {
    padding: 14px 12px !important;
    border-radius: 10px !important;
    min-height: 64px !important;
    gap: 10px !important;
  }
  .upload__name { font-size: 13px !important; }
  .upload__meta { font-size: 11px !important; }
  .upload__action {
    padding: 9px 14px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  /* Consent */
  .consent {
    display: flex !important;
    gap: 12px !important;
    align-items: flex-start !important;
    margin-bottom: 24px !important;
  }
  .consent input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    accent-color: var(--forest) !important;
  }
  .consent label {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }

  /* Submit */
  .form-submit { flex-direction: column !important; align-items: stretch !important; }
  #submitBtn {
    width: 100% !important;
    padding: 18px 24px !important;
    font-size: 16px !important;
    justify-content: center !important;
    border-radius: 12px !important;
    text-align: center !important;
  }
  .form-note { font-size: 12px !important; text-align: center !important; }

  /* Success state */
  .success { padding: 32px 16px !important; }
  .success h2 { font-size: 22px !important; }
}

/* ============================================================
   3. PAYMENT PAGE
   ============================================================ */
@media (max-width: 860px) {

  .payment-hero { padding: 28px 0 24px; }
  .payment-hero h1 { font-size: 24px !important; }
  .payment-hero p  { font-size: 14px !important; }

  .payment-layout {
    grid-template-columns: 1fr !important;
    padding: 20px 0 48px !important;
    gap: 20px !important;
  }

  /* Show info cards above payment card on mobile */
  .payment-layout > div:first-child { order: 2; }
  .payment-layout > div:last-child  { order: 1; }

  .payment-card {
    padding: 20px 16px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08) !important;
  }
  .payment-card__amount { font-size: 28px !important; }

  .id-display {
    padding: 12px 14px !important;
  }
  .id-display__value { font-size: 15px !important; }

  /* Inputs */
  .payment-card .input {
    padding: 14px 14px !important;
    font-size: 16px !important;
    min-height: 52px !important;
  }

  /* Pay button */
  .nexapay-btn {
    padding: 18px 20px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }

  /* Checkbox */
  .checkbox-row input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
  }
  .checkbox-row label { font-size: 13px !important; }

  /* Steps card */
  .steps-card { padding: 18px 14px !important; }
  .step-num { width: 26px !important; height: 26px !important; font-size: 12px !important; }
  .step-txt b { font-size: 13px !important; }
  .step-txt span { font-size: 12px !important; }

  /* Guarantee card */
  .guarantee-card { padding: 18px 14px !important; }
  .guarantee-card p { font-size: 13px !important; }
}

/* ============================================================
   4. TABLET (768px - 1024px) — light touches
   ============================================================ */
@media (min-width: 768px) and (max-width: 1024px) {
  .prof-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .country-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .apply-layout { grid-template-columns: 1fr !important; }
  .apply-aside { display: none !important; }
  .form-card { padding: 32px 28px !important; }
  .payment-layout { grid-template-columns: 1fr !important; }
}

