/* ==========================================================================
   HemRang — Components (navbar, footer, cards)
   ========================================================================== */

/* ==========================================================================
   Navbar — a floating pill that overlays the hero.
   Figma: 1399x85, r=30, y=17, gradient #d4e3f6 -> #eaf1fc 45% -> #b1cdee
   ========================================================================== */

.site-header {
  position: absolute;
  inset: 20px 0 auto;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: 20px;
}

.site-header.is-stuck {
  position: fixed;
  top: 8px;
  animation: nav-drop .32s ease;
}

@keyframes nav-drop {
  from { transform: translateY(-14px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.navbar {
  display: flex;
  align-items: center;
  gap: 24px;
  width: calc(100% - 40px);
  max-width: none;
  height: 85px;
  padding: 0 24px 0 32px;
  border-radius: 14px;
  background: var(--grad-navbar);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}

.navbar__logo { flex: none; }
.navbar__logo img {
  width: 300px;
}
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 58px;
  margin-inline: auto;
}

.navbar__link {
  font-weight: 600;
  font-size: 16px;
  line-height: 19px;
  color: var(--indigo);
  position: relative;
  padding-block: 6px;
}

.navbar__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--indigo);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.navbar__link:hover::after,
.navbar__link[aria-current="page"]::after,
.navbar__dropdown-toggle[aria-expanded="true"]::after {
  transform: scaleX(1);
}

.btn--nav {
  flex: none;
  width: 220px;
  height: 52px;
  font-size: 16px;
  line-height: 19px;
  color: var(--white);
  background: var(--grad-primary);
  border: 1px solid rgba(255, 255, 255, .50);
  box-shadow: var(--shadow-cta);
}

/* Mobile menu toggle — hidden until the nav collapses */
.navbar__toggle {
  display: none;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}
.navbar__toggle span,
.navbar__toggle span::before,
.navbar__toggle span::after {
  display: block;
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--indigo);
  transition: transform .22s ease, opacity .22s ease;
}
.navbar__toggle span { position: relative; }
.navbar__toggle span::before,
.navbar__toggle span::after { content: ""; position: absolute; left: 0; }
.navbar__toggle span::before { top: -7px; }
.navbar__toggle span::after  { top:  7px; }

.navbar__toggle[aria-expanded="true"] span { background: transparent; }
.navbar__toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }
/* Services dropdown */
.navbar__dropdown {
  position: relative;
}

.navbar__dropdown-toggle {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Keep Services active/hover styling */
.navbar__dropdown:hover .navbar__dropdown-toggle,
.navbar__dropdown-toggle[aria-expanded="true"] {
  color: #6155f5;
  font-weight: 600;
}

/* Dropdown box */
.navbar__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  width: 190px;
  padding: 10px 0;

  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;

  z-index: 100;
}

/* Show on hover */
.navbar__dropdown:hover .navbar__dropdown-menu,
.navbar__dropdown:focus-within .navbar__dropdown-menu,
.navbar__dropdown-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.navbar__dropdown-menu a {
  display: block;
  padding: 10px 18px;

  font-size: 12px;
  line-height: 16px;
  font-weight: 400;

  color: #4b4b4b;
  text-decoration: none;
  white-space: nowrap;
}

.navbar__dropdown-menu a:hover {
  color: #6155f5;
  background: #f7f6ff;
}
/* ==========================================================================
   Cards
   ========================================================================== */

/* Service card — Hexagonal design, large format */
.svc-card {
  --hex-width: 340px;
  --hex-height: 380px;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: var(--hex-width);
  height: var(--hex-height);
  padding: 48px 32px 40px;
  background: var(--hex-purple);
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  text-align: center;
  transition: transform .22s ease, box-shadow .22s ease;
  position: relative;
  gap: 8px;
}

/* Color variants for each service */
.svc-card:nth-child(1) { background: var(--hex-purple); }
.svc-card:nth-child(2) { background: var(--hex-teal); }
.svc-card:nth-child(3) { background: var(--hex-orange); }
.svc-card:nth-child(4) { background: var(--hex-green); }
.svc-card:nth-child(5) { background: var(--hex-indigo); }

.svc-card:hover { transform: translateY(-8px); }

/* Icon: no background hexagon, just white icon on the colored background */
.svc-card .hex { 
  width: 50px; 
  height: 56px; 
  background: transparent !important;
  display: grid;
  place-items: center;
  flex: none;
  margin-bottom: 4px;
}

.svc-card .hex img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.svc-card__title {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 19px;
  color: var(--white);
  text-transform: uppercase;
  padding: 0 12px;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 14px;
  word-break: break-word;
}

/* Divider line below title */
.svc-card__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
}

.svc-card__body {
  font-size: 12px;
  line-height: 15px;
  color: #ffffff;
  margin: 12px 8px 0;
  padding: 0 4px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.svc-card__more {
  margin-top: auto;
  margin-bottom: 8px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  color: #000000;
  background: #ffffff;
  border-radius: 8px;
  transition: all .2s ease;
  flex: none;
  cursor: pointer;
}

.svc-card__more:hover { 
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Why-HemRang card — Figma: 220x274, r=20, white, shadow 0 0 40 2 */
.why-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 220px;
  min-height: 274px;
  padding: 15px 14px 20px;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--r-why);
  box-shadow: var(--shadow-why);
  text-align: center;
  transition: transform .22s ease;
}
.why-card:hover { transform: translateY(-6px); }

.why-card .hex { width: 64px; height: 70px; }

.why-card__title {
  margin-top: 14px;
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
}

.why-card__body {
  margin-top: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-60);
}

/* Industry tile — Figma: 218x73, r=8, white, shadow 0 0 25 4 */
.ind-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 218px;
  height: 73px;
  padding-inline: 18px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  box-shadow: var(--shadow-tile);
  transition: transform .2s ease;
}
.ind-tile:hover { transform: translateY(-4px); }
.ind-tile img { width: 40px; height: 40px; object-fit: contain; }

.ind-tile__label {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 25px;
  color: var(--ink);
}

/* Certificate tile — Figma: 158x147, r=8 */
.cert-tile {
  display: grid;
  place-items: center;
  gap: 10px;
  width: 158px;
  height: 147px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  box-shadow: var(--shadow-tile);
  text-align: center;
}

.cert-tile__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-72);
}

/* ==========================================================================
   Footer — target design
   ========================================================================== */

.site-footer {
  position: relative;
  width: 100%;
  padding: 24px 34px 40px;
  box-sizing: border-box;
  background: #082B5C;
  overflow: hidden;
  isolation: isolate;
}

/* Hex pattern across the outer footer */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("../img/footer-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: repeat;

  opacity: 0.45;
  mix-blend-mode: multiply;

  z-index: 0;
  pointer-events: none;
}


/* ==========================================================================
   Inner rounded panel
   ========================================================================== */

.footer__panel {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 1380px;

  margin: 0 auto;
  padding: 18px 60px 14px 96px;

  box-sizing: border-box;

  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);

  background: linear-gradient(
  90deg,
  #064B91 0%,
  #03386D 50%,
  #064B91 100%
);

  overflow: hidden;
}


/* Hex pattern INSIDE the rounded panel */
.footer__panel::before {
  content: "";
  position: absolute;
  inset: 0;

  display: block;

  background-image: url("../img/footer-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: repeat;

  opacity: 0.55;
  mix-blend-mode: multiply;

  z-index: 0;
  pointer-events: none;
}


/* Keep footer content above the hex pattern */
.footer__panel > * {
  position: relative;
  z-index: 2;
}


/* ==========================================================================
   Main footer columns
   ========================================================================== */

.footer__grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  column-gap: 72px;
  align-items: start;
}


/* ==========================================================================
   Brand
   ========================================================================== */

.footer__brand {
  min-width: 0;
}

.footer__brand img {
  display: block;
  width: 190px;
  height: auto;
  object-fit: contain;
  margin: 0 0 0 -20px;
  margin-bottom: 12px;
}

.footer__tagline {
  margin: 10px 0 0;
  max-width: 220px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  margin: 0;
  border-radius: 5px;
  background: transparent;
  transition: transform .18s ease, background .18s ease;
}

.footer__social a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .14);
}
.footer__social img {
  display: block;
  width: 28px;
  height: 20px;
  object-fit: contain;
}


/* ==========================================================================
   Navigation columns
   ========================================================================== */

.footer__col {
  min-width: 0;
  transform: translateY(22px);
}

.footer__col h3 {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.footer__col ul {
  list-style: none;

  margin: 0;
  padding: 0;
}

.footer__col li {
  margin: 0 0 7px;
  padding: 0;
}

.footer__col a {
  font-size: 12px;
  line-height: 1.4;

  color: rgba(255, 255, 255, 0.80);

  text-decoration: none;

  transition: color .15s ease;
}

.footer__col a:hover {
  color: #fff;
}


/* ==========================================================================
   Divider
   ========================================================================== */

.footer__rule {
  width: 100%;
  height: 1px;

  margin: 18px 0 11px;

  background: rgba(255, 255, 255, 0.30);
}


/* ==========================================================================
   Bottom row
   ========================================================================== */

.footer__bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.footer__copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.footer__badges {
  display: flex;
  align-items: center;

  gap: 11px;

  list-style: none;

  margin: 0;
  padding: 0;

  flex-wrap: nowrap;
}

.footer__badge {
  display: grid;
  place-items: center;

  width: 100px;
  height: 27px;

  padding: 0 8px;

  border-radius: 9px;

  background: rgba(10, 42, 102, 0.55);

  border: 1px solid rgba(255, 255, 255, 0.18);

  font-size: 9px;
  line-height: 1.3;

  font-weight: 500;

  color: rgba(255, 255, 255, 0.80);

  box-sizing: border-box;

  white-space: nowrap;
}


/* ==========================================================================
   Footer — Tablet
   ========================================================================== */

@media (max-width: 1024px) {

  .site-footer {
    padding: 22px 24px 24px;
  }

  .footer__panel {
    padding: 24px 40px 17px;
  }

  .footer__grid {
    grid-template-columns: 200px repeat(3, 1fr);
    column-gap: 32px;
  }

}


/* ==========================================================================
   Footer — Mobile
   ========================================================================== */

@media (max-width: 680px) {

  .site-footer {
    padding: 16px 14px 20px;
  }

  .footer__panel {
    padding: 26px 22px 20px;
    border-radius: 16px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 24px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__tagline {
    max-width: 260px;
  }

  .footer__rule {
    margin: 20px 0 14px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer__badges {
    flex-wrap: wrap;
    gap: 8px;
  }

}


/* ==========================================================================
   Footer — Small Mobile
   ========================================================================== */

@media (max-width: 420px) {

  .footer__grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }

  .footer__badge {
    width: 100px;
  }

}
/* ==========================================================================
   Responsive — Service Cards
   ========================================================================== */

@media (max-width: 1360px) {
  .svc-card {
    --hex-width: 310px;
    --hex-height: 360px;
    padding: 44px 28px 36px;
    gap: 6px;
  }
}

@media (max-width: 1200px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 100%;
  }
  
  .services__grid > .svc-card:nth-child(1),
  .services__grid > .svc-card:nth-child(2),
  .services__grid > .svc-card:nth-child(3),
  .services__grid > .svc-card:nth-child(4),
  .services__grid > .svc-card:nth-child(5) {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .svc-card {
    --hex-width: 280px;
    --hex-height: 330px;
    padding: 40px 24px 32px;
  }

  .svc-card .hex {
    width: 46px;
    height: 52px;
  }

  .svc-card .hex img {
    width: 38px;
    height: 38px;
  }

  .svc-card__title {
    font-size: 15px;
    line-height: 18px;
  }

  .svc-card__body {
    font-size: 11px;
    line-height: 14px;
  }
}

@media (max-width: 768px) {
  .svc-card {
    --hex-width: 100%;
    --hex-height: auto;
    min-height: 280px;
    max-width: 260px;
    margin: 0 auto;
  }

  .svc-card .hex {
    width: 44px;
    height: 50px;
  }

  .svc-card .hex img {
    width: 36px;
    height: 36px;
  }

  .svc-card__title {
    font-size: 14px;
    line-height: 17px;
  }

  .svc-card__body {
    font-size: 11px;
    line-height: 14px;
    min-height: 50px;
  }

  .svc-card__more {
    font-size: 11px;
    padding: 7px 16px;
  }
  /* Show Services dropdown on hover/focus in mobile view */
.navbar__dropdown:hover .navbar__dropdown-menu,
.navbar__dropdown:focus-within .navbar__dropdown-menu,
.navbar__dropdown-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
}


/* =========================================================
   NAVBAR — FINAL DESKTOP SIZE
   ========================================================= */

.navbar {
  display: flex;
  align-items: center;
  gap: 24px;

  width: calc(100% - 40px);
  max-width: none;
  height: 64px;

  padding: 0 20px 0 28px;

  border-radius: 14px;
  border: 1px solid rgba(210, 218, 230, 0.8);

  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f8f9fb 100%
  );

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

/* Logo */
.navbar__logo {
  flex: none;
}

.navbar__logo img {
  width: 164px;
  height: auto;
  display: block;
}

/* Navigation */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 45px;
  margin-left: auto;
  margin-right: 15px;
}

.navbar__link {
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;

  color: #4b4b4b;

  padding: 6px 0;
}

.navbar__link[aria-current="page"] {
  color: #6155f5;
  font-weight: 600;
}

/* Active underline */
.navbar__link::after {
  height: 2px;
  background: #6155f5;
}

/* CTA */
.btn--nav {
  flex: none;

  width: 164px;
  height: 42px;
  font-size: 13px;

  border-radius: 9px;
  line-height: 18px;
  font-weight: 600;

  color: #fff;

  background: linear-gradient(
    90deg,
    #4169f5 0%,
    #8133ed 100%
  );

  border: none;
  box-shadow: none;
}

/* Active Services nav item */
.navbar__dropdown[data-active="true"] .navbar__dropdown-toggle {
  color: #6155f5;
  font-weight: 600;
}

.navbar__dropdown[data-active="true"] .navbar__dropdown-toggle::after {
  transform: scaleX(1);
}
/* =========================================================
   HOME PAGE — FLEXIBLE CONTENT WIDTH
   Keep all main sections aligned with the full-width navbar
   ========================================================= */

.home-page .container {
  width: calc(100% - 40px);
  max-width: none;
  margin-inline: auto;
}
@media (min-width: 769px) {
  .navbar__dropdown-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
  }
  .navbar__dropdown:hover .navbar__dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Prevent click/focus from keeping it open on desktop */
  .navbar__dropdown-menu.is-open {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .navbar__dropdown:focus-within .navbar__dropdown-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .navbar__dropdown:hover .navbar__dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
.resources-page {
  padding: 140px 40px 80px;
}

.resources-page__container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.resources-page__image {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
}
/* =========================================================
   RESOURCE HUB
   ========================================================= */

.resources-page {
  padding: 110px 40px 40px;
  box-sizing: border-box;
}

.resources-page__container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* Cropped viewport */
.resources-page__crop {
  width: 100%;
  max-width: 1200px;
  height: 420px;
  overflow: hidden;
  position: relative;
}

/* Actual SVG */
.resources-page__image {
  position: absolute;
  display: block;
  width: 100%;
  max-width: none;
  height: auto;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%) scale(1.25);
  transform-origin: center center;
}


/* =========================================================
   TABLET — 1024px
   ========================================================= */

@media (max-width: 1024px) {

  .resources-page {
    padding: 100px 24px 32px;
  }

  .resources-page__crop {
    height: 360px;
  }

  .resources-page__image {
    width: 110%;
    transform: translate(-50%, -50%) scale(1.3);
  }

}


/* =========================================================
   MOBILE — 680px
   ========================================================= */

@media (max-width: 680px) {

  .resources-page {
    padding: 90px 14px 28px;
  }

  .resources-page__crop {
    height: 300px;
  }

  .resources-page__image {
    width: 125%;
    transform: translate(-50%, -50%) scale(1.45);
  }

}


/* =========================================================
   SMALL MOBILE — 480px
   ========================================================= */

@media (max-width: 480px) {

  .resources-page {
    padding: 86px 10px 24px;
  }

  .resources-page__crop {
    height: 270px;
  }

  .resources-page__image {
    width: 140%;
    transform: translate(-50%, -50%) scale(1.55);
  }

}


/* =========================================================
   VERY SMALL MOBILE — 360px
   ========================================================= */

@media (max-width: 360px) {

  .resources-page__crop {
    height: 250px;
  }

  .resources-page__image {
    width: 150%;
    transform: translate(-50%, -50%) scale(1.65);
  }

}
/* =========================================================
   RESOURCE HUB — STICKY FOOTER
   Prevent white space below the footer
   ========================================================= */

html,
body {
  margin: 0;
  padding: 0;
}

body.resources-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.resources-page-body #main {
  flex: 1 0 auto;
}

body.resources-page-body .site-footer {
  flex-shrink: 0;
}