/* adaptation.css — Responsive layout and fluid text scaling */

/* ── Tablet (768px – 1199px) ─────────────────────────────── */
@media (max-width: 1199px) {
  .header_desktop {
    padding: 10px 24px;
    gap: 16px;
  }
  main {
    padding: 0px 24px;
  }
  .header_desktop nav {
    gap: 18px;
  }

  /* ── Hero — tablet ────────────────────────────────────── */
  .hero {
    padding: 100px 40px 60px;
    gap: 32px;
  }

  .infiniti_cards_scroll {
    width: 240px;
  }

  .people_card {
    width: 240px;
  }

  .people_card img {
    height: 200px;
  }

  /* ── Info cards — tablet ────────────────────────────── */
  .info_cards_container {
    padding: 40px 40px;
  }

  .payment_info + .payment_info {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* ── Phone — tablet ──────────────────────────────────── */
  .phone {
    margin: 0 24px;
  }

  .phone_inner {
    padding: 50px 40px 0px;
    gap: 24px;
  }

  .phone_transactions {
    max-width: 360px;
  }

  .phone_tx_logo {
    width: 38px;
    height: 38px;
  }

  /* ── Join — tablet ─────────────────────────────────── */

  .join_item {
    grid-template-columns: 140px 1fr;
  }

  .map {
    margin: 0px -24px;
  }
  .online {
    margin: 0px -24px;
}

/* ── Mobile (≤ 767px) ────────────────────────────────────── */
@media (max-width: 767px) {
  .header_desktop {
    display: none;
  }
  main {
    padding: 0px 16px;
  }

  .header_mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    width: 100%;
    height: 60px;
    background: #fff;
  }

  .header_mobile .logo-rating {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .header_mobile .logo-rating img {
    height: 28px;
    width: auto;
  }
  .red_button {
    width: 100%;
  }

  .rating-text {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .rating-text img {
    width: 16px;
    height: 16px;
  }

  .burger-btn {
    display: flex;
  }

  /* ── Mobile menu overlay ────────────────────────── */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    /* hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
  }
  .mobile-menu.is-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  /* header row inside menu */
  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 28px;
  }

  .mobile-logo-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-logo-wrap img {
    height: 28px;
    width: auto;
  }

  .mobile-brand {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
  }

  .mobile-rating {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .mobile-rating img {
    width: 16px;
    height: 16px;
  }

  .close-menu {
    font-size: 1.6rem;
    line-height: 1;
    color: #222;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  /* nav items */
  .mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1;
  }

  .mobile-menu-nav a {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }

  .mobile-menu-nav a img {
    width: 18px;
    height: 18px;
  }

  /* ── Hero — mobile ──────────────────────────────────────── */
  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 16px 40px;
    min-height: fit-content;
    background-size: cover;
    gap: 32px;
  }

  .left_part {
    max-width: 100%;
  }

  .left_part h1 {
    font-size: 1.4rem;
  }

  .left_part > p {
    font-size: 0.95rem;
  }

  .hero_input,
  .hero_phone_wrap,
  .hero_submit {
    height: 52px;
  }

  .hero_submit {
    font-size: 1rem;
  }

  /* ── Infinite scroll cards — mobile (scroll LEFT) ────── */
  .infiniti_cards_scroll {
    width: 100%;
    height: 280px;
    max-height: 280px;
    min-height: unset;
    /* fade on left/right edges */
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      #000 6%,
      #000 94%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      #000 6%,
      #000 94%,
      transparent 100%
    );
  }

  /* JS requestAnimationFrame scroll — no CSS animation */
  .cards_track {
    display: flex;
    flex-direction: row;
    animation: none;
    will-change: transform;
  }

  .people_card {
    width: 200px;
    flex-shrink: 0;
    gap: 11px;
    padding: 11px;
  }

  .people_card img {
    height: 170px;
  }

  .people_card_badge span {
    font-size: 0.8rem;
  }

  .people_card_info {
    font-size: 0.72rem;
  }

  .article h1 {
    text-align: center;
  }

  /* ── Join — mobile ──────────────────────────────────── */

  .join_header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 32px;
  }

  .join_desc {
    max-width: 100%;
    align-self: auto;
  }

  .join_title {
    font-size: 38px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.76px;
  }
  .join_inner {
    padding: 24px;
  }
  .join_item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .join_num {
    font-size: 2rem;
  }

  .join_text {
    font-size: 1rem;
  }

  /* footer row: text + timer pill */
  .mobile-menu-footer {
    margin-top: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    gap: 12px;
  }

  .mobile-menu-footer p {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
    flex: 1;
  }

  .mobile-menu-footer .timer {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
  }

  .info_cards_container {
    flex-direction: column;
    padding: 36px 16px;
    gap: 28px;
  }

  .payment_info {
    width: 100%;
    padding-right: 0 !important;
    padding-left: 0 !important;
    border-left: none !important;
    padding-bottom: 28px;
    gap: 8px;
  }

  .payment_info p {
    max-width: 100%;
  }

  /* ── Phone — mobile ───────────────────────────────────── */
  .phone {
    margin: 0;
    border-radius: 12px;
  }

  .phone_inner {
    flex-direction: column;
    align-items: center;
    padding: 36px 16px 0;
    gap: 24px;
  }

  .phone_transactions {
    width: 100%;
    max-width: 100%;
    padding-bottom: 0;
  }

  .phone_image_wrap {
    order: 2;
    margin-top: 0;
    width: 100%;
    justify-content: center;
  }

  .phone_img {
    width: clamp(200px, 70vw, 300px);
  }

  .phone_tx {
    padding: 12px 14px;
  }

  .phone_tx_logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .phone_tx_title {
    font-size: 0.82rem;
  }

  .phone_tx_sub {
    font-size: 0.72rem;
  }

  .phone_tx_amount {
    font-size: 0.88rem;
  }

  .map {
    margin: 0px -16px;
  }
  /* online section */
  .online {
    margin: 0px -16px;
  }
  .online_grid {
    grid-template-columns: 1fr;
  }

  .online_title {
    font-size: 1.3rem;
  }

  .online_btn {
    min-width: 0;
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
  }

  /* ── Form section — mobile ────────────────────────────────── */
  .formaa {
    padding: 48px 16px;
  }

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

  .fq_title {
    font-size: 1.25rem;
  }

  .fq_slots {
    font-size: 0.88rem;
  }

  /* ── Form: age + contacts — mobile ───────────────────────── */
  .fq_age,
  .fq_form_wrap {
    padding: 22px 16px;
  }

  .fq_age_title {
    font-size: 1.2rem;
  }

  .fq_age_btns {
    flex-direction: column;
    gap: 12px;
  }

  .fq_age_btn {
    height: auto;
    padding: 16px 20px;
    font-size: 1rem;
  }

  .fq_input {
    height: 52px;
    font-size: 0.95rem;
  }

  .fq_phone_field,
  .fq_phone_prefix {
    height: 52px;
  }

  .fq_input--phone {
    height: 50px;
  }

  .fq_submit {
    height: 56px;
    font-size: 1.05rem;
  }

  /* ── Footer — mobile ─────────────────────────────────────── */
  .site-footer {
    padding: 40px 20px 28px;
  }

  .footer_top {
    flex-direction: column;
    gap: 28px;
  }

  .footer_logo {
    justify-content: flex-start;
  }

  .footer_col {
    gap: 12px;
  }

  .footer_col_title {
    font-size: 1.05rem;
  }

  .footer_link,
  .footer_address {
    font-size: 0.9rem;
  }

  .footer_divider {
    margin: 28px 0 18px;
  }

  /* ── Comments — mobile ──────────────────────────────────── */
  .comments {
    padding: 40px 16px 60px;
  }

  .comments_title {
    font-size: 1.6rem;
  }

  .comments_header {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .comments_subheader {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .comment_card {
    gap: 12px;
    padding: 16px;
  }

  .comment_avatar,
  .comment_avatar_initials {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  .comment_top {
    flex-direction: row;
  }

  .comment_author {
    gap: 4px;
  }

  .comment_phone {
    font-size: 0.78rem;
  }
}
