/* ==========================================================================
   Responsive layout fixes for tablet, small laptop and in-between widths.
   Loaded after the page CSS (see seo.php), so it overrides the fixed-width rules.
   ========================================================================== */

/* ---------- 1. Header: keep logo, menu and buttons on one line from 992px to 1279px ---------- */
@media (min-width: 992px) and (max-width: 1279.98px) {
  .custom-header { padding-left: .75rem; padding-right: .75rem; }
  .custom-header .navbar-brand { margin-right: .5rem; margin-left: 0; }
  .custom-header .navbar-brand .img-fluid { max-width: 150px; }
  .custom-header #navbarSupportedContent .navbar-nav .nav-link {
    padding: 8px 8px; font-size: .88rem; white-space: nowrap;
  }
  .custom-header #navbarSupportedContent .side-btn { flex-wrap: nowrap; white-space: nowrap; margin-left: auto; }
  .custom-header #navbarSupportedContent .book-demo-btn,
  .custom-header #navbarSupportedContent .header-login-btn {
    font-size: .88rem; padding: .4rem .85rem; white-space: nowrap; margin-top: 0; margin-bottom: 0;
  }
  .custom-header #navbarSupportedContent .book-demo-btn { margin-right: .5rem; }
}
/* Slightly tighter before the full desktop layout, so nothing wraps between 1280px and 1439px either */
@media (min-width: 1280px) and (max-width: 1439.98px) {
  .custom-header #navbarSupportedContent .navbar-nav .nav-link { padding: 10px 11px; white-space: nowrap; }
  .custom-header #navbarSupportedContent .book-demo-btn { margin-right: 1rem; white-space: nowrap; }
  .custom-header #navbarSupportedContent .header-login-btn { white-space: nowrap; }
}

/* ---------- 2. Contact page: stack below 1280px so the form gets the full width ---------- */
@media (max-width: 1279.98px) {
  .custom-container-fluid.contactus { width: 92%; }
  .contactus > .row > .col-md-5,
  .contactus > .row > .col-md-7 { flex: 0 0 100%; max-width: 100%; }
  .contactus > .row > .col-md-5 { margin-bottom: 1.5rem; }
  .contactus .contact-img,
  .contactus .schedule-demo-img { display: block; max-width: min(380px, 70%); margin-left: auto; margin-right: auto; }
  .contactus .contact-bg1 .form,
  .contactus .form { max-width: 760px; margin-left: auto; margin-right: auto; }
  /* The decorative illustration must not push the form far down the page when stacked */
  .contactus .col-md-5 img[alt="Contact Illustration"] { display: block; max-width: min(320px, 60%); margin: 0 auto; }
  .contactus .form .form-control { min-height: 50px; font-size: 16px; }
  .contactus .form .interest-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
}
/* Phones and small tablets: one field per row so labels are never cut off */
@media (max-width: 575.98px) {
  .contactus .form .col-sm-6 { flex: 0 0 100%; max-width: 100%; }
}

/* ---------- 3. About page: Vision and Mission cards must never overlap ---------- */
.about-us-bg .card { width: 100%; max-width: 480px; }
@media (max-width: 991.98px) {
  .about-us-bg .col-md-6 { flex: 0 0 100%; max-width: 100%; }
  .about-us-bg .card,
  .about-us-bg .card.float-right { float: none !important; margin-left: auto; margin-right: auto; }
}

/* ---------- 4. General: use the available width on tablets instead of 75% ---------- */
@media (min-width: 576px) and (max-width: 991.98px) {
  .custom-container-fluid { width: 92%; }
}
@media (max-width: 1279.98px) {
  img, video { max-width: 100%; height: auto; }
}

/* ---------- 5. About page: statistics row must not break words mid-way ---------- */
@media (max-width: 991.98px) {
  .world-map .form-row > .col-4 { flex: 1 1 33%; max-width: none; min-width: 0; }
  .world-map .form-row > .col-4 h5 { font-size: 1rem; word-break: normal; overflow-wrap: normal; hyphens: none; }
}

/* ---------- 6. Contact page: "Get in touch" details as clear, readable cards at every width ---------- */
.contact-info { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff;
  border: 1px solid #dbe6f5; border-radius: 14px; box-shadow: 0 2px 10px rgba(14, 30, 60, .06);
  min-width: 0;
}
.contact-card-icon {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: #eaf3ff;
  display: flex; align-items: center; justify-content: center;
}
.contact-card-icon img { width: 26px; height: 26px; max-width: none; object-fit: contain; }
.contact-card-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.contact-card-label { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5b6b82; }
.contact-card-value { font-size: 1.08rem; font-weight: 600; color: #1a2433; overflow-wrap: anywhere; text-decoration: none; }
a.contact-card-value:hover, a.contact-card-value:focus { color: #0b6fd1; text-decoration: underline; }
/* Tablet and small laptop: three cards side by side under the intro text */
@media (min-width: 576px) and (max-width: 1279.98px) {
  .contact-info { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-card { flex-direction: column; align-items: flex-start; text-align: left; padding: 16px; }
}
/* In-between tablet widths where three cards would be cramped */
@media (min-width: 576px) and (max-width: 767.98px) {
  .contact-info { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .contact-card { flex-direction: row; align-items: center; }
}
/* The page centres its text on phones; keep the cards left-aligned and tidy */
@media (max-width: 767.98px) {
  .contactus .col-md-5 { text-align: left; }
}

/* ---------- 7. Contact page, two-column layout (1280px and up): let the form use the column width ---------- */
@media (min-width: 1280px) {
  /* the form column holds a second 75%-wide container; make it span the column */
  .contactus .contact-bg1 .custom-container-fluid { width: 100%; padding-left: 0; padding-right: 0; }
  .contactus .contact-bg1 .form { max-width: 820px; width: 100%; }
  .contactus .form form { margin-left: 0; margin-right: 0; }
}
@media (min-width: 1600px) {
  .contactus .contact-bg1 .form { max-width: 900px; }
}
