/* ------------------------------------------------------------------ */
/* Ashrai custom overrides                                             */
/* ------------------------------------------------------------------ */

/* --- Photo gallery: clickable / zoomable thumbnails ----------------- */
.uxbuild-image-gallery .gallery-icon a {
  display: block;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.uxbuild-image-gallery .gallery-icon a img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.uxbuild-image-gallery .gallery-icon a:hover img {
  transform: scale(1.06);
}

.uxbuild-image-gallery .gallery-icon a::after {
  content: "\f00e";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 52px;
  height: 52px;
  line-height: 52px;
  text-align: center;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  background: rgba(46, 204, 113, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.uxbuild-image-gallery .gallery-icon a:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Magnific Popup: sit above the sticky header / revolution slider */
.mfp-bg,
.mfp-wrap {
  z-index: 100000;
}

.mfp-wrap {
  z-index: 100001;
}

.ashrai-mfp .mfp-figure:after {
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.65);
}

.ashrai-mfp .mfp-title {
  padding-right: 40px;
}

/* --- Careers: application result + closed vacancies ----------------- */
.twm-apply-result {
  padding: 13px 18px;
  border-radius: 8px;
  margin-bottom: 22px;
  font-size: 15px;
  line-height: 1.6;
}

.twm-apply-ok {
  background: #e3f4e9;
  border: 1px solid #bfe3cc;
  color: #0d6a2e;
}

.twm-apply-fail {
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #7d241a;
}

.twm-apply-fail a { color: #7d241a; text-decoration: underline; }

.site-button.disabled {
  opacity: .65;
  cursor: not-allowed;
  pointer-events: none;
}

/* A vacancy posted without a banner image leaves .twm-media-bg at zero height.
   The Apply Now button is absolutely positioned inside it, so the following
   .twm-mid-content (position:relative, later in the DOM) painted straight over
   the top and swallowed every click. Give the empty banner a real height, and
   keep the button above its siblings either way. */
.twm-job-detail-v2 .twm-media-bg-empty {
  min-height: 170px;
  border-radius: 6px;
  background: linear-gradient(135deg, #12813a 0%, #2ecc71 100%);
}

.twm-job-detail-v2 .twm-job-self-bottom {
  z-index: 5;
}

.twm-job-no-vacancy {
  padding: 40px 10px;
  text-align: center;
  font-size: 16px;
  color: #6b7a86;
}

/* --- Footer: social icons under the e-mail address ------------------ */
.footer .footer-logo-social {
  margin-top: 18px !important;
}

/* --- Post photo galleries: clickable thumbnails --------------------- */
/* Images inside .ashrai-photo-gallery are wrapped in a link to their own
   full-size file, so they open in the Magnific Popup lightbox. Without a
   cursor hint nothing tells the visitor the picture is clickable. */
.ashrai-photo-gallery a {
  display: block;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
}

.ashrai-photo-gallery a img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .35s ease, opacity .35s ease;
}

.ashrai-photo-gallery a:hover img,
.ashrai-photo-gallery a:focus-visible img {
  transform: scale(1.05);
  opacity: .88;
}

/* Magnifier badge, fading in on hover. */
.ashrai-photo-gallery a::after {
  content: "\f00e";               /* fa-search-plus */
  font-family: "Font Awesome 5 Free", "FontAwesome";
  font-weight: 900;
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  font-size: 15px;
  color: #fff;
  background: rgba(18, 129, 58, .9);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}

.ashrai-photo-gallery a:hover::after,
.ashrai-photo-gallery a:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.ashrai-photo-gallery a:focus-visible {
  outline: 3px solid #12813a;
  outline-offset: 2px;
}

/* Lightbox chrome */
.ashrai-mfp .mfp-title {
  padding: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #e6e6e6;
}

.ashrai-mfp .mfp-counter {
  font-size: 13px;
  color: #b9b9b9;
}

.ashrai-mfp.mfp-bg {
  background: #0b0f0d;
  opacity: .94;
}

/* --- Visually hidden ------------------------------------------------ */
/* Readable by search engines and screen readers, invisible on screen.
   Uses the clip-rect pattern rather than display:none, which crawlers and
   assistive technology both ignore. */
.ashrai-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ */
/* Inline PDF previews (journal articles)                              */
/* The frame is built by assets/js/pdf-inline.js; the box keeps the     */
/* height so the page does not jump while the document loads.          */
/* ------------------------------------------------------------------ */
.pdf-embed {
  position: relative;
  width: 100%;
  height: 900px;
  border: 1px solid #ddd;
  background: #f6f8f9;
  overflow: hidden;
}

.pdf-embed-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.pdf-embed-note {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0 20px;
  text-align: center;
  font-size: 14px;
  color: #6b7a86;
}

.pdf-embed-note a {
  color: #12813a;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .pdf-embed {
    height: 70vh;
    min-height: 420px;
  }
}

/* ------------------------------------------------------------------ */
/* Media menu anchors (Gallery, Video)                                 */
/* Keeps the section clear of the sticky header when the browser jumps */
/* to it on its own - with JavaScript on, ashrai-custom.js measures    */
/* the header instead and this is only the starting point.             */
/* ------------------------------------------------------------------ */
#photo-gallery,
#project-video {
  scroll-margin-top: 24px;
}

@media (max-width: 1024px) {
  #photo-gallery,
  #project-video {
    scroll-margin-top: 170px;
  }
}

/* ------------------------------------------------------------------ */
/* Contact form feedback                                               */
/* ------------------------------------------------------------------ */
.contact-note {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
}

.contact-note-ok {
  color: #0d5c2b;
  background: #eaf6ee;
  border-color: #b7dfc4;
}

.contact-note-bad {
  color: #7a2318;
  background: #fdeeec;
  border-color: #f3c6c0;
  list-style: disc;
  padding-left: 34px;
}

.contact-note-bad li {
  margin: 0;
}
