/* Embassy List component */

/* ---- Section wrapper ---- */
.embassy-list {
  padding: 1.875rem 0;
}

@media (min-width: 768px) {
  .embassy-list {
    padding: 3rem 0;
  }
}

.embassy-list > .site-container {
  background: linear-gradient(124deg, #0D1532 0%, #2D2E83 100%);
  border-radius: 1.6875rem;
  padding: 1.5rem 0.75rem;
}

@media (min-width: 768px) {
  .embassy-list > .site-container {
    border-radius: 2.25rem;
    padding: 2.25rem 2.8125rem;
  }
}

/* ---- Title ---- */
.embassy-list__title {
  margin: 0 0 1.3125rem;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #FBFBFB;
  text-align: center;
}

@media (min-width: 768px) {
  .embassy-list__title {
    font-size: 2.625rem;
    margin-bottom: 2.0625rem;
  }
}

/* ---- Tab bar ---- */
.embassy-list__tabs {
  display: flex;
  width: 100%;
}

.embassy-list__tab {
  flex: 1;
  height: 2.15625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid rgba(251, 251, 251, 0.38);
  background: transparent;
  color: rgba(251, 251, 251, 0.58);
  transition: background 0.2s;
  padding: 0 0.375rem;
  font-family: inherit;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .embassy-list__tab {
    height: 2.53125rem;
    font-size: 1.40625rem;
    padding: 0 0.75rem;
  }
}

.embassy-list__tab + .embassy-list__tab {
  border-left: none;
}

.embassy-list__tab:first-child {
  border-radius: 1.125rem 0 0 1.125rem;
}

.embassy-list__tab:last-child {
  border-radius: 0 1.125rem 1.125rem 0;
}

/* Active tab */
.embassy-list__tab.is-active {
  background: #FBFBFB;
  border-color: #FBFBFB;
  color: #1E2461;
}

.embassy-list__tab-text {
  display: block;
  color: inherit;
}

/* ---- Separator ---- */
.embassy-list__separator {
  border: none;
  border-top: 1px solid rgba(251, 251, 251, 0.3);
  margin: 1.125rem 0 1.3125rem;
}

@media (min-width: 768px) {
  .embassy-list__separator {
    margin: 1.5rem 0 1.6875rem;
  }
}

/* ---- Panels ---- */
.embassy-list__panel {
  display: none;
}

.embassy-list__panel.is-active {
  display: block;
}

/* ---- Cards grid ---- */
.embassy-list__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .embassy-list__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9375rem;
  }
}

@media (min-width: 1024px) {
  .embassy-list__cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.125rem;
  }
}

/* ---- Embassy card ---- */
.embassy-list__card {
  position: relative;
  height: 19.5rem;
  background: #F2F2F5;
  border-radius: 1.125rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .embassy-list__card {
    height: 24rem;
  }
}

/* Card top: number + name */
.embassy-list__card-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.125rem 1.125rem 0;
  z-index: 1;
}

/* Ghost number with fade gradient */
.embassy-list__card-number {
  display: block;
  leading-trim: both;
  text-edge: cap;
  font-family: "Carmen Sans";
  font-size: 2.0625rem;
  font-style: normal;
  font-weight: 500;
  line-height: 2.475rem;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  background: linear-gradient(180deg, rgba(13, 21, 50, 0.8) 0%, rgba(13, 21, 50, 0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.embassy-list__card-name {
  margin: 0;
  color: #0D1532;
  leading-trim: both;
  text-edge: cap;
  font-family: "Carmen Sans";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.2rem;
}

/* Country shape container */
.embassy-list__card-shape {
  position: absolute;
  top: 35%;
  bottom: 4.3125rem;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5625rem 1.125rem;
  z-index: 0;
  overflow: hidden;
}

.embassy-list__country-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  fill: var(--color-primary-dark);
  display: block;
}

/* Card footer */
.embassy-list__card-footer {
  position: absolute;
  bottom: 1.125rem;
  left: 1.125rem;
  right: 1.125rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5625rem;
}

.embassy-list__card-country {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #0D1532;
}

.embassy-list__pin-icon {
  flex-shrink: 0;
  color: #0D1532;
  width: 0.703125rem;
  height: 0.890625rem;
}

.embassy-list__card-country span {
  color: #0D1532;
  leading-trim: both;
  text-edge: cap;
  font-family: "Carmen Sans";
  font-size: 0.84375rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.36444rem;
  text-transform: capitalize;
}

.embassy-list__card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 7.875rem;
  height: 1.875rem;
  padding: 0 0.75rem;
  border-radius: 9999px;
  background: linear-gradient(321.06deg, #2D2E83 -40.98%, #0D1532 157.1%);
  color: #FBFBFB;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  font-family: "Carmen Sans";
}

@media (min-width: 768px) {
  .embassy-list__card-link {
    min-width: 10.5rem;
    height: 2.4375rem;
    padding: 0 1.125rem;
    font-size: 1.03125rem;
  }
}

/* ---- Bottom link rows ---- */
.embassy-list__links {
  display: flex;
  flex-direction: column;
  gap: 0.65625rem;
  margin-top: 0.9375rem;
}

@media (min-width: 768px) {
  .embassy-list__links {
    gap: 0.75rem;
    margin-top: 1.3125rem;
  }
}

.embassy-list__link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3.046875rem;
  background: #FBFBFB;
  border-radius: 9999px;
  min-height: 2.4375rem;
  padding: 10px;
}

.embassy-list__link-label {
  flex: 1 1 auto;
  padding: 0.46875rem;
  color: #0D1532;
  leading-trim: both;
  text-edge: cap;
  font-family: "Carmen Sans";
  font-size: 0.9375rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.125rem;
  text-align: left;
}

.embassy-list__link-cta {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-left: auto;
}

.embassy-list__link-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.875rem;
  height: 1.875rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  font-family: "Carmen Sans";
  background: linear-gradient(321.06deg, #2D2E83 -40.98%, #0D1532 157.1%);
}

@media (min-width: 768px) {
  .embassy-list__link-cta .btn {
    min-width: 10.5rem;
    height: 2.4375rem;
    font-size: 1.03125rem;
  }
}

@media (max-width: 767px) {
  .embassy-list__tabs {
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  .embassy-list__tab {
    flex: 1 1 calc(50% - 0.375rem);
    border-radius: 0.75rem;
    border: 1px solid rgba(251, 251, 251, 0.38);
  }

  .embassy-list__tab + .embassy-list__tab {
    border-left: 1px solid rgba(251, 251, 251, 0.38);
  }

  .embassy-list__tab:first-child,
  .embassy-list__tab:last-child {
    border-radius: 0.75rem;
  }

  .embassy-list__card-number {
    font-size: 1.5rem;
    line-height: 1.8rem;
  }

  .embassy-list__card-name {
    font-size: 0.9375rem;
    line-height: 1.125rem;
  }

  .embassy-list__link-row {
    flex-wrap: wrap;
    gap: 0.5rem;
    border-radius: 0.9375rem;
    padding: 10px;
  }

  .embassy-list__link-label {
    flex: 1 1 100%;
    text-align: left;
  }

  .embassy-list__link-cta {
    flex: 1 1 100%;
    justify-content: flex-start;
    padding: 0 0.46875rem;
  }
}
