/* Regional Agents - editorial premium layout */

:root {
  --agent-bg: #f3efe8;
  --agent-bg-soft: #fbf8f3;
  --agent-surface: rgba(255, 255, 255, 0.8);
  --agent-surface-strong: rgba(255, 255, 255, 0.92);
  --agent-text: #14233f;
  --agent-muted: #5f6b7f;
  --agent-primary: #1f3f88;
  --agent-primary-strong: #102a60;
  --agent-accent: #6b8fd4;
  --agent-line: rgba(20, 35, 63, 0.08);
  --agent-shadow: 0 24px 60px rgba(20, 35, 63, 0.1);
  --hero-grad: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
}

.agents-page {
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(30, 64, 175, 0.14),
      transparent 28%
    ),
    radial-gradient(circle at 85% 8%, rgba(30, 64, 175, 0.12), transparent 24%),
    linear-gradient(180deg, #e8eef8 0%, #dde6f4 40%, #e2eaf5 100%);
  color: var(--agent-text);
}

.agents-hero {
  position: relative;
  overflow: hidden;
  padding: 240px 0 200px;
  background: var(--hero-grad);
  color: #fff;
}

.agents-hero::before {
  content: "";
  position: absolute;
  inset: -10% auto auto -6%;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0) 70%
  );
}

.agents-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(31, 63, 136, 0.18) 0%,
    rgba(31, 63, 136, 0) 72%
  );
}

.agents-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.agents-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 64, 175, 0.6) 0%,
    rgba(59, 130, 246, 0.4) 50%,
    rgba(37, 99, 235, 0.5) 100%
  );
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-copy {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agents-hero h1 {
  margin: 22px 0 18px;
  font-size: 4.1rem;
  line-height: 1.04;
  letter-spacing: 0.01em;
  font-family: "Noto Serif SC", serif;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.agents-hero p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.14rem;
  line-height: 1.95;
}

.city-filter-container {
  position: relative;
  z-index: 5;
  margin-top: -52px;
}

.city-filter-bar {
  width: fit-content;
  margin: 0 auto;
  padding: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 60px rgba(20, 35, 63, 0.14);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.city-filter-bar .filter-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #45536b;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.28s ease;
}

.city-filter-bar .filter-btn:hover {
  background: rgba(31, 63, 136, 0.08);
  color: var(--agent-primary);
}

.city-filter-bar .filter-btn.active {
  background: linear-gradient(135deg, var(--agent-primary) 0%, #2b58b1 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(31, 63, 136, 0.28);
}

.agents-directory-section {
  position: relative;
  padding: 34px 0 94px;
}

.agents-directory-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(31, 63, 136, 0.08), transparent 25%),
    radial-gradient(circle at 84% 24%, rgba(31, 63, 136, 0.09), transparent 22%);
}

.agent-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.agent-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 460px;
  padding: 34px 28px 28px;
  border-radius: 32px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(249, 250, 252, 0.9)
  );
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 28px 70px rgba(20, 35, 63, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  text-align: center;
  transition:
    transform 0.38s ease,
    box-shadow 0.38s ease;
}

.agent-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 138px;
  background:
    linear-gradient(135deg, rgba(31, 63, 136, 0.12), rgba(31, 63, 136, 0.24)),
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.55),
      transparent 42%
    );
}

.agent-card::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -48px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(31, 63, 136, 0.16) 0%,
    rgba(31, 63, 136, 0) 72%
  );
}

.agent-card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 38px 94px rgba(20, 35, 63, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.agent-avatar-wrapper {
  position: relative;
  z-index: 1;
  width: 134px;
  height: 134px;
  margin-bottom: 26px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(20, 35, 63, 0.18);
  background: #e9eef6;
}

.agent-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.agent-card:hover .agent-img {
  transform: scale(1.06);
}

.agent-city-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(31, 63, 136, 0.07);
  color: var(--agent-primary);
  font-size: 0.84rem;
  font-weight: 800;
}

.agent-name {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.16;
  color: var(--agent-text);
}

.agent-role {
  position: relative;
  z-index: 1;
  margin: 0 0 28px;
  min-height: 2.6em;
  color: var(--agent-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.btn-agent-action {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: auto;
  padding: 15px 0;
  border: none;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    var(--agent-primary-strong) 0%,
    var(--agent-primary) 100%
  );
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(31, 63, 136, 0.22);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.btn-agent-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(31, 63, 136, 0.28);
}

.agents-overview-section,
.agents-scenarios-section,
.agents-process-section,
.agents-compliance-section {
  padding: 110px 0 0;
  position: relative;
}

.agents-process-section {
  padding-bottom: 110px;
}

.section-heading {
  max-width: 860px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-kicker {
  display: inline-flex;
  padding: 8px 20px;
  border-radius: 999px;
  background: linear-gradient(
    rgba(31, 63, 136, 0.1) 0%,
    rgba(31, 63, 136, 0.2) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--agent-primary-strong);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(20, 35, 63, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.section-heading h2 {
  margin: 24px 0 16px;
  font-size: 2.8rem;
  line-height: 1.25;
  color: var(--agent-text);
  font-family: "Noto Serif SC", serif;
}

.section-heading p {
  margin: 0;
  color: var(--agent-muted);
  line-height: 1.8;
  font-size: 1.1rem;
}

.overview-grid,
.scenario-grid,
.process-grid {
  display: grid;
  gap: 30px;
}

.overview-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(280px, auto);
}

.scenario-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
  gap: 26px;
}

.overview-card,
.scenario-card {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 20px 50px rgba(10, 20, 55, 0.14);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.overview-card:hover,
.scenario-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(31, 63, 136, 0.12);
  border-color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.98);
}

.overview-card,
.scenario-card {
  padding: 40px;
}

.process-step {
  position: relative;
  margin-top: 45px;
  padding: 55px 30px 40px;
  border-radius: 32px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(220, 230, 245, 0.9)
  );
  border: 1px solid rgba(200, 215, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 20px 50px rgba(10, 20, 60, 0.12),
    inset 0 2px 20px rgba(255, 255, 255, 0.5);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  text-align: center;
}

.process-step:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(31, 63, 136, 0.15);
  border-color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 1);
}

.overview-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.overview-card:hover {
  background: linear-gradient(135deg, #102a60 0%, #1f3f88 100%);
  border-color: transparent;
  box-shadow: 0 34px 60px rgba(31, 63, 136, 0.4);
}

.overview-card::after {
  position: absolute;
  bottom: -15px;
  right: 10px;
  font-size: 9rem;
  line-height: 1;
  font-weight: 800;
  color: rgba(31, 63, 136, 0.04);
  font-family: "Noto Serif SC", serif;
  pointer-events: none;
  transition: color 0.4s ease;
  z-index: 0;
}

.overview-card:nth-child(1)::after {
  content: "01";
}
.overview-card:nth-child(2)::after {
  content: "02";
}
.overview-card:nth-child(3)::after {
  content: "03";
}

.overview-card:hover::after {
  color: rgba(255, 255, 255, 0.06);
}

.overview-icon {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7f9fc, #e8edf4);
  color: var(--agent-primary);
  font-weight: 800;
  font-size: 1.5rem;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 1),
    0 10px 20px rgba(10, 20, 40, 0.06);
  transition: all 0.4s ease;
}

.overview-card:hover .overview-icon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.overview-card h3,
.scenario-card h3,
.process-step h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  font-size: 1.4rem;
  color: var(--agent-text);
  font-weight: 700;
  transition: color 0.4s ease;
}

.overview-card:hover h3 {
  color: #fff;
}

.overview-card p,
.scenario-card p,
.process-step p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--agent-muted);
  font-size: 1.05rem;
  line-height: 1.85;
  transition: color 0.4s ease;
}

.overview-card:hover p {
  color: rgba(255, 255, 255, 0.85);
}

.scenario-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: none;
  box-shadow: 0 24px 50px rgba(16, 42, 96, 0.25);
  background-blend-mode: overlay;
}

.scenario-card h3 {
  color: #ffffff;
  font-size: 2.1rem;
  font-weight: 700;
}

.scenario-card p {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  max-width: 32em;
  font-size: 1.15rem;
}

.scenario-card:nth-child(1) {
  grid-column: span 8;
  background:
    linear-gradient(135deg, rgba(16, 42, 96, 0.88), rgba(15, 23, 42, 0.8)),
    url("https://cos.medicine.net/worldsleep/site-assets/v2/img/ai/agents_channel_light.png") center/cover;
}

.scenario-card:nth-child(1):hover {
  background:
    linear-gradient(135deg, rgba(16, 42, 96, 0.95), rgba(15, 23, 42, 0.88)),
    url("https://cos.medicine.net/worldsleep/site-assets/v2/img/ai/agents_channel_light.png") center/cover;
}

.scenario-card:nth-child(2) {
  grid-column: span 4;
  background:
    linear-gradient(135deg, rgba(16, 42, 96, 0.88), rgba(15, 23, 42, 0.8)),
    url("https://cos.medicine.net/worldsleep/site-assets/v2/img/ai/agents_clinical_light.png") center/cover;
}

.scenario-card:nth-child(2):hover {
  background:
    linear-gradient(135deg, rgba(16, 42, 96, 0.95), rgba(15, 23, 42, 0.88)),
    url("https://cos.medicine.net/worldsleep/site-assets/v2/img/ai/agents_clinical_light.png") center/cover;
}

.scenario-card:nth-child(3) {
  grid-column: span 5;
  background:
    linear-gradient(135deg, rgba(16, 42, 96, 0.88), rgba(15, 23, 42, 0.8)),
    url("https://cos.medicine.net/worldsleep/site-assets/v2/img/ai/agents_supply_light.png") center/cover;
}

.scenario-card:nth-child(3):hover {
  background:
    linear-gradient(135deg, rgba(16, 42, 96, 0.95), rgba(15, 23, 42, 0.88)),
    url("https://cos.medicine.net/worldsleep/site-assets/v2/img/ai/agents_supply_light.png") center/cover;
}

.scenario-card:nth-child(4) {
  grid-column: span 7;
  background:
    linear-gradient(135deg, rgba(16, 42, 96, 0.88), rgba(15, 23, 42, 0.8)),
    url("https://cos.medicine.net/worldsleep/site-assets/v2/img/ai/agents_ecology_light.png") center/cover;
}

.scenario-card:nth-child(4):hover {
  background:
    linear-gradient(135deg, rgba(16, 42, 96, 0.95), rgba(15, 23, 42, 0.88)),
    url("https://cos.medicine.net/worldsleep/site-assets/v2/img/ai/agents_ecology_light.png") center/cover;
}

.process-index {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--agent-primary),
    var(--agent-primary-strong)
  );
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow:
    0 16px 30px rgba(31, 63, 136, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
  border: 6px solid #f8fafc;
  z-index: 2;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.05em;
}

.compliance-panel {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(0, 1.2fr);
  gap: 40px;
  padding: 60px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.4),
    inset 0 2px 20px rgba(31, 63, 136, 0.3);
  position: relative;
  overflow: hidden;
}

.compliance-panel::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(31, 63, 136, 0.2) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.compliance-panel > div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.compliance-panel .section-kicker {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: none;
  align-self: flex-start;
}

.compliance-panel h2 {
  margin: 28px 0 0;
  font-size: 2.8rem;
  line-height: 1.35;
  color: #fff;
  font-family: "Noto Serif SC", serif;
}

.compliance-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  line-height: 1.9;
  display: grid;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.compliance-list li {
  position: relative;
  padding: 24px 28px 24px 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.compliance-list li:hover {
  transform: translateX(10px);
  background: rgba(255, 255, 255, 0.06);
}

.compliance-list li::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 32px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #6b8fd4;
  box-shadow: 0 0 15px rgba(107, 143, 212, 0.6);
}

.agent-modal-content {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(245, 247, 251, 0.96)
  );
  border-radius: 32px;
  padding: 50px;
  max-width: 600px;
  width: 90%;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 38px 80px rgba(0, 0, 0, 0.26);
}

.resource-list {
  display: grid;
  gap: 15px;
  margin-top: 25px;
}

.resource-item {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 35, 63, 0.06);
  padding: 16px 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.resource-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(180deg, #ffffff, #edf2f9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(20, 35, 63, 0.07);
  font-size: 1.25rem;
}

@media (max-width: 1100px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: none;
    text-align: center;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scenario-card:nth-child(1),
  .scenario-card:nth-child(2),
  .scenario-card:nth-child(3),
  .scenario-card:nth-child(4) {
    grid-column: span 1;
    min-height: 250px;
  }

  .compliance-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .agents-hero {
    padding: 130px 0 120px;
  }

  .agents-hero h1 {
    font-size: 2.8rem;
  }

  .city-filter-container {
    margin-top: -36px;
  }

  .city-filter-bar {
    width: 100%;
    border-radius: 28px;
  }

  .city-filter-bar .filter-btn {
    flex: 1 1 auto;
    min-width: 96px;
  }

  .agent-grid,
  .overview-grid,
  .scenario-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .overview-card:nth-child(1) {
    grid-row: auto;
    padding: 34px 26px;
  }

  .agent-card {
    min-height: 420px;
    border-radius: 26px;
  }

  .agent-name {
    font-size: 1.7rem;
  }

  .section-heading h2 {
    font-size: 1.9rem;
  }

  .compliance-panel,
  .overview-card,
  .scenario-card,
  .process-step,
  .agent-modal-content {
    border-radius: 24px;
  }

  .compliance-panel {
    padding: 40px 28px;
  }

  .compliance-panel > div {
    padding: 0;
  }

  .agent-modal-content {
    padding: 28px;
  }
}
