/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

/* Base */
body {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: #f9f9f9;
}

/* Header */
.site-header .top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 20px;
  background: #fff;
  border-bottom: 1px solid #0073e6;
}
.social-icons a {
  margin-right: 10px;
  text-decoration: none;
}

.social-icons img {
  width: 20px;
  height: 20px;
}
.header-utility {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
}
.header-utility span,
.header-utility a {
  color: #333;
  text-decoration: none;
}
.header-utility a:hover {
  text-decoration: underline;
}
.lang-switch img {
  width: 20px;   
  height: auto;
  vertical-align: middle;
  margin-left: 5px;
}

.main-header {
   display: flex;
  flex-wrap: wrap;      
  align-items: center;
  padding: 20px;
  background: #fff;
  border-bottom: 3px solid #0073e6;
}
.main-header img {
  width: 110px;
  height: 110px;
}
.main-header h1 {
  flex: 1;
  text-align: center;
  font-size: 25px;
  margin: 0;
}
.main-header .trust-phone {
   margin-top: 0;
  font-size: 14px;
}
/* Navigation line */
.nav-line {
  background: #e3eefc;
  border-top: 3px solid #0073e6;
  border-bottom: 1px solid #0073e6;
}

.nav-line ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 10px 20px;
}

.nav-line ul li {
  position: relative;
  margin-right: 20px;
}

.nav-line ul li a {
  color: #0073e6;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}

.nav-line ul li a:hover {
  text-decoration: underline;
}

/* Выпадающее сабменю Министерство */
.nav-line ul,
.nav-line .submenu {
  margin: 10px;
  padding: 5px;
  list-style: none;
  transition-delay: 900ms;
  top: calc(100% - 8px);
}


.nav-line li {
  position: relative;
}


.nav-line .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e4eaf1;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 115, 230, 0.1);
  padding: 4px 0;
  min-width: 240px;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-line li.has-submenu:hover > .submenu,
.nav-line .submenu li.has-submenu:hover > .submenu {
  visibility: visible;
  opacity: 1;
}


.nav-line .submenu .submenu {
 top: -5px;
  transform: translateX(10px);
  left: 100%;
  margin-left: 4px;
  border-radius: 4px;
}

.nav-line li.has-submenu {
  position: relative;
  padding-bottom: 8px; /* высота «невидимой» зоны */
}

.nav-line li.has-submenu:hover > .submenu {
  display: block;
}

.nav-line .submenu li.has-submenu:hover > .submenu {
  display: block;
}


.nav-line .submenu li + li {
  border-top: 1px solid #e4eaf1;
}
.nav-line li.has-submenu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 8px;    
  background: transparent;
}


.nav-line .submenu a {
  display: block;
  padding: 10px 20px;
  color: #0073e6;      
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.nav-line .submenu a:hover {
  background: rgba(0, 115, 230, 0.05);
}

.nav-line .has-submenu > a::after {
  content: '▼';
  font-size: 10px;
  margin-left: 6px;
  vertical-align: middle;
  transition: transform 0.2s;
}
.nav-line .submenu li.has-submenu > a::after {
  content: '►';
}
.nav-line > ul > li.has-submenu::after {
  content: '';
  position: absolute;
  bottom: -5px;
  height: 15px;
}
.nav-line li.has-submenu:hover > a::after {
  transform: rotate(180deg);
}


/* Секция начальных новостей */
.featured-news {
  padding: 40px 20px;
  background: #fff;
}
.featured-grid {
  display: flex;
  gap: 20px;
}
.featured-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}
.featured-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.featured-item:hover .featured-caption {
  opacity: 1;
  transform: translateY(0);
}

.featured-caption .featured-date {
  font-size: 16px;
  font-weight: bold;
}

.featured-caption .featured-title {
  font-size: 19px;
  margin: 0;
}

.featured-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.featured-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
.featured-item--large {
  flex: 2;
}
.featured-item--small {
  flex: 1;
}

.featured-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.featured-item:hover img {
  transform: scale(1.05);
}


.featured-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: #fff;
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}


.featured-item:hover .featured-caption {
  opacity: 1;
  transform: translateY(0);
}

.featured-date,
.featured-views {
  font-size:  18px;
  line-height: 1;
}

/* Секция сервисов */
.services-section {
  padding: 40px 20px;
  background: #fff;
}
.services-section h2 {
  margin-bottom: 20px;
  font-size: 24px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-item {
  background: #fff;
  border: 1px solid #e4eaf1;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(17, 38, 146, 0.07);
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  padding: 36px 20px;
  text-align: center;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 32px;
}

.service-item:hover {
  box-shadow: 0 4px 24px rgba(17, 38, 146, 0.13);
  border-color: #0073e6;
}

.service-accent {
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 6px;
  background: #0073e6 !important;
  border-radius: 6px;
  content: "";
}

.services-footer {
  text-align: center;
  margin-top: 30px;
}
.btn-all-services {  
  display: inline-flex;
  align-items: center;
  background: #0073e6;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 40px;
  transition: background 0.2s;
}
.btn-all-services:hover {
  background: #0073e6;
}
.btn-all-services .btn-arrow {
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.2s;
}
.btn-all-services:hover .btn-arrow {
  transform: translateX(4px);
}

/* Все новости */
.news-section {
  padding: 40px 20px;
  background: #fff;
}
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.news-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
}
.news-all-link {
  font-size: 16px;
  color: #0073e6;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.news-all-link .arrow {
  margin-left: 4px;
  transition: transform 0.2s;
}
.news-all-link:hover .arrow {
  transform: translateX(4px);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.news-card {
  left: 5px;
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.news-card:hover {
  transform: translateY(-4px);
}
.news-card img {
  width: 100%;
  height: auto;
  display: block;
}
.news-meta span {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: #555;
  margin-right: 16px;
  position: relative;
  padding-left: 24px; 
}

.news-meta span::before {
  content: "";
  position: absolute;
  left:5px;
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-size: contain;
}


.news-meta .news-date::before {
  background-image: url("../icons/calendar.svg");
}


.news-meta .news-time::before {
  background-image: url("../icons/clock.svg");
}


.news-meta .news-views::before {
  background-image: url("../icons/eye.svg");
}
.news-title {
  padding: 0 16px 16px;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}


/* Быстрые ссылки */
.quick-links {
  padding: 40px 20px;
  background: #fff;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.quick-item {
  display: flex;
  align-items: center;
  padding: 20px;
  background: #fff;
  border: 1px solid #e4eaf1;
  border-radius: 12px;
  text-decoration: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.quick-item:hover {
  border-color: #0073e6;
  box-shadow: 0 4px 16px rgba(0, 115, 230, 0.1);
}
.quick-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #f1f4f8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}
.quick-icon img {
  width: 24px;
  height: 24px;
  fill: #0073e6;
}
.quick-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.articles-section {
  padding: 40px 20px;
  background: #fff;
}
.articles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.articles-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
}
.articles-all-link {
  font-size: 16px;
  color: #0073e6;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.articles-all-link .arrow {
  margin-left: 4px;
  transition: transform 0.2s;
}
.articles-all-link:hover .arrow {
  transform: translateX(4px);
}
.articles-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.article-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.article-card:hover {
  transform: translateY(-4px);
}
.article-card img {
  width: 100%;
  height: auto;
  display: block;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 16px 0;
  font-size: 14px;
  color: #555;
}
.article-meta span {
  position: relative;
  padding-left: 24px;
}
.article-date::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  mask: url("../assets/icons/calendar.svg") no-repeat center/contain;
  -webkit-mask: url("../assets/icons/calendar.svg") no-repeat center/contain;
  background-color: #0073e6;
}
.article-views::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  mask: url("../assets/icons/eye.svg") no-repeat center/contain;
  -webkit-mask: url("../assets/icons/eye.svg") no-repeat center/contain;
  background-color: #0073e6;
}

.article-title {
  padding: 8px 16px 16px;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.faq-cta {
  width: 1400px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: #0073e6;
  background-image: url("../assets/img/faq-pattern.svg");
  background-repeat: repeat;
  background-size: auto 100%;
  border-radius: 10px;
  color: #ffffff;
}

.faq-cta h2 {
  font-size: 24px;
  font-weight: 400;
}

.faq-button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid #ffffff;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.faq-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Медиатека */
.media-section {
  padding: 40px 20px;
  background: #fff;
}
.media-header {
  max-width: 1200px;
  margin: 0 auto 20px;
}
.media-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
}
/* Табы */
.media-tabs ul {
  display: flex;
  gap: 24px;
  list-style: none;
  border-bottom: 1px solid #0073e6;
  margin-top: 12px;
  padding-bottom: 4px;
}
.media-tabs li {
  padding-bottom: 4px;
}
.media-tabs li.active {
  border-bottom: 2px solid #0073e6;
}
.media-tabs a {
  font-size: 16px;
  color: #333;
  text-decoration: none;
}
.media-tabs li.active a {
  color: #0073e6;
}

.media-content {
  max-width: 1200px;
  margin: 0 auto;
}
.media-grid {
  display: none;

}
.media-grid.active {
  display: block; 
}
/* Слайдер */
.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 940px; /* ровно 3×300px + 2×20px */
  margin: 0 auto;
}

.carousel-slides {
  display: flex;
  gap: 20px;
  transition: transform 0.3s ease;
}

.carousel-slide {
  flex: 0 0 300px;
  border-radius: 12px;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  display: block;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0,115,230,0.7);
  color: #fff;
  font-size: 20px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  z-index: 1;
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }


/* Офиц. рес-сы */

.official-resources {
  padding: 40px 20px;
  background: #fff;
}
.official-resources h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
}
.official-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;      
  -ms-overflow-style: none;     
}
.official-grid::-webkit-scrollbar {
  display: none;                
}

.official-item {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #e4eaf1;
  border-radius: 12px;
  padding: 16px;
  min-width: 260px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
}
.official-item:hover {
  border-color: #0073e6;
  box-shadow: 0 4px 16px rgba(0,115,230,0.1);
}

.official-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-right: 12px;
}
.official-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.official-text {
  flex: 1;           
  line-height: 1.3;
}


/*Футер*/
.site-footer {
  border-top: 1px solid #0073e6;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background: #fff;
  font-size: 16px;
  color: #333;
}
.footer-top,
.footer-middle {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-col {
  flex: 1;
}
.footer-logo img {
  width: 110px;
  height: auto;
}
.footer-address p,
.footer-phones p {
  line-height: 1.4;
}
.footer-map a,
.footer-policy a {
  margin-left: 15px;
  color: #0073e6;
  text-decoration: none;
  font-weight: 600;
}
.footer-map a:hover,
.footer-policy a:hover {
  margin-top: 30px;
  text-decoration: underline;
}
.footer-divider {
  height: 1px;
  margin: 20px 0;
}
.footer-middle .footer-name {
  font-weight: 600;
  font-size: 18px;
}
.footer-phones a {
  color: inherit;
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid #0073e6;
  text-align: center;
  font-size: 14px;
  color: #555;
  line-height: 1.4;
  border-bottom: 1px solid #0073e6;
}


/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
  /* Header */
  .site-header .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 15px;
  }
  .social-icons {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
  }
  .header-utility {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
  }
  .header-utility span, .header-utility a, .lang-switch {
    white-space: nowrap;
  }

  .main-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 10px;
  }
  .main-header img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
  }
  .main-header h1 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  .main-header .trust-phone {
    font-size: 12px;
  }

  /* Меню */
  .nav-line ul {
    flex-direction: column;
    padding: 0 10px;
  }
  .nav-line ul li {
    margin-right: 0;
    margin-bottom: 8px;
  }
  .nav-line ul li a {
    font-size: 14px;
    display: block;
    padding: 8px 12px;
  }
  .nav-line .submenu {
    position: static;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 15px;
    margin-top: 4px;
  }
  .nav-line .submenu a {
    padding: 6px 0;
    font-weight: 500;
  }

  /* Блок новостей */
  .featured-grid {
    flex-direction: column;
    gap: 14px;
  }
  .featured-item--large, .featured-aside {
    width: 100%;
    flex: none;
  }
  .featured-aside {
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
  }
  .featured-aside a {
    flex: 0 0 48%;
  }

  /* Сервисы */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .service-item {
    padding: 24px 16px;
    font-size: 16px;
  }

  /* Новости */
  .news-header h2,
  .articles-header h2,
  .media-header h2,
  .official-resources h2 {
    font-size: 22px;
  }
  .news-list,
  .articles-list,
  .quick-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Быстрые ссылки */
  .quick-item {
    padding: 16px;
    font-size: 15px;
  }
  .quick-icon {
    width: 36px;
    height: 36px;
    margin-right: 10px;
  }
  .quick-title {
    font-size: 15px;
  }

  /* Медиатека */
  .media-tabs ul {
    gap: 12px;
  }
  .carousel-container {
    max-width: 100%;
  }
  .carousel-slide {
    flex: 0 0 80vw;
  }

  /* Официальные ресурсы */
  .official-grid {
    gap: 12px;
    padding-bottom: 8px;
  }
  .official-item {
    min-width: 140px;
    font-size: 14px;
    padding: 12px;
  }
  .official-logo {
    width: 32px;
    height: 32px;
    margin-right: 8px;
  }

  /* Футер */
  .footer-top,
  .footer-middle {
    flex-direction: column;
    gap: 20px;
  }
  .footer-logo img {
    width: 80px;
  }
  .footer-map a,
  .footer-policy a {
    margin-left: 0;
  }
  .footer-bottom {
    font-size: 13px;
  }
}
