/*
  Mobile/UX overrides (loaded last).
  Desktop button styles remain unchanged.
*/

:root {
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* ===== Main mobile rules ===== */
@media (max-width: 991px) {
  body { overflow-x: hidden; }

  /* Hero: remove forced desktop height to avoid giant empty space */
  .hero { min-height: auto !important; padding-bottom: 32px !important; }


  /* Keep content away from notches / rounded corners */
  .container {
    padding-left: calc(16px + var(--safe-left));
    padding-right: calc(16px + var(--safe-right));
  }

  /* ===== 1) Buttons: аккуратные, не громоздкие, заокругленные ===== */
  /* Header mobile button */
  #pumpFunMobileBtn {
    width: auto !important;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px !important;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0.6px;
    white-space: normal;
  }

  /* Prevent earlier “all buttons full width” rule from making header buttons huge */
  header .header-btn button,
  header .header-btn .btn,
  header .header-btn [role="button"] {
    width: auto !important;
  }

  /* Hero CTA buttons */
  .hero__btn .them-btn {
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 15px;
    letter-spacing: 0.6px;
  }
  .hero__btn .them-btn .btn_label {
    padding: 14px 0 12px;
  }
  .btns { margin: -8px; }
  .btns a { margin: 8px; }

  /* ===== 2) Удалить картинку about-img.png в мобильной версии ===== */
  .about-img { display: none !important; }

  /* ===== 3) Максимально уменьшить отступы между блоками ===== */
  /* Utility paddings used across the template */
  .pt-150 { padding-top: 72px !important; }
  .pt-140 { padding-top: 64px !important; }
  .pt-135 { padding-top: 60px !important; }
  .pt-125 { padding-top: 56px !important; }
  .pt-120 { padding-top: 56px !important; }
  .pt-115 { padding-top: 52px !important; }
  .pt-110 { padding-top: 48px !important; }
  .pt-100 { padding-top: 44px !important; }

  .pb-150 { padding-bottom: 72px !important; }
  .pb-140 { padding-bottom: 64px !important; }
  .pb-135 { padding-bottom: 60px !important; }
  .pb-125 { padding-bottom: 56px !important; }
  .pb-120 { padding-bottom: 56px !important; }
  .pb-115 { padding-bottom: 52px !important; }
  .pb-110 { padding-bottom: 48px !important; }
  .pb-100 { padding-bottom: 44px !important; }

  .pt-50 { padding-top: 28px !important; }
  .pb-65 { padding-bottom: 32px !important; }
  .pb-55 { padding-bottom: 28px !important; }
  .pb-50 { padding-bottom: 24px !important; }

  .mt-70 { margin-top: 32px !important; }
  .mt-60 { margin-top: 28px !important; }
  .mt-50 { margin-top: 24px !important; }
  .mt-40 { margin-top: 20px !important; }

  /* Section title spacing */
  .section-title { margin-bottom: 0 !important; }

  /* ===== 4) Убрать лишнюю инфу / декоративку на мобильной версии ===== */
  /* Hide heavy decorative shapes that don’t add meaning on small screens */
  .hero-shape,
  .toke-shape,
  .footer-shape,
  .hero-overlay-shape {
    display: none !important;
  }

  /* Partners: reduce vertical footprint */
  .partners { padding-top: 56px !important; }
  /* Show “our top partners” title on mobile */
  .patners-title { display: block !important; }

  /* ===== Countdown / Timer: prevent truncation on any phone ===== */
  #countdown {
    padding-left: calc(10px + var(--safe-left));
    padding-right: calc(10px + var(--safe-right));
  }

  /* Timer on mobile: single row (Hours • Minutes • Seconds), no Days */
  #timer-content {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    padding-left: calc(6px + var(--safe-left));
    padding-right: calc(6px + var(--safe-right));
  }
  /* Hide Days only on mobile */
  #timer-content .single--days { display: none !important; }

  #timer-content .single {
    margin-right: 0 !important; /* overrides template spacing */
    min-width: 0;
    flex: 1 1 0;
    padding: 10px 8px;
    border-radius: 14px;
  }

  /* Kill the decorative colon separators on mobile (they break when wrapping) */
  .countdown .single h1::before { display: none !important; }

  /* Typography: keep labels readable, never cut */
  .countdown .single p {
    margin-bottom: 6px !important;
    font-size: 11px !important;
    letter-spacing: 0.08em;
    white-space: normal;
  }
    /* Make SECONDS fit on very small screens */
  #timer-content .single--seconds p { font-size: 10px !important; letter-spacing: 0.06em; }

.countdown .single h1 {
    margin: 0 !important;
    line-height: 1;
    font-size: clamp(22px, 7vw, 34px) !important;
  }

  /* Special state message should wrap nicely */
  #special-text { padding: 10px 12px !important; }
  #special-sonic-message { white-space: normal !important; text-align: center !important; }
}

/* Ultra-narrow phones */
@media (max-width: 360px) {
  #timer-content { gap: 8px; }
  #timer-content .single { padding: 8px 6px; }
  .countdown .single p { font-size: 10px !important; }
  .countdown .single h1 { font-size: clamp(18px, 6.8vw, 28px) !important; }

  /* Keep only Hours + Minutes + Seconds (Days hidden) */
  #timer-content .single--days { display: none !important; }
}

/* Tablet tweaks: keep timer on one line when there is enough space */
@media (min-width: 560px) and (max-width: 991px) {
  #timer-content .single { flex: 0 1 auto; min-width: 110px; }
}

/* Reduce motion for smoother UX */
@media (max-width: 991px) and (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Desktop fixes ===== */
/* Keep all feature cards ровными on desktop (equal height inside each row) */
@media (min-width: 992px) {
  /* Make columns stretch and let the card fill the column height */
  .feature .row > [class*="col-"] {
    display: flex;
  }

  .feature .feature-wrap {
    width: 100%;
    height: 100%;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  /* Push the icon block to the bottom so all cards look identical */
  .feature .feature-wrap .xb-item--feature-icon {
    margin-top: auto;
  }
}
