:root {
  --accent: #5fa8df;
  --accent-strong: #2879b7;
  --leaf: #9fbd4a;
  --ink: #5f6670;
  --muted: #a6abb4;
  --line: #e7e9ec;
  --footer: #202224;
  --page: #ffffff;
  --soft: #f6f8fa;
  --shadow: 0 3px 12px rgba(30, 34, 38, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--muted);
  background: var(--page);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--leaf);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--accent-strong);
  text-decoration: underline;
}

.site-header {
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 24px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: min(430px, 82vw);
  height: auto;
}

.site-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 42px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: clamp(210px, 28vw, 340px);
  margin: 10px auto 44px;
  background: var(--soft);
  box-shadow: var(--shadow);
}

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 650ms ease;
}

.slide.is-active {
  opacity: 1;
}

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

.slide figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 8px 12px;
  color: #f3f5f7;
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.92rem;
}

.slider-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 64px;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.14);
  font-size: 4rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.slider-control:hover,
.slider-control:focus-visible {
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
}

.slider-prev {
  left: 0;
}

.slider-next {
  right: 0;
}

.content-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.95rem;
}

.nav-link,
.sub-nav-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--muted);
  text-decoration: none;
}

.nav-link {
  justify-content: space-between;
}

.nav-link.is-active {
  color: #fff;
  background: var(--accent);
}

.nav-link:hover,
.nav-link:focus,
.sub-nav-link:hover,
.sub-nav-link:focus {
  color: #fff;
  background: var(--accent-strong);
  text-decoration: none;
}

.nav-chevron {
  margin-left: 12px;
  font-size: 1rem;
}

.sub-nav {
  display: flex;
  flex-direction: column;
  padding-left: 18px;
}

.sub-nav-link {
  min-height: 28px;
  padding-top: 4px;
  padding-bottom: 4px;
  color: var(--leaf);
}

.sub-nav-link.is-active {
  color: var(--accent-strong);
  font-weight: 600;
}

.page-content {
  max-width: 880px;
  color: var(--muted);
}

.page-header {
  margin-bottom: 26px;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 300;
  line-height: 1.2;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.15rem, 4vw, 3rem);
}

h2 {
  margin: 32px 0 12px;
  font-size: 1.65rem;
  font-weight: 650;
}

p {
  margin: 0 0 18px;
}

.page-intro {
  margin: 0;
}

.content-body strong {
  color: #8f949c;
}

.home-welcome {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  max-width: 720px;
  min-height: 230px;
  margin-top: 26px;
}

.home-welcome img {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(159, 189, 74, 0.36);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 34px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--soft);
  box-shadow: 0 1px 4px rgba(45, 50, 56, 0.22);
}

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

.gallery-item figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 7px 9px;
  color: #fff;
  background: rgba(32, 34, 36, 0.68);
  font-size: 0.86rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 10px max(24px, calc((100vw - 1160px) / 2 + 24px));
  color: #ccd3db;
  background: var(--footer);
  font-size: 0.86rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.site-footer a {
  color: #ccd3db;
  text-transform: uppercase;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--leaf);
}

.back-to-top {
  display: grid;
  place-items: center;
  width: 38px;
  height: 32px;
  font-size: 1.4rem;
}

@media (max-width: 760px) {
  .site-header {
    padding: 20px 18px 12px;
  }

  .site-main {
    padding: 0 18px 34px;
  }

  .hero-slider {
    height: clamp(180px, 52vw, 260px);
    margin-bottom: 28px;
  }

  .content-shell {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sub-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-left: 0;
  }

  .home-welcome {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .side-nav,
  .sub-nav,
  .gallery {
    grid-template-columns: 1fr;
  }

  .slider-control {
    width: 36px;
    height: 52px;
    font-size: 3rem;
  }

  .site-footer {
    align-items: flex-start;
    gap: 12px;
  }
}
