/* =========================================================================
   Postmark Travel — Home page responsive fixes
   
   Fixes:
   1. Hero banner cropping / excessive height on mobile and tablet
   2. Quote cards showing on mobile/tablet (user wants them hidden)
   3. Experience cards grid refinement for tablet/mobile
   4. Tailored Packages image containment on narrow viewports
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Hero banner — prevent cropping and excessive height
   ------------------------------------------------------------------------- */

/* Mobile: taller banner so background isn't so tightly cropped */
@media (max-width: 767px) {
  .elementor-10 .elementor-element-8d5636a {
    --min-height: 520px !important;
    min-height: 520px !important;
  }

  /* Keep the background video/image covering without over-cropping */
  .elementor-10 .elementor-element-8d5636a .elementor-background-video-hosted,
  .elementor-10 .elementor-element-8d5636a > .elementor-background-overlay,
  .elementor-10 .elementor-element-8d5636a > .e-con-inner {
    min-height: 520px !important;
  }

  /* Down-arrow anchor image: scale down so it doesn't overlap text */
  .elementor-10 .elementor-element-76e5d67 img {
    max-width: 120px !important;
    max-height: 120px !important;
    width: auto !important;
    height: auto !important;
  }

  /* Slightly tighten hero text spacing on small screens */
  .elementor-10 .elementor-element-063d396 .elementor-heading-title {
    letter-spacing: 2px !important;
  }
  .elementor-10 .elementor-element-ebbd77e .elementor-heading-title {
    line-height: 1.1 !important;
  }
}

/* Tablet / iPad: reduce the very tall 700px hero to a friendlier height */
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-10 .elementor-element-8d5636a {
    --min-height: 550px !important;
    min-height: 550px !important;
  }

  .elementor-10 .elementor-element-8d5636a .elementor-background-video-hosted,
  .elementor-10 .elementor-element-8d5636a > .elementor-background-overlay,
  .elementor-10 .elementor-element-8d5636a > .e-con-inner {
    min-height: 550px !important;
  }
}

/* -------------------------------------------------------------------------
   2. Experience-cards quote cards — hide on mobile AND tablet
   (The user doesn't want "codes"/quotes on mobile; hiding them on iPad
   also makes the 3×2 grid look balanced.)
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .elementor-10 .elementor-element-fbbbac5 .elementor-element-6c22864,
  .elementor-10 .elementor-element-fbbbac5 .elementor-element-5033716 {
    display: none !important;
  }
}

/* -------------------------------------------------------------------------
   3. Experience cards grid — better column counts per breakpoint
   ------------------------------------------------------------------------- */

/* Tablet: 2 columns so the 4 titled cards fill the grid neatly */
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-10 .elementor-element-fbbbac5 {
    --e-con-grid-template-columns: repeat(2, 1fr) !important;
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile: single column, comfortable gap */
@media (max-width: 767px) {
  .elementor-10 .elementor-element-fbbbac5 {
    --e-con-grid-template-columns: repeat(1, 1fr) !important;
    grid-template-columns: repeat(1, 1fr) !important;
    gap: 16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Reduce the huge card padding on mobile */
  .elementor-10 .elementor-element-fbbbac5 .elementor-image-box-content {
    padding: 20px !important;
  }

  /* Card titles a touch smaller on phone */
  .elementor-10 .elementor-element-fbbbac5 .elementor-image-box-title {
    font-size: 26px !important;
  }
}

/* -------------------------------------------------------------------------
   4. Tailored Packages — make loop card images fit narrow screens
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .elementor-10 .elementor-element-6b01085 .elementor-loop-container {
    --grid-columns: 1 !important;
    grid-template-columns: repeat(1, 1fr) !important;
  }

  /* Prevent hard-coded 350×350 loop images from overflowing */
  .elementor-10 .elementor-element-6b01085 .e-loop-item img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-10 .elementor-element-6b01085 .e-loop-item img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important;
  }
}
