/* ============================================================
   Sidebar Off-Canvas Lightbox
   Tech: CSS3 — no Tailwind, no Bootstrap Offcanvas
   ============================================================ */

/* ----------------------------------------------------------
   CSS Custom Properties (design tokens)
   ---------------------------------------------------------- */
:root {
  --sidebar-bg:            #162479;
  --sidebar-accent:        #8DC63F;
  --sidebar-width-desktop: 425px;
  --sidebar-width-tablet:  380px;
  --sidebar-radius-tr:     35px;
  --sidebar-radius-br:     90px;
  --sidebar-padding:       48px 40px 40px 40px;
  --sidebar-padding-tablet:36px 30px 30px 30px;
  --sidebar-padding-mobile:28px 22px 28px 22px;
  --sidebar-transition:    transform 0.4s ease;
  --overlay-bg:            rgba(0, 0, 0, 0.45);
  --overlay-transition:    opacity 0.4s ease, visibility 0.4s ease;
  --text-white:            #ffffff;
  --text-muted:            rgba(255, 255, 255, 0.72);
  --heading-font-size:     32px;
  --heading-line-height:   1.22;
  --subtitle-font-size:    15px;
  --subtitle-line-height:  1.65;
  --contact-label-size:    20px;
  --contact-item-size:     14px;
  --social-font-size:      14px;
  --icon-size:             22px;
  --close-btn-size:        40px;
}


/* ----------------------------------------------------------
   Overlay Backdrop
   ---------------------------------------------------------- */
.sb-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--overlay-bg);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--overlay-transition);
}

.sb-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}


/* ----------------------------------------------------------
   Panel
   ---------------------------------------------------------- */
.sb-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width-desktop);
  height: 100vh;
  background-color: var(--sidebar-bg);
  border-top-right-radius: var(--sidebar-radius-tr);
  border-bottom-right-radius: var(--sidebar-radius-br);
  padding: var(--sidebar-padding);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 9999;
  transform: translateX(-100%);
  transition: var(--sidebar-transition);
  display: flex;
  flex-direction: column;
  gap: 0;

  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sb-panel::-webkit-scrollbar {
  width: 4px;
}
.sb-panel::-webkit-scrollbar-track {
  background: transparent;
}
.sb-panel::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.2);
  border-radius: 4px;
}

.sb-panel.is-open {
  transform: translateX(0);
}


/* ----------------------------------------------------------
   Close Button  (top-right, absolute)
   ---------------------------------------------------------- */
.sb-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: var(--close-btn-size);
  height: var(--close-btn-size);
  border-radius: 50%;
  border: 2px solid var(--text-white);
  background: transparent;
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: background-color 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
  z-index: 1;
}

.sb-close-btn:hover,
.sb-close-btn:focus-visible {
  background-color: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
  outline: none;
}

.sb-close-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.6);
}

/* Close icon — pure CSS X via pseudo-elements */
.sb-close-btn::before,
.sb-close-btn::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 2px;
  background-color: var(--text-white);
  border-radius: 1px;
}
.sb-close-btn::before { transform: rotate(45deg); }
.sb-close-btn::after  { transform: rotate(-45deg); }


/* ----------------------------------------------------------
   Heading Section
   ---------------------------------------------------------- */
.sb-heading {
  margin-top: 0;
  margin-bottom: 22px;
  padding-top: 8px;
}

.sb-heading__title {
  font-size: var(--heading-font-size);
  font-weight: 800;
  color: var(--text-white);
  line-height: var(--heading-line-height);
  margin: 0 0 12px 0;
  letter-spacing: -0.3px;
}

.sb-heading__subtitle {
  font-size: var(--subtitle-font-size);
  color: var(--text-muted);
  line-height: var(--subtitle-line-height);
  margin: 0;
  font-weight: 400;
}


/* ----------------------------------------------------------
   Image
   ---------------------------------------------------------- */
.sb-image {
  margin-bottom: 28px;
  border-radius: 25px;
  border-bottom-left-radius: 70px;
  overflow: hidden;
  flex-shrink: 0;
}

.sb-image img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 25px;
}


/* ----------------------------------------------------------
   Contact Section
   ---------------------------------------------------------- */
.sb-contact {
  margin-bottom: 28px;
}

.sb-contact__heading {
  font-size: var(--contact-label-size);
  font-weight: 800;
  color: var(--text-white);
  margin: 0 0 18px 0;
  letter-spacing: 0.1px;
}

.sb-contact__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.sb-contact__item:last-child {
  margin-bottom: 0;
}

.sb-contact__icon {
  flex-shrink: 0;
  width: var(--icon-size);
  height: var(--icon-size);
  color: var(--sidebar-accent);
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-contact__icon svg {
  width: 100%;
  height: 100%;
}

.sb-contact__text {
  font-size: var(--contact-item-size);
  color: var(--text-white);
  line-height: 1.6;
  margin: 0;
}


/* ----------------------------------------------------------
   Social Links
   ---------------------------------------------------------- */
.sb-social {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}

.sb-social__link {
  font-size: var(--social-font-size);
  font-weight: 600;
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.22s ease;
  letter-spacing: 0.2px;
}

.sb-social__link:hover,
.sb-social__link:focus-visible {
  color: var(--sidebar-accent);
  outline: none;
}


/* ----------------------------------------------------------
   Body lock — prevents background scroll when sidebar open
   ---------------------------------------------------------- */
body.sb-no-scroll {
  overflow: hidden;
}


/* ----------------------------------------------------------
   Responsive Breakpoints
   ---------------------------------------------------------- */

/* Tablet */
@media (max-width: 991.98px) {
  .sb-panel {
    width: var(--sidebar-width-tablet);
    padding: var(--sidebar-padding-tablet);
  }
  .sb-heading__title {
    font-size: 26px;
  }
  .sb-heading__subtitle {
    font-size: 14px;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .sb-panel {
    width: 100%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: var(--sidebar-padding-mobile);
  }
  .sb-heading__title {
    font-size: 24px;
  }
  .sb-image img {
    height: 150px;
  }
}
