@import url("/static/css/modern-normalize.css");

:root {
  --brand: #3e4090;
  --brand-light: #5657a8;
  --brand-dark: #2d2f6d;

  /* Accent */
  --accent: #e67e22;
  --accent-light: #f39c4a;
  --accent-dark: #bf6516;

  /* Success */
  --success-light: #5ecf8a;
  --success: #9beab6;
  --success-dark: #2da95b;

  /* Background */
  --bg: #ffffff;
  --bg-alt: #f8f9fa;

  /* Text */
  --text: #1c1c1c;
  --text-light: #555555;
  --text-secondary: #4b4d70;

  /* Borders */
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --border-dark: #c0c0c0;

  /* Grays */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;

  /* Misc */
  --muted: #a0a2c2;
  --text-50: hsl(0, 0%, 95%);
  --text-100: hsl(0, 0%, 90%);
  --text-200: hsl(0, 0%, 80%);
  --text-300: hsl(0, 0%, 70%);
  --text-400: hsl(0, 0%, 60%);
  --text-500: hsl(0, 0%, 50%);
  --text-600: hsl(0, 0%, 40%);
  --text-700: hsl(0, 0%, 30%);
  --text-800: hsl(0, 0%, 20%);
  --text-900: hsl(0, 0%, 10%);
  --text-950: hsl(0, 0%, 5%);

  --background-50: hsl(0, 15%, 95%);
  --background-100: hsl(0, 18%, 90%);
  --background-200: hsl(0, 18%, 80%);
  --background-300: hsl(0, 18%, 70%);
  --background-400: hsl(0, 17%, 60%);
  --background-500: hsl(0, 17%, 50%);
  --background-600: hsl(0, 17%, 40%);
  --background-700: hsl(0, 18%, 30%);
  --background-800: hsl(0, 18%, 20%);
  --background-900: hsl(0, 18%, 10%);
  --background-950: hsl(0, 15%, 5%);

  --primary-50: hsl(240, 38%, 95%);
  --primary-100: hsl(237, 41%, 90%);
  --primary-200: hsl(240, 39%, 80%);
  --primary-300: hsl(239, 40%, 70%);
  --primary-400: hsl(239, 40%, 60%);
  --primary-500: hsl(239, 40%, 50%);
  --primary-600: hsl(239, 40%, 40%);
  --primary-700: hsl(239, 40%, 30%);
  --primary-800: hsl(240, 39%, 20%);
  --primary-900: hsl(237, 41%, 10%);
  --primary-950: hsl(240, 38%, 5%);

  --secondary-50: hsl(105, 15%, 95%);
  --secondary-100: hsl(111, 14%, 90%);
  --secondary-200: hsl(109, 16%, 80%);
  --secondary-300: hsl(112, 15%, 70%);
  --secondary-400: hsl(112, 15%, 60%);
  --secondary-500: hsl(111, 15%, 50%);
  --secondary-600: hsl(112, 15%, 40%);
  --secondary-700: hsl(112, 15%, 30%);
  --secondary-800: hsl(109, 16%, 20%);
  --secondary-900: hsl(111, 14%, 10%);
  --secondary-950: hsl(120, 15%, 5%);

  --accent-50: hsl(30, 77%, 95%);
  --accent-100: hsl(28, 80%, 90%);
  --accent-200: hsl(28, 80%, 80%);
  --accent-300: hsl(28, 80%, 70%);
  --accent-400: hsl(28, 80%, 60%);
  --accent-500: hsl(28, 80%, 50%);
  --accent-600: hsl(28, 80%, 40%);
  --accent-700: hsl(28, 80%, 30%);
  --accent-800: hsl(28, 80%, 20%);
  --accent-900: hsl(28, 80%, 10%);
  --accent-950: hsl(27, 77%, 5%);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Libre Franklin", sans-serif;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e5e7f3' fill-opacity='0.12' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
}

main {
  flex-grow: 1;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Заголовки */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "PT Serif", serif;
  margin: 0;
  font-weight: 500;
}

h1 {
  font-size: 3rem;
  margin-bottom: 8px;
  line-height: 48px;
  font-weight: 600;
}

h2 {
  font-size: 2.3rem; /* 32px */
  margin-bottom: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
}

h3 {
  font-size: 1.75rem; /* 28px */
  line-height: 1.3;
  margin-bottom: 0.85rem;
}

h4 {
  font-size: 1.5rem; /* 24px */
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

h5 {
  font-size: 1.125rem; /* 20px */
  line-height: 1.2;
  margin-bottom: 0.5rem;
  font-family: "PT Sans", sans-serif;
}

h6 {
  font-size: 1rem; /* 16px */
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-family: "PT Sans", sans-serif;
}

/* Параграфы */
p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  max-width: 100ch;
}

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

/* Ссылки */
a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Цитаты */
blockquote {
  border-left: 4px solid var(--brand);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin: 1rem 0;
}

/* Списки */
ul,
ol {
  margin: 0;
  padding-left: 1.5rem;
}

ul.unstyled-list {
  list-style: none;
}

li {
  margin-bottom: 2rem;
  line-height: 1.5;
}
li:last-child {
  margin-bottom: 0;
}

/* Малый текст */
small {
  font-size: 0.875rem;
  color: var(--muted);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.container {
  max-width: 1366px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 3rem;
}

.container > div {
  margin-bottom: 2rem;
}

.container > div:last-child {
  margin-bottom: 0;
}

.header-logo {
  display: block;
  height: 112px;
}

.header-logo > img {
  display: block;
  margin: 0 auto;
  object-fit: contain;
  height: 100%;
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  background-color: var(--brand);
  border-radius: 8px;
  border: 1px solid var(--brand-light);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.nav li {
  margin: 0;
}

.nav a {
  color: var(--bg);
  text-decoration: none;
  margin: 0;
}

.nav a:hover {
  color: var(--bg-alt);
  border-bottom: 2px solid var(--bg-alt);
}

.footer {
  padding: 1rem 2rem;
  background-color: var(--bg-alt);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer-content p {
  margin: 0;
  color: var(--text-secondary);
}

.section {
  /*margin-top: 3.5rem;*/
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.section-alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-alt);
}

.team-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: flex-start;
  flex-wrap: wrap;
  row-gap: 2rem;
  column-gap: 2rem;
}

.team-member {
  display: block;
  overflow: hidden;
  text-align: left;
  max-width: 230px;
  position: relative;
  font-family: "PT Sans", sans-serif;
}

.team-member img {
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1/1;
}

.team-member-info {
  margin-top: 12px;
}

.team-member-name {
  color: var(--text);
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: -0.025em;
  /*line-height: 2rem;*/
}

.team-member-position {
  margin-top: 0.5rem;
  font-weight: normal;
  color: var(--text-secondary);
}

.two-layout {
  /*display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));*/
  display: flex;
  row-gap: 6rem;
  column-gap: 4rem;
  align-items: flex-start;
}

.two-layout.no-gap {
  column-gap: 0;
}

.two-layout img {
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /*aspect-ratio: 1/1;*/
}

.two-layout > div {
  flex: 2;
  width: 100%;
}

.two-layout-wide {
  flex: 3 !important;
}

.slider-images {
  display: flex;
  gap: 2rem;
}

.slider-image {
  display: block;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  /*max-width: 200px;*/
  position: relative;
  aspect-ratio: 4/3;
}

.slider-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image {
  display: block;
  overflow: hidden;
  text-align: center;
  /*max-width: 200px;*/
  position: relative;
}

.image img {
  border-radius: 6px;
  border: 1px solid var(--border);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-list {
  display: flex;
  flex-direction: column;
  /*gap: 1rem;*/
  max-width: 860px;
  list-style: none;
  padding: 0;
}

.news-item {
  flex: 1;
  width: 100%;
  display: flex;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg);
  overflow: hidden;
  box-shadow: 0 0px 2px rgba(0, 0, 0, 0.05);
}

.news-item-preview {
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-item-preview-title {
  color: var(--text);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.news-item-preview-content {
  color: var(--text-secondary);
  flex: 1;
}

.news-item-preview-content p {
  margin: 0;
  line-height: 1.33;
}

.news-item-preview-date {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.news-item-preview-image {
  display: block;
  overflow: hidden;
  text-align: center;
  max-width: 200px;
  position: relative;
  aspect-ratio: 4/3;
  width: 100%;
}

.news-item-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.publication {
  display: flex;
  flex-direction: column;
}

.publication-title {
  color: var(--text);
  font-weight: 600;
  /*margin-bottom: 0.5rem;*/
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg);
  overflow: hidden;
  box-shadow: 0 0px 2px rgba(0, 0, 0, 0.05);
  padding: 1rem 1rem;
  font-family: 'PT Mono', monospace;
  font-size: 0.875rem;
}

.card-title {
  color: var(--text);
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.card-description {
  color: var(--text-secondary);
  flex: 1;
}

.card-description p {
  margin: 0;
  font-size: 0.875rem;
}

.card-date {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.card-image {
  display: block;
  overflow: hidden;
  text-align: center;
  max-width: 200px;
  position: relative;
  aspect-ratio: 4/3;
  padding: 0.5rem;
  width: 100%;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.button {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--brand-dark);
  background-color: var(--brand);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
  min-width: fit-content;
}

.button:hover {
  background-color: var(--brand-light);
  text-decoration: none;
}

.alert {
  display: block;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background-color: var(--gray-50);
  color: var(--gray-50);
  text-decoration: none;
  max-width: 650px;
  width: 100%;
}

.alert-warning {
  background-color: var(--accent-50);
  color: var(--accent-700);
  border: 1px solid var(--accent-500);
}

.alert-error {
  background-color: var(--accent-50);
  color: var(--accent-700);
  border: 1px solid var(--accent-500);
}

.alert-success {
  background-color: var(--secondary-50);
  color: var(--secondary-700);
  border: 1px solid var(--secondary-500);
}

.alert-title {
  font-weight: 600;
}

.alert p {
  color: inherit !important;
  margin-bottom: 0.5rem;
}

.map {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/*
 * Utilities
*/

.flex {
  display: flex;
  gap: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
}

.text-center {
  text-align: center;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.back-link {
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
}

.link {
  color: var(--brand);
  font-weight: semibold;
  text-decoration: underline;
}

.link:hover {
  text-decoration: none;
}

.form {
  max-width: 550px;
  width: 100%;
  /*display: flex;
  flex-direction: column;
  gap: 4px;*/
}

input {
  display: block;
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  color: var(--text);
  /*margin-bottom: 1rem;*/
}
input[type=file] {
  background-color: var(--bg-alt);
  display: block;
}

.pre {
  white-space: pre-wrap;
  text-overflow: ellipsis;
  overflow: auto;
}

.lead {
  margin-top: 24px;
  font-family: 'PT Serif', serif;
  max-width: 85ch;
}

.lead,
.lead > p {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--primary-700);
  /*color: var(--gray-600);*/
}

.bold {
  font-weight: bold;
}

.text-large {
  font-size: 1.25rem;
}

.text-muted {
  color: var(--muted);
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-5 {
  margin-top: 1.25rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

.mt-12 {
  margin-top: 3rem;
}

.mt-16 {
  margin-top: 4rem;
}

.mt-20 {
  margin-top: 5rem;
}

.mt-24 {
  margin-top: 6rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 1.25rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-10 {
  margin-bottom: 2.5rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.mb-20 {
  margin-bottom: 5rem;
}

.mb-24 {
  margin-bottom: 6rem;
}

@font-face {
  font-family: "Kommuna";
  src: url("/static/fonts/Kommuna-Normal.ttf") format("truetype");
}
