/**
 * Employment Agency profile page.
 * Palette follows the Gin admin theme accent color (#b85c18, set in
 * gin.settings accent_color) so agency pages match the site's brand color.
 * Hard-coded because the frontend theme (mercury) does not expose Gin's
 * CSS custom properties.
 */

.ea-profile {
  --ea-primary: #b85c18;
  --ea-primary-dark: #93490f;
  --ea-primary-light: #fbe8d9;
  --ea-green: #16a34a;
  --ea-whatsapp: #25d366;
  --ea-bg: #fafaf8;
  --ea-card-bg: #ffffff;
  --ea-border: #e9e9e4;
  --ea-border-2: #e5e7eb;
  --ea-text: #1f2937;
  --ea-text-2: #4b5563;
  --ea-muted: #6b7280;

  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  color: var(--ea-text);
  font-size: 1rem;
  line-height: 1.55;
}

.ea-profile svg {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  vertical-align: -0.2em;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.ea-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  background: var(--ea-card-bg);
  border: 1px solid var(--ea-border);
  border-radius: 16px;
  overflow: hidden;
}

.ea-hero__main {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  align-items: flex-start;
}

.ea-hero__logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  min-width: 180px;
}

.ea-hero__licence {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ea-muted);
  white-space: nowrap;
}

.ea-hero__logo-wrap .ea-hero__actions {
  flex-direction: column;
  width: 100%;
  margin-top: 0.4rem;
}

.ea-hero__logo-wrap .ea-btn {
  width: 100%;
  box-sizing: border-box;
}

.ea-hero__logo,
.ea-hero__initials {
  width: 130px;
  height: 130px;
  border-radius: 12px;
  border: 1px solid var(--ea-border-2);
  background: #fff;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}

.ea-hero__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--ea-primary);
  background: var(--ea-primary-light);
}

.ea-hero__mom-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ea-primary-dark);
  background: var(--ea-primary-light);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}

.ea-hero__name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.35rem;
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--ea-text);
}

.ea-hero__location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.8rem;
  color: var(--ea-muted);
  font-size: 0.95rem;
}

.ea-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
}

.ea-tag {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ea-text-2);
  background: var(--ea-bg);
  border: 1px solid var(--ea-border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.ea-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.ea-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.ea-btn--primary {
  background: var(--ea-primary);
  color: #fff;
}

.ea-btn--primary:hover {
  background: var(--ea-primary-dark);
  color: #fff;
}

.ea-btn--outline {
  background: #fff;
  color: var(--ea-primary);
  border-color: var(--ea-primary);
}

.ea-btn--outline:hover {
  background: var(--ea-primary-light);
  color: var(--ea-primary-dark);
}

.ea-btn--block {
  display: flex;
  width: 100%;
  margin-top: 1rem;
}

/* ── Hero banner ──────────────────────────────────────────────── */
.ea-hero__banner {
  min-height: 240px;
}

.ea-hero__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ea-hero__banner--gradient {
  background: linear-gradient(135deg, var(--ea-primary) 0%, var(--ea-primary-dark) 60%, #6f370b 100%);
}

/* ── Stats bar ────────────────────────────────────────────────── */
.ea-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--ea-border);
  border: 1px solid var(--ea-border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1.25rem;
}

.ea-stat {
  flex: 1 1 220px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.8rem;
  align-items: center;
  background: var(--ea-card-bg);
  padding: 1.1rem 1.4rem;
}

.ea-stat__icon {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  color: var(--ea-primary);
  background: var(--ea-primary-light);
}

.ea-stat__val {
  font-weight: 700;
  color: var(--ea-text);
}

.ea-stat__label {
  grid-column: 2;
  font-size: 0.85rem;
  color: var(--ea-muted);
}

/* ── Body layout ──────────────────────────────────────────────── */
.ea-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

.ea-section {
  background: var(--ea-card-bg);
  border: 1px solid var(--ea-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.ea-section + .ea-section {
  margin-top: 1.5rem;
}

.ea-section__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--ea-text);
}

.ea-about__text {
  color: var(--ea-text-2);
}

/* ── Services ─────────────────────────────────────────────────── */
.ea-services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ea-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  border: 1px solid var(--ea-border-2);
  border-radius: 10px;
  padding: 1.1rem 0.8rem;
  background: #fff;
}

.ea-service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
}

.ea-service-card__icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.ea-service-card__icon--0 { color: #b85c18; background: #fbe8d9; }
.ea-service-card__icon--1 { color: #7c3aed; background: #ede9fe; }
.ea-service-card__icon--2 { color: #0f766e; background: #ccfbf1; }
.ea-service-card__icon--3 { color: #db2777; background: #fce7f3; }
.ea-service-card__icon--4 { color: #0284c7; background: #e0f2fe; }

.ea-service-card__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ea-text);
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.ea-card {
  background: var(--ea-card-bg);
  border: 1px solid var(--ea-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.ea-card + .ea-card {
  margin-top: 1.5rem;
}

.ea-card__title {
  margin: 0 0 0.4rem;
  padding-bottom: 0.7rem;
  font-size: 1.15rem;
  color: var(--ea-text);
  border-bottom: 2px solid var(--ea-primary);
  display: inline-block;
}

.ea-contact__list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.ea-contact__list > li {
  display: flex;
  gap: 0.7rem;
  padding: 0.55rem 0;
  color: var(--ea-text-2);
  font-size: 0.95rem;
}

.ea-contact__list > li > svg {
  margin-top: 0.2rem;
  color: var(--ea-primary);
}

.ea-contact__whatsapp > svg {
  color: var(--ea-whatsapp);
}

.ea-contact__list a {
  color: var(--ea-text-2);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ea-contact__list a:hover {
  color: var(--ea-primary);
  text-decoration: underline;
}

.ea-contact__block > div {
  min-width: 0;
}

.ea-contact__block p {
  margin: 0 0 0.3rem;
}

/* ── Map ──────────────────────────────────────────────────────── */
.ea-map {
  padding: 0;
  overflow: hidden;
}

.ea-map iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
}

/* ── Caregivers section: grid comes from biodata_display ─────── */
.ea-caregivers .biodata-listing-grid {
  margin-top: 0.5rem;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ea-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-hero__banner {
    order: -1;
    min-height: 180px;
  }
}

@media (max-width: 640px) {
  .ea-hero__main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.4rem;
  }

  .ea-hero__name,
  .ea-hero__location,
  .ea-hero__tags,
  .ea-hero__actions {
    justify-content: center;
  }

  .ea-hero__actions .ea-btn {
    flex: 1 1 auto;
  }
}
