
:root {
  --color-primary: #f4f6f9;      /* 60% - dominant light background */
  --color-secondary: #1f3a5f;    /* 30% - deep blue for header, footer, structure */
  --color-accent: #f5a623;       /* 10% - electric amber accent */
  --color-text: #22303f;
  --color-white: #ffffff;
  --color-border: #d9e0e8;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(31, 58, 95, 0.10);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-primary);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 17px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Header ---------- */
.site-header {
  background-color: var(--color-secondary);
  border-bottom: 4px solid var(--color-accent);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--color-white);
  text-decoration: none;
  text-transform: lowercase;
}

.logo span {
  color: var(--color-accent);
}

/* ---------- Navbar ---------- */
.site-nav {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(31, 58, 95, 0.05);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  display: block;
  padding: 14px 18px;
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* ---------- Main content ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}

h1 {
  font-size: 2.3rem;
  line-height: 1.25;
  color: var(--color-secondary);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--color-accent);
}

article {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
  margin-bottom: 32px;
  overflow-wrap: break-word;
}

article h2,
article h3,
article h4,
article h5,
article h6 {
  color: var(--color-secondary);
  line-height: 1.3;
  margin: 1.6em 0 0.6em;
}

article h2 { font-size: 1.7rem; }
article h3 { font-size: 1.4rem; }
article h4 { font-size: 1.2rem; }

article > :first-child {
  margin-top: 0;
}

article p {
  margin-bottom: 1.1em;
}

article ul,
article ol {
  margin: 0 0 1.1em 1.5em;
}

article li {
  margin-bottom: 0.4em;
}

article a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
}

article a:hover {
  color: var(--color-accent);
}

/* ---------- Transition paragraph block ---------- */
.transition {
  background-color: var(--color-white);
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 32px;
  margin-bottom: 32px;
  overflow-wrap: break-word;
}

.transition p {
  margin-bottom: 1em;
}

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

/* ---------- Links block ---------- */
.links-block {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 36px;
  overflow: hidden;
}

.links-block h3 {
  color: var(--color-accent);
  font-size: 1.3rem;
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.links-block h3:first-child {
  margin-top: 0;
}

.links-block ul {
  list-style: none;
  columns: 2;
  column-gap: 40px;
  margin: 0 0 8px;
}

.links-block li {
  break-inside: avoid;
  page-break-inside: avoid;
  padding: 6px 0 6px 18px;
  position: relative;
  overflow-wrap: break-word;
}

.links-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 7px;
  height: 7px;
  background-color: var(--color-accent);
  border-radius: 50%;
}

.links-block a {
  color: var(--color-white);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.links-block a:hover,
.links-block a:focus {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-top: 4px solid var(--color-accent);
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 24px;
  text-align: center;
  font-size: 0.95rem;
}

.footer-inner a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  main {
    padding: 28px 16px 40px;
  }

  h1 {
    font-size: 1.8rem;
  }

  article {
    padding: 24px 20px;
  }

  .transition {
    padding: 20px;
  }

  .links-block {
    padding: 24px 20px;
  }

  .header-inner,
  .nav-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    border-bottom: 1px solid var(--color-border);
    padding: 12px 4px;
  }
}

@media (max-width: 520px) {
  .links-block ul {
    columns: 1;
  }

  h1 {
    font-size: 1.55rem;
  }

  .logo {
    font-size: 1.5rem;
  }
}
