/**
 * Parts24 — Home Page
 * src/css/pages/home.css
 *
 * Page-specific styles for the homepage only.
 * Generic styles (buttons, cards, hero, cta) → components/.
 * Utility classes (.text-white etc.) → core/base.css.
 *
 * Mobile-first: base = mobile, min-width overrides scale up.
 *
 * Sections:
 *   1. Hero (full-bleed image + glassmorphic card)
 *   2. About / Trust
 *   3. Partner (dark section)
 *   4. Brands section wrapper
 *   5. Stats section wrapper
 *   6. Tablet (≥ 768px)
 *   7. Desktop (≥ 1024px)
 *   8. Small mobile refinements (≤ 480px)
 */

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

.hero-section {
  position: relative;
  min-height: 100svh; /* fill viewport on mobile */
  display: flex;
  align-items: flex-end; /* content anchors to bottom on mobile */
  overflow: hidden;
}

/* Background image layer */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

/* Fallback gradient when image fails */
.hero-bg--fallback {
  background: linear-gradient(
    135deg,
    var(--color-primary-dark)   0%,
    var(--color-primary-medium) 100%
  );
}

/* Dark overlay — gradient for mobile (heavy at bottom) */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(80, 80, 80, 0.95) 40%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

/* Content wrapper */
.hero-body {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr; /* single column on mobile */
  padding-top: var(--space-8);
  padding-bottom: var(--space-10);
}

/* Glassmorphic content card */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  color: var(--color-white);
}

.hero-eyebrow {
  font-size: 2rem;
  font-weight: var(--font-extrabold);
  color: var(--color-accent-primary);
  margin-bottom: var(--space-5);
}

.hero-text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-200);
  margin-bottom: var(--space-5);
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.hero-feature {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.hero-feature__icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.hero-feature strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-white);
  margin-bottom: var(--space-1);
}

.hero-feature p {
  font-size: var(--text-xs);
  color: var(--color-gray-300);
  margin: 0;
  line-height: var(--leading-relaxed);
}

.hero-tagline {
  font-size: var(--text-xs);
  color: var(--color-gray-300);
  font-style: italic;
  margin-bottom: var(--space-5);
}

/* CTA row — stacks vertically on mobile (handled by buttons.css) */
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

/* ============================================
   2. ABOUT / TRUST SECTION
   ============================================ */

.about-section {
  background-color: var(--color-white);
}

/* Single column on mobile */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: start;
}

.about-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* Floating stat badge — positioned relative to image wrapper */
.about-image-wrap {
  position: relative;
}

.about-badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  background: var(--color-accent-primary);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.about-badge__number {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  line-height: 1;
}

.about-badge__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  opacity: 0.9;
  margin-top: var(--space-1);
}

/* Text column */
.about-content h2 {
  font-size: var(--text-2xl);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.about-content p {
  color: var(--color-gray-700);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.about-why-title {
  font-size: var(--text-lg);
  color: var(--color-primary-dark);
  margin: var(--space-5) 0 var(--space-3);
}

.about-closing {
  color: var(--color-primary-dark);
  font-weight: var(--font-medium);
  font-size: var(--text-base);
}

/* ============================================
   3. PARTNER SECTION (dark background)
   ============================================ */

/* Single column on mobile */
.partner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: start;
}

.partner-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.partner-intro p {
  color: var(--color-gray-300);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.partner-intro strong {
  color: var(--color-white);
}

/* Advantages grid — 1 column on mobile */
.advantages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.advantage-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: var(--space-5);
  text-align: center;
  transition: background var(--transition-base), transform var(--transition-base);
}

.advantage-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.advantage-card__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: var(--space-2);
}

.advantage-card h4 {
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
}

/* ============================================
   4. BRANDS SECTION WRAPPER
   Ticker widget styles → components/brands-ticker.css
   ============================================ */

.brands-section {
  background-color: var(--color-white);
}

.brands-intro {
  color: var(--color-gray-700);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  text-align: center;
}

/* Section heading stays full-width on mobile */
.brands-section .section-header {
  max-width: 100%;
}

/* ============================================
   5. STATS SECTION WRAPPER
   Stat-card styles → components/stat-cards.css
   ============================================ */

.stats-section {
  background-color: var(--color-gray-100);
}

/* ============================================
   6. TABLET (≥ 768px)
   ============================================ */

@media (min-width: 768px) {

  /* Hero */
  .hero-section {
    align-items: center; /* vertically center content on larger screens */
    min-height: 75vh;
  }

  .hero-overlay {
    background: linear-gradient(
      135deg,
      rgba(78, 78, 78, 0.88) 0%,
      rgba(0, 0, 0, 0.55) 100%
    );
  }

  .glass-card {
    padding: var(--space-8);
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-2xl);
  }

  .hero-text     { font-size: var(--text-base); }
  .hero-tagline  { font-size: var(--text-sm); }

  .hero-feature strong { font-size: var(--text-base); }
  .hero-feature p      { font-size: var(--text-sm); }

  .hero-cta {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
  }

  /* About */
  .about-img {
    height: 400px;
  }

  .about-badge__number { font-size: var(--text-3xl); }
  .about-badge__label  { font-size: var(--text-sm); }

  .about-content h2 { font-size: var(--text-3xl); }

  /* Partner */
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Brands */
  .brands-section .section-header {
    max-width: 55%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .brands-section .section-header h2 {
    align-items: center;
  }
}

/* ============================================
   7. DESKTOP (≥ 1024px)
   ============================================ */

@media (min-width: 1024px) {

  /* Hero — 2-column layout: glass card left, photo right */
  .hero-section {
    min-height: 90vh;
    align-items: center;
  }

  .hero-body {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }

  .glass-card {
    padding: var(--space-10) var(--space-12);
  }

  .hero-text    { font-size: var(--text-base); }

  .hero-feature strong { font-size: var(--text-base); }
  .hero-feature p      { font-size: var(--text-sm); }

  /* About — 2-column: image left, text right */
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }

  .about-image-wrap { order: 1; }
  .about-content    { order: 2; }

  .about-img {
    height: 520px;
  }

  .about-badge {
    left: calc(var(--space-6) * -1); /* float slightly outside image */
    bottom: var(--space-6);
  }

  .about-badge__number { font-size: var(--text-3xl); }

  /* Partner — 2-column */
  .partner-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }

  .advantages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   8. SMALL MOBILE REFINEMENTS (≤ 480px)
   ============================================ */

@media (max-width: 480px) {

  .hero-section {
    min-height: unset; /* let content define height on very small screens */
  }

  .hero-img {
    object-position: right bottom;
  }

  .advantages-grid {
    grid-template-columns: 1fr; /* single column on very small screens */
  }
}
