/*
 * GoExam-IDP legacy Internet Explorer compatibility layer.
 * Modern browsers ignore these rules. IE10/IE11 receive a simplified,
 * readable Flexbox-based layout instead of unsupported CSS Grid/custom props.
 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  html, body { width:100%; max-width:100%; overflow-x:hidden; }
  body { font-family: Tahoma, Arial, sans-serif; color:#28191c; background:#FAF6F2; }
  a { color:inherit; }
  img, video, iframe { max-width:100%; height:auto; }

  /* centered site shell – IE does not understand min()/margin-inline */
  .wrap, .container, .go-wrap, .go-head>.go-wrap {
    width:1180px !important;
    max-width:calc(100% - 48px) !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  /* literal colour fallbacks for CSS custom properties */
  .btn-solid, .go-register, .refresh-dates { background:#7a1a2b; color:#fff; }
  .btn-solid:hover { background:#5e1220; }
  .btn-outline { background:#fff; color:#7a1a2b; border-color:#7a1a2b; }
  .eyebrow, .hero-city, .section-link, .article-link { color:#7a1a2b; }
  .eyebrow:before, .eyebrow:after { background:#c99a4a; }
  .section-sub, .hero-text p, .service-card p, .article-card p { color:#7d6f70; }
  .go-top { background:#5e1220 !important; color:#f7ede6 !important; }
  .go-mark { background:#7a1a2b; color:#fff; display:flex; align-items:center; justify-content:center; }
  .go-nav li.active a, .go-nav a:hover { color:#7a1a2b !important; }

  /* IE11 has no standard CSS Grid; use wrapped Flexbox fallbacks. */
  .service-grid, .article-grid, .tours-grid, .footer-grid,
  .methods-grid, .channels-grid, .faq-grid, .test-type-options,
  .booking-grid, .info-grid, .bank-cards-wrap, .search-fields,
  .pv-info-grid, .admin-info-grid, .form-row, .field-row,
  .about-feats, .hero-feats {
    display:-ms-flexbox !important;
    display:flex !important;
    -ms-flex-wrap:wrap !important;
    flex-wrap:wrap !important;
  }
  .service-grid, .article-grid, .tours-grid, .footer-grid,
  .methods-grid, .channels-grid, .faq-grid, .test-type-options,
  .booking-grid, .info-grid, .bank-cards-wrap, .search-fields,
  .pv-info-grid, .admin-info-grid, .form-row, .field-row {
    margin-left:-8px;
    margin-right:-8px;
  }
  .service-grid > *, .article-grid > *, .tours-grid > *, .footer-grid > *,
  .methods-grid > *, .channels-grid > *, .faq-grid > *, .test-type-options > *,
  .booking-grid > *, .info-grid > *, .bank-cards-wrap > *, .search-fields > *,
  .pv-info-grid > *, .admin-info-grid > *, .form-row > *, .field-row > * {
    margin:8px !important;
    min-width:0;
  }
  .service-grid > * { width:calc(16.666% - 16px); }
  .article-grid > * { width:calc(33.333% - 16px); }
  .tours-grid > * { width:calc(33.333% - 16px); }
  .footer-grid > * { width:calc(25% - 16px); }
  .methods-grid > *, .channels-grid > * { width:calc(33.333% - 16px); }
  .faq-grid > * { width:calc(50% - 16px); }
  .test-type-options > * { width:calc(50% - 16px); }
  .form-row > *, .field-row > *, .info-grid > *, .pv-info-grid > *, .admin-info-grid > * { width:calc(50% - 16px); }

  /* main two-column areas */
  .hero-slide, .about .wrap, .dates .wrap, .content-grid, .map-grid, .contact-grid,
  .pv-layout, .order-detail-grid {
    display:-ms-flexbox !important;
    display:flex !important;
    -ms-flex-wrap:wrap !important;
    flex-wrap:wrap !important;
  }
  .hero-slide > *, .about .wrap > *, .dates .wrap > *, .content-grid > *,
  .map-grid > *, .contact-grid > *, .pv-layout > *, .order-detail-grid > * {
    min-width:0;
  }
  .hero-slide > *, .about .wrap > *, .dates .wrap > *, .map-grid > *, .contact-grid > * { width:50%; }

  /* Flex gap is unsupported in IE. Keep visible spacing with margins. */
  .hero-btns > *, .go-actions > *, .go-contact > *, .go-social > *, .about-feats > *, .hero-feats > * {
    margin:4px 6px;
  }

  /* unsupported modern effects -> safe fallback */
  .service-card:before { display:none !important; }
  .service-card, .article-card, .tour-card { box-shadow:0 8px 22px rgba(70,35,40,.10); }
}

@media all and (-ms-high-contrast: none) and (max-width:980px),
       all and (-ms-high-contrast: active) and (max-width:980px) {
  .wrap, .container, .go-wrap, .go-head>.go-wrap { max-width:calc(100% - 32px)!important; }
  .service-grid > * { width:calc(33.333% - 16px); }
  .article-grid > *, .footer-grid > *, .methods-grid > *, .channels-grid > * { width:calc(50% - 16px); }
  .hero-slide > *, .about .wrap > *, .dates .wrap > *, .map-grid > *, .contact-grid > *,
  .content-grid > *, .pv-layout > *, .order-detail-grid > * { width:100%; }
}

@media all and (-ms-high-contrast: none) and (max-width:620px),
       all and (-ms-high-contrast: active) and (max-width:620px) {
  .wrap, .container, .go-wrap, .go-head>.go-wrap { max-width:calc(100% - 24px)!important; }
  .service-grid > * { width:calc(50% - 16px); }
  .article-grid > *, .tours-grid > *, .footer-grid > *, .methods-grid > *, .channels-grid > *,
  .faq-grid > *, .test-type-options > *, .form-row > *, .field-row > *, .info-grid > *,
  .pv-info-grid > *, .admin-info-grid > * { width:calc(100% - 16px); }
}
