/*
 * eastlabor.com smartphone layout
 * Desktop styling remains in style.css. This file activates automatically
 * for narrow screens and coarse-pointer mobile/tablet devices.
 */

.mobile-menu-toggle,
.mobile-drawer,
.mobile-drawer-backdrop,
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) and (max-width: 1180px) {
  :root {
    --header-h: 66px;
    --radius-lg: 22px;
    --radius-md: 16px;
  }

  html {
    overflow-x: hidden;
    scroll-padding-top: 78px;
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-width: 0 !important;
    width: 100%;
    overflow-x: hidden;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
    line-height: 1.7;
  }

  body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  .container {
    width: min(100% - 32px, 720px);
  }

  .section {
    padding: 64px 0;
  }

  .section--tight {
    padding: 48px 0;
  }

  .section-head {
    display: block;
    margin-bottom: 32px;
  }

  .section-head__copy,
  .section-lead {
    max-width: none;
  }

  .section-title,
  body.lang-en .section-title,
  body.lang-vi .section-title,
  body.lang-id .section-title {
    margin-top: 9px;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.38;
  }

  .section-lead {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.85;
  }

  .eyebrow {
    gap: 9px;
    font-size: 10px;
    letter-spacing: .14em;
  }

  .eyebrow::before {
    width: 22px;
  }

  .btn {
    min-height: 52px;
    padding-inline: 22px;
    font-size: 14px;
  }

  /* Top language bar */
  .utility-bar {
    height: 40px;
  }

  .utility-inner {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    justify-content: flex-end;
    gap: 0;
  }

  .utility-title,
  .utility-copy {
    display: none;
  }

  .language-select {
    width: 100%;
    justify-content: flex-end;
  }

  .language-select select {
    width: min(190px, calc(100vw - 50px));
    height: 30px;
    min-width: 0;
    font-size: 12px;
    text-align: left;
  }

  /* Mobile header */
  .site-header {
    height: 66px;
  }

  .header-inner {
    width: 100%;
    padding: 0 14px;
    gap: 12px;
  }

  .site-logo {
    width: 170px;
    max-width: calc(100vw - 84px);
  }

  .site-logo img {
    height: 50px;
  }

  .global-nav,
  .header-cta {
    display: none;
  }

  .mobile-menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(11,35,68,.14);
    border-radius: 13px;
    color: var(--navy);
    background: #fff;
    box-shadow: 0 5px 16px rgba(11,35,68,.08);
  }

  .mobile-menu-toggle__lines,
  .mobile-menu-toggle__lines::before,
  .mobile-menu-toggle__lines::after {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .25s var(--ease), opacity .25s var(--ease);
  }

  .mobile-menu-toggle__lines {
    position: relative;
  }

  .mobile-menu-toggle__lines::before,
  .mobile-menu-toggle__lines::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .mobile-menu-toggle__lines::before { top: -7px; }
  .mobile-menu-toggle__lines::after { top: 7px; }

  .mobile-menu-open .mobile-menu-toggle__lines {
    background: transparent;
  }

  .mobile-menu-open .mobile-menu-toggle__lines::before {
    top: 0;
    transform: rotate(45deg);
  }

  .mobile-menu-open .mobile-menu-toggle__lines::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 990;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(3,15,32,.48);
    transition: opacity .28s var(--ease), visibility .28s;
  }

  .mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: min(86vw, 360px);
    padding: max(18px, env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: -18px 0 50px rgba(3,15,32,.20);
    transform: translateX(104%);
    transition: transform .32s var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-menu-open .mobile-drawer {
    transform: translateX(0);
  }

  .mobile-menu-open .mobile-drawer-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .mobile-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-drawer__logo {
    width: 180px;
  }

  .mobile-drawer__close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--navy);
    background: #fff;
    font-size: 26px;
    line-height: 1;
  }

  .mobile-drawer__nav {
    margin-top: 18px;
  }

  .mobile-drawer__nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-drawer__nav li {
    border-bottom: 1px solid var(--line);
  }

  .mobile-drawer__nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 10px 32px 10px 4px;
    color: var(--navy);
    font-size: 15px;
    font-weight: 800;
  }

  .mobile-drawer__nav a::after {
    content: "→";
    position: absolute;
    right: 6px;
    color: var(--red);
    font-size: 18px;
  }

  .mobile-drawer__nav a.is-active {
    color: var(--red);
  }

  .mobile-drawer__cta {
    width: 100%;
    margin-top: 24px;
  }

  .mobile-drawer__note {
    margin: auto 0 0;
    padding-top: 24px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
  }

  /* Bottom touch navigation */
  .mobile-bottom-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 950;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(11,35,68,.10);
    background: rgba(255,255,255,.96);
    box-shadow: 0 -12px 30px rgba(11,35,68,.10);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-bar__menu {
    display: grid;
    place-items: center;
    min-height: 52px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--navy);
    background: #fff;
    font-size: 11px;
    font-weight: 900;
  }

  .mobile-bottom-bar__menu::before {
    content: "☰";
    display: block;
    margin-bottom: -6px;
    font-size: 20px;
    line-height: 1;
  }

  .mobile-bottom-bar .btn {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(233,39,50,.22);
  }

  /* Home language chooser */
  .home-language-panel__inner {
    display: block;
    min-height: 0;
    padding: 18px 0 20px;
  }

  .home-language-copy {
    margin-bottom: 13px;
  }

  .home-language-copy strong {
    font-size: 15px;
  }

  .home-language-copy span {
    margin-top: 2px;
    font-size: 11px;
  }

  .home-language-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-language-link {
    width: 100%;
    min-height: 40px;
    padding: 5px 8px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }

  /* Home hero */
  .hero {
    min-height: 0;
  }

  .hero::before,
  .hero::after {
    opacity: .55;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 52px 0 58px;
  }

  .hero-copy h1,
  body.lang-en .hero-copy h1,
  body.lang-vi .hero-copy h1,
  body.lang-id .hero-copy h1,
  body.lang-ko .hero-copy h1,
  body.lang-zh .hero-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(34px, 10vw, 43px);
    line-height: 1.28;
    overflow-wrap: anywhere;
  }

  .hero-copy__lead {
    font-size: 15px;
    line-height: 1.9;
  }

  .success-fee-highlight,
  .success-fee-highlight--hero,
  .success-fee-highlight--fees {
    width: 100%;
    max-width: none;
    padding: 17px 18px;
    justify-content: flex-start;
  }

  .success-fee-highlight strong,
  .success-fee-highlight--fees strong {
    font-size: 21px;
  }

  .success-fee-highlight div > span,
  .success-fee-highlight--fees div > span {
    font-size: 12px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 28px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-notes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 26px;
    font-size: 11px;
  }

  .hero-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
  }

  .hero-emblem {
    grid-column: 1 / -1;
    width: 220px;
    margin: 0 auto 2px;
  }

  .hero-stat-card {
    position: static;
    width: auto;
    min-width: 0;
    padding: 12px 8px;
    text-align: center;
    border-radius: 13px;
  }

  .hero-stat-card strong {
    font-size: 15px;
    line-height: 1.3;
  }

  .hero-stat-card span {
    font-size: 8px;
    line-height: 1.4;
  }

  /* Cards and grids */
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-item,
  .trust-item:last-child {
    min-width: 0;
    padding: 18px 12px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .trust-item:nth-child(2n) {
    border-right: 0;
  }

  .trust-item:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .trust-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
  }

  .trust-item strong {
    font-size: 12px;
    line-height: 1.45;
  }

  .trust-item small {
    display: none;
  }

  .card-grid,
  .case-grid,
  .feature-banner,
  .requirement-grid,
  .docs-grid,
  .price-layout,
  .caution-grid,
  .contact-layout,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .case-grid,
  .requirement-grid,
  .price-layout {
    gap: 16px;
  }

  .info-card,
  .requirement-card {
    min-height: 0;
    padding: 26px 24px;
  }

  .info-card h3 {
    margin-top: 20px;
  }

  .eligibility-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 16px;
  }

  .eligibility-item {
    min-height: 150px;
    padding: 20px 16px;
  }

  .eligibility-item strong {
    margin-top: 12px;
    font-size: 13px;
  }

  .case-card {
    padding: 26px 22px;
  }

  .case-card__top {
    align-items: flex-start;
  }

  .case-benefit-amount {
    padding: 16px;
  }

  .case-card__type {
    font-size: clamp(23px, 7.2vw, 30px);
  }

  .case-card h3 {
    font-size: 22px;
  }

  .case-total {
    gap: 12px;
    padding: 18px;
    align-items: flex-end;
  }

  .case-total strong {
    font-size: clamp(27px, 8vw, 35px);
    text-align: right;
    overflow-wrap: anywhere;
  }

  .tax-refund-note {
    padding: 17px 18px;
    font-size: 12px;
  }

  /* CTA bands */
  .cta-band {
    padding: 52px 0;
  }

  .cta-band-grid {
    display: block;
  }

  .cta-band h2 {
    font-size: 29px;
    line-height: 1.45;
  }

  .cta-band p {
    font-size: 13px;
    line-height: 1.8;
  }

  .cta-band-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 24px;
  }

  .cta-band-actions .btn {
    width: 100%;
  }

  /* Inner-page hero */
  .page-hero {
    padding: 48px 0 44px;
  }

  .page-hero::after {
    right: -150px;
  }

  .breadcrumb {
    margin-bottom: 22px;
  }

  .page-hero-grid {
    display: block;
  }

  .page-hero h1 {
    font-size: clamp(32px, 9vw, 40px);
    overflow-wrap: anywhere;
  }

  .page-hero h1 small {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.6;
  }

  .page-hero__lead {
    max-width: none;
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.85;
  }

  .feature-banner {
    gap: 14px;
  }

  .feature-banner__main,
  .feature-banner__side {
    padding: 30px 24px;
  }

  .feature-banner__main strong,
  .feature-banner__side strong {
    font-size: 35px;
  }

  .requirement-card h3 {
    margin-top: 20px;
  }

  /* Tables and tabs */
  .pension-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .tab-btn {
    width: 100%;
    padding: 12px 10px;
  }

  .formula-box {
    display: block;
    padding: 24px 20px;
  }

  .formula-box strong {
    display: block;
    font-size: 20px;
    line-height: 1.65;
  }

  .formula-box span {
    display: block;
    margin-top: 10px;
    line-height: 1.6;
  }

  .data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .data-table {
    min-width: 820px;
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 14px 12px;
  }

  .note-box {
    padding: 18px;
    font-size: 12px;
  }

  /* Workflow timeline */
  .timeline::before {
    left: 25px;
    top: 28px;
    bottom: 28px;
  }

  .timeline-item {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 0;
    margin-bottom: 18px;
    align-items: start;
  }

  .timeline-item__dot {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 44px;
    height: 44px;
    margin-top: 14px;
    font-size: 12px;
    box-shadow: 0 0 0 6px #fff;
  }

  .timeline-item__card,
  .timeline-item:nth-child(odd) .timeline-item__card,
  .timeline-item:nth-child(even) .timeline-item__card {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0;
    padding: 22px 20px;
  }

  .timeline-item__card h3 {
    font-size: 17px;
  }

  .timeline-item__card p {
    font-size: 12px;
  }

  .docs-grid {
    gap: 10px;
  }

  .doc-item {
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    gap: 12px;
    padding: 17px 16px;
  }

  .doc-item strong {
    font-size: 13px;
    line-height: 1.55;
  }

  /* Pricing and calculator */
  .success-fee-highlight--fees {
    margin-bottom: 24px;
  }

  .price-card,
  .calc-box {
    padding: 26px 22px;
  }

  .price-card__value {
    font-size: clamp(29px, 8vw, 38px);
    overflow-wrap: anywhere;
  }

  .calc-box {
    position: static;
    top: auto;
  }

  .calc-box h3 {
    font-size: 25px;
  }

  .calc-box__lead {
    font-size: 16px;
    line-height: 1.7;
  }

  .calc-input-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .calc-input-grid .form-control {
    height: 58px;
    font-size: 18px;
  }

  .calc-estimate {
    padding: 18px;
  }

  .calc-estimate strong {
    font-size: clamp(31px, 10vw, 42px);
    overflow-wrap: anywhere;
  }

  .calc-line--balance {
    gap: 10px;
  }

  .calc-line--balance strong {
    font-size: clamp(25px, 8vw, 33px);
    text-align: right;
  }

  .caution-card {
    padding: 23px 21px;
  }

  /* Contact form and FAQ */
  .contact-layout {
    gap: 26px;
  }

  .contact-info {
    position: static;
  }

  .contact-info h2 {
    font-size: 30px;
  }

  .contact-form {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .contact-form .section-head {
    margin-bottom: 24px !important;
  }

  .contact-form .section-title {
    font-size: 28px !important;
  }

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

  .form-row--full {
    grid-column: auto;
  }

  .contact-form .form-control {
    height: 56px;
    font-size: 16px;
  }

  .contact-form textarea.form-control {
    height: 150px;
  }

  .contact-form > .btn {
    width: 100%;
    margin-top: 4px;
  }

  .faq-q {
    grid-template-columns: 42px minmax(0, 1fr) 24px;
    gap: 10px;
    padding: 19px 0;
    font-size: 13px;
    line-height: 1.65;
  }

  .faq-q__mark {
    width: 36px;
    height: 36px;
  }

  .faq-a p {
    margin: 0 0 20px 52px;
    font-size: 12px;
  }

  /* Footer */
  .site-footer {
    padding: 50px 0 28px;
  }

  .footer-top {
    gap: 34px;
    padding-bottom: 34px;
  }

  .footer-brand img {
    width: 210px;
  }

  .footer-brand p {
    max-width: none;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 14px;
  }

  .footer-nav li + li {
    margin-top: 0;
  }

  .footer-info div {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .footer-bottom {
    display: block;
    line-height: 1.8;
  }

  .footer-bottom span {
    display: block;
  }

  /* Submission dialog */
  .modal {
    padding: 18px 14px calc(96px + env(safe-area-inset-bottom));
  }

  .modal-card {
    width: min(360px, 100%);
    padding: 24px 20px;
  }

  .modal--compact {
    place-items: center;
    padding: 18px 14px calc(96px + env(safe-area-inset-bottom));
  }

  .modal--compact .modal-card {
    width: min(330px, 100%);
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 24px);
  }

  .header-inner {
    padding-inline: 10px;
  }

  .site-logo {
    width: 156px;
  }

  .home-language-links {
    gap: 7px;
  }

  .hero-copy h1,
  body.lang-en .hero-copy h1,
  body.lang-vi .hero-copy h1,
  body.lang-id .hero-copy h1,
  body.lang-ko .hero-copy h1,
  body.lang-zh .hero-copy h1 {
    font-size: 33px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-stat-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    text-align: left;
  }

  .hero-stat-card span:last-child {
    text-align: right;
  }

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

  .trust-item,
  .trust-item:nth-child(2n),
  .trust-item:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-item:last-child {
    border-bottom: 0;
  }

  .eligibility-strip {
    grid-template-columns: 1fr;
  }

  .eligibility-item {
    min-height: 0;
  }

  .case-total,
  .calc-line--balance {
    display: block;
  }

  .case-total strong,
  .calc-line--balance strong {
    display: block;
    margin-top: 9px;
    text-align: left;
  }

  .mobile-bottom-bar {
    grid-template-columns: 64px 1fr;
    padding-inline: 9px;
  }
}
