/*
 * home.css — Western Trade Home Page Styles
 * ------------------------------------------
 * Purpose : Styles specific to index.html only.
 *           All shared styles live in main.css + components.css.
 * Domain  : ewesterntrade.com
 * Updated : 2026-10-16
 *
 * TABLE OF CONTENTS
 *  1. Hero Section
 *  2. Products Strip (cards row)
 *  3. About Section (split layout)
 *  4. Why Us Preview (4 cards)
 *  5. Partners Logo Strip
 */


/* ============================================================
   1. HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;           /* full viewport including behind fixed navbar */
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-footer-bg); /* fallback while image loads */
}

@media (max-width: 767px) {
  .hero { min-height: 90vh; }
}

/* Hero background image */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

/* Gradient overlay — left dark, fades right */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 1;
}

/* Extra darkening layer on mobile for readability */
@media (max-width: 767px) {
  .hero__overlay {
    background: rgba(7, 30, 71, 0.80);
  }
}

/* Content area */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: var(--space-24) 0;
}

/* "BANGLADESH TO THE WORLD" badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: var(--border-radius-full);
  display: inline-block;
  flex-shrink: 0;
}

/* Main headline */
.hero__headline {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: 1.08;
  color: var(--color-white);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .hero__headline { font-size: var(--text-6xl); }
}

@media (max-width: 480px) {
  .hero__headline { font-size: var(--text-4xl); }
}

.hero__headline .text-gold {
  color: var(--color-accent);
  display: block;
}

/* Subtext paragraph */
.hero__subtext {
  color: rgba(255, 255, 255, 0.80);
  font-size: var(--text-base);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .hero__subtext { font-size: var(--text-lg); }
}

/* CTA button group */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* Scroll indicator at bottom of hero */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0.6;
  animation: bounce 2s ease infinite;
}

.hero__scroll-indicator span {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
}

.hero__scroll-indicator svg {
  width: 20px;
  height: 20px;
  color: var(--color-white);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* Hide scroll indicator on mobile */
@media (max-width: 767px) {
  .hero__scroll-indicator { display: none; }
}


/* ============================================================
   2. PRODUCTS STRIP (card row)
   ============================================================ */

.products-strip {
  padding: var(--space-16) 0;
  background: var(--color-white);
}

.products-strip__header {
  margin-bottom: var(--space-10);
}

.products-strip__header h2 {
  margin-bottom: var(--space-2);
}

.products-strip__header p {
  color: var(--color-text-muted);
  margin: 0;
}

/* Scrollable row on mobile, 3-up then 6-up on desktop */
.products-strip__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .products-strip__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-strip__grid {
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-4);
  }
}

/* Individual product card */
.product-card {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  min-height: 200px;
  display: block;
  text-decoration: none;
}

@media (min-width: 1024px) {
  .product-card {
    aspect-ratio: 2 / 3;
    min-height: 280px;
  }
}

/* Background image */
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

/* Gradient overlay */
.product-card__overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-card-overlay);
  transition: background var(--transition);
}

.product-card:hover .product-card__overlay {
  background: linear-gradient(
    to top,
    rgba(7, 30, 71, 0.96) 0%,
    rgba(7, 30, 71, 0.60) 60%,
    rgba(7, 30, 71, 0.20) 100%
  );
}

/* Card label at bottom */
.product-card__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-4) var(--space-5);
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .product-card__name { font-size: var(--text-lg); }
}

.product-card__arrow {
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform: scale(0.85);
  transition: transform var(--transition), background-color var(--transition);
}

.product-card__arrow svg {
  width: 14px;
  height: 14px;
  color: var(--color-footer-bg);
}

.product-card:hover .product-card__arrow {
  transform: scale(1);
  background: var(--color-white);
}

.product-card:hover .product-card__img {
  transform: scale(1.06);
}


/* ============================================================
   3. ABOUT SECTION (split layout)
   ============================================================ */

.about-home {
  padding: var(--space-20) 0;
  background: var(--color-bg);
}

.about-home__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .about-home__inner {
    grid-template-columns: 3fr 2fr;
    gap: var(--space-16);
  }
}

/* Left column — text */
.about-home__text h2 {
  margin-bottom: var(--space-5);
}

.about-home__text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.8;
}

/* Trust badges row */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}

.trust-badge:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.trust-badge__icon {
  width: 36px;
  height: 36px;
  background: rgba(11, 61, 145, 0.08);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-badge__icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.trust-badge__text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

/* Small phones: tighter badge spacing so words like "Competitive" don't break mid-word */
@media (max-width: 420px) {
  .trust-badges {
    gap: var(--space-3);
  }

  .trust-badge {
    padding: var(--space-3);
    gap: var(--space-2);
  }
}

/* Right column — map card */
.about-home__map-card {
  background: var(--gradient-dark);
  border-radius: var(--border-radius-xl);
  padding: var(--space-10) var(--space-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-home__map-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-gold);
}

.about-home__map-label-top {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-3);
}

.about-home__map-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
  line-height: 1.15;
}

.about-home__map-svg {
  width: 100%;
  max-width: 260px;
  margin: 0 auto var(--space-6);
  opacity: 0.85;
}

.about-home__map-desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 240px;
  margin: 0 auto;
}


/* ============================================================
   4. WHY US PREVIEW (4 cards)
   ============================================================ */

.why-us-preview {
  padding: var(--space-20) 0;
  background: var(--color-white);
}

.why-us-preview__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-top: var(--space-10);
}

@media (min-width: 640px) {
  .why-us-preview__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .why-us-preview__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.why-us-preview__cta {
  margin-top: var(--space-10);
  text-align: center;
}


/* ============================================================
   5. INDUSTRIES WE COVER
   Replaced the partners strip — no manufacturer names shown
   ============================================================ */

/* ============================================================
   INDUSTRIES WE COVER — Infinite Marquee
   ──────────────────────────────────────────────────────────
   Pure CSS infinite scroll. Two identical sets of cards sit
   side by side inside one flex track. A @keyframes animation
   shifts the track left by exactly 50% (= width of one set),
   then instantly resets — creating a seamless infinite loop.

   Pauses on hover (animation-play-state: paused).
   Respects prefers-reduced-motion.
   No JavaScript required.
   ============================================================ */

.industries-section {
  padding: var(--space-20) 0;
  overflow: hidden;  /* clips the wide marquee track */
}

/* ── Outer wrapper — masks overflowing track ── */
.industries-marquee {
  overflow: hidden;
  width: 100%;
  margin-top: var(--space-10);
  /* Fade edges for a polished "disappearing" effect */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  cursor: default;
}

/* Pause when user hovers anywhere over the marquee */
.industries-marquee:hover .industries-marquee__track {
  animation-play-state: paused;
}

/* ── Track — flex row, twice as wide as viewport ── */
.industries-marquee__track {
  display: flex;
  gap: var(--space-4);
  width: max-content;  /* shrink-wraps all cards */
  animation: marquee-scroll 28s linear infinite;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .industries-marquee__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ── Keyframes: slide left by exactly half total width (= 1 set of cards) ── */
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Individual industry card ── */
.industry-card {
  background: var(--color-white);
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: var(--border-radius-lg, 12px);
  /* --space-7 doesn't exist — use explicit values: 28px top/bottom, 32px left/right */
  padding: 1.75rem 2rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  min-width: 175px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

/* Gold bottom border slides up on hover */
.industry-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: center;
}

.industry-card:hover {
  box-shadow: 0 8px 28px rgba(11, 61, 145, 0.13);
  border-color: var(--color-accent);
  transform: translateY(-4px);
}

.industry-card:hover::after {
  transform: scaleX(1);
}

/* Also pause marquee when a card is focused (keyboard nav) */
.industry-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.industries-marquee__track:has(.industry-card:focus-visible) {
  animation-play-state: paused;
}

.industry-card__icon {
  font-size: 2.4rem;   /* slightly larger emoji icon */
  line-height: 1;
  display: block;
}

.industry-card__name {
  font-size: 0.82rem;  /* slightly larger, more readable */
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  font-family: var(--font-body);
  white-space: nowrap;
}

/* ============================================================
   6. GLOBAL REACH SECTION
   ============================================================ */

.global-reach {
  padding: var(--space-20) 0;
}

.global-reach__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .global-reach__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.global-reach__text h2 { margin-bottom: var(--space-5); }
.global-reach__text p  {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-8);
}

/* Market rows */
.reach-markets {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.reach-market {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.reach-market:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.reach-market__flag {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.reach-market strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.reach-market span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Right: visual card */
.global-reach__visual {}

.reach-card {
  background: var(--gradient-dark);
  border-radius: var(--border-radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

.reach-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-gold);
}

.reach-card__top {
  margin-bottom: var(--space-6);
}

.reach-card__badge {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.reach-card__map {
  width: 100%;
  max-width: 100%;
  display: block;
  margin-bottom: var(--space-6);
  /* Prevent SVG from collapsing to tiny height on very narrow phones.
     SVG viewBox is 320x200 (1.6:1 ratio). At 280px wide = 175px tall.
     min-height 140px ensures continent shapes remain visible. */
  min-height: 140px;
}

/* Stats row at bottom of reach card */
.reach-card__stats {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: var(--space-6);
  gap: var(--space-4);
}

.reach-card__stat {
  text-align: center;
}

.reach-card__stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.reach-card__stat span {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.partners-strip {
  padding: var(--space-16) 0;
  background: var(--color-bg);
  overflow: hidden;
}

.partners-strip__header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.partners-strip__header h2 { margin-bottom: var(--space-3); }
.partners-strip__header p  { color: var(--color-text-muted); }

/* Logo row — flex scroll on mobile */
.partners-strip__logos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
}

/* Each partner pill */
.partner-pill {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-full);
  transition: box-shadow var(--transition), border-color var(--transition),
              transform var(--transition);
  cursor: default;
}

.partner-pill:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* Logo image inside pill — fixed height, any aspect ratio works */
.partner-pill__logo-img {
  height: 28px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  display: block;
  filter: grayscale(100%) opacity(0.60);
  transition: filter 0.35s ease;
  flex-shrink: 0;
}

.partner-pill:hover .partner-pill__logo-img {
  filter: grayscale(0%) opacity(1);
}

.partner-pill__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.partners-strip__cta {
  text-align: center;
  margin-top: var(--space-10);
}


/* ============================================================
   PRODUCTS CAROUSEL
   ──────────────────────────────────────────────────────────
   Infinite-loop clone-based carousel.
   Layout : 2 cards mobile / 3 tablet (640px+) / 4 desktop (1024px+)
   Auto   : 4 s interval, pauses on hover/focus
   Scroll : smooth cubic-bezier, 0.55s
   Cards  : subtle zoom-in on first entry (IntersectionObserver)
   Adding more products: just append .product-card to the track.
   ============================================================ */

.products-carousel {
  position: relative;
  padding: 0 3.25rem;  /* room for prev/next buttons on tablet/desktop */
}

/* ── On narrow phones, reduce side padding so cards aren't squeezed ──
   Below 480px: tighten padding — buttons overlay cards slightly but
   cards remain fully readable. Cards still show 2-up as designed.
   ------------------------------------------------------------------ */
@media (max-width: 479px) {
  .products-carousel {
    padding: 0 2.25rem;  /* reduced from 3.25rem — prevents card clipping */
  }
}

/* ── Viewport — clips cards, enables scroll-snap ── */
.products-carousel__viewport {
  overflow: hidden;
  width: 100%;
  border-radius: var(--radius-lg, 12px);
}

/* ── Track — flat flex row ── */
.products-carousel__track {
  display: flex;
  gap: var(--space-3);
  /* Smooth slide via JS scrollLeft on viewport */
  transition: none;
}

/* ── Each card: fixed width, does NOT shrink ──
   Widths are set via CSS custom property --carousel-vis
   which JS updates on resize. Fallback: calc below. */

.products-carousel__track .product-card {
  flex: 0 0 calc(50% - (var(--space-3) / 2));   /* 2 on mobile */
  max-width: calc(50% - (var(--space-3) / 2));
  /* Zoom-in reveal: cards start slightly scaled down */
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* Card revealed state (added by JS IntersectionObserver) */
.products-carousel__track .product-card.is-visible {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .products-carousel__track .product-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (min-width: 640px) {
  .products-carousel__track .product-card {
    flex: 0 0 calc(33.333% - (var(--space-3) * 2 / 3));  /* 3 on tablet */
    max-width: calc(33.333% - (var(--space-3) * 2 / 3));
  }
}

@media (min-width: 1024px) {
  .products-carousel__track .product-card {
    flex: 0 0 calc(25% - (var(--space-3) * 3 / 4));  /* 4 on desktop */
    max-width: calc(25% - (var(--space-3) * 3 / 4));
  }
}

/* ── Prev / Next arrow buttons ── */
.products-carousel__btn {
  position: absolute;
  top: 40%;                  /* slightly above center — visually better with tall cards */
  transform: translateY(-50%);
  z-index: 10;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(11, 61, 145, 0.15);
  background: var(--color-white);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  outline-offset: 3px;
}

.products-carousel__btn:hover,
.products-carousel__btn:focus-visible {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 6px 20px rgba(11, 61, 145, 0.28);
  transform: translateY(-50%) scale(1.07);
}

.products-carousel__btn:active {
  transform: translateY(-50%) scale(0.97);
}

.products-carousel__btn svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.products-carousel__btn--prev { left: 0; }
.products-carousel__btn--next { right: 0; }

/* ── Dot indicators ── */
.products-carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.products-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 61, 145, 0.18);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
  /* Touch target fix — minimum 44×44px tap area per WCAG 2.5.5
     padding creates the tap area without changing the visual dot size */
  position: relative;
}

.products-carousel__dot--active {
  background: var(--color-primary);
  width: 26px;
  border-radius: 4px;
}

/* Expand tap area to 44×44px without changing visual appearance */
.products-carousel__dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}

/* ── "View All Products" link below carousel ── */
.products-strip__footer {
  display: flex;
  justify-content: center;
  margin-top: var(--space-8);
}
