/* Card grids for About Company, Industries and Resources on the home page.
   Scoped to .ixc; loaded only by templates/index.html. */

.ixc {
  --ixc-maroon: #9d2f2f;
  --ixc-maroon-dark: #802626;
  --ixc-ink: #1b232b;
  --ixc-body: #5b6570;
  --ixc-line: #e3ddd7;
  --ixc-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ixc .ixc-grid {
  display: grid;
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 6px 15px 0;
  text-align: left;
}

.ixc .ixc-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.ixc .ixc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ixc .ixc-card {
  position: relative;
  display: flex;
  min-width: 0;
  border: 1px solid var(--ixc-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

/* The card itself does not move on hover - only the image reacts. */

/* The whole card is one link. */
.ixc .ixc-card > .ixc-inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  color: inherit !important;
  text-decoration: none !important;
  outline: none;
}

.ixc .ixc-cta:focus-visible {
  outline: 3px solid var(--ixc-maroon, #9d2f2f);
  outline-offset: 3px;
}

.ixc .ixc-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #f3efeb;
  overflow: hidden;
}

.ixc .ixc-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ixc-ease);
}

.ixc .ixc-card:hover .ixc-media img { transform: scale(1.05); }

/* Accent line that sweeps under the image on hover. */
.ixc .ixc-media::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ixc-maroon), #d9a441);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ixc-ease);
}

.ixc .ixc-card:hover .ixc-media::after,
.ixc .ixc-card:focus-within .ixc-media::after { transform: scaleX(1); }

.ixc .ixc-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.ixc .ixc-body h4 {
  margin: 0 0 10px !important;
  color: var(--ixc-ink) !important;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-align: left;
  text-transform: none;
  transition: color 0.3s ease;
}

.ixc .ixc-card:hover h4 { color: var(--ixc-maroon) !important; }

.ixc .ixc-body p {
  flex: 1 1 auto;
  margin: 0 0 18px !important;
  color: var(--ixc-body) !important;
  font-size: 14.5px !important;
  line-height: 1.65;
  text-align: left;
}

.ixc .ixc-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  min-height: 40px;
  margin-top: auto !important;
  padding: 9px 18px;
  border: 1px solid rgba(157, 47, 47, 0.35);
  border-radius: 999px;
  color: var(--ixc-maroon) !important;
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.ixc .ixc-cta i {
  font-size: 12px;
  transition: transform 0.3s var(--ixc-ease);
}

.ixc .ixc-card:hover .ixc-cta,
.ixc .ixc-card:focus-within .ixc-cta {
  background: var(--ixc-maroon);
  border-color: var(--ixc-maroon);
  color: #fff !important;
  box-shadow: 0 12px 22px -14px rgba(157, 47, 47, 0.95);
}

.ixc .ixc-card:hover .ixc-cta i { transform: translateX(4px); }

/* Reveal on scroll (only when the page's script adds the class). */
.ixc.ixc-ready .ixc-card {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ixc-ease), transform 0.7s var(--ixc-ease), box-shadow 0.35s ease, border-color 0.35s ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}

.ixc.ixc-ready .ixc-card.is-in { opacity: 1; transform: none; }

@media (max-width: 1199px) {
  .ixc .ixc-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .ixc .ixc-grid--4,
  .ixc .ixc-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

@media (max-width: 640px) {
  .ixc .ixc-grid--4,
  .ixc .ixc-grid--3 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ixc .ixc-body { padding: 18px; }
  .ixc .ixc-body h4 { font-size: 17px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ixc *,
  .ixc *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .ixc.ixc-ready .ixc-card { opacity: 1; transform: none; }
}

/* ---------- Sliding variant (Resources, About Company) ---------- */
/* slick lays these out; the grid rules above must not apply. */
.ixc .ixc-slider { display: block; max-width: 1140px; margin: 0 auto; padding: 6px 15px 0; text-align: left; }

.ixc .ixc-slide { padding: 0 11px; height: auto; }

/* Pull the track back by the slide padding so the first and last cards line up
   with the section edges and nothing is clipped. */
.ixc .ixc-slider .slick-list { margin: 0 -11px; padding-bottom: 4px; }

/* Equal-height cards inside the track. */
.ixc .ixc-slider .slick-track { display: flex; align-items: stretch; }
.ixc .ixc-slider .slick-slide { height: auto; float: none; }
.ixc .ixc-slider .slick-slide > div { height: 100%; }
.ixc .ixc-slider .ixc-slide { display: flex !important; height: auto; }
.ixc .ixc-slider .ixc-card { width: 100%; }
.ixc .ixc-slider .slick-slide > .ixc-card { height: auto; }

/* Room for the arrows so they never sit on top of a card. */
.ixc .ixc-slider .slick-prev { left: -14px; z-index: 2; }
.ixc .ixc-slider .slick-next { right: -14px; z-index: 2; }
.ixc .ixc-slider .slick-prev::before,
.ixc .ixc-slider .slick-next::before { display: none; }

@media (max-width: 991px) {
  .ixc .ixc-slide { padding: 0 8px; }
  .ixc .ixc-slider .slick-prev { left: -6px; }
  .ixc .ixc-slider .slick-next { right: -6px; }
}
/* The card body is not clickable - only this button navigates. */
.ixc .ixc-cta { text-decoration: none !important; cursor: pointer; }
.ixc .ixc-card { cursor: default; }
