/* =====================================================
   WORK WITH US PAGE STYLES (AHDA) — CLEAN + FAST
   Matches your HTML exactly + hero text animations
   Grid stays 2x2 on medium screens, 1 column on small
===================================================== */

/* =======================
   PAGE WRAPPER
======================= */
.ahda-workwithus{
  background: var(--ahda-bg);
  color: var(--primary-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* =======================
   HERO SECTION (MOVING BG)
======================= */
.work-hero{
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--ahda-white);

  margin-top: -100px;
  padding: 5.5rem 0 4rem;
  padding-top: 140px;

  background: linear-gradient(135deg,
    var(--ahda-teal) 0%,
    var(--ahda-green) 70%,
    var(--ahda-orange) 120%);
}

/* Background slideshow layers */
.work-hero-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
}

.work-hero-bg-slide{
  position: absolute;
  inset: 0;
  opacity: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  transform: scale(1.05);
  transition: opacity 1s ease, transform 2s ease;
}

.work-hero-bg-slide.is-active{
  opacity: 1;
  transform: scale(1);
}

/* Overlay + pattern */
.work-hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(245,123,44,.25), transparent 60%),
    linear-gradient(135deg, rgba(11,79,102,.85), rgba(20,119,109,.85));
}

.work-hero-pattern{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .18;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,.25), transparent 30%),
    radial-gradient(circle at 80% 40%, rgba(255,255,255,.20), transparent 30%);
}

/* Ensure hero content is above overlays */
#workHero .container{
  position: relative;
  z-index: 5;
}

/* =======================
   HERO CONTENT
======================= */
.work-hero-badge{
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
  margin-bottom: 1rem;
}

.work-hero-title{
  font-weight: 900;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.1;
  margin-bottom: 1.2rem;

  background: linear-gradient(90deg, #fff, var(--ahda-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  text-shadow: 0 12px 34px rgba(0,0,0,0.45);
}

.work-hero-subtitle{
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* hero actions: keep same row on medium */
.work-hero-actions{
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: nowrap;
}

/* =======================
   HERO ANIMATIONS (no JS)
======================= */
@keyframes workFadeUp{
  from{ opacity: 0; transform: translateY(18px); filter: blur(2px); }
  to  { opacity: 1; transform: translateY(0);  filter: blur(0); }
}
@keyframes workFloat{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}
@keyframes workSoftGlow{
  0%,100%{ box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
  50%{ box-shadow: 0 14px 38px rgba(0,0,0,0.28); }
}

.work-hero-badge{ animation: workFadeUp .75s ease-out both; }
.work-hero-title{
  animation:
    workFadeUp .9s ease-out .08s both,
    workFloat 6s ease-in-out 1.2s infinite;
  will-change: transform;
}
.work-hero-subtitle{ animation: workFadeUp .9s ease-out .18s both; }
.work-hero-actions{ animation: workFadeUp .9s ease-out .28s both; }

/* Optional gentle glow for primary button in hero */
.work-hero-actions .btn-ahda-primary{
  animation: workSoftGlow 3.2s ease-in-out 1.2s infinite;
}

/* =======================
   HEADINGS (SECTION TITLES)
======================= */
.work-head{
  margin-bottom: 3rem;
  text-align: center;
  width: 100%;
}

.work-h2{
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary-heading);
  position: relative;
  display: inline-block;
  margin: 0 auto;
}

.work-h2::after{
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  margin: 0.8rem auto 0;
  border-radius: 4px;
  opacity: 0.9;
  background: linear-gradient(90deg, var(--primary-accent), var(--ahda-green));
}

.work-sub{
  margin-top: 1rem;
  color: var(--secondary-text);
  font-size: 1.05rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* =======================
   CATEGORY CARDS (OPPORTUNITIES AT AHDA)
======================= */
.work-categories{
  padding: 5rem 0 2.5rem;
}

.work-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  max-width: 1050px;
  margin: 2.2rem auto 0;
}

.work-card{
  text-decoration: none;
  color: inherit;

  background: var(--ahda-white);
  border-radius: 24px;
  padding: 1.6rem 1.5rem;

  border: 1px solid rgba(11,79,102,0.06);
  box-shadow: 0 8px 25px rgba(11,79,102,0.06);

  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
  overflow: hidden;
}

.work-card:hover{
  transform: translateY(-7px);
  box-shadow: 0 15px 35px rgba(11,79,102,0.1);
  border-color: rgba(245,123,44,0.15);
}

.work-card-top{
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.work-icon{
  width: 56px;
  height: 56px;
  border-radius: 16px;

  display: grid;
  place-items: center;

  background: linear-gradient(135deg, var(--ahda-teal), var(--ahda-green));
  color: var(--ahda-white);
  font-size: 1.5rem;

  flex: 0 0 auto;
  box-shadow: 0 6px 18px rgba(11,79,102,0.25);
}

.work-card-text{ flex: 1; }

.work-h3{
  margin: 0 0 .35rem;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary-heading);
}

.work-p{
  margin: 0;
  color: var(--secondary-text);
  line-height: 1.65;
  font-size: .98rem;
}

/* =======================
   CURRENT OPPORTUNITIES SECTION
======================= */
.work-opps{
  padding: 3.5rem 0 4.5rem;
}

/* Equal Opportunity Statement (EOS) */
.work-eos{
  max-width: 1050px;
  margin: 3rem auto 0;
  border-radius: 24px;
  padding: 1.6rem 1.4rem;

  background: linear-gradient(135deg, rgba(11,79,102,.04), rgba(245,123,44,.04));
  border: 1px solid rgba(11,79,102,.06);

  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.work-eos-icon{
  width: 52px;
  height: 52px;
  border-radius: 16px;

  display: grid;
  place-items: center;

  background: linear-gradient(135deg, var(--ahda-teal), var(--ahda-green));
  color: var(--ahda-white);
  font-size: 1.4rem;

  flex: 0 0 auto;
}

.work-eos-title{
  margin: 0 0 .35rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary-heading);
}

.work-eos-p{
  margin: 0;
  color: var(--secondary-text);
  line-height: 1.7;
}

/* =======================
   BUTTON STYLES
======================= */
.btn-ahda-primary,
.btn-ahda-outline{
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 700;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  text-decoration: none;
}

.btn-ahda-primary{
  background: var(--primary-accent);
  color: var(--ahda-white);
  border: none;
  box-shadow: var(--shadow-orange);
}

.btn-ahda-primary::after,
.btn-ahda-outline::after{
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 0;
  border-radius: 999px;
  transition: height .3s ease;
  z-index: -1;
}

.btn-ahda-primary::after{ background: rgba(255,255,255,0.2); }
.btn-ahda-outline::after{ background: rgba(255,255,255,0.15); }

.btn-ahda-primary:hover{
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(245,123,44,0.5);
}
.btn-ahda-primary:hover::after{ height: 100%; }

.btn-ahda-outline{
  background: transparent;
  color: var(--ahda-white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-ahda-outline:hover{
  transform: translateY(-3px);
  border-color: #fff;
}
.btn-ahda-outline:hover::after{ height: 100%; }

/* Small helpers (only if you use them) */
.me-2{ margin-right: .5rem; }

/* =======================
   RESPONSIVE
======================= */

/* Keep grid 2x2 on medium; only become 1 column on small */
@media (max-width: 992px){
  .work-grid{ grid-template-columns: repeat(2, 1fr); }
  .work-hero-actions{ flex-wrap: wrap; }
}

@media (max-width: 768px){
  .work-hero{
    padding-top: 120px;
    padding-bottom: 3rem;
  }

  .work-grid{ grid-template-columns: 1fr; }

  /* keep hero buttons in same row if there are 2; otherwise they wrap naturally */
  .work-hero-actions{
    flex-wrap: wrap;
  }
}

@media (max-width: 480px){
  .work-hero-title{ font-size: 2.2rem; }
  .work-h2{ font-size: 2rem; }

  .work-card{ padding: 1.2rem 1rem; }

  .work-icon{
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .work-h3{ font-size: 1.1rem; }
  .work-p{ font-size: .9rem; }

  .work-eos{
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem;
  }

  /* stack hero buttons on small phones */
  .work-hero-actions{
    flex-direction: column;
  }
  .work-hero-actions .btn-ahda-primary,
  .work-hero-actions .btn-ahda-outline{
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }
}

@media (max-width: 360px){
  .work-hero-title{ font-size: 1.9rem; }
  .work-h2{ font-size: 1.7rem; }
}

/* =======================
   REDUCED MOTION
======================= */
@media (prefers-reduced-motion: reduce){
  .work-hero-badge,
  .work-hero-title,
  .work-hero-subtitle,
  .work-hero-actions,
  .work-hero-actions .btn-ahda-primary{
    animation: none !important;
  }
  .work-card:hover,
  .btn-ahda-primary:hover,
  .btn-ahda-outline:hover{
    transform: none !important;
  }
}