/*
 * MOA v38 mobile home refinements.
 * Desktop rules are explicitly restored at 1024px so the existing PC header
 * and desktop layout remain unchanged.
 */
.brand-mobile,
.mobile-header-actions {
  display: none;
}

.live-projects {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.live-project {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  text-align: left;
}

.live-project-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8e8e2;
}

.live-project-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .25s ease;
}

.live-project:hover .live-project-photo img {
  transform: scale(1.025);
}

.live-project-photo em {
  position: absolute;
  top: 10px;
  left: 10px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(20, 22, 28, .74);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.live-project-body {
  padding: 13px 14px 15px;
}

.live-project-body small,
.live-project-body b,
.live-project-body span {
  min-width: 0;
}

.live-project-body b {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.live-project-body span {
  line-height: 1.55;
}

@media (max-width: 1023px) {
  .header {
    padding: 0 14px 0 16px;
  }

  .header .brand {
    min-width: 0;
  }

  .header .brand span,
  .header .brand-desktop,
  .header > .header-actions {
    display: none;
  }

  .header .brand-mobile {
    display: block;
    font-size: 20px;
    letter-spacing: -1px;
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .mobile-header-actions button {
    border: 0;
    background: transparent;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .15px;
  }

  .mobile-login,
  .mobile-my {
    padding: 10px 5px;
    color: #17191e;
  }

  .mobile-signup {
    padding: 10px 8px;
    border-radius: 9px !important;
    background: var(--blue) !important;
    color: #fff;
  }

  .mobile-menu {
    width: 38px;
    height: 38px;
    padding: 10px 9px;
    border: 1px solid var(--line) !important;
    border-radius: 11px !important;
    background: #fff !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .mobile-menu span {
    width: 100%;
    height: 1.5px;
    border-radius: 99px;
    background: #111318;
  }

  #homeView .arrow {
    display: none;
  }

  #homeView > .trust,
  #homeView > .search {
    display: none;
  }

  #homeView .project-category-grid > .category {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  #homeView .expert-info {
    display: flex;
    flex-direction: column;
  }

  #homeView .expert-job {
    order: 1;
    margin-top: 0;
    margin-bottom: 6px;
  }

  #homeView .expert-name {
    order: 2;
  }

  #homeView .expert-status {
    order: 3;
  }

  #homeView .live-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #homeView .live-project {
    border-radius: 16px;
  }

  #homeView .live-project-photo {
    aspect-ratio: 1 / 1;
  }

  #homeView .live-project-body {
    padding: 11px 11px 13px;
  }

  #homeView .live-project-body small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #homeView .live-project-body b {
    min-height: 2.8em;
    font-size: 12px;
  }

  #homeView .live-project-body span {
    font-size: 8px;
  }

  /* v69 mobile main layout: reference styling only; data and actions stay intact. */
  .app:has(#homeView.active) .mobile-my {
    padding: 10px 7px;
    font-size: 17px;
    font-weight: 950;
  }

  .app:has(#homeView.active) .mobile-menu {
    display: none;
  }

  #homeView {
    width: calc(100% + 32px);
    margin-inline: -16px;
  }

  #homeView .hero {
    margin: 0 0 14px;
    border-radius: 0;
    box-shadow: none;
  }

  #homeView .dots {
    margin: 12px 0 19px;
  }

  #homeView .v2-cta {
    margin: 0;
    padding: 20px;
    border-radius: 0;
    align-items: center;
    flex-direction: row;
  }

  #homeView .v2-cta strong {
    font-size: 15px;
  }

  #homeView .v2-cta-actions {
    width: auto;
    min-width: 110px;
    flex: 0 0 110px;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  #homeView .v2-cta button {
    width: 100%;
    padding: 10px 8px;
  }

  #homeView .section > .head {
    padding-inline: 16px;
  }

  #homeView .head .sub {
    font-size: 14px;
    line-height: 1.45;
  }

  #homeView .project-category-grid {
    gap: 0;
  }

  #homeView .project-category-grid > .category {
    border-radius: 0;
  }

  #homeView .popular-rail {
    gap: 0;
  }

  #homeView .popular-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #homeView .popular-photo {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  #homeView .popular-body {
    padding: 12px 13px;
  }

  #homeView .popular-body span {
    font-size: 14px;
    line-height: 1.45;
  }

  #homeView .collab-home-banner {
    margin: 28px 0;
    border-radius: 0;
  }

  #homeView .collab-home-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    align-items: center;
    column-gap: 16px;
  }

  #homeView .collab-home-copy small,
  #homeView .collab-home-copy p {
    grid-column: 1 / -1;
  }

  #homeView .collab-home-copy h2 {
    grid-column: 1;
  }

  #homeView .collab-home-copy button {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  #homeView .collab-home-copy p {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 700;
  }

  #homeView #homeVerifiedExperts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
  }

  #homeView #homeVerifiedExperts .expert {
    min-width: 0;
    border: 0;
    border-radius: 0;
  }

  #homeView #homeVerifiedExperts .expert-img {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  #homeView .team,
  #homeView .live-projects {
    margin-inline: 16px;
  }

  #homeView .how {
    gap: 1px;
    background: var(--line);
  }

  #homeView .how .step {
    min-height: 124px;
    padding: 13px 10px;
    border: 0;
    border-radius: 0;
  }

  #homeView .how .num {
    margin-bottom: 13px;
  }

  #homeView .how .step b {
    line-height: 1.35;
  }

  #homeView .how .step p {
    line-height: 1.45;
  }
}

@media (max-width: 360px) {
  .header .brand-mobile {
    font-size: 18px;
  }

  .mobile-header-actions {
    gap: 3px;
  }

  .mobile-header-actions button {
    font-size: 8px;
  }

  .mobile-menu {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 1024px) {
  .header .brand-mobile,
  .mobile-header-actions {
    display: none;
  }

  .header .brand-desktop {
    display: block;
  }
}
