/*
  Mobile homepage alignment with indorispace_FRONTEND_POLISHED_V11.
  Scope is intentionally limited to the homepage main UI.
  Header/hamburger navigation and footer styles are not touched.
*/

/* Header and hamburger navigation intentionally use the original site styles. */

@media (max-width: 720px) {
  /* V11 uses 16px side gutters on the mobile homepage. Footer intentionally excluded. */
  body[data-page="index.html"] main .container {
    width: calc(100% - 32px) !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body[data-page="index.html"] main .section {
    padding-top: 58px !important;
    padding-bottom: 58px !important;
  }

  /* Typography scale / vertical rhythm from V11. */
  body[data-page="index.html"] main h1 {
    line-height: 1.10 !important;
  }

  body[data-page="index.html"] main h2 {
    line-height: 1.16 !important;
  }

  body[data-page="index.html"] main h3 {
    line-height: 1.26 !important;
  }

  body[data-page="index.html"] main p {
    line-height: 1.65 !important;
  }

  body[data-page="index.html"] main .eyebrow,
  body[data-page="index.html"] main .section-head .eyebrow {
    margin-bottom: 16px !important;
  }

  body[data-page="index.html"] main .section-head {
    display: block !important;
    align-items: start !important;
    margin-bottom: 30px !important;
  }

  body[data-page="index.html"] main .section-head h2 {
    max-width: 100% !important;
    font-size: clamp(1.8rem, 7.7vw, 2.6rem) !important;
  }

  body[data-page="index.html"] main .section-head p {
    margin-top: 14px !important;
  }

  body[data-page="index.html"] main .section-head > .btn {
    margin-top: 18px !important;
  }

  /* Hero geometry and responsive spacing from V11. */
  body[data-page="index.html"] main .hero {
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    padding-top: 104px !important;
    overflow: visible !important;
  }

  body[data-page="index.html"] main .hero-content {
    position: relative !important;
  }

  body[data-page="index.html"] main .hero h1 {
    font-size: clamp(2.4rem, 9.3vw, 3.4rem) !important;
    line-height: 1.10 !important;
    letter-spacing: -0.045em !important;
  }

  /* Current markup wraps the final phrase in <em>; V11 displayed one uniform H1 treatment. */
  body[data-page="index.html"] main .hero h1 em {
    display: inline !important;
    color: inherit !important;
    font: inherit !important;
    letter-spacing: inherit !important;
  }

  body[data-page="index.html"] main .hero-content > p {
    font-size: 1rem !important;
    line-height: 1.70 !important;
  }

  body[data-page="index.html"] main .hero-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 0 !important;
  }

  body[data-page="index.html"] main .hero-buttons .btn {
    width: 100% !important;
  }

  body[data-page="index.html"] main .hero-search-wrap {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    transform: none !important;
    width: calc(100% - 32px) !important;
    margin: 26px auto 0 !important;
    z-index: 520 !important;
  }

  body[data-page="index.html"] main .hero-search {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 18px !important;
    border-radius: 24px !important;
    overflow: visible !important;
  }

  body[data-page="index.html"] main .hero-search > label {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body[data-page="index.html"] main .hero-search > label:first-child {
    grid-column: 1 / -1 !important;
  }

  body[data-page="index.html"] main .hero-search > label > span {
    margin-bottom: 0 !important;
    font-size: .70rem !important;
    line-height: 1.4 !important;
    letter-spacing: .05em !important;
  }

  body[data-page="index.html"] main .hero-search > button[type="submit"] {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 58px !important;
    margin: 0 !important;
  }

  /* Current site keeps its custom dropdown functionality; make the visible control use V11 mobile proportions. */
  body[data-page="index.html"] main .hero-search .premium-select {
    margin-top: 7px !important;
    min-width: 0 !important;
  }

  body[data-page="index.html"] main .hero-search .premium-select-trigger {
    min-height: 46px !important;
    padding: 9px 30px 9px 10px !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    background: #f8fbf9 !important;
    color: var(--forest) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
  }

  body[data-page="index.html"] main .hero-search .premium-select-trigger .premium-select-chevron {
    right: 7px !important;
  }

  body[data-page="index.html"] main .hero-search .premium-select-menu {
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: 240px !important;
  }

  /* V11 compact mobile grids / cards. */
  body[data-page="index.html"] main .property-grid {
    gap: 24px !important;
  }

  body[data-page="index.html"] main .property-body {
    padding: 20px !important;
  }

  body[data-page="index.html"] main .property-card .property-image {
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

  body[data-page="index.html"] main .property-card .property-image img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
  }

  body[data-page="index.html"] main .location-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-page="index.html"] main .location-card,
  body[data-page="index.html"] main .location-card.large {
    grid-column: auto !important;
    min-height: 300px !important;
  }

  body[data-page="index.html"] main .location-card em {
    font-size: .9rem !important;
  }

  body[data-page="index.html"] main .feature-grid,
  body[data-page="index.html"] main .feature-grid.compact,
  body[data-page="index.html"] main .timeline {
    grid-template-columns: 1fr !important;
  }

  body[data-page="index.html"] main .timeline::before {
    display: none !important;
  }

  body[data-page="index.html"] main .timeline article {
    min-height: 75px !important;
    padding: 0 0 0 68px !important;
  }

  body[data-page="index.html"] main .timeline article > span {
    top: 0 !important;
  }

  /* Homepage card carousels exactly follow the V11 mobile one-card viewport behavior. */
  body[data-page="index.html"] main .mobile-card-carousel {
    display: flex !important;
    gap: 20px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: thin !important;
    padding: 4px 0 14px !important;
    max-width: 100% !important;
    align-items: stretch !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page="index.html"] main .mobile-card-carousel > * {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: start !important;
    height: auto !important;
  }

  body[data-page="index.html"] main .mobile-card-carousel > .location-card {
    height: 320px !important;
    min-height: 320px !important;
  }

  body[data-page="index.html"] main .mobile-card-controls {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 18px !important;
    padding-top: 14px !important;
  }

  body[data-page="index.html"] main .mobile-card-controls button {
    width: 44px !important;
    height: 44px !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid var(--border) !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--forest) !important;
    padding: 0 !important;
  }

  body[data-page="index.html"] main .mobile-card-controls span {
    color: var(--muted) !important;
    font-size: .85rem !important;
  }

  /* V11 button proportions. */
  body[data-page="index.html"] main .btn {
    min-height: 48px !important;
    padding: 12px 19px !important;
    font-size: .9rem !important;
    line-height: 1.45 !important;
  }

  /* Keep the final CTA's V11 mobile card proportion while leaving footer untouched. */
  body[data-page="index.html"] main .final-cta {
    max-width: calc(100% - 32px) !important;
  }
}

@media (max-width: 600px) {
  body[data-page="index.html"] main .testimonials .section-head {
    text-align: left !important;
    justify-content: flex-start !important;
  }

  body[data-page="index.html"] main .testimonials .section-head > div,
  body[data-page="index.html"] main .testimonials .section-head h2,
  body[data-page="index.html"] main .testimonials .section-head p {
    margin-inline: 0 !important;
  }

  body[data-page="index.html"] main .testimonial-card {
    text-align: left !important;
    padding: 28px 22px !important;
    border-radius: 22px !important;
  }

  body[data-page="index.html"] main .testimonial-card > .icon,
  body[data-page="index.html"] main .testimonial-card blockquote {
    margin-inline: 0 !important;
  }

  body[data-page="index.html"] main .carousel-actions {
    justify-content: flex-start !important;
  }
}

@media (max-width: 450px) {
  body[data-page="index.html"] main .hero-search-wrap {
    width: calc(100% - 32px) !important;
    margin-top: 26px !important;
  }
}

/* Desktop/tablet homepage and the complete footer remain governed by the existing site styles. */
@media (min-width: 721px) {
  body[data-page="index.html"] main .mobile-card-controls {
    display: none !important;
  }
}
