@font-face {
  font-family: "Alyamama";
  src: url("/fonts/Alyamama-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body.home-page {
  min-height: 100vh;
  margin: 0;
  color: #123e36;
  background: #f6f2e9;
  direction: rtl;
  font-family: "Alyamama", "Traditional Arabic", "Noto Naskh Arabic", serif;
  line-height: 1.8;
}

body.home-page a,
body.home-page a:visited,
body.home-page a:hover,
body.home-page a:focus,
body.home-page a:active {
  text-decoration: none;
}

body.home-page a:focus-visible,
body.home-page button:focus-visible,
body.home-page input:focus-visible {
  outline: 3px solid #d9bd6d;
  outline-offset: 3px;
}

.site-header,
.home-shell,
.site-footer {
  width: min(100% - 24px, 1120px);
  margin-inline: auto;
}

.site-header {
  padding-top: 28px;
}

.button-link,
.feature-card,
.info-panel,
.search-panel,
.footer-links a {
  border: 1px solid #d9c28a;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(67, 49, 15, 0.1);
}

.footer-links a,
.footer-links a:visited,
.footer-links a:focus,
.footer-links a:active {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  color: #173f35;
  text-align: center;
  background: #fffdf8;
  border-bottom: 3px solid #b9913d;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 34px;
  color: #fff8e7;
  text-align: center;
  background: #123e36;
  border: 1px solid #b9913d;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(20, 48, 42, 0.18);
}

.hero::before,
.search-panel::before,
.info-panel::before {
  content: "";
  position: absolute;
  inset-inline: 72px;
  top: 0;
  height: 3px;
  background: #b9913d;
}

.hero__kicker,
.section-kicker {
  margin: 0;
  color: #d9bd6d;
  font-weight: 700;
  line-height: 1.5;
}

.hero h1 {
  margin: 10px 0 0;
  color: #fff8e7;
  font-family: "Alyamama", "Traditional Arabic", "Noto Naskh Arabic", serif;
  font-size: 4rem;
  line-height: 1.35;
}

.hero__intro {
  max-width: 740px;
  margin: 12px auto 0;
  color: #f7efd9;
  font-size: 1.2rem;
  line-height: 1.9;
}

.hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button-link,
.button-link:visited,
.button-link:focus,
.button-link:active {
  min-width: 170px;
  min-height: 56px;
  display: inline-grid;
  place-items: center;
  padding: 10px 18px;
  color: #173f35;
  background: #fffdf8;
  border-bottom: 3px solid #b9913d;
  font-weight: 700;
}

.button-link--primary,
.button-link--primary:visited,
.button-link:hover,
.button-link:focus,
.feature-card:hover,
.feature-card:focus {
  color: #fff8e7;
  background: #164d3f;
  border-color: #b9913d;
}

.home-shell {
  padding: 22px 0 48px;
}

.search-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 26px;
  background: #fffaf0;
}

.search-panel h2,
.info-panel h2 {
  margin: 4px 0 0;
  color: #123e36;
  font-family: "Alyamama", "Traditional Arabic", "Noto Naskh Arabic", serif;
  font-size: 2rem;
  line-height: 1.4;
}

.search-form__label {
  display: block;
  margin-bottom: 8px;
  color: #6f5b2a;
  font-weight: 700;
}

.search-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
}

.search-form input[type="search"] {
  width: 100%;
  min-height: 54px;
  padding: 8px 14px;
  color: #123e36;
  background: #fffdf8;
  border: 1px solid #d9c28a;
  border-radius: 8px;
  font: 700 1.2rem "Alyamama", "Traditional Arabic", serif;
}

.search-form button {
  min-height: 54px;
  color: #fff8e7;
  cursor: pointer;
  background: #123e36;
  border: 1px solid #b9913d;
  border-radius: 8px;
  font: 700 1.15rem "Alyamama", "Traditional Arabic", serif;
}

.root-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #6f5b2a;
  font-weight: 700;
}

.root-option input {
  width: 18px;
  height: 18px;
  accent-color: #123e36;
}

.advanced-link,
.advanced-link:visited,
.advanced-link:focus,
.advanced-link:active {
  display: inline-block;
  margin-inline-start: 18px;
  color: #123e36;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.feature-card,
.feature-card:visited,
.feature-card:focus,
.feature-card:active {
  min-height: 116px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  color: #173f35;
  background: #fffdf8;
  border-bottom: 3px solid #b9913d;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(49, 39, 14, 0.14);
}

.feature-card__mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #123e36;
  background: #f3e6c5;
  border: 1px solid #c79b38;
  border-radius: 50%;
  font-size: 1.3rem;
}

.feature-card:hover .feature-card__mark {
  color: #fff8e7;
  background: #b9913d;
}

.feature-card__title,
.feature-card__meta {
  display: block;
}

.feature-card__title {
  font-family: "Alyamama", "Traditional Arabic", "Noto Naskh Arabic", serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.45;
}

.feature-card__meta {
  margin-top: 3px;
  color: #8a6c2b;
  font-weight: 700;
  line-height: 1.5;
}

.feature-card:hover .feature-card__meta {
  color: #d9bd6d;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.info-panel {
  position: relative;
  min-height: 180px;
  padding: 24px;
  background: #fffaf0;
}

.info-panel p:last-child {
  margin-bottom: 0;
}

.info-panel--stat h2 {
  font-family: "Alyamama", "Traditional Arabic", serif;
  font-size: 2.6rem;
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.recent-list a,
.recent-list a:visited,
.recent-list a:focus,
.recent-list a:active {
  padding: 6px 12px;
  color: #123e36;
  background: #f3e6c5;
  border: 1px solid #d9c28a;
  border-radius: 999px;
  font-weight: 700;
}

.site-footer {
  padding-bottom: 34px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(185, 145, 61, 0.28);
}

@media (max-width: 900px) {
  .footer-links,
  .feature-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero h1 {
    font-size: 3rem;
  }
}

@media (max-width: 560px) {
  .site-header,
  .home-shell,
  .site-footer {
    width: 100%;
  }

  .site-header {
    padding-top: 0;
  }

  .footer-links,
  .feature-grid,
  .info-grid,
  .search-form__row {
    grid-template-columns: 1fr;
  }

  .footer-links {
    gap: 8px;
    padding: 12px;
    background: #fffaf0;
    border-top: 1px solid #d9c28a;
  }

  .hero,
  .search-panel {
    border-inline: 0;
    border-radius: 0;
  }

  .hero {
    padding: 32px 18px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero__intro {
    font-size: 1rem;
  }

  .home-shell {
    padding-top: 0;
  }

  .search-panel,
  .info-panel,
  .feature-card {
    padding: 18px;
  }

  .feature-grid,
  .info-grid {
    gap: 10px;
    padding-inline: 12px;
  }

  .feature-card {
    min-height: 96px;
  }
}
