/* QEL sprint overrides — keep Labrix custom.css unchanged */

/* Replace laboratory flask/microscope/atom section decorations with QEL field/testing shapes */
.about-us {
  background-image: url('../images/shared/shapes/section-bg-shape-1.svg');
}

.why-choose-us,
.case-study,
.our-faqs {
  background-image: url('../images/shared/shapes/section-bg-shape-2.svg');
}

.how-it-work {
  background-image: url('../images/shared/shapes/section-bg-shape-4.svg');
}

.our-core-value {
  background-image: url('../images/shared/shapes/section-bg-shape-6.svg');
}

/* Result icons sit on a dark primary circle — invert the navy stroke to white */
.service-result-item .icon-box img {
  filter: brightness(0) invert(1);
}

.service-result-item:hover .icon-box img {
  filter: none;
}

/* ============================================================
   Brand palette (Marine Blue) — single site-wide theme
   ------------------------------------------------------------
     --primary-color   = text, headers, hover fills, dark sections, CTAs
     --secondary-color = large bg-section panels (light tint)
     --accent-color    = resting button/chip/icon backgrounds (light tint)
     --primary-rgb     = same as --primary-color, for rgba() gradients/shadows
     --btn-hover       = darker primary, for the button hover fill
   ============================================================ */
:root {
  --primary-color   : #0E5A8A;
  --primary-rgb     : 14, 90, 138;
  --secondary-color : #CDEAF7;
  --accent-color    : #BBE2F4;
  --text-color      : #243845;
  --bg-color        : #F4FAFD;
  --divider-color   : rgba(14, 90, 138, 0.10);
  --btn-hover       : #093F61;
}

/* The template hardcodes the old navy (rgb 23,44,69) in a few gradients and
   shadows that don't read from --primary-color. Re-point them to --primary-rgb. */
.hero::before,
.hero.hero-slider-layout .hero-slide::before {
  background: linear-gradient(270deg, rgba(var(--primary-rgb), 0.00) 0%, rgba(var(--primary-rgb), 0.80) 60.83%);
}

.page-header::before {
  background: linear-gradient(270deg, rgba(var(--primary-rgb), 0.80) 0%, rgba(var(--primary-rgb), 0.80) 60.83%);
}

.customer-rating-images {
  box-shadow: 0px 0px 20px 0px rgba(var(--primary-rgb), 0.10);
}

.about-image::before,
.service-image::after {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.00) 39.29%, var(--primary-color) 100%);
}

/* CTAs: solid brand primary instead of the light pill that blended into the
   site. The template's resting button bg is --accent-color (a light tint); we
   make the *filled* button solid primary with a white label and white arrow.
   .btn-border (outline) and .btn-highlighted hover keep their own backgrounds
   via higher specificity, so this only changes the fill. */
.btn-default {
  background: var(--primary-color);
  color: var(--white-color);
}

.btn-default::before {
  filter: brightness(0) invert(1); /* white arrow on primary */
}

.btn-default::after {
  background-color: var(--btn-hover); /* darker primary hover fill for feedback */
}

/* Hero + header primary CTA: WHITE at rest, fills primary on hover so it pops
   against the dark hero. Scoped to .hero/.header-btn so the highlighted CTAs
   that sit on light sections elsewhere keep their solid primary fill. */
.hero .btn-default.btn-highlighted,
.header-btn .btn-default.btn-highlighted {
  background: var(--white-color);
  color: var(--primary-color);
}

.hero .btn-default.btn-highlighted::before,
.header-btn .btn-default.btn-highlighted::before {
  filter: none; /* native (dark) arrow on the white button */
}

.hero .btn-default.btn-highlighted::after,
.header-btn .btn-default.btn-highlighted::after {
  background-color: var(--primary-color); /* primary fill slides in on hover */
}

.hero .btn-default.btn-highlighted:hover,
.header-btn .btn-default.btn-highlighted:hover {
  color: var(--white-color);
}

.hero .btn-default.btn-highlighted:hover::before,
.header-btn .btn-default.btn-highlighted:hover::before {
  filter: brightness(0) invert(1); /* white arrow once primary fills in */
}

/* Services dropdown — white card panel with divided rows */
.main-menu ul li.submenu > ul.nav-services-menu {
  width: 320px;
  padding: 0;
  overflow: hidden;
  background: var(--white-color);
  border-radius: 14px;
  box-shadow: 0 14px 44px rgba(var(--primary-rgb), 0.22);
}

.main-menu ul li:hover > ul.nav-services-menu {
  padding: 0;
}

.nav-dropdown-label {
  pointer-events: none;
  cursor: default;
  margin: 0;
}

.nav-dropdown-label span {
  display: block;
  padding: 10px 18px;
  font-family: var(--accent-font, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  background: rgba(var(--primary-rgb), 0.07);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.12);
}

/* Each core service = its own row with a divider line */
.nav-services-menu .nav-dropdown-item {
  margin: 0;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

.nav-services-menu .nav-dropdown-item .nav-link {
  display: block;
  padding: 12px 18px !important;
  line-height: 1.4;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color);
  transition: background 0.2s ease, padding 0.2s ease;
}

.nav-services-menu .nav-dropdown-item .nav-link:hover,
.nav-services-menu .nav-dropdown-item .nav-link:focus {
  background: rgba(var(--primary-rgb), 0.06);
  padding: 12px 18px 12px 22px !important;
  color: var(--primary-color);
}

.nav-dropdown-divider {
  height: 0;
  margin: 0;
  padding: 0 !important;
  border-top: 2px solid rgba(var(--primary-rgb), 0.14);
  list-style: none;
  pointer-events: none;
}

.nav-dropdown-action {
  background: rgba(var(--primary-rgb), 0.05);
}

.nav-dropdown-action .nav-link {
  font-weight: 600 !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 13px 18px !important;
  color: var(--primary-color);
}

.nav-dropdown-action .nav-link:hover,
.nav-dropdown-action .nav-link:focus {
  background: rgba(var(--primary-rgb), 0.1);
  padding: 13px 18px !important;
}

.nav-dropdown-action .nav-link i {
  font-size: 0.75rem;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-dropdown-action .nav-link:hover i {
  transform: translateX(3px);
  opacity: 1;
}

/* Mobile (SlickNav) — divided list in services submenu */
.slicknav_nav ul .nav-services-menu,
.slicknav_nav ul ul {
  background: var(--white-color);
  border-radius: 10px;
  margin: 0.35rem 0 0.5rem;
  overflow: hidden;
}

.slicknav_nav .nav-dropdown-label span {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  background: rgba(var(--primary-rgb), 0.07);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.12);
}

.slicknav_nav .nav-dropdown-item {
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

.slicknav_nav .nav-dropdown-item > a {
  padding: 0.65rem 1rem !important;
  line-height: 1.4;
}

.slicknav_nav .nav-dropdown-divider {
  margin: 0;
  border-top: 2px solid rgba(var(--primary-rgb), 0.14);
}

.slicknav_nav .nav-dropdown-action > a {
  font-weight: 600;
  padding: 0.7rem 1rem !important;
  background: rgba(var(--primary-rgb), 0.05);
}

.preloader {
  background: #0E5A8A;
}

.loading {
  border-color: transparent #BBE2F4 transparent #BBE2F4;
}

/* Hide the stacked-avatar "trust" widgets sitewide. They use stock/placeholder
   faces that don't represent real QEL clients. This covers the hero "Trusted By"
   strip, the star-rating box, and the avatar stat badges (Proven Track Record,
   500+ Active Projects, ISO/IEC 17025 Accredited, etc.) wherever they appear. */
.satisfy-client-box,
.customer-rating-box {
  display: none !important;
}

/* Disable Labrix custom cursor — use system pointer */
.cb-cursor {
  display: none !important;
}

.section-title h1,
.section-title h2 {
  cursor: auto;
}

/* Play button: template sets cursor:none for MagicCursor; restore pointer + stacking */
.about-image-content-box-1 .about-image-content {
  z-index: 3;
}

.video-play-button a {
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.video-play-button a::before,
.video-play-button a::after {
  pointer-events: none;
}

.about-video-title {
  pointer-events: none;
}

/* Intro video: image overlay sits under the play control; restore system pointer */
.intro-video-image {
  pointer-events: none;
}

.video-play-border-button {
  position: relative;
  z-index: 2;
}

.video-play-border-button a {
  cursor: pointer;
}

/* About page — sticky Our Story heading (same pattern as team-member-contact-box) */
.about-story-box {
  display: flex;
  flex-wrap: wrap;
  gap: 30px 60px;
  align-items: stretch;
}

.about-story-info {
  width: calc(58% - 30px);
}

.about-story-info .section-title {
  position: sticky;
  top: 50px;
  margin-bottom: 0;
}

.about-story-content {
  width: calc(42% - 30px);
}

@media (max-width: 991.98px) {
  .about-story-info,
  .about-story-content {
    width: 100%;
  }

  .about-story-info .section-title {
    position: static;
    margin-bottom: 40px;
  }
}

.footer-cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 0;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-cert-item img {
  max-height: 48px;
  width: auto;
  opacity: 0.9;
  filter: grayscale(20%);
  transition: opacity 0.2s, filter 0.2s;
}

.footer-cert-item img:hover {
  opacity: 1;
  filter: none;
}

/* Footer — full width + visual polish (Option A align + Option F UX) */
.qel-footer.main-footer {
  width: 100%;
  max-width: none;
  border-radius: 0;
  margin: 0;
  margin-bottom: 0;
  padding: 72px 0 0;
  position: relative;
  overflow: hidden;
}

.qel-footer.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color) 0%, var(--primary-color) 55%, var(--accent-color) 100%);
}

.qel-footer-main {
  row-gap: 2.5rem;
}

.qel-footer .footer-logo img {
  max-width: 148px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.qel-footer .about-footer-content p {
  opacity: 0.92;
  line-height: 1.65;
  max-width: 22rem;
}

.footer-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white-color);
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.footer-social-link:hover {
  color: var(--white-color);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.qel-footer .footer-links h3 {
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.qel-footer .footer-links ul li a {
  opacity: 0.88;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.qel-footer .footer-links ul li a:hover {
  opacity: 1;
  color: var(--accent-color);
}

/* Divider before "View All Services" in footer service list */
.qel-footer .footer-links:last-child ul li:last-child {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 0.5rem;
  padding-top: 0.65rem;
}

.qel-footer .footer-links:last-child ul li:last-child a {
  font-weight: 600;
}

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer-contact-list li:last-child {
  margin-bottom: 0;
}

.footer-contact-list li > i {
  width: 1.25rem;
  margin-top: 0.2rem;
  opacity: 0.85;
  color: var(--accent-color);
  flex-shrink: 0;
}

.footer-contact-list a {
  color: var(--white-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-list a.footer-email,
.footer-contact-list a[href^="mailto:"] {
  text-transform: lowercase;
}

.footer-contact-list a:hover {
  color: var(--accent-color);
}

.footer-contact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
  margin-bottom: 0.15rem;
}

.footer-cert-row:empty {
  display: none;
  padding: 0;
  margin: 0;
  border: none;
}

.qel-footer .footer-copyright-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.5rem 0 2rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.qel-footer .footer-copyright-text p {
  margin: 0;
}

.qel-footer .footer-copyright-text .small {
  width: auto;
  max-width: 100%;
  opacity: 0.75;
  margin-top: 0;
  line-height: 1.5;
}

@media (max-width: 991.98px) {
  .qel-footer .footer-links-box {
    margin-top: 0.5rem;
  }
}

/* ── Mobile footer: compact two-column layout instead of one endless stack ── */
@media (max-width: 767.98px) {
  .qel-footer.main-footer {
    padding-top: 40px;
  }

  .qel-footer .qel-footer-main {
    row-gap: 0;
  }

  /* About block: centered and tighter */
  .qel-footer .about-footer {
    margin: 0 0 28px;
    text-align: center;
  }

  .qel-footer .footer-logo {
    margin-bottom: 12px;
  }

  .qel-footer .footer-logo img {
    max-width: 120px;
  }

  .qel-footer .about-footer-content {
    margin-bottom: 14px;
  }

  .qel-footer .about-footer-content p {
    max-width: none;
    font-size: 0.9rem;
  }

  .qel-footer .footer-social-row {
    justify-content: center;
    margin-top: 0;
  }

  /* Section headings: centered with a short accent underline */
  .qel-footer .footer-links h3 {
    font-size: 1.05rem;
    text-align: center;
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    position: relative;
  }

  .qel-footer .footer-links h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 44px;
    height: 2px;
    background: var(--accent-color);
  }

  /* Quick Links + Our Services side by side, centered lists without bullets */
  .qel-footer .footer-links-box {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 0;
  }

  .qel-footer .footer-links-box .footer-links {
    width: calc(50% - 6px);
    margin-bottom: 24px;
  }

  .qel-footer .footer-links ul {
    list-style: none;
    padding-left: 0;
    text-align: center;
  }

  .qel-footer .footer-links ul li {
    font-size: 0.875rem;
    margin-bottom: 10px;
  }

  /* Divider row ("View All Services") — keep it centered too */
  .qel-footer .footer-links-box .footer-links:last-child ul li:last-child {
    border-top: none;
    margin-top: 2px;
    padding-top: 0;
  }

  /* Contact list: full-width rows with boxed icons, like the reference */
  .qel-footer .footer-contact-box {
    width: 100%;
    margin-bottom: 12px;
  }

  .qel-footer .footer-contact-list {
    max-width: 340px;
    margin: 0 auto;
  }

  .qel-footer .footer-contact-list li {
    margin-bottom: 14px;
    font-size: 0.875rem;
    text-align: left;
  }

  .qel-footer .footer-contact-list li > i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--accent-color);
    opacity: 1;
    font-size: 0.85rem;
  }

  .qel-footer .footer-contact-list li > div {
    min-width: 0;
    align-self: center;
  }

  .qel-footer .footer-contact-list a {
    overflow-wrap: anywhere;
  }

  .footer-contact-label {
    display: inline-block;
    margin-bottom: 0;
    margin-right: 0.4rem;
  }

  /* Certifications: centered, smaller logos */
  .footer-cert-row {
    justify-content: center;
    gap: 0.9rem;
    padding: 16px 0 10px;
    margin-top: 8px;
  }

  .footer-cert-item img {
    max-height: 36px;
  }

  /* Copyright: compact */
  .qel-footer .footer-copyright-text {
    padding: 14px 0;
    margin-top: 14px;
    text-align: center;
    font-size: 0.8rem;
  }
}

.project-client {
  font-size: 0.875rem;
  opacity: 0.75;
  margin-top: 0.35rem;
}

/* Team detail — biography and profile PDF */
.team-bio p + p {
  margin-top: 1rem;
}

.team-profile-pdf {
  margin-top: 1.5rem;
}

.team-profile-pdf.d-none {
  display: none !important;
}

/* Team pages kept on disk; hide all team.html links from the UI */
li:has(> a[href="team.html"]),
li:has(> a[href="./team.html"]) {
  display: none !important;
}

.breadcrumb-item:has(> a[href="team.html"]) {
  display: none !important;
}

a[href="team.html"],
a[href="./team.html"] {
  display: none !important;
}

/* About page — Managing Director block */
.about-md-section.page-team-single {
  padding: 60px 0 80px;
}

.about-md-section .team-about-content .section-title p {
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.about-md-section .team-about-content .section-title p:last-of-type {
  font-size: 0.9375rem;
  opacity: 0.75;
  margin-bottom: 1.25rem;
}

@media (max-width: 991px) {
  .about-md-section .team-single-image,
  .about-md-section .team-about-content {
    width: 100%;
  }
}

/* Services — full discipline catalogue */
.service-disciplines {
  padding: 80px 0;
}

.discipline-grid {
  align-items: stretch;
}

.discipline-grid > [class*='col-'] {
  display: flex;
}

.service-discipline-item {
  background: var(--white-color, #fff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-discipline-item:hover {
  border-color: var(--primary-color, #0d6efd);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Text-only discipline cards — compact fallback when no CMS image */
.service-discipline-item.no-image {
  align-self: flex-start;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--primary-color, #0d6efd);
}

.service-discipline-item.no-image h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.35rem;
}

.service-discipline-item.no-image .discipline-desc {
  font-size: 0.875rem;
  line-height: 1.45;
}

.service-discipline-item h3 a,
.service-discipline-item h3 .discipline-title {
  color: inherit;
  text-decoration: none;
}

.service-discipline-item h3 a:hover,
.service-discipline-item:hover h3 .discipline-title {
  color: var(--primary-color, #0d6efd);
}

.service-discipline-item .discipline-desc {
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.8;
  line-height: 1.5;
}

/* Discipline catalogue — same hover reveal as pillar cards, slightly smaller */
.discipline-grid .service-item.service-item--discipline {
  width: 100%;
  flex: 1;
  min-height: 260px;
  height: 100%;
  margin-bottom: 0;
  padding: 32px 28px;
}

.discipline-grid .service-item--discipline .service-desc {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.discipline-grid .service-item--discipline .service-content h3 {
  font-size: 18px;
}

.page-category-list ul li.active a {
  font-weight: 600;
  color: var(--primary-color, #0d6efd);
}

/* Service pillar cards — Labrix template assumes one-line copy; QEL uses
   longer descriptions, so let cards grow to content (equal height per row)
   instead of a fixed aspect ratio that clips text. */
.service-item {
  aspect-ratio: auto !important;
  height: calc(100% - 30px);
  min-height: 300px;
}

.service-content {
  margin-top: 20px;
}

.service-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}

/* Real QEL imagery for hero + inner-page banners (fallback before CMS/local JSON).
   Desktop: match parallaxie (fixed + cover + center) so init does not crop-jump. */
.hero {
  background-image: url('../images/pages/home/hero-background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

@media (min-width: 992px) {
  .hero.parallaxie,
  .page-header.parallaxie {
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
  }
}

@media (max-width: 991px) {
  .hero.parallaxie,
  .page-header.parallaxie {
    background-attachment: scroll;
    background-size: cover;
  }
}

/* Solid fill under parallax photos so scroll never flashes a light band */
.hero,
.page-header {
  background-color: var(--primary-color, #172c45);
}

/* Keep equal-height counter card with side images: content flows from the top,
   link sits at the bottom so the middle is filled by bullets + short paragraph. */
.about-counter-box {
  justify-content: flex-start;
}

.about-counter-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.about-counter-content .readmore-btn {
  margin-top: auto;
}

.page-header {
  background-image: url('../images/shared/page-header-default.jpg');
  background-size: cover;
  background-position: center center;
}

/* Caption beneath the service detail hero image */
.page-single-caption {
  margin-top: 12px;
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted, #6b7280);
  line-height: 1.5;
}

/* Whole service card is one click target (pillar + image discipline cards) */
.service-item {
  cursor: pointer;
}

.service-item .service-body {
  pointer-events: none;
}

.service-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.service-readmore-btn-icon {
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.service-readmore-btn-icon img {
  max-width: 20px;
}

/* Floating actions — WhatsApp always visible; back-to-top appears on scroll */
.qel-float-actions {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.qel-whatsapp-float,
.qel-back-top-float {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.qel-whatsapp-float {
  background: #25D366;
  font-size: 28px;
  transition: transform 0.25s ease, box-shadow 0.2s ease;
}

.qel-back-top-float {
  background: var(--primary-color);
  font-size: 22px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(6px) scale(0.9);
  margin-top: 0;
  transition:
    max-height 0.3s ease,
    opacity 0.25s ease,
    transform 0.3s ease,
    margin-top 0.3s ease,
    box-shadow 0.2s ease;
}

.qel-float-actions.is-scrolled .qel-back-top-float {
  max-height: 56px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  margin-top: 12px;
}

.qel-whatsapp-float:hover,
.qel-float-actions.is-scrolled .qel-back-top-float:hover {
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.qel-float-actions.is-scrolled .qel-back-top-float:hover {
  transform: translateY(0) scale(1.06);
}

@media (max-width: 575.98px) {
  .qel-float-actions {
    right: 16px;
    bottom: 16px;
  }

  .qel-whatsapp-float,
  .qel-back-top-float {
    width: 50px;
    height: 50px;
  }

  .qel-whatsapp-float {
    font-size: 24px;
  }

  .qel-back-top-float {
    font-size: 20px;
  }

  .qel-float-actions.is-scrolled .qel-back-top-float {
    max-height: 50px;
    margin-top: 10px;
  }
}

/* Contact page — office branch cards */
.qel-offices {
  padding: 80px 0 100px;
}

.qel-offices .section-title {
  margin-bottom: 2.5rem;
}

.office-card {
  height: 100%;
  background: var(--white-color);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.office-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--primary-color);
}

.office-card .office-entity {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.85;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.office-details {
  list-style: none;
  margin: 0;
  padding: 0;
}

.office-details li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color);
}

.office-details li:last-child {
  margin-bottom: 0;
}

.office-details li > i {
  width: 1.1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  color: var(--accent-color);
}

.office-details a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.office-details a:hover {
  color: var(--accent-color);
}

.office-registrations {
  margin-top: 2rem;
  margin-bottom: 0;
  opacity: 0.8;
}

/* Standalone contact form */
.qel-contact-form-section {
  padding: 0 0 80px;
  margin-top: -10px;
}

.qel-contact-form-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.qel-contact-form-card.contact-us-form {
  padding: 2.75rem 2.5rem;
}

.qel-contact-form-card .section-title {
  margin-bottom: 1.75rem;
}

/* Office location maps — paired with office cards */
.qel-office-maps {
  margin-top: 3rem;
  padding-top: 0.5rem;
}

.qel-office-maps-title {
  margin-bottom: 1.75rem;
}

.qel-office-maps-title h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-color);
  opacity: 0.85;
  margin: 0;
}

.office-map-card {
  height: 100%;
  background: var(--white-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.office-map-card .map-label {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.office-map-embed {
  position: relative;
  flex: 1;
  min-height: 320px;
}

.office-map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 991.98px) {
  .qel-contact-form-card.contact-us-form {
    padding: 2rem 1.5rem;
  }

  .office-map-embed {
    min-height: 280px;
  }
}

@media (max-width: 575.98px) {
  .qel-contact-form-section {
    padding-bottom: 60px;
  }

  .qel-contact-form-card.contact-us-form {
    padding: 1.5rem 1.15rem;
  }

  .qel-offices {
    padding: 60px 0 70px;
  }

  .office-card {
    padding: 1.35rem 1.15rem;
  }

  .qel-office-maps {
    margin-top: 2rem;
  }

  .office-map-embed {
    min-height: 240px;
  }
}

/* Laboratory video modal (HTML5 MP4) */
.qel-video-popup {
  position: relative;
  width: min(92vw, 960px);
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.qel-video-popup video {
  display: block;
  width: 100%;
  max-height: 80vh;
  background: #000;
}

.mfp-inline-holder .qel-video-popup {
  vertical-align: middle;
}

/* ============================================================
   Project gallery — filterable mosaic grid
   ============================================================ */
.qel-gallery-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  margin-bottom: 40px;
}

.qel-gallery-filter-btn {
  appearance: none;
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: transparent;
  color: var(--primary-color);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.55rem 1.35rem;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.qel-gallery-filter-btn:hover {
  background: rgba(var(--primary-rgb), 0.08);
}

.qel-gallery-filter-btn.is-active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.qel-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 20px;
}

.qel-gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(var(--primary-rgb), 0.06);
}

.qel-gallery-item.is-hidden {
  display: none;
}

.qel-tile-lg {
  grid-column: span 2;
  grid-row: span 2;
}

.qel-tile-wide {
  grid-column: span 2;
}

.qel-gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.qel-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.qel-gallery-item:hover img {
  transform: scale(1.06);
}

.qel-gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0) 45%, rgba(var(--primary-rgb), 0.82) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.qel-gallery-item:hover .qel-gallery-overlay,
.qel-gallery-item a:focus-visible .qel-gallery-overlay {
  opacity: 1;
}

.qel-gallery-caption {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  transform: translateY(8px);
  transition: transform 0.35s ease;
}

.qel-gallery-item:hover .qel-gallery-caption {
  transform: translateY(0);
}

.qel-gallery-zoom {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.9rem;
}

@media (max-width: 1199.98px) {
  .qel-gallery-grid {
    grid-auto-rows: 190px;
  }
}

@media (max-width: 991.98px) {
  .qel-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 170px;
    gap: 16px;
  }

  .qel-gallery-filter {
    margin-bottom: 32px;
  }
}

@media (max-width: 767.98px) {
  .qel-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 12px;
  }

  .qel-gallery-item {
    border-radius: 12px;
  }

  .qel-gallery-filter-btn {
    font-size: 0.82rem;
    padding: 0.45rem 1.05rem;
  }

  /* Touch devices don't hover — keep captions readable on the big tiles only */
  .qel-tile-lg .qel-gallery-overlay {
    opacity: 1;
  }

  .qel-tile-lg .qel-gallery-caption {
    transform: translateY(0);
  }

  .qel-gallery-zoom {
    display: none;
  }
}
