@font-face {
    font-family: 'Trajan Pro';
    src: url(../fonts/TrajanPro-Bold.otf) format('opentype'),
        url(../fonts/TrajanPro-Regular.ttf) format('opentype');
    font-weight: normal;
    font-style: normal;
}


@font-face {
  font-family: 'Denton Test';
  src: url('../fonts/denton-font/Denton\ Test\ Regular\ 400.otf') format('woff2'),
       url('../fonts/denton-font/Denton\ Test\ Regular\ 400.otf') format('truetype');
  font-weight: normal;
  font-style: normal;
  /* font-display: swap; */
}


.client-stories-section {
  width: 100%;
  height: 600px;
  opacity: 1;
  /* top: 712px;     Check if top positioning is needed; if parent is static, this may not affect */
  left: 0px;     /* Same as above */
  /* background-image: url("../Images/home/client-stories/client-stories-bg.jpg"); */
  background: #fff;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover; /* ensure the image covers the container */
  /* object-fit: cover; Note: object-fit applies to replaced elements like img, not div backgrounds */
  padding: 20px;
  overflow: hidden;
    margin: 0 auto;
    position: relative;
    
}

.client-stories-section h2 {
/* padding-top: 20px; */
  position: relative;
  font-family: 'Denton Test';
  font-weight: 420;
  font-style: normal;
  font-size: 48px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;
  vertical-align: middle;
  margin: 40px auto; /* center horizontally */
  max-width: 550px; /* control max width for better line length */
  color: #000;
  z-index: 2;
}

/* Lines before and after */
.client-stories-section h2::before,
.client-stories-section h2::after {
  content: "";
  position: absolute;
  top: 60%; /* vertically center */
  width: 100px; /* length of lines */
  border-bottom: 2px solid #70724F; /* line color and thickness */
  transform: translateY(-40%);
}

.client-stories-section h2::before {
  left: 20px; /* position line at the start of container */
}

.client-stories-section h2::after {
  right: 20px; /* position line at the end of container */
}

.stories-container {
  margin-top: 20px;
  display: flex;
  gap: 24px;
  width: max-content;
  animation: scrollLoop 25s linear infinite alternate;
  will-change: transform;
  transform: translateZ(0);              /* 🧠 Force hardware acceleration */
  backface-visibility: hidden;          /* 🪞 Prevent flickering */
  -webkit-font-smoothing: antialiased;  /* 🖋 Sharpen text edges on WebKit */
  -moz-osx-font-smoothing: grayscale;   /* 🖋 Sharpen text edges on macOS */
}

.stories-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.story-card {
  flex: 0 0 280px;
  height: 310px;
  background: #F6ECE4;
  border-radius: 20px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #000;
  padding: 10px;
}

.quote-bg {
  position: absolute;
  top: -80px; /* floats above the card */
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 130px;
  border: 4px solid #F6ECE4; /* matches card color */
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 2;
   object-fit: cover; 
    display: block;
}


.quote-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* Crop and fill */
  display: block;
}

.story-text{
 width: 100%;                /* Full width inside card */
   /* padding: 40px 15px;Padding inside text block */
  border-radius: 20px;
  background: #F6ECE4;
  box-sizing: border-box;
  color: #000;                /* Dark text for readability */
  /* text-align: center;  */
  
}

.story-text img{
  width:50px;
  height:50px;
}

.client-quote{
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 25px;
  letter-spacing: 1%;
  margin-bottom: 8px;

}

.client-name{
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 26px;
  letter-spacing: 0;
  margin-bottom: 4px;
  margin-top: 40px;
}

.client-profile{
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 9px;
  line-height: 14px;
  letter-spacing: 1%;
}

/* Start completely outside of viewport */
@keyframes scrollLoop {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-50%); /* exactly half, covers duplicates */
  }
  100% {
    transform: translateX(0);
  }
}

/* 
* Tablets / Medium screens */
@media (max-width: 992px) {
  .client-stories-section {
    height: auto; /* allow content to expand */
    padding: 40px 20px;
  }

  .client-stories-section h2 {
    font-size: 36px;
    max-width:450px;
  }

  .client-stories-section h2::before,
  .client-stories-section h2::after {
    width: 80px;
    /* margin: 0 8px; */
  }
  .stories-wrapper {
    overflow-x: scroll; /* horizontal scroll for tablets */
    width: 100%;
  }

  .stories-container {
    gap: 16px;
    /* animation: none; disable automatic scrolling on touch devices */
    /* flex-wrap: nowrap; keep cards in a row */
  }

  .story-card {
    flex: 0 0 220px;
    height: 290px;
    font-size: 16px;
    padding: 8px;
  }

  .quote-bg {
    width: 100px;
    height: 100px;
    top: -60px;
  }

  .quote-bg img {
    width: 100%;
    height: 100%;
  }

  .client-name {
    font-size: 13px;
    margin-top: 30px;
  }

  .client-profile {
    font-size: 8px;
  }
}

@media(max-width:768px){
  .client-stories-section h2 { font-size:28px; max-width:340px; }
  .client-stories-section h2::before, .client-stories-section h2::after { width:60px; }
}

/* Mobile - Small screens */
@media (max-width: 600px) {
  .client-stories-section {
    height: auto; /* allow content to expand */
    padding: 40px 20px;
  }
  .stories-wrapper {
    overflow-x: scroll; /* horizontal scroll for tablets */
    width: 100%;
  }

  .stories-container {
    gap: 16px;
    /* animation: none; disable automatic scrolling on touch devices */
    /* flex-wrap: nowrap; keep cards in a row */
  }

  .story-card {
    flex: 0 0 220px;
    height: 280px;
    font-size: 16px;
    padding: 8px;
  }

  .quote-bg {
    width: 100px;
    height: 100px;
    top: -60px;
  }

  .quote-bg img {
    width: 100%;
    height: 100%;
  }

  .client-name {
    font-size: 13px;
    margin-top: 30px;
  }

  .client-profile {
    font-size: 8px;
  }
}

@media(max-width:480px){
  .client-stories-section h2 {
    font-size: 24px;
    max-width:290px;
  }

  .client-stories-section h2::before,
  .client-stories-section h2::after {
    width:30px;
  }
  .client-stories-section h2::before { left:30px; }
  .client-stories-section h2::after { right:30px; }
}

/* Extra small phones */
@media (max-width: 400px) {
   .client-stories-section {
    height: auto; /* allow content to expand */
    padding: 40px 20px;
  }

  .stories-wrapper {
    overflow-x: scroll; /* horizontal scroll for tablets */
    width: 100%;
  }

  .stories-container {
    gap: 12px;
    /* animation: none; disable automatic scrolling on touch devices */
    /* flex-wrap: nowrap; keep cards in a row */
  }

  .story-card {
    flex: 0 0 220px;
    height: 240px;
    font-size: 13px;
    padding: 8px;
  }

  .quote-bg {
    width: 80px;
    height: 80px;
    top: -40px;
  }

  .quote-bg img {
    width: 100%;
    height: 100%;
  }

  .client-name {
    font-size: 10px;
    margin-top: 20px;
  }

  .client-profile {
    font-size: 8px;
  }
}

