:root {
  --brand-blue: #EF7F1B;
  --accent-yellow: #16519D;
  --text: #333;
  --light-bg: #fff;
  --footer-bg: var(--brand-blue);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--light-bg);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  background-color: var(--brand-blue);
  color: white;
  padding: 12px 0;
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo img {
  max-width: 300px;
  height: auto;
}

.contacts {
  text-align: right;
}

.phone {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.phone a {
  color: white;
  text-decoration: none;
}

.phone a:hover {
  text-decoration: underline;
}

.email a {
  color: white;
  text-decoration: underline;
}

.navbar {
  background-color: var(--accent-yellow);
  margin-top: 12px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 8px 0;
  gap: 0;
}

.nav-item {
  padding: 0 16px;
}

.nav-link {
  text-decoration: none;
  color: var(--brand-blue);
  font-weight: bold;
  white-space: nowrap;
}

.nav-link:hover {
  text-decoration: underline;
}

main {
  padding: 24px 0;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.hero-image {
  flex: 1;
  min-width: 250px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.hero-content {
  flex: 2;
  min-width: 280px;
}

h1 {
  font-size: 1.875rem;
  margin-bottom: 20px;
  color: var(--brand-blue);
}

p, ul {
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
}

a {
  color: var(--brand-blue);
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: white;
  padding: 20px 0;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.footer-info {
  flex: 2;
  min-width: 280px;
}

.footer-link {
  color: white;
  text-decoration: underline;
}

.footer-extra {
  flex: 1;
  min-width: 200px;
  text-align: right;
}

/* Contacts page specific */
.working-hours {
  margin-top: 16px;
  padding-left: 20px;
}

.working-hours li {
  list-style-type: none;
  margin-bottom: 4px;
}

/* Mobile styles */
@media (max-width: 768px) {
  .header-top {
    text-align: center;
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    width: 100%;
    text-align: center;
    margin-bottom: 12px;
  }

  .contacts {
    text-align: center;
    width: 100%;
    order: 2;
  }

  /* Телефоны в одну строку по центру */
  .phone {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 1rem;
  }

  .phone a {
    white-space: nowrap;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
  }

  .nav-item {
    padding: 4px 0;
  }

  h1 {
    font-size: 1.5rem;
  }

  /* Уменьшаем изображение в мобильной версии */
  .hero-image img {
    max-height: 100px;
    object-fit: cover;
  }

  .hero-image {
    min-width: 100%;
  }

  .hero-content {
    min-width: 100%;
  }

  /* Страница контактов: карта */
  .map-container {
    width: 100%;
    height: 300px;
    margin-top: 16px;
  }
}