/* ==========================================
   Calibration Page — Visual Fixes
   Scoped to .calibration-page only, so nothing
   here affects any other page on the site.
   ========================================== */

/* Hero background + overlay */
.calibration-page .lab-hero {
  min-height: 650px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* --------------------------------------------
   Fix: the page is RTL, so the hero text sits
   on the RIGHT side of the grid — but the dark
   gradient was written left-to-right (90deg),
   putting the darkest shading over the empty
   left side and the lightest, most transparent
   part directly behind the headline and
   paragraph. Against a bright, busy photo that
   left the text almost unreadable. Flipping the
   angle puts the dark shading behind the text
   instead, and the box behind the text is
   darkened too as a second safety net.
   -------------------------------------------- */
.calibration-page .lab-hero__overlay {
  background: linear-gradient(270deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .3));
}
.calibration-page .lab-hero__grid {
  grid-template-columns: 1fr 430px;
  align-items: center;
}
.calibration-page .lab-hero__content {
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(6px);
  padding: 35px;
  border-radius: 22px;
}
.calibration-page .lab-hero__content h1 {
  font-size: 40px;
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}
.calibration-page .lab-hero__content p {
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
.calibration-page .lab-accreditation-card {
  border-top: 5px solid #ff6a00;
}

/* --------------------------------------------
   The section titles ("محیط تخصصی آزمایشگاه...",
   "حوزه‌های اصلی خدمات آزمایشگاه", etc.) were
   plain floating text with no card around them,
   while every other block on the page sits in a
   white card — give them the same treatment so
   the page reads as one consistent design.
   -------------------------------------------- */
.calibration-page .section-title {
  background: #fff;
  border: 1px solid #edf0f3;
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .06);
  text-align: center;
  max-width: 820px;
  margin: 0 auto 32px;
}
.calibration-page .section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
  margin-bottom: 0;
}
.calibration-page .section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff6a00, #ffa252);
}
.calibration-page .section-title p {
  margin-top: 8px;
}
@media (max-width: 768px) {
  .calibration-page .section-title {
    padding: 22px 20px;
  }
}

/* Metrics strip */
.calibration-page .lab-metrics-section { padding-top: 40px; }
.calibration-page .lab-metrics-grid { grid-template-columns: repeat(4, 1fr); }
.calibration-page .lab-metric__num,
.calibration-page .lab-metric__label { text-align: center; }

.calibration-page .section { background: #f6f7f9; }
.calibration-page .lab-service-card:hover {
  transform: translateY(-6px);
  transition: .3s;
}
.calibration-page .lab-gallery__item {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/* --------------------------------------------
   Fix: floating WhatsApp/phone/social icons
   were fixed to vertical-center of the whole
   viewport, so on any layout narrower than the
   two-column hero (tablet + mobile) they land
   on top of the accreditation card / hero text
   instead of beside it. Below that breakpoint,
   turn the stack into a compact bar pinned to
   the bottom corner instead, clear of content.
   -------------------------------------------- */
@media (max-width: 1100px) {
  .calibration-page .social-fixed {
    top: auto;
    bottom: 14px;
    left: 12px;
    right: 12px;
    transform: none;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, .92);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    z-index: 1500;
  }
  .calibration-page .social-fixed a { width: 48px; height: 48px; }
  .calibration-page .social-fixed img { width: 48px; height: 48px; }
}
@media (max-width: 480px) {
  .calibration-page .social-fixed { gap: 6px; padding: 7px 12px; }
  .calibration-page .social-fixed a { width: 42px; height: 42px; }
  .calibration-page .social-fixed img { width: 42px; height: 42px; }
}

/* --------------------------------------------
   Nav bar: replaced with a manual toggle button
   instead of the old auto show/hide-on-scroll
   behavior. The menu stays closed until the
   person taps the button, and closes again on
   tap of a link, the backdrop, or resize to
   desktop.
   -------------------------------------------- */
.calibration-page .cal-menu-btn { display: none; }
.calibration-page .cal-menu-backdrop { display: none; }

@media (max-width: 768px) {
  .calibration-page .topbar .wrap {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 16px;
  }
  .calibration-page .topbar img {
    width: 52px;
    height: 52px;
  }
  .calibration-page .site-title {
    font-size: 17px;
    margin-right: 0;
    white-space: nowrap;
  }

  .calibration-page .cal-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    top: 85px;
    right: 16px;
    background: #fff;
    border: 1px solid #e7eaee;
    border-radius: 999px;
    padding: 9px 10px 9px 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    cursor: pointer;
    z-index: 1600;
  }
  .calibration-page .cal-menu-btn__icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
  }
  .calibration-page .cal-menu-btn__icon span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #ff6a00;
    transition: transform .25s ease, opacity .2s ease, width .2s ease;
  }
  .calibration-page .cal-menu-btn__icon span:nth-child(1) { width: 100%; }
  .calibration-page .cal-menu-btn__icon span:nth-child(2) { width: 68%; margin-inline-start: auto; }
  .calibration-page .cal-menu-btn__icon span:nth-child(3) { width: 100%; }
  .calibration-page .cal-menu-btn__label {
    font-size: 13px;
    font-weight: 700;
    color: #222;
  }

  /* open state: icon morphs into an X */
  .calibration-page.menu-open .cal-menu-btn__icon span:nth-child(1) {
    width: 100%;
    transform: translateY(6px) rotate(45deg);
  }
  .calibration-page.menu-open .cal-menu-btn__icon span:nth-child(2) { opacity: 0; }
  .calibration-page.menu-open .cal-menu-btn__icon span:nth-child(3) {
    width: 100%;
    transform: translateY(-6px) rotate(-45deg);
  }

  /* nav hidden by default; !important overrides the
     legacy body.scrolled rule from the shared stylesheet
     so this page no longer reacts to scroll direction */
  .calibration-page .navbar {
    top: -600px !important;
    transition: top .3s ease;
  }
  .calibration-page.menu-open .navbar {
    top: 0 !important;
  }

  .calibration-page.menu-open .cal-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .42);
    z-index: 900;
  }
}

/* Responsive grid collapse */
@media (max-width: 900px) {
  .calibration-page .lab-hero__grid,
  .calibration-page .lab-metrics-grid {
    grid-template-columns: 1fr;
  }
  .calibration-page .lab-hero__content h1 { font-size: 30px; }
}
