* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}    
/*Шапка (Верхняя панель с соц.сетями)*/
.top-bar {
    background: #fefeff;/*#1A3455*/
    color: #1A3455;
    font-size: 15px;
}

.content-bar {
    display: flex;
    align-items: center;
    justify-content: center; /* Центрировка по горизонтали */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
.content-item {
    display: flex;
    justify-content: center; /* центрирует содержимое по горизонтали */
    align-items: center;     /* по вертикали - если нужно */
    width: 100%;
}
/*Ярлыки Соц.сетей*/
.middle {
    display: flex;
    gap: 20px; 
    margin: 0;
    padding: 0;
    list-style: none;
}

.middle li {
  display: flex;
}

.middle a {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 40px;
    text-decoration: none;
}

.middle a:before {
    content: "";
    width: 40px;
    height: 40px;
    border-radius: 100%;
    display: block;
    background: linear-gradient(45deg, #273863, #2d6b9f);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s ease-out;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.middle i {
    color: #fff;
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    text-align: center;
    transition: transform 0.3s ease-out, color 0.3s ease-out;
    font-size: 20px;
    line-height: 20px;
    z-index: 1;
}

.middle a:hover:before {
    transform: scale(0.9);
}

.middle a:hover i {
    transform: scale(1.2);
    color: #1A3455;
}
/*Разделительная черта*/
.divider {
    width: calc(100% - 160px); /*отступ с каждой стороны */
    height: 1px;
    background-color: #ccc; 
    margin: 0 auto; 
    margin-top: 10px; 
    margin-bottom: 20px; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); 
}
/*Header(Шапка)*/
header {
    width: 100%;
    padding: 5px 100px;
    margin-top: -10px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 100px;
    width: 100%;
    box-sizing: border-box;
}

.header-content {
    width: 100%;
    max-width: 1400px;
}
/*MAIN*/
/*Основной стиль*/
main {
    padding: 30px 0;
    background: #fff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 100px;
}

h2 {
    color: #1A3455;
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: 600;
}
/*Главные новости*/

/* Последние новости и реклама */
.content-wrapper {
    display: flex;
    gap: 30px;
}

.latest-news {
    flex: 2;
}

.advertisement {
    flex: 1;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-item {
    display: flex;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.news-item img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
}

.news-content h3 {
    color: #1A3455;
    font-size: 18px;
    margin-bottom: 10px;
}

.news-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.news-content p {
    color: #333;
    line-height: 1.5;
}
/*Footer (Подвал)*/

footer {
  background: #00000c;
  color: #fff;
  padding: 40px 0 20px 0;
  font-size: 15px;
  margin-top: 40px;
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-left, .footer-center, .footer-right {
  flex: 1 1 250px;
  min-width: 220px;
}

.footer-logo {
  max-width: 160px;
  margin-bottom: 20px;
  display: block;
}

.footer-social {
  margin-top: 15px;
}
.footer-social a {
  color: #fff;
  margin-right: 12px;
  font-size: 22px;
  transition: color 0.2s;
}
.footer-social a:hover {
  color: #0063EC;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-menu li {
  margin-bottom: 10px;
}
.footer-menu a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-menu a:hover {
  color: #0063EC;
}

.footer-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: #fff;
}

.footer-about {
  font-size: 13px;
  color: #cfd8dc;
  line-height: 1.5;
}
/*Адаптация сайта*/
/* --- Большие экраны (десктопы) --- */
@media (min-width: 1200px) {
  .container {
    padding: 0 100px;
  }
}

/* --- Средние экраны (ноутбуки, планшеты в горизонтали) --- */
@media (max-width: 1199px) and (min-width: 900px) {
  .container {
    padding: 0 40px;
  }
  .top-bar, header {
    padding: 15px 40px;
  }
  .divider {
    width: calc(100% - 80px);
  }
}

/* --- Планшеты и небольшие ноутбуки --- */
@media (max-width: 899px) and (min-width: 600px) {
  .container {
    padding: 0 15px;
  }
  .top-bar, header {
    padding: 10px 15px;
  }
  .divider {
    width: calc(100% - 30px);
  }
  nav {
    flex-direction: column;
    gap: 10px;
  }
  .main-news-item.big {
    height: 400px;
  }
  .main-news-item {
    height: 180px;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .content-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  .advertisement {
    flex-direction: row;
    gap: 10px;
  }
  .ad-big, .ad-small {
    height: 120px;
  }
}

/* --- Мобильные устройства --- */
@media (max-width: 768px) {
  .container {
    padding: 0 5px;
  }
  .top-bar, header {
    padding: 8px 5px;
    font-size: 13px;
  }
  .divider {
    width: 100%;
    margin: 10px 0;
  }
  .content-item{
    display: flex;
    justify-content: center;
  }
  .logo {
    width: 120px;
    height: 30px;
    margin-right: 10px;
  }
  .content-bar, .content-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  nav {
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
  }
  .main-news {
    margin-bottom: 20px;
  }
  .news-grid {
    grid-template-columns: 1fr;
    grid-gap: 10px;
  }
  .main-news-item, .main-news-item.big {
    height: 140px;
  }
  .news-overlay h3 {
    font-size: 14px;
  }
  .news-category {
    font-size: 11px;
    padding: 2px 6px;
  }
  .news-item {
    flex-direction: column;
    gap: 8px;
  }
  .news-item img {
    width: 100%;
    height: 90px;
  }
  .ad-big, .ad-small {
    height: 70px;
  }
  .projects-carousel {
    flex-direction: column;
    gap: 10px;
    padding-bottom: 0;
  }
  .project-item {
    min-width: 100%;
  }
  .project-item img {
    height: 100px;
  }
    footer {
        padding: 20px 0 10px 0;
        font-size: 12px;
    }
    .footer-main {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
        max-width: 1200px;
        padding: 0 30px;
    }

    .footer-left, .footer-center, .footer-right {
        text-align: left;
        max-width: 33%;
    }

    .footer-social {
        justify-content: flex-start;
        margin-bottom: 20px;
    }

    .footer-logo {
        max-width: 100px;
        margin-bottom: 20px;
    }

    .footer-right {
        max-width: 33%;
    }
}
