/* =========================================================
   WHY-US PAGE STYLE
   Only touches components unique to this page.
   ======================================================= */

/* ---------- HERO ---------- */
.hero--why {
    min-height: 100vh;
    height: 100vh;
    width: 100vw;
    --darken-overlay: 0;
    background: url('../../image/Why_Choose_us/Project_in_Action.jpg') center center/cover no-repeat;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    transition: transform 0.3s ease-out;
}

/* Darkening overlay that gets stronger as user scrolls */
.hero--why::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, var(--darken-overlay, 0));
    transition: background 0.1s ease-out;
    z-index: 1;
    pointer-events: none;
}

.hero--why .hero-overlay {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, rgba(41,80,135,0.55) 0%, rgba(52,118,209,0.35) 100%);
    z-index: 2;
    transition: opacity 0.6s ease;
}

/* Hero bottom fade for smooth transition with animation */
.hero--why::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent 0%, rgba(41, 80, 135, 0.8) 100%);
    z-index: 3;
    opacity: 0;
    animation: fadeInBottom 1s ease 0.5s forwards;
}

@keyframes fadeInBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hero--why .hero-content {
    position: relative;
    z-index: 5;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.hero--why .hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #fff !important;
}
.hero--why .hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 36px;
    color: rgba(255,255,255,0.95);
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .hero--why {
        min-height: 70vh;
        height: 70vh;
        background-attachment: scroll;
    }
    
    .hero--why::before {
        background-attachment: scroll;
    }
    
    .hero--why .hero-content {
        padding: 40px 10px;
    }
    .hero--why .hero-title {
        font-size: 2.5rem;
    }
    .hero--why .hero-subtitle {
        font-size: 1.2rem;
    }
    /* Ensure overlay is always visible and covers hero on mobile */
    .hero--why .hero-overlay {
        display: block !important;
        opacity: 1 !important;
        background: linear-gradient(120deg, rgba(41,80,135,0.55) 0%, rgba(52,118,209,0.35) 100%) !important;
        z-index: 2;
    }
}
@media (max-width: 480px) {
    .hero--why {
        min-height: 60vh;
        height: 60vh;
    }
    .hero--why .hero-content {
        padding: 24px 4px;
    }
    .hero--why .hero-title {
        font-size: 2rem;
    }
    .hero--why .hero-subtitle {
        font-size: 1.1rem;
    }
    /* Ensure overlay is always visible and covers hero on small mobile */
    .hero--why .hero-overlay {
        display: block !important;
        opacity: 1 !important;
        background: linear-gradient(120deg, rgba(41,80,135,0.55) 0%, rgba(52,118,209,0.35) 100%) !important;
        z-index: 2;
    }
}

/* ---------- FEATURES SECTION (Warehouse Background) ---------- */
.features-section {
  background: url('/image/About_us/Warehouse.jpg') center center/cover no-repeat !important;
  background-color: #295087 !important;
  background-attachment: fixed;
  padding: 160px 0 100px 0;
  position: relative;
  overflow: hidden;
  margin-top: -80px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.features-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth gradient transition at top with animation */
.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to bottom, 
    rgba(41, 80, 135, 0.95) 0%, 
    rgba(41, 80, 135, 0.7) 50%,
    transparent 100%);
  z-index: 2;
  opacity: 0;
  animation: slideDownFade 1.5s ease 0.3s forwards;
}

/* Main overlay for warehouse image with animation */
.features-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(41, 80, 135, 0.7) 0%, 
    rgba(0, 0, 0, 0.4) 50%, 
    rgba(41, 80, 135, 0.6) 100%);
  z-index: 1;
  opacity: 0;
  animation: fadeInOverlay 2s ease 0.6s forwards;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scroll indicator styling */
.scroll-down-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  color: #fff;
  font-size: 1.5rem;
  animation: bounce 2s infinite;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.scroll-down-indicator:hover {
  opacity: 0.7;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.features-section .container {
  position: relative;
  z-index: 3;
  max-width: 1400px;
}

.features-section .section-title {
  font-size: 3rem;
  font-weight: 800;
  color: #fff !important;
  margin-bottom: 60px;
  text-align: center;
  position: relative;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
  letter-spacing: -1px;
}

.features-section .section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #FF9800;
  margin: 24px auto 0 auto;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.5);
}

.features-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 80px;
  position: relative;
  z-index: 3;
}

.feature-step {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-step:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 152, 0, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  font-size: 2.2rem;
  color: #FF9800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.feature-step:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(255, 152, 0, 0.3);
}

.feature-step h4 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.feature-step p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* Mobile responsiveness for features */
@media (max-width: 768px) {
  .hero--why {
    background-attachment: scroll;
  }
  
  .features-section {
    padding: 120px 0 60px 0;
    margin-top: -60px;
    background-attachment: scroll;
    transition: all 0.8s ease;
  }
  
  .features-section::before {
    height: 120px;
    animation-duration: 1s;
  }
  
  .features-section::after {
    animation-duration: 1.5s;
  }
  
  .features-section .section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
  }
  
  .features-flow {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 50px;
  }
  
  .feature-step {
    padding: 32px 24px;
    border-radius: 16px;
  }
  
  .feature-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
  
  .feature-step h4 {
    font-size: 1.2rem;
  }
  
  .feature-step p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .features-section {
    margin-top: -40px;
    padding: 100px 0 50px 0;
  }
  
  .features-section::before {
    height: 100px;
  }
  
  .features-section .section-title {
    font-size: 1.8rem;
  }
  
  .feature-step {
    padding: 24px 20px;
  }
}

/* ---------- PILLAR CARDS (Legacy - keeping for compatibility) ---------- */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.pillar-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.pillar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.pillar-icon {
    font-size: 2rem;
    color: var(--clr-primary, #0055ff);
    margin-bottom: 1rem;
}

.pillar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .75rem;
}

/* ---------- METRICS ---------- */
.bg-dark {
    background: #111;
    color: #eee;
}

.section-title--light { color: #fff !important; }

.bg-primary .section-title {
  color: #fff !important;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.metric-card {
    text-align: center;
    padding: 1rem;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    display: block;
}

.metric-label {
    font-size: .9rem;
    opacity: .8;
}

/* ---------- LOGO RIBBON ---------- */
.logo-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
}

.logo-ribbon img {
    width: 120px;
    height: auto;
    filter: grayscale(100%);
    opacity: .75;
    transition: filter .2s, opacity .2s;
}
.logo-ribbon img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ---------- TESTIMONIAL SLIDER ---------- */
.story-slider {
    display: grid;                      /* simple CSS slider (use JS if you like) */
    grid-auto-flow: column;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: .5rem;
}

.story-slide {
    min-width: 300px;
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 2rem;
    scroll-snap-align: start;
}

.story-slide blockquote {
    font-size: .95rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    position: relative;
}
.story-slide blockquote:before {
    content: "“";
    font-size: 3rem;
    line-height: 0;
    color: var(--clr-primary, #0055ff);
    position: absolute;
    left: -0.5rem; top: -0.5rem;
}

.story-author {
    font-size: .85rem;
    font-weight: 600;
    color: #666;
}

/* ---------- CTA ---------- */
.bg-primary {
    background: var(--clr-primary, #0055ff);
    color: #fff;
}

.btn-light {
    background: #fff;
    color: var(--clr-primary, #0055ff);
}

/* ========== CTA Section Perfect Centering ========== */
.cta-section {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 400px !important;
    margin-bottom: 0 !important;
}

.cta-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

.cta-section .section-title {
    margin-bottom: 1.5rem !important;
}

.cta-section .cta-text {
    margin-bottom: 2rem !important;
    font-size: 1.2rem !important;
}

@media (min-width: 992px) {
    .story-slider { overflow-x: visible; }
    .story-slide  { min-width: auto; }
}

/* ---------- ANIMATION CLASSES ---------- */
.section-animate { 
    opacity: 0; 
    transform: translateY(40px); 
    transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1); 
}
.section-animate.in-view { 
    opacity: 1; 
    transform: none; 
}
.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1); 
}
.section-animate.in-view .reveal, 
.section-animate.in-view .reveal.delay-1, 
.section-animate.in-view .reveal.delay-2, 
.section-animate.in-view .reveal.delay-3, 
.section-animate.in-view .reveal.delay-4 {
    opacity: 1; 
    transform: none;
}
.reveal.delay-1 { transition-delay: 0.15s; }
.reveal.delay-2 { transition-delay: 0.3s; }
.reveal.delay-3 { transition-delay: 0.45s; }
.reveal.delay-4 { transition-delay: 0.6s; }
