/* ========================================
   Agency page (new design), on top of dept2.css
   pages/portal/agency-new.html
======================================== */

/* ---------- Hero ---------- */

.ag-hero {
  position: relative;
  background: var(--d-navy) url("../assets/images/agency/agency-hero.jpg") center 35% / cover no-repeat;
  overflow: hidden;
}

.ag-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(0, 38, 54, .95) 0%, rgba(0, 43, 61, .86) 36%, rgba(0, 52, 75, .35) 70%, rgba(0, 52, 75, .1) 100%),
    linear-gradient(to top, rgba(0, 30, 44, .9) 0%, rgba(0, 30, 44, 0) 38%);
}

.ag-hero-inner {
  position: relative;
  z-index: 1;
  padding: 72px 0 120px;
  color: #ffffff;
}

.ag-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--d-mint);
  font-size: 14px;
  font-weight: 700;
}

.ag-hero-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--d-mint);
}

.ag-hero h1 {
  max-width: 680px;
  margin: 0 0 18px;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.22;
  font-weight: 700;
}

.ag-hero p {
  max-width: 540px;
  margin: 0 0 34px;
  color: rgba(255, 255, 255, .82);
  font-size: 17px;
  line-height: 1.9;
}

/* Highlights: a white card overlapping the bottom of the hero */
.ag-highlights {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: -58px;
  border: 1px solid var(--d-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 52, 75, .12);
  overflow: hidden;
}

.ag-hl {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px;
}

.ag-hl + .ag-hl { border-right: 1px solid var(--d-line); }

.ag-hl-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #effaf8 0%, #dff4f0 100%);
  box-shadow: inset 0 0 0 1px rgba(22, 156, 140, .14);
  color: var(--d-teal);
}

.ag-hl-icon svg { width: 24px; height: 24px; }
.ag-hl-text { display: grid; gap: 3px; min-width: 0; }
.ag-hl-text strong { color: var(--d-navy); font-size: 16px; }
.ag-hl-text small { color: var(--d-muted); font-size: 13px; line-height: 1.6; }

/* ---------- Departments ---------- */

.ag-depts {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 18px;
}

.ag-dept {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--d-line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--d-ink);
  text-decoration: none;
}

.ag-dept-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--d-soft);
}

.ag-dept-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.ag-dept-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
}

.ag-dept-state {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e6faf7;
  color: var(--d-teal);
  font-size: 12px;
  font-weight: 700;
}

.ag-dept-state.is-soon {
  background: #f1f4f5;
  color: #7c8f97;
}

.ag-dept strong { color: var(--d-navy); font-size: 17px; line-height: 1.5; }
.ag-dept small { color: var(--d-muted); font-size: 13.5px; line-height: 1.8; }

.ag-dept-go {
  margin-top: auto;
  padding-top: 8px;
  color: var(--d-teal);
  font-size: 14px;
  font-weight: 700;
}

.ag-dept.is-active {
  border-color: #bfe9e2;
  box-shadow: 0 18px 44px rgba(0, 52, 75, .1);
  transition: transform .2s ease, box-shadow .2s ease;
}

.ag-dept.is-active:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 54px rgba(0, 52, 75, .16);
}

.ag-dept.is-active:hover .ag-dept-img img { transform: scale(1.04); }
.ag-dept.is-active strong { font-size: 19px; }

.ag-dept:not(.is-active) .ag-dept-img img { filter: saturate(.55); opacity: .85; }

/* ---------- How it works ---------- */

.ag-how {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 56px;
  padding: 56px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f4f9fa 0%, #eaf6f4 100%);
}

.ag-steps {
  display: grid;
  gap: 18px;
  margin: 26px 0 30px;
  padding: 0;
  list-style: none;
}

.ag-steps li { display: flex; gap: 14px; }

.ag-steps li > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--d-navy);
  color: var(--d-mint);
  font-size: 15px;
  font-weight: 700;
}

.ag-steps strong { display: block; margin-bottom: 3px; color: var(--d-navy); font-size: 16px; }
.ag-steps small { color: var(--d-muted); font-size: 14px; line-height: 1.75; }

.ag-how-visual { margin: 0; }

.ag-how-visual img {
  display: block;
  width: 100%;
  border-radius: 18px;
  mix-blend-mode: multiply;
}

/* ---------- Services ---------- */

.ag-services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ag-service {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--d-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--d-ink);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

a.ag-service:hover {
  border-color: #bfe9e2;
  box-shadow: 0 16px 36px rgba(0, 52, 75, .1);
  transform: translateY(-2px);
}

.ag-service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: linear-gradient(145deg, #effaf8, #dff4f0);
  color: var(--d-teal);
}

.ag-service-icon svg { width: 25px; height: 25px; }
.ag-service strong { color: var(--d-navy); font-size: 17px; }
.ag-service small { color: var(--d-muted); font-size: 13.5px; line-height: 1.8; }
.ag-service-go { margin-top: auto; color: var(--d-teal); font-size: 14px; font-weight: 700; }

.ag-service.is-soon { background: #fbfcfd; }
.ag-service.is-soon .ag-service-icon { background: #eef2f3; color: #8a9ca4; }
.ag-service.is-soon .ag-service-go { color: #9aaab1; }

/* ---------- Closing call to action ---------- */

.ag-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 88px;
  margin-bottom: 96px;
  padding: 40px 48px;
  border-radius: 22px;
  background: linear-gradient(135deg, #004663 0%, var(--d-navy) 55%, var(--d-navy-2) 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.ag-cta::after {
  content: "";
  position: absolute;
  left: -80px;
  top: -110px;
  width: 280px;
  height: 280px;
  border: 40px solid rgba(0, 206, 183, .1);
  border-radius: 50%;
  pointer-events: none;
}

.ag-cta h2 { margin: 0 0 8px; font-size: 26px; }
.ag-cta p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 15.5px; }
.ag-cta .dp2-btn { position: relative; z-index: 1; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .ag-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-hl:nth-child(3) { border-right: 0; }
  .ag-hl:nth-child(n+3) { border-top: 1px solid var(--d-line); }
  .ag-depts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-how { grid-template-columns: 1fr; padding: 36px; }
}

@media (max-width: 760px) {
  .ag-highlights { grid-template-columns: 1fr; }
  .ag-hl + .ag-hl { border-right: 0; border-top: 1px solid var(--d-line); }
  .ag-depts, .ag-services { grid-template-columns: 1fr; }
  .ag-how { padding: 24px; }
  .ag-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
}
