/* ==========================================================
   WHAT WE OFFER SECTION
   Author: Shayne Rothwell
   Version: 1.6 (Optimized Hover + Animation)
========================================================== */

/* ---------- MAIN CONTAINER ---------- */
.offer-container {
  padding: 80px 10%;
  background: var(--color-primary);
  color: var(--color-secondary);
  display: flex;
  justify-content: center;
}

.offer-content {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 50px;
  max-width: 1200px;
  width: 100%;
}

/* ---------- LEFT IMAGE ---------- */
.image-block-offer {
  flex: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-block-offer img {
  width: 100%;
  height: 100%;
  border-radius: 25px;
  object-fit: cover;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ---------- RIGHT SIDE CONTENT ---------- */
.text-and-cards {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ---------- SECTION HEADER ---------- */
.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-secondary);
}

.section-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 20px;
  max-width: 550px;
  color: var(--color-secondary);
}

.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--color-secondary);
  color: var(--color-accent);
  transform: scale(1.05);
}

/* ---------- OFFER CARDS GRID ---------- */
.offer-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  flex: 1;
}

/* CARD BASE STYLE */
.offer-card {
  background: var(--color-bg);
  padding: 24px 22px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-top: 4px solid transparent;
  cursor: pointer;
  transition: none; /* Removes shared transition delay */
}

/* SNAPPY HOVER EFFECT */
.offer-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2),
              0 0 6px var(--color-accent);
  border-color: var(--color-accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

/* CARD TEXT */
.offer-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--color-secondary);
}

.offer-card p {
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.6;
}

/* ---------- TABLET (≤1024px) ---------- */
@media (max-width: 1024px) {
  .offer-content {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: 20px;
  }

  .section-header h2,
  .section-header p {
    flex: 1;
  }

  .section-header img {
    flex: 0.8;
    max-width: 280px;
    border-radius: 15px;
  }

  .image-block-offer {
    display: none;
  }

  .offer-cards {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }
}

/* ---------- MOBILE (≤600px) ---------- */
@media (max-width: 600px) {
  .section-header {
    flex-direction: column;
    text-align: center;
  }

  .section-header img {
    max-width: 100%;
    border-radius: 10px;
  }

  .offer-cards {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  .btn-primary {
    padding: 10px 24px;
  }
}

/* ---------- SCROLL ANIMATION STYLES ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

[data-animate].active {
  opacity: 1;
  transform: translateY(0);
}

/* VARIANTS */
[data-animate="fade-left"] {
  transform: translateX(-60px);
}
[data-animate="fade-right"] {
  transform: translateX(60px);
}
[data-animate="fade-left"].active,
[data-animate="fade-right"].active {
  transform: translateX(0);
}

/* ---------- ANIMATION STAGGER (FADE-IN ONLY) ---------- */
.offer-card[data-animate].active:nth-child(1) { transition-delay: 0.05s; }
.offer-card[data-animate].active:nth-child(2) { transition-delay: 0.1s; }
.offer-card[data-animate].active:nth-child(3) { transition-delay: 0.15s; }
.offer-card[data-animate].active:nth-child(4) { transition-delay: 0.2s; }
