/* ============================================================
   responsive-fixes-3.css
   Agent 3 — mobile audit fixes for:
   Pages: NewsEvents, AllNews, NewsDetail, AllEvents, AllMedia, MediaDetail,
          PhotoVideoGallery, AllBlogs, BlogDetail, AllPress, PressDetail,
          AllAwards, AwardsRecognitions, AllAchievements, AlumniNetwork,
          AnnouncementDetail, Contact
   Sections: EventAlbums, ExploreMemories, FeaturedHighlights, VideoHighlights,
             AlumniConnect, AlumniEvents, AlumniGlobalNetwork, AlumniMemories,
             AlumniSuccessStories, instafeed
   Common: EventDetailModal, MediaLightbox

   All other classes/pages in this scope were checked against style.css /
   aboutpage.css / allpage.css and the existing responsive.css and found to
   already be adequately handled for 375–768px (grids collapse, carousels
   scroll, tabs wrap, hero collages are masked, modals fit, etc.) — only the
   genuine breakages below needed new rules.
   ============================================================ */

/* ───────────────────────────────────────────────────────────
   MediaLightbox.jsx (mg-lightbox-*)
   Prev/Next nav buttons are positioned at left:-80px / right:-80px
   relative to .mg-lightbox-content, which has no overflow clipping.
   On mobile the overlay only has 20px side padding, so the buttons
   render far outside the viewport and are completely unreachable/
   invisible. Bring them onto the image on narrow screens.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mg-lightbox-overlay {
    padding: 30px 12px;
  }
  .mg-lightbox-nav {
    width: 38px;
    height: 38px;
  }
  .mg-lightbox-prev {
    left: 6px;
  }
  .mg-lightbox-next {
    right: 6px;
  }
  .mg-lightbox-close {
    top: -38px;
  }
}

/* ───────────────────────────────────────────────────────────
   Contact.jsx — Message + Map section (.ct-mm-map-wrap / .ct-mm-iframe)
   The map column relies on height:100% of its parent, which is only
   given a real height by "align-items-stretch" when the form/map
   columns sit side-by-side (>=992px). Once the two columns stack on
   mobile, the wrapper's height:100% resolves to auto, collapsing the
   iframe to the browser's tiny default height. Give it an explicit
   height whenever the columns are stacked.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .ct-mm-map-wrap {
    height: 360px;
  }
}

@media (max-width: 480px) {
  .ct-mm-map-wrap {
    height: 280px;
  }
}

/* ───────────────────────────────────────────────────────────
   Contact.jsx — Visit Campus image badge (.ct-vc-img-badge)
   Fixed-size icon (44px) + fixed-size "Book a Visit" button
   (nowrap, flex-shrink:0) leave almost no room for the title/sub
   text on narrow phones, squeezing it into a couple of characters
   per line. Stack the badge content vertically on small screens.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
  .ct-vc-img-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
  }
  .ct-vc-badge-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

/* ───────────────────────────────────────────────────────────
   Contact.jsx — Transportation panel (.ct-tr-wrap)
   40px of horizontal padding on both sides eats a large share of a
   375–480px viewport's width, on top of the nested .ct-tr-left
   32px padding. Reduce the outer padding on narrow screens so the
   bus-routes cards and text get usable width.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
  .ct-tr-wrap {
    padding: 44px 16px 24px;
    border-radius: 24px;
  }
  .ct-tr-left {
    padding: 20px;
  }
}

/* ───────────────────────────────────────────────────────────
   Contact.jsx — Department Directory row (.ct-dd-col-email / .ct-dd-meta-val)
   Once .ct-dd-row switches to a stacked column (see responsive.css,
   <=991.98px), .ct-dd-col-email/.ct-dd-col-phone/.ct-dd-col-hours lose
   their flex-basis but .ct-dd-meta-val keeps white-space:nowrap with
   no width limit, so a long email/phone string can push the row wider
   than the viewport. Allow it to wrap and stay within the card.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .ct-dd-col-email,
  .ct-dd-col-phone,
  .ct-dd-col-hours {
    width: 100%;
  }
  .ct-dd-meta-val {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* ===== HOME HERO — desktop vs mobile switch at 991px ===== */
.home-hero-mobile { display: none; }

@media (max-width: 991px) {
  section.hero-section.home-hero--desktop { display: none; }

  .home-hero-mobile {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    min-height: clamp(750px, 118vw, 820px);
    background: #0F1E2E;
    overflow: hidden;
  }

  .home-hero-mobile__media {
    position: absolute;
    inset: 0;
  }

  .home-hero-mobile__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
  }

  /* same navy gradient as the desktop hero, applied from the bottom */
  .home-hero-mobile__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 30, 46, 0.82) 0%, rgba(15, 30, 46, 0.45) 100%);
    pointer-events: none;
  }

  .home-hero-mobile .hero-slider-arrow { top: 30%; bottom: auto; transform: translateY(-50%); z-index: 3; }

  .home-hero-mobile__content {
    position: relative;
    z-index: 2;
    padding: 0 28px 56px;
    text-align: center;
  }

  .home-hero-mobile .hero-heading {
    color: #fff;
    font-size: clamp(26px, 6vw, 40px);
    line-height: 1.25;
  }

  .home-hero-mobile .hero-description {
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    margin: 12px auto 22px;
    max-width: 520px;
  }

  .home-hero-mobile .hero-actions { justify-content: center; gap: 12px; }
}

@media (max-width: 576px) {
  .home-hero-mobile__content { padding: 0 20px 100px; }
  .home-hero-mobile .hero-heading { font-size: clamp(24px, 7vw, 30px); }
  .home-hero-mobile .hero-description { font-size: 14.5px; }
  .home-hero-mobile .hero-actions a { padding: 12px 20px; font-size: 14px; }
}

/* Coordinators' Voices / HOD cards — always visible on mobile & tablet (no hidden-until-scrolled state) */
@media (max-width: 991px) {
  .cp-voices-grid .cw-testimonial-card.reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
