/* ==========================================================================
   Undes Pharm — Homepage final visual refinement
   Loaded last on index pages only. Preserves brand & section order.
   ========================================================================== */

:root {
  --header-height: 86px;
  --container-width: 1240px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.container {
  width: min(calc(100% - 48px), 1240px);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   1. Header — single sticky bar
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(11, 61, 145, 0.07);
  box-shadow: none;
  transition: box-shadow 0.3s var(--ease-out);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(11, 61, 145, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
  max-width: 1240px;
}

.logo__img {
  display: block;
  width: auto;
  height: 64px;
  max-width: 190px;
  object-fit: contain;
}

.logo--footer .logo__img,
.footer-logo img {
  width: auto;
  height: 72px;
  max-width: 180px;
}

.nav__list {
  gap: 32px;
}

@media (min-width: 1024px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .logo {
    justify-self: start;
  }

  .nav {
    justify-self: center;
  }

  .header-actions {
    justify-self: end;
  }
}

/* --------------------------------------------------------------------------
   2. Hero — readable, less washed out
   -------------------------------------------------------------------------- */

.hero {
  min-height: 590px;
  isolation: isolate;
  background: #F3F7FB;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #E8F0F5;
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.95) 28%,
      rgba(255, 255, 255, 0.65) 46%,
      rgba(255, 255, 255, 0.15) 64%,
      rgba(255, 255, 255, 0) 82%
    ),
    url("../images/hero/hero-laboratory.webp");
  background-size: auto, cover;
  background-position: center, center right;
  background-repeat: no-repeat;
  transform: none;
  transition: none;
}

.hero:hover .hero__bg {
  transform: none;
}

.hero__bg::before {
  content: none;
}

.hero__inner {
  min-height: 590px;
  padding-block: 56px 64px;
  align-items: center;
}

.hero__content {
  max-width: 570px;
}

.hero__title {
  margin-bottom: 22px;
}

.hero__title-line {
  font-family: "Roboto Condensed", sans-serif;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.hero__title-line--navy { color: #0B3D91; }
.hero__title-line--green { color: #1E6F3D; }
.hero__title-line--gold { color: #D4A017; }

.hero__desc {
  font-size: 17px;
  line-height: 1.75;
  max-width: 530px;
  margin-bottom: 28px;
  color: #1A1A1A;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero__actions .button {
  height: 50px;
  min-height: 50px;
  padding-inline: 28px;
  font-weight: 600;
}

.hero__actions .button-primary {
  background: #0B3D91;
  border: none;
}

.hero__actions .button-secondary {
  background: #FFFFFF;
  color: #0B3D91;
  border: 1.5px solid #0B3D91;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   6. Subtle wave dividers
   -------------------------------------------------------------------------- */

.wave {
  display: block;
  width: 100%;
  height: 24px;
  line-height: 0;
  position: relative;
  z-index: 2;
  margin-top: -1px;
  color: var(--color-white);
}

.hero + .wave {
  margin-top: -12px;
}

.wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wave--blue { color: #F0F4F8; }
.wave--white { color: #FFFFFF; }
.wave--green { color: #0B4D2A; }
.wave--footer { color: var(--color-footer); }

/* --------------------------------------------------------------------------
   3–4. Products section
   -------------------------------------------------------------------------- */

body.home #products.section {
  padding-top: 88px;
  padding-bottom: 96px;
}

body.home #products .section-title {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
}

body.home #products .section-subtitle {
  font-size: 16px;
  margin-bottom: 40px;
}

body.home #products .product-grid {
  max-width: 1120px;
  margin-inline: auto;
  gap: 26px;
}

@media (min-width: 1024px) {
  body.home #products .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

body.home #products .product-card {
  display: flex;
  flex-direction: column;
  min-height: 390px;
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid rgba(11, 61, 145, 0.08);
  border-top-width: 3px;
  box-shadow: 0 12px 32px rgba(11, 61, 145, 0.07);
  overflow: hidden;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}

body.home #products .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(11, 61, 145, 0.12);
}

body.home #products .product-card__image {
  height: 220px;
  padding: 12px 14px;
  background: #F7F9FA;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

body.home #products .product-card__image img {
  width: auto;
  max-width: 84%;
  max-height: 200px;
  height: 90%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.12));
  transition: transform 0.4s var(--ease-out);
}

body.home #products .product-card:hover .product-card__image img {
  transform: scale(1.035);
}

body.home #products .product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
  gap: 10px;
}

body.home #products .product-card__name {
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0B3D91;
  margin: 0;
}

body.home #products .product-card__desc {
  font-size: 14px;
  line-height: 1.6;
  color: #5F6368;
  min-height: 67px;
  flex: 1;
  margin: 0;
}

body.home #products .product-card__body .text-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
}

body.home #products .products-cta {
  margin-top: 48px;
}

/* Product accent tops on homepage */
body.home #products .product-card:nth-child(1) { border-top-color: #A82020; }
body.home #products .product-card:nth-child(2) { border-top-color: #E39B15; }
body.home #products .product-card:nth-child(3) { border-top-color: #34368D; }
body.home #products .product-card:nth-child(4) { border-top-color: #1E6F3D; }
body.home #products .product-card:nth-child(5) { border-top-color: #168447; }
body.home #products .product-card:nth-child(6) { border-top-color: #4A9B3E; }

/* --------------------------------------------------------------------------
   5. Why Undes Pharm
   -------------------------------------------------------------------------- */

body.home .section--blue {
  background: #F0F4F8;
  padding: 88px 0 96px;
}

body.home .section--blue .section-title {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 42px;
  font-weight: 700;
}

@media (min-width: 1024px) {
  body.home .value-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }
}

body.home .value-card {
  min-height: 205px;
  padding: 28px 20px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid rgba(11, 61, 145, 0.08);
  border-bottom: 1px solid rgba(11, 61, 145, 0.08);
  box-shadow: 0 10px 28px rgba(11, 61, 145, 0.06);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

body.home .value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(11, 61, 145, 0.09);
}

body.home .value-card__icon {
  width: 68px;
  height: 68px;
  margin-bottom: 16px;
}

body.home .value-card__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

body.home .value-card__desc {
  font-size: 13.5px;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   7–8. About + stats
   -------------------------------------------------------------------------- */

body.home .section--about {
  padding: 100px 0;
}

@media (min-width: 1024px) {
  body.home .about-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 72px;
    align-items: center;
  }
}

body.home .about-image {
  height: 440px;
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(11, 61, 145, 0.11);
  overflow: hidden;
}

body.home .about-image img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

body.home .about-image:hover img,
body.home .media-zoom:hover img {
  transform: scale(1.03);
}

body.home .about-content__title {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 18px;
}

body.home .about-content__desc {
  font-size: 16px;
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 8px;
}

body.home .quality-highlights {
  margin: 28px 0 32px;
  gap: 0;
}

body.home .quality-highlight {
  margin-top: 15px;
  padding: 14px 16px;
}

body.home .quality-highlight:first-child {
  margin-top: 0;
}

body.home .quality-highlight__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

body.home .quality-highlight__desc {
  font-size: 13px;
  line-height: 1.5;
}

body.home .stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}

body.home .stat-card {
  min-height: 105px;
  padding: 18px 14px;
  border-radius: 14px;
}

body.home .stat-card__number {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #0B3D91;
  line-height: 1.1;
}

body.home .stat-card__label {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   9. Contact strip
   -------------------------------------------------------------------------- */

body.home .contact-strip {
  padding: 64px 0;
  background:
    linear-gradient(
      110deg,
      #0B4D2A 0%,
      #126536 55%,
      #187642 100%
    );
}

body.home .contact-strip__bg {
  opacity: 0.35;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(123, 198, 123, 0.32) 0%, transparent 42%),
    radial-gradient(ellipse at 92% 78%, rgba(241, 199, 91, 0.1) 0%, transparent 36%),
    url("../images/icons/leaves-pattern.svg") right center / 48% auto no-repeat;
}

@media (min-width: 768px) {
  body.home .contact-strip__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr auto;
    align-items: center;
    gap: 48px;
  }
}

body.home .contact-strip__title {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 32px;
  color: #FFFFFF;
  margin-bottom: 10px;
}

body.home .contact-strip__intro {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
  max-width: 360px;
}

body.home .contact-item {
  font-size: 14px;
}

body.home .contact-strip .button-outline-white {
  height: 50px;
  min-height: 50px;
  border: 1px solid #F1C75B;
  color: #FFFFFF;
  padding-inline: 28px;
}

/* --------------------------------------------------------------------------
   10. Footer rhythm
   -------------------------------------------------------------------------- */

body.home .site-footer {
  padding-top: 62px;
  padding-bottom: 26px;
}

body.home .footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}

body.home .footer-title {
  font-size: 14px;
  margin-bottom: 16px;
}

body.home .footer-links a {
  font-size: 13px;
  line-height: 2;
}

body.home .footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
}

/* --------------------------------------------------------------------------
   15. Tablet
   -------------------------------------------------------------------------- */

@media (min-width: 768px) and (max-width: 1023px) {
  body.home #products .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body.home .value-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  body.home .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  body.home .section--about,
  body.home .section--blue,
  body.home #products.section {
    padding-block: 72px;
  }

  body.home .contact-strip__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  body.home .contact-strip__inner > div:last-child {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------------------
   14. Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 576px) {
  :root {
    --header-height: 72px;
  }

  .site-header .logo__img,
  .site-header .site-logo img {
    height: 52px;
    width: auto;
    max-width: 150px;
  }

  .hero {
    min-height: 600px;
  }

  .hero__bg {
    background-image:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.88) 42%,
        rgba(255, 255, 255, 0.55) 68%,
        rgba(255, 255, 255, 0.2) 100%
      ),
      url("../images/hero/hero-laboratory.webp");
    background-position: center, center 20%;
    background-size: auto, cover;
  }

  .hero__inner {
    min-height: 600px;
    padding-block: 48px 56px;
  }

  .hero__title-line {
    font-size: 40px;
  }

  .hero__eyebrow {
    color: #0B3D91;
  }

  .hero__desc {
    font-size: 16px;
  }

  body.home #products.section,
  body.home .section--blue,
  body.home .section--about {
    padding: 56px 0;
  }

  body.home #products .section-title,
  body.home .section--blue .section-title,
  body.home .about-content__title {
    font-size: 30px;
  }

  body.home #products .product-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  body.home #products .product-card {
    min-height: 0;
  }

  body.home #products .product-card__image {
    height: 230px;
  }

  body.home #products .product-card__image img {
    max-height: 200px;
  }

  body.home .value-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  body.home .value-card {
    min-height: 0;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  body.home .value-card__icon {
    margin-bottom: 0;
    width: 56px;
    height: 56px;
  }

  body.home .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  body.home .about-image,
  body.home .about-image img {
    height: auto;
    min-height: 260px;
  }

  body.home .stats-row {
    gap: 10px;
  }

  body.home .stat-card {
    min-height: 96px;
    padding: 14px 10px;
  }

  body.home .stat-card__number {
    font-size: 28px;
  }

  body.home .contact-strip {
    padding: 52px 0;
  }

  body.home .contact-strip__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  body.home .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .wave {
    height: 20px;
  }
}

/* --------------------------------------------------------------------------
   16. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  body.home #products .product-card:hover,
  body.home .value-card:hover,
  body.home .about-image:hover img,
  body.home .media-zoom:hover img,
  body.home #products .product-card:hover .product-card__image img {
    transform: none;
  }
}
