:root {
  --blue: #0879e8;
  --navy: #172238;
  --red: #df2029;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f9fc;
  color: #172238;
  font-family: Arial, Helvetica, sans-serif;
}
.directory-nav {
  min-height: 78px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 10;
}
.directory-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 23px;
  font-weight: 700;
  color: #172238;
}
.directory-brand:hover {
  color: #172238;
}
.brand-mark {
  color: var(--red);
  font-size: 32px;
  line-height: 1;
}
.brand-peru {
  color: var(--red);
}
.directory-brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.4px;
  margin-top: -3px;
}
.nav-link {
  font-weight: 600;
  color: #263246 !important;
}
.nav-link.active {
  color: var(--blue) !important;
  border-bottom: 3px solid var(--blue);
}
.hero-peru {
  height: 440px;
  min-height: 440px;
  background-image: url("peru-hero.png");
  background-size: cover;
  background-position: center 48%;
  position: relative;
  display: flex;
  align-items: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
}
.hero-content h1 {
  font-size: 48px;
  font-weight: 800;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  margin-bottom: 10px;
}
.hero-content p {
  font-size: 19px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  margin-bottom: 26px;
}
.search-panel {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 145px;
  gap: 10px;
  max-width: 1000px;
  margin: auto;
}
.search-field {
  height: 56px;
  background: #fff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #162238;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.search-field span {
  font-size: 25px;
  margin-right: 10px;
}
.search-field input,
.search-field select {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  font-size: 16px;
  color: #343b48;
}
.search-btn {
  border: 0;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
}
.search-btn:hover {
  background: #066acb;
}
.categories-section {
  background: #fff;
  padding: 48px 0 55px;
}
.subcategories-section {
  background: #f7f9fc;
  padding: 48px 0 55px;
  border-top: 1px solid #e9edf2;
  border-bottom: 1px solid #e9edf2;
}
.section-heading {
  text-align: center;
}
.section-heading h2 {
  font-size: 31px;
  font-weight: 800;
  margin-bottom: 5px;
}
.section-heading p {
  color: #737b89;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.category-card {
  text-decoration: none;
  color: #172238;
  background: #fff;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(18, 37, 63, 0.12);
  transition: 0.2s;
}
.category-card:hover {
  transform: translateY(-4px);
  color: #172238;
}
.category-photo {
  height: 112px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.cat-photo-0 {
  background: linear-gradient(135deg, #4ea7df, #164a82);
}
.cat-photo-1 {
  background: linear-gradient(135deg, #b8793e, #432719);
}
.cat-photo-2 {
  background: linear-gradient(135deg, #72a651, #294d28);
}
.cat-photo-3 {
  background: linear-gradient(135deg, #d0a867, #6d4b34);
}
.cat-photo-4 {
  background: linear-gradient(135deg, #c45858, #6c2424);
}
.cat-photo-5 {
  background: linear-gradient(135deg, #36a8a4, #165c72);
}
.cat-icon {
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  border: 4px solid #fff;
  font-size: 21px;
}
.category-body {
  text-align: center;
  padding: 30px 12px 18px;
}
.category-body h3 {
  font-size: 16px;
  font-weight: 700;
  min-height: 38px;
  margin: 0;
}
.category-body span {
  font-size: 13px;
  color: #727b88;
}
.resource-card {
  background: #fff;
  border: 0;
  border-radius: 9px;
  box-shadow: 0 3px 14px rgba(18, 37, 63, 0.1);
  transition: 0.2s;
  overflow: hidden;
}
.resource-card:hover {
  transform: translateY(-3px);
}
.resource-snapshot {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #eef1f4;
  border-bottom: 1px solid #e5e7eb;
}
.resource-card .card-body {
  padding: 24px;
}
.resource-card a {
  color: #172238;
  text-decoration: none;
}
.resource-card a:hover {
  color: var(--blue);
}
.resource-badge {
  display: inline-block;
  background: #eaf4ff;
  color: #086bc8;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 991px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-panel {
    grid-template-columns: 1fr 1fr;
  }
  .search-btn {
    height: 54px;
    grid-column: 1/-1;
  }
  .hero-content h1 {
    font-size: 38px;
  }
}
@media (max-width: 600px) {
  .hero-peru {
    height: auto;
    min-height: 500px;
    padding: 55px 0;
  }
  .hero-content h1 {
    font-size: 34px;
  }
  .search-panel {
    grid-template-columns: 1fr;
  }
  .search-btn {
    grid-column: auto;
    height: 54px;
  }
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }
  .directory-brand {
    font-size: 19px;
  }
}
