/* InkOnWeb public homepage and shop alignment.
   Load after main.css. Opt in using the body class for each route. */
.iow-home,
.iow-shop {
  --iow-gutter: clamp(16px, 3vw, 40px);
  --iow-section: clamp(32px, 5vw, 64px);
  --iow-gap: clamp(12px, 2vw, 24px);
}

.iow-home :is(.hero-section, .feature-section, .offer-section, .about-section,
  .sop-category-section, .home-cta-section) > .container,
.iow-shop .product-details-section > .container {
  max-width: 1200px;
  width: 100%;
  padding-inline: var(--iow-gutter);
}

.iow-home .hero-section.hero-1 {
  padding-block: clamp(28px, 5vw, 72px);
}

.iow-home .hero-section .hero-items {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  min-height: 0;
}

.iow-home .hero-section .hero-content,
.iow-home .hero-section .hero-image-slider {
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.iow-home .hero-section .hero-image-slider {
  width: 100%;
}

.iow-home .hero-content h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.75rem);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.iow-home .hero-content > p {
  max-width: 60ch;
}

.iow-home .hero-content .hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.iow-home .hero-content .hero-actions > :is(.theme-btn, .hero-secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  max-width: 100%;
  margin: 0;
  padding: 11px 16px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}

.iow-home .hero-content .hero-trust {
  flex-wrap: wrap;
  row-gap: 12px;
}

.iow-home .feature-section .feature-wrapper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--iow-gap);
}

.iow-home .feature-wrapper > .feature-item {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  margin: 0;
}

.iow-home .feature-wrapper .feature-item .content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.iow-home :is(.offer-section, .about-section, .sop-category-section,
  .home-cta-section) {
  padding-block: var(--iow-section);
}

/* Remove pt-0 from the homepage section elements when integrating this file.
   Bootstrap's utility can otherwise override their padding. */
.iow-home .offer-section > .container > .row,
.iow-home .about-section > .container > .row {
  margin-block-start: 0;
}

.iow-home .offer-section > .container > .row > [class*="col-"],
.iow-home .about-section > .container > .row > [class*="col-"] {
  margin-block-start: 0;
  min-width: 0;
}

.iow-home .about-section > .container > .row {
  align-items: center;
}

.iow-home .about-section .about-content {
  margin-block-start: 0;
}

.iow-home .sop-category-section .section-title {
  margin-block: 0 var(--iow-gap);
}

.iow-home .category-slider .swiper-wrapper {
  align-items: stretch;
}

.iow-home .category-slider .swiper-slide {
  display: flex;
  height: auto;
}

.iow-home .category-slider .swiper-slide > .shop-category-item {
  width: 100%;
  min-width: 0;
  margin-block-start: 0;
}

.iow-shop .product-details-wrapper #Course > .row {
  --bs-gutter-x: var(--iow-gap);
  --bs-gutter-y: var(--iow-gap);
}

.iow-shop .product-details-wrapper #Course > .row > [class*="col-"] {
  display: flex;
  min-width: 0;
}

.iow-shop .product-details-wrapper #Course .product-details-item {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  margin-block: 0;
  overflow-wrap: anywhere;
}

.iow-shop .product-details-wrapper #Course .shop-image {
  aspect-ratio: 1;
}

.iow-shop .product-details-wrapper #Course .shop-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* The existing grid, carousel JS and menu control breakpoint stay in use. */
@media (max-width: 991.98px) {
  .iow-home .hero-section .hero-items {
    grid-template-columns: minmax(0, 1fr);
  }

  .iow-home .hero-section .video {
    top: auto;
    right: clamp(16px, 4vw, 36px);
    bottom: 24px;
  }

  .iow-home .hero-section .hero-image-slider {
    width: min(100%, 480px);
    justify-self: center;
  }

  .iow-home .feature-section .feature-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iow-home :is(.offer-section, .about-section) > .container > .row {
    row-gap: var(--iow-gap);
  }
}

@media (max-width: 575.98px) {
  .iow-home .feature-section .feature-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  .iow-home .hero-content .hero-actions > :is(.theme-btn, .hero-secondary) {
    flex: 1 1 100%;
  }
}
