/* ============================================================
   Шрифты
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");


/* ============================================================
   Переменные (чтобы проще менять цвета)
   ============================================================ */
:root {
  --brand: #d93b3b;
  --brand-dark: #b73838;
  --bg: #f5f5f5;
  --text: #222;
  --white: #fff;
  --shadow: rgba(0, 0, 0, 0.2);
  --border: rgba(217, 59, 59, 0.2);
  --hover-bg-1: #f2cccc;
  --hover-bg-2: #e5b5b5;
}


/* ============================================================
   Общие настройки
   ============================================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  position: relative;
}

/* Удобный фокус для клавиатуры */
:focus-visible {
  outline: 3px solid rgba(217, 59, 59, 0.35);
  outline-offset: 3px;
  border-radius: 8px;
}


/* ============================================================
   NAV
   ============================================================ */
nav {
  background-color: var(--brand);
}

.navbar-brand img {
  margin-right: 8px;
}

.navbar-dark .navbar-nav .nav-link {
  font-weight: 500;
  color: var(--white);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus-visible {
  color: #ffcccc;
}


/* ============================================================
   HEADER
   ============================================================ */
header {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--white);
  padding: 100px 0;
  text-align: center;
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

header p {
  font-size: 1.3rem;
  margin: 0;
}


/* ============================================================
   SECTIONS
   ============================================================ */
section {
  padding: 80px 0;
  transition: background 0.5s ease;
}

main section:nth-of-type(even) {
  background: var(--white);
}

main section:nth-of-type(odd) {
  background: var(--bg);
}

h2 {
  text-align: center;
  margin-bottom: 60px;
  font-weight: 700;
}


/* ============================================================
   Карточки
   ============================================================ */
.card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow);
  background: linear-gradient(135deg, var(--hover-bg-1), var(--hover-bg-2));
}

.card-img-top {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}


/* ============================================================
   TEAM
   ============================================================ */
#team .card {
  padding: 18px 14px;
}

#team img.rounded-circle {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: block;
  margin: 18px auto 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

#team img.rounded-circle:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}


/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 40px;
  list-style: none;
  margin: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: var(--brand);
  border-radius: 2px;
}

.timeline li {
  position: relative;
  margin-bottom: 30px;
  padding-left: 25px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.15rem;
  width: 14px;
  height: 14px;
  background-color: var(--brand);
  border-radius: 50%;
  border: 2px solid var(--white);
}


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background-color: #222;
  color: var(--white);
  padding: 30px 0;
  text-align: center;
  font-weight: 500;
}

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

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


/* ============================================================
   Кнопка "Наверх"
   ============================================================ */
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background-color: var(--brand);
  color: var(--white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: none;
  z-index: 999;
  box-shadow: 0 5px 15px var(--shadow);
  transition: background 0.3s ease, transform 0.2s ease;
}

#backToTop:hover {
  background-color: var(--brand-dark);
  transform: scale(1.1);
}


/* ============================================================
   Адаптивность
   ============================================================ */
@media (min-width: 1200px) {
  section {
    padding: 120px 0;
  }
}

@media (max-width: 576px) {
  header {
    padding: 70px 0;
  }

  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1.05rem;
  }

  h2 {
    margin-bottom: 40px;
  }

  #backToTop {
    bottom: 20px;
    right: 20px;
  }
}
