/* ==== HOME PAGE ==== */

/* Tweaks for mobile */
@media (max-width: 767px) {
  /* Section containers */
  .hp-homepage-details-section,
  .hp-homepage-details-section-fullwidth_code {
    position: relative;
    width: 100%;
    height: auto !important;
    min-height: 63vh !important;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  /* Image container */
  #hp-bg-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 63vh;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
  }

  /* Background image */
  .hp-homepage-hero-bg {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center center;
    transform-origin: center top;
    -webkit-tap-highlight-color: transparent;
  }

  /* Overlay — stripped of box styling */
  .hp-homepage-hero-overlay {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: auto;
    max-width: 75%;
    padding: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
  }

  .hp-homepage-hero-overlay h1 {
    font-size: 1rem;
    margin: 0 0 0.2rem 0;
    padding: 0;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    background: none !important;
  }

  .hp-homepage-hero-overlay p {
    font-size: 0.85rem;
    margin: 0;
    padding: 0;
    color: #ddd;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    background: none !important;
  }

  .hp-homepage-hero-logo {
    max-width: 60px !important;
    height: auto !important;
    margin-bottom: 0.5rem !important;
  }

  .hp-homepage-hero-toggle-fit-mode {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 3px;
  }
  
  .hp-homepage-hero-copyright {
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.5rem;
    max-width: 80%;
    z-index: 5;
  }

  /* Reset inherited spacing from Divi */
  body,
  .et_pb_section,
  .et_pb_row,
  .et_pb_column {
    margin: 0;
    padding: 0;
  }
}

/* Extra support for short screens */
@media (max-height: 500px) {
  .hp-homepage-hero-overlay {
    top: 0.25rem;
    left: 0.25rem;
    max-width: 90%;
    padding: 0 !important;
  }
}
