/* =========================
   Variables (mobile‑first)
   ========================= */
:root{
  --wrap-max: 1500px;
  --pad-x: clamp(16px, 4vw, 40px);
  --pad-y: clamp(40px, 6vw, 80px);
  --gap: clamp(16px, 3vw, 28px);
  --kicker-size: clamp(25px, 6vw, 70px);
  --title-size: clamp(18px, 2.2vw, 22px);
  --text-size: clamp(14px, 1.6vw, 15px);
  --arrow: clamp(36px, 5vw, 44px);
}

/* =========================
   Section + container
   ========================= */
.materials-section{
  position: relative;
  background:#f3f4f6;
  color:#0f172a;
  padding: var(--pad-y) var(--pad-x);
}

.materials-section .container{
  width: min(var(--wrap-max), 100%);
  margin-inline: auto;
  position: relative;
}

.materials-heading{ 
  margin-bottom: clamp(14px, 3vw, 22px);
  position: relative;
}

.materials-kicker{
  font-weight: 800;
  font-size: var(--kicker-size);
  color: transparent;
  -webkit-text-stroke: 2px #8d919a;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

/* =========================
   Swiper container
   ========================= */
.materials-carousel{
  --swiper-theme-color:#0f172a;
  padding-bottom: clamp(24px, 5vw, 36px);
}

/* Make slides stretch the card nicely */
.materials-carousel .swiper-slide{
  height: auto;              /* let cards size naturally */
  display: flex;
}

/* =========================
   Card
   ========================= */
.material-card{
  display:flex;
  flex-direction:column;
  flex: 1 1 auto;            /* fill slide */
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
  color:inherit;
  text-decoration:none;
  transition:transform .15s ease, box-shadow .15s ease;
  overflow: hidden;           /* clip corners for image */
  height: 100%;
}

@media (hover:hover){
  .material-card:hover{
    transform: translateY(-2px);
    box-shadow:0 8px 24px rgba(0,0,0,.08);
  }
}

/* Image */
.material-card .thumb{
  aspect-ratio: 16 / 9;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  overflow:hidden;
  border-bottom:1px solid #f1f5f9;
  background:#fff;
}

.material-card .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Text */
.material-card .title{
  font-weight:800;
  font-size: var(--title-size);
  padding: 16px 18px 0;
  margin:0;
  color:#0f172a;
}

.material-card .description{
  padding: 10px 18px 18px;
  font-size: var(--text-size);
  line-height: 1.6;
  color:#374151;
}

.btn-arrow{
  width:28px;         /* make the arrow shorter (was 50) */
  height:auto;        /* keep aspect ratio */
}

/* Button */
.btn-inquire{
  display:inline-flex;
  align-items:right;
  justify-content:right;
  gap:8px;
  padding:8px 30px;
  border-radius:8px;
  background: transparent;
  color:#000;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
  white-space:nowrap;
}
/* .btn-inquire:hover{ background:#001a33; } */
.btn-inquire:hover{ background:transparent; }


/* Keyboard focus */
.material-card:focus-visible{
  outline: 3px solid #0ea5e9;
  outline-offset: 2px;
}

/* =========================
   Arrows & pagination
   ========================= */
/* Round arrow buttons */
.materials-carousel .swiper-button-prev,
.materials-carousel .swiper-button-next{
  width: var(--arrow);
  height: var(--arrow);
  background: rgba(255,255,255,.95);
  border:1px solid #e5e7eb;
  border-radius: 999px;
  box-shadow:0 6px 16px rgba(0,0,0,.08);
  /* keep arrows inside on phones */
  top: auto;
  bottom: 0;
  transform: translateY(50%);
}

.materials-carousel .swiper-button-prev{ left: 8px;  right: auto; }
.materials-carousel .swiper-button-next{ right: 8px; left: auto; }

.materials-carousel .swiper-button-prev:after,
.materials-carousel .swiper-button-next:after{
  font-size: clamp(14px, 2.2vw, 16px);
  color:#0f172a;
}

@media (min-width: 768px){
  /* float arrows vertically centered on tablet/desktop */
  .materials-carousel .swiper-button-prev,
  .materials-carousel .swiper-button-next{
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  .materials-carousel .swiper-button-prev{ left: -6px; }
  .materials-carousel .swiper-button-next{ right: -6px; }
}

.materials-carousel .swiper-pagination-bullet{ opacity:.5; }
.materials-carousel .swiper-pagination-bullet-active{ opacity:1; }

/* Hide pagination when arrows are centered on large screens (optional) */
@media (min-width: 1024px){
  .materials-carousel{ padding-bottom: 0; }
  .materials-carousel .swiper-pagination{ display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .material-card{ transition: none; }
}
