
/* assets/css/style.css */

/* Сбросы и базовые стили */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  background: #f6f7f8;
  color: #003c70;
  line-height: 1.5;
}

a {
  color: #0b6db7;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Контейнер главного контента */
main {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 16px;
}

/* HEADER */
.header {
  background: linear-gradient(135deg, #0b6db7, #084a80);
  padding: 16px 0;
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center; /* центрируем логотип */
}

.header-logo {
  max-height: 60px;
  height: auto;
  display: block;
}

.hero {
  color: #003c70;
  padding: 0px 16px;
}

.hero h1 {
  margin-top: 0;
}

.hero p {
  margin-bottom: 0;
}

.hero .container {
  max-width: 1100px; /* такая же ширина, как у main/статей */
  margin: 0 auto;
}

/* Featured статья сверху */
.featured {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

.featured img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.featured .content {
  padding: 18px;
}

.featured h2 {
  margin-top: 0;
  font-size: 24px;
}

.featured p {
  font-size: 16px;
  color: #444;
  margin-bottom: 12px;
}

/* Сетка для остальных статей */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}

/* Карточка статьи */
.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 16px;
  margin: 0 0 8px;
  font-weight: 600;
  color: #003c70;
}

.card-excerpt {
  color: #555;
  font-size: 14px;
  margin: 0 0 12px;
  flex-grow: 1;
}

.read-more {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  background: #0b6db7;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.read-more:hover {
  background: #084a80;
}

/* Полная статья */
.article-full {
  background: #fff;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin-bottom: 18px;
}

/* Футер */
footer {
  background: #111;
  color: #ddd;
  padding: 20px;
  margin-top: 26px;
  text-align: center;
  font-size: 14px;
}

footer a {
  color: #ddd;
  text-decoration: none;
  margin: 0 8px;
}

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

/* Модальное окно для полной статьи */
#article-modal {
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

#modal-content img {
  display: block;
  margin: 0 auto 15px;
}

#article-modal-inner {
  max-width: 900px;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
  max-height: 90%;
  position: relative;
}

#article-modal-inner img {
  max-width: 100%;
  height: auto;
  margin-bottom: 12px;
}

#modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  padding: 6px 10px;
  cursor: pointer;
  background: #0b6db7;
  border: none;
  color: white;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

#modal-close:hover {
  background: #084a80;
}

/* Адаптивность */

/* Планшет: 2 колонки */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Мобильные: 1 колонка */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .featured img {
    height: 220px;
  }
}

.card,
.featured {
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.card img,
.featured img {
  transition: transform 0.3s ease;
}

.card:hover img,
.featured:hover img {
  transform: scale(1.05);
}

.card:hover,
.featured:hover {
  border-color: #0b6db7; /* цвет рамки при наведении */
}

