/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  background-color: #f5f5f5;
}

/* Header styles */
.header {
  height: 100px;
  background-color: #1a1d24;
  padding: 1rem 2rem;
  color: white;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
}

.header-brand {
  display: flex;
  flex-direction: column;
  margin-left: 0.7rem; /* Отступ между логотипом и текстом */
}

.logo {
  max-width: 50px; /* Максимальная ширина логотипа */
  max-height: 50px; /* Максимальная высота логотипа */
  width: auto;
  height: auto;
}

.brand-title {
  font-size: 2rem;
  font-weight: 500;
}

.brand-subtitle {
  font-size: 1rem;
  opacity: 0.8;
}

/* Navigation styles */
.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin-left: 35vw;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(17, 159, 230, 0.486);
}

.nav-link.active {
  background-color: #0ea5e9;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: white;
  margin: 5px 0;
  transition: 0.3s;
}

/* Main content styles */
.main-content {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.weather-section {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Основной контейнер для управления новостями */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem;
  background-color: #f0f4f8;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.controls:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Метка для поля ввода */
.controls label {
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}
.news-image {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 10px;
}
/* Поле ввода количества новостей */
#news-count {
  width: 60px;
  padding: 0.5rem;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#news-count:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Кнопка загрузки новостей */
#load-news-btn {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: #fff;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#load-news-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

#load-news-btn:active {
  transform: scale(1);
}

/* Контейнер для новостей */
.news-container {
  margin-top: 1rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding: 1rem;
}

/* Карточки новостей */
.news-item {
  background-color: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.news-item h2 a {
  font-size: 1.25rem;
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-item h2 a:hover {
  color: #0056b3;
}

.news-item p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #555;
}

/* Footer styles */
.footer {
  background: #000;
  color: gray;
  padding: 30px 0;
  font-family: 'Play', sans-serif;
  text-align: center;
}

.footer .row {
  margin: 10px 0;
  font-size: 0.8em;
}

.footer .row a {
  text-decoration: none;
  color: gray;
  transition: color 0.5s;
}

.footer .row a:hover {
  color: #fff;
}

.footer .row ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer .row ul li {
  display: inline-block;
  margin: 0 30px;
}

.footer .row a i {
  font-size: 2em;
  margin: 0 1%;
}

/* Quote block styles */
#random-phrase {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 15px;
  color: #fff;
}

#author {
  font-size: 1rem;
  margin-top: 10px;
  font-weight: bold;
  color: #ccc;
}

#next-quote {
  padding: 10px 20px;
  background-color: #00b4d8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 1rem;
}

#next-quote:hover {
  background-color: #008a9d;
}

/* GitHub link styles */
.github-link {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  color: gray;
  margin-top: 10px;
  transition: color 0.3s ease;
}

.github-link i {
  font-size: 1.5em;
  margin-right: 5px;
}

.github-link:hover {
  color: #fff;
}

/* Responsive design */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
    margin-left: 15vw;
  }

  .logo {
    max-width: 40px; /* Уменьшаем размер логотипа на мобильных устройствах */
    max-height: 40px;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1d24;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    z-index: 10;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
  }

  .footer {
    padding: 20px;
    text-align: left;
  }

  .footer .row ul li {
    display: block;
    margin: 10px 0;
  }

  .footer .row a i {
    margin: 0 3%;
  }
  .github-link {
    color: white; /* Цвет текста */
    font-size: 24px; /* Размер значка */
    text-decoration: none;
    padding: 10px;
  }
  
  .github-link:hover {
    color: #333; /* Цвет при наведении */
  }
}
