/* Homepage sections — KOM MED Laboratories */

/* Full-window hero */
.home-hero-full,
.home-hero,
.hero-section {
  --hero-overlay: 0.72;
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #1a5c28 0%, #2f7b35 48%, #3d8f45 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      120deg,
      rgba(12, 42, 22, var(--hero-overlay)) 0%,
      rgba(30, 90, 45, calc(var(--hero-overlay) * 0.92)) 42%,
      rgba(47, 123, 53, calc(var(--hero-overlay) * 0.78)) 100%
    );
}

.home-hero-inner,
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  margin-top: 0;
  color: #fff;
  padding: 0;
  text-align: left;
}

.home-hero-inner.is-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.home-hero-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.home-hero-title,
.home-hero h1,
.hero-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 5vw, 74px);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 24px;
}

.home-hero-subtitle,
.home-hero p,
.hero-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  max-width: 680px;
  line-height: 1.7;
  margin: 0 0 32px;
  opacity: 0.96;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.home-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.45rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease, opacity 0.25s ease;
}

.home-hero-btn-primary {
  background: #fff;
  color: var(--green-dark);
  border: 2px solid #fff;
}

.home-hero-btn-primary:hover {
  background: var(--green-soft);
  border-color: var(--green-soft);
  transform: translateY(-1px);
}

.home-hero-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.92);
}

.home-hero-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  :root {
    --nav-height: 74px;
  }

  .home-hero-full,
  .home-hero,
  .hero-section {
    min-height: 100vh;
    padding-top: calc(var(--nav-height) + 50px);
    padding-bottom: 60px;
    text-align: center;
  }

  .home-hero-inner,
  .hero-content {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    padding: 0 20px;
  }

  .home-hero-inner:not(.is-center) {
    text-align: center;
  }

  .home-hero-title,
  .home-hero h1,
  .hero-title {
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.12;
  }

  .home-hero-actions {
    justify-content: center;
  }
}

.home-section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.home-section-alt {
  background: #f7fbf8;
}

.home-section .head-big {
  margin-bottom: 0.75rem;
}

.home-section .section-lead {
  margin: 0 auto 2.25rem;
}

/* Glance counters */
.glance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.glance-card {
  background: #fff;
  border: 1px solid #d4ead8;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(47, 123, 53, 0.08);
  padding: 1.5rem 1rem;
  text-align: center;
}

.glance-card-value {
  color: var(--green-dark);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.glance-card-label {
  color: #5d6d62;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* Product category cards */
.home-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid #d4ead8;
  border-radius: 18px;
  padding: 1.75rem 1.25rem 1.5rem;
  box-shadow: 0 8px 24px rgba(47, 123, 53, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  height: 100%;
}

.home-category-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-mid);
  box-shadow: 0 14px 32px rgba(47, 123, 53, 0.14);
}

.home-category-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.home-category-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.home-category-card h3 {
  color: var(--green-dark);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.home-category-card p {
  color: #5d6d62;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.home-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  background: var(--green-dark);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
  margin-top: auto;
}

.home-card-btn:hover {
  background: var(--green);
  transform: translateY(-1px);
}

/* Product highlights — 2 split cards */
.home-highlights-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.home-split-card {
  display: grid;
  grid-template-columns: 6px 1fr;
  background: #fff;
  border: 1px solid #d4ead8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(47, 123, 53, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-split-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(47, 123, 53, 0.12);
}

.home-split-accent {
  background: linear-gradient(180deg, var(--green-dark) 0%, var(--green) 100%);
}

.home-split-body {
  padding: 1.75rem 1.5rem;
}

.home-split-body h4 {
  color: var(--green-dark);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.home-split-body p {
  color: #5d6d62;
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 1.15rem;
}

.home-card-btn-outline {
  background: transparent;
  color: var(--green-dark);
  border: 1.5px solid var(--green-dark);
}

.home-card-btn-outline:hover {
  background: var(--green-soft);
  color: var(--green-dark);
}

/* FAQ */
.faq-list {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: #fff;
  border: 1px solid #d4ead8;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(47, 123, 53, 0.06);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--green-dark);
  color: #fff;
}

.faq-answer {
  padding: 0 1.25rem 1.15rem;
  color: #5d6d62;
  font-size: 0.92rem;
  line-height: 1.8;
  border-top: 1px solid #e8f2ea;
}

/* CTA */
.home-cta-section {
  padding: 0 0 clamp(3rem, 6vw, 4.5rem);
}

.home-cta-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #eef8e8 0%, #f7fbf8 100%);
  border: 1px solid #d4ead8;
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: 0 8px 24px rgba(47, 123, 53, 0.08);
}

.home-cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-dark);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.home-cta-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.home-cta-text {
  flex: 1;
  min-width: 220px;
}

.home-cta-text h2 {
  font-family: "Cormorant Garamond", serif;
  color: var(--green-dark);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.home-cta-text p {
  color: #5d6d62;
  line-height: 1.75;
  font-size: 0.92rem;
  max-width: 560px;
}

.home-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  background: var(--green-dark);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.home-cta-btn:hover {
  background: var(--green);
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  .glance-grid,
  .home-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .home-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero-actions a {
    text-align: center;
    justify-content: center;
  }

  .glance-grid,
  .home-category-grid,
  .home-highlights-2 {
    grid-template-columns: 1fr;
  }

  .home-cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .home-cta-text p {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 76px;
  }

  .home-hero-full,
  .home-hero,
  .hero-section {
    min-height: 100vh;
    padding-top: calc(var(--nav-height) + 50px);
    padding-bottom: 60px;
    text-align: center;
  }

  .home-hero-inner,
  .hero-content {
    max-width: 100%;
    padding: 0 20px;
    text-align: center;
  }

  .home-hero-subtitle,
  .home-hero p,
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero-title,
  .home-hero h1,
  .hero-title {
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.12;
  }

  .home-hero-actions {
    justify-content: center;
  }
}

/* Home hero auto slider */
.home-hero-bg {
  overflow: hidden;
}

.home-hero-slider-bg {
  background-image: none !important;
}

.home-slider-layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.1s ease, transform 6s ease;
  will-change: opacity, transform;
}

.home-slider-layer.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Home responsive cleanup */
@media (max-width: 1100px) {
  .home-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-highlights-2,
  .home-cta-inner {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .home-hero-full,
  .home-hero {
    min-height: 82vh !important;
    padding-top: 7rem !important;
    padding-bottom: 4rem !important;
  }

  .home-hero-inner {
    text-align: left !important;
    align-items: flex-start !important;
  }

  .home-hero-title,
  .home-hero h1 {
    font-size: clamp(2.1rem, 10vw, 3rem) !important;
    line-height: 1.08 !important;
  }

  .home-hero-subtitle,
  .home-hero p {
    font-size: 1rem !important;
    max-width: 100% !important;
  }

  .home-section {
    padding: 3.2rem 0 !important;
  }

  .home-category-grid {
    grid-template-columns: 1fr !important;
  }

  .home-category-card,
  .home-split-card {
    min-height: auto !important;
  }
}

@media (max-width: 520px) {
  .home-hero-actions {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .home-hero-btn,
  .home-card-btn,
  .home-cta-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* Home slider manual controls */
.home-hero-full {
  position: relative;
}

.home-hero-bg {
  overflow: hidden;
}

.home-hero-slider-bg {
  background-image: none !important;
}

.home-slider-layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.1s ease, transform 6s ease;
  will-change: opacity, transform;
}

.home-slider-layer.is-active {
  opacity: 1;
  transform: scale(1);
}

.home-slider-controls {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  z-index: 8;
  width: min(1120px, calc(100% - 36px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.home-slider-arrow {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.home-slider-arrow span {
  font-size: 2.2rem;
  line-height: 1;
  transform: translateY(-1px);
}

.home-slider-arrow:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.75);
}

.home-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 0.45rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.home-slider-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.home-slider-dot.is-active {
  width: 28px;
  background: #ffffff;
}

.home-slider-dot:hover {
  transform: scale(1.15);
  background: #ffffff;
}

@media (max-width: 768px) {
  .home-slider-controls {
    bottom: 1.2rem;
    width: calc(100% - 22px);
  }

  .home-slider-arrow {
    width: 40px;
    height: 40px;
  }

  .home-slider-arrow span {
    font-size: 1.9rem;
  }

  .home-slider-dots {
    bottom: 0.15rem;
    gap: 0.45rem;
  }

  .home-slider-dot {
    width: 8px;
    height: 8px;
  }

  .home-slider-dot.is-active {
    width: 22px;
  }
}
