/*
 ATHENA MOBILE V1.1
 Responsive homepage correction
 Desktop unchanged
*/

@media screen and (max-width: 700px) {

  /* Prevent width overflow in the homepage */
  .athena5-home,
  .athena5-content {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .athena5-content {
    padding: 0 12px 24px !important;
  }

  /* Mobile hero: portrait above readable content */
  .athena5-home .athena5-hero {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 18px rgba(8,35,75,.10);
    isolation: isolate;
  }

  /* Existing hero image becomes a distinct banner */
  .athena5-home .athena5-hero::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    height: 190px !important;
    background-image:
      url("/assets/images/athena-goddess-hero-exact.png")
      !important;
    background-size: cover !important;
    background-position: center 27% !important;
    background-repeat: no-repeat !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  /* Restrict any old image overlay to banner only */
  .athena5-home .athena5-hero::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    height: 190px !important;
    background: linear-gradient(
      180deg,
      rgba(5,26,58,.06),
      rgba(5,26,58,.02)
    ) !important;
    pointer-events: none !important;
    z-index: 1 !important;
  }

  /* Content begins after image, not over it */
  .athena5-home .athena5-hero-left {
    position: relative !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 210px 16px 18px !important;
    background: transparent !important;
    color: #102b50 !important;
  }

  /* Title suitable for a narrow phone */
  .athena5-home .athena5-title {
    font-size: clamp(28px, 8vw, 34px) !important;
    font-weight: 700 !important;
    line-height: 1.12 !important;
    letter-spacing: -.025em !important;
    color: #102b50 !important;
    max-width: 100% !important;
    overflow-wrap: normal !important;
    text-shadow: none !important;
  }

  /* Descriptions remain legible */
  .athena5-home .athena5-hero-left p {
    max-width: 100% !important;
    color: #405875 !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    text-shadow: none !important;
  }

  /* Main ask control remains within viewport */
  .athena5-home .athena5-ask {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .athena5-home .athena5-ask input,
  .athena5-home .athena5-ask textarea {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 16px !important;
  }

  /* Preserve the right panel without viewport overflow */
  .athena5-home .athena5-hero-right {
    position: relative !important;
    z-index: 2 !important;
    display: flex !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 16px 16px !important;
    background: #ffffff !important;
  }

  /* Move the existing mobile menu to the right */
  .athena-responsive-menu-toggle {
    left: auto !important;
    right: 12px !important;
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
  }

  /* Maintain usable touch control sizes */
  .athena5-home button,
  .athena5-home select {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Avoid images forcing horizontal scrolling */
  .athena5-home img,
  .athena5-home video {
    max-width: 100% !important;
  }
}

@media screen and (max-width: 360px) {
  .athena5-home .athena5-hero-left {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .athena5-home .athena5-title {
    font-size: 28px !important;
  }

  .athena5-home .athena5-hero::before,
  .athena5-home .athena5-hero::after {
    height: 170px !important;
  }

  .athena5-home .athena5-hero-left {
    padding-top: 190px !important;
  }
}
