/**
 * EAUT-55557: services section (EAUT-55406).
 *
 * CAA brand colours and the Cairo font, with no grey panels (AC10).
 * Logical properties (start) keep text left in English and right in
 * Arabic (AC09).
 */
.eo-services {
  --eo-blue: #26285f;
  --eo-green: #808646;
  --eo-tint: #f3f4ec;
  --eo-text: #333333;
  --eo-border: #e3e5ef;
  padding: 48px 16px;
  font-family: "Cairo", sans-serif;
  text-align: start;
  background: #ffffff;
}

/* Hidden cards and messages must stay hidden, whatever their display. */
.eo-services [hidden] {
  display: none !important;
}

.eo-services__inner {
  max-width: 1140px;
  margin: 0 auto;
}

.eo-services__title {
  margin: 0 0 24px;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--eo-blue);
}

/* Search box and category filter. */
.eo-services__controls {
  margin-bottom: 32px;
}

.eo-services__search {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 20px;
  padding: 12px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--eo-text);
  border: 1px solid #c9ccdb;
  border-radius: 6px;
}

.eo-services__search:focus {
  border-color: var(--eo-blue);
  outline: 2px solid var(--eo-blue);
  outline-offset: 2px;
}

.eo-services__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.eo-services__filter {
  padding: 8px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--eo-blue);
  background: #ffffff;
  border: 1px solid var(--eo-border);
  border-radius: 4px;
  cursor: pointer;
}

.eo-services__filter:hover,
.eo-services__filter:focus {
  border-color: var(--eo-blue);
}

.eo-services__filter[aria-pressed="true"] {
  color: #ffffff;
  background: var(--eo-blue);
  border-color: var(--eo-blue);
}

/* "Most used services" heading and the "View all services" link. */
.eo-services__list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.eo-services__list-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--eo-blue);
}

.eo-services__view-all {
  font-weight: 600;
  color: var(--eo-green);
  text-decoration: none;
}

.eo-services__view-all:hover,
.eo-services__view-all:focus {
  text-decoration: underline;
}

/* Service cards: three per row on desktop. */
.eo-services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.eo-service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 20px 20px;
  text-align: start;
  background: #ffffff;
  border: 1px solid var(--eo-border);
  border-top: 3px solid var(--eo-blue);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(38, 40, 95, 0.06);
}

.eo-service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  color: var(--eo-green);
  background: var(--eo-tint);
  border-radius: 50%;
}

.eo-service-card__svg {
  width: 28px;
  height: 28px;
}

.eo-service-card__category {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eo-green);
}

/* Letter spacing breaks Arabic letter joining. */
html[dir="rtl"] .eo-service-card__category {
  letter-spacing: 0;
}

/* Titles are not links, so never underlined, and always wrap (AC08). */
.eo-service-card__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--eo-blue);
  overflow-wrap: anywhere;
}

/* At most 3 lines; longer descriptions end with "...". The full text stays
   in the page for search and screen readers. */
.eo-service-card__description {
  display: -webkit-box;
  margin: 0 0 16px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  color: var(--eo-text);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* "Start service" sits at the bottom of every card. */
.eo-service-card__link {
  margin-top: auto;
  font-weight: 700;
  color: var(--eo-green);
  text-decoration: none;
}

.eo-service-card__link:hover,
.eo-service-card__link:focus {
  text-decoration: underline;
}

.eo-services__empty {
  margin: 24px 0 0;
  font-size: 16px;
  text-align: center;
  color: var(--eo-text);
}

.eo-services__more {
  margin-top: 32px;
  text-align: center;
}

.eo-services__more-button {
  display: inline-block;
  padding: 12px 32px;
  font-weight: 600;
  color: #ffffff;
  background: var(--eo-green);
  border-radius: 4px;
  text-decoration: none;
}

.eo-services__more-button:hover,
.eo-services__more-button:focus {
  color: #ffffff;
  background: var(--eo-blue);
}

/* Two cards per row on tablets, one on phones. */
@media (max-width: 991px) {
  .eo-services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .eo-services__grid {
    grid-template-columns: 1fr;
  }
}
