:root {
    --primary-blue: #2563eb;
    --bg-gray: #f1f3f4;
    --text-dark: #151515;
    --text-gray: #555555;
    --text-light-gray: #9ca3af;
    --white: #ffffff;
    --border-color: #dcdcdc;
  }
  


body {
    font-family: 'Unbounded';
    margin: 0;
    padding: 0;
    background-color: #f1f3f4;
    color: #151515;
    box-sizing: border-box;
  }
  
  *,
  *::before,
  *::after {
    box-sizing: inherit;
  }

  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;

  }

  /* Utility for merged images */
  .merged-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
  }
  .merged-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  #top-banner {
    width: 100%;
    background-color: #000;
  }
  .banner-img {
    width: 100%;
    height: auto;
    max-height: 243px;
    object-fit: cover;
  }
  
  /* header */
  .site-header {
    background-color: #2563eb;
    padding: 20px 0;
    box-shadow: 0px 10px 40px 0px rgba(109, 141, 173, 0.25);
  }
  .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .logo-wrapper {
    position: relative;
    width: 182px;
    height: 40px;
  }
  .logo-part {
    position: absolute;
  }
  .vertical-divider {
    width: 1px;
    height: 20px;
    background-color: #ffffff;
    margin: 0 20px;
  }
  .main-nav {
    display: flex;
    gap: 30px;
    flex-grow: 1;
    margin-left: 40px;
  }
  .nav-link {
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
  }
  .icon-group {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  /* header end */
  .action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
  }
  

  
  @media (max-width: 768px) {
    .main-nav {
      display: none;
    }
  }
  
  
  .layout-grid {
    display: grid;
    grid-template-columns: 1fr 277px;
    gap: 20px;
    padding: 20px 0;
  }
  
  /* Author Card */
  .author-card {
    position: relative;
    margin-bottom: 20px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.25);

  }
  .author-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }
  .author-content {
    position: relative;
    z-index: 2;
    display: flex;
    padding: 40px 30px;
    gap: 20px;
  }
  .author-avatar img {
    width: 136px;
    height: 136px;
    border-radius: 50%; 
    object-fit: cover;
  }
  .author-info h1 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
  }
  .author-bio {
    font-size: 14px;
    color: #262b33;
    margin-bottom: 15px;
    line-height: 1.6;
  }
  .author-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4b5563;
    font-size: 14px;
  }
  .meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .icon-tg {
    color: var(--primary-blue);
    height: 28px;
  }
  
  /* Articles Container */
  .articles-container {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.25);
    padding: 20px 30px;
    margin-bottom: 20px;
  }
  
  .tabs-header {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    position: relative;
  }
  .tab {
    padding-bottom: 10px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 500;
  }
  .tab.active {
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary-blue);
  }
  
  .articles-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }
  
  .article-item {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
  }
  .article-item:last-child {
    border-bottom: none;
  }
  
  .article-image {
    position: relative;
    width: 325px;
    flex-shrink: 0;
  }
  .article-image img {
    border-radius: 10px;
    width: 100%;
    height: 217px;
  }
  .article-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
  }
  .tag {
    background: var(--primary-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
  }
  
  .article-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .article-meta-top {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 15px;
    margin-top: 5px;
    flex-wrap: wrap;
  }

  .article-meta-top .icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-meta-top .icon img {
  width: 15px;
  height: 15px;
}
  .article-content h2 {
    font-size: 18px;
    margin: 0 0 10px 0;
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
  }
  .article-content p {
    font-size: 14px;
    color: #000;
    margin: 0 0 15px 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .read-more {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
  }
  
  .show-more-wrapper {
    display: flex;
    justify-content: center;
  }
  .btn-show-more {
    background: var(--primary-blue);
    color: white;
    padding: 12px 40px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0px 0px 15px 0px rgba(255, 255, 255, 0.15);
  }
  
  /* Comments Section */
  .comments-section {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.25);
  }
  .comments-section h3 {
    margin-top: 0;
  }
  .required-note {
    color: #7f8c8d;
    font-size: 14px;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #9ca3af;
    font-size: 14px;
  }
  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    background: #fefeff;
    font-family: inherit;
  }
  .form-group textarea {
    height: 120px;
    resize: vertical;
  }
  .help-text {
    font-size: 12px;
    color: #000;
    margin-top: 5px;
  }
  
  .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #7f8c8d;
    font-size: 14px;
  }
  
  .recaptcha-box {
    background: #f9f9f9;
    border: 1px solid #d3d3d3;
    border-radius: 3px;
    width: 302px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    margin-bottom: 20px;
  }
  .checkbox-area {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #c1c1c1;
    border-radius: 2px;
    background: white;
  }
  .captcha-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: #555;
  }
  .captcha-logo img {
    width: 32px;
    height: 32px;
  }
  
  .btn-submit {
    background: var(--primary-blue);
    color: white;
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    font-weight: 600;
  }
  

  .sidebar-ad img {
    border-radius: 10px;
    width: 100%;
  }
  
  @media (max-width: 900px) {
    .layout-grid {
      grid-template-columns: 1fr;
    }
    .article-item {
      flex-direction: column;
    }
    .article-image {
      width: 100%;
    }
    .author-content {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
  }
  
  .site-footer {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 0 20px 0;
  }
  .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.2fr 0.8fr 1.2fr; 
    gap: 30px; 
    margin-bottom: 60px;
  }
  .footer-logo {
    width: 186px;
    margin-bottom: 20px;
  }
  .footer-desc {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 320px;
  }
  .social-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
  }
  .email-link {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .footer-link {
    display: block;
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 16px;
  }
  .footer-link.sub-link {
    color: #d2d2d2;
    font-size: 14px;
  }
  .footer-bottom {
    text-align: center;
    color: #7e7e7e;
    font-size: 14px;
    border-top: 1px solid #333;
    padding-top: 20px;
  }
  @media (max-width: 768px) {
    .footer-grid {
      grid-template-columns: 1fr;
      text-align: center;
    }
    .brand-col {
      align-items: center;
      display: flex;
      flex-direction: column;
    }
  }
  
  .main-nav ul {
    display: flex;
    gap: 30px;
    flex-grow: 1;
    color: white;
    list-style: none;
    font-weight: 400;
}




#header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* === КНОПКА НАВЕРХ === */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #2563eb;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background-color: #1d4ed8;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .scroll-to-top {
      bottom: 20px;
      right: 18px;
      width: 50px;
      height: 50px;
  }
  
  .scroll-to-top svg {
      width: 20px;
      height: 20px;
  }
}



/* === КНОПКА AI АССИСТЕНТ === */
.ai-assistant-btn {
  position: fixed;
  bottom: 95px; 
 right: 30px;
  width: 50px;
  height: 50px;
  background-color: #2563eb;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1; 
  visibility: visible; 
  transform: translateY(0); 
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.ai-assistant-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.ai-assistant-btn:active {
  transform: translateY(-1px);
}

.ai-assistant-btn img {
  width: 24px;
  height: 24px;
}



/* Контейнер полей ввода */
.comments-wrapper #commentform p {
  margin-bottom: 20px;
}


.comments-wrapper #commentform input[type="text"],
.comments-wrapper #commentform input[type="email"],
.comments-wrapper #commentform input[type="url"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background-color: #fefeff;
  box-sizing: border-box;
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  color: #151515;
  margin-top: 5px;
}

.comments-wrapper #commentform input[type="text"]:focus,
.comments-wrapper #commentform input[type="email"]:focus,
.comments-wrapper #commentform input[type="url"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


.comments-wrapper #commentform textarea#comment {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background-color: #fefeff;
  box-sizing: border-box;
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  color: #151515;
  height: 120px;
  resize: vertical;
  display: block;
  margin-top: 5px;
}

.comments-wrapper #commentform textarea#comment:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


.comments-wrapper #commentform input[type="submit"] {
  background-color: #2563eb;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 30px;
  border: none;
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  width: auto; 
}

.comments-wrapper #commentform input[type="submit"]:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}


.comments-wrapper #commentform p.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #6b7280;
}

.comments-wrapper #commentform p.comment-form-cookies-consent input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.comments-wrapper #commentform label {
  font-weight: 600;
  color: #151515;
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
}



.author-socials {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.social-link:hover {
  transform: translateY(-3px);
}

.social-link img {
  width: 20px;
  height: 20px;
}

.social-link.telegram {
  background: #229ED9;
  padding: 6px;
}

.social-link.vk {
  background: #4C75A3;
  padding: 6px;
}

.social-link.youtube {
  background: #FF0000;
  padding: 6px;
}

@media (max-width: 768px) {
  .author-socials {
      margin-left: 0;
      margin-top: 15px;
      justify-content: center;
  }
  
  .author-meta {
      flex-direction: column;
      align-items: center;
  }
}

.sidebar-column {
  width: 276px;
  flex-shrink: 0;
  position: sticky;
  top: 90px; 
  align-self: flex-start; 
}

.sidebar-ad img {
  border-radius: 10px;
  width: 100%;
  height: auto;

}


@media (max-width: 430px) {
  .sidebar-ad img {
    width: 50%;
  }
} 

@media (max-width: 768px) {
  .ai-assistant-btn {
      bottom: 80px; 
      right: 20px;
      width: 45px;
      height: 45px;
  }
  
  .ai-assistant-btn img {
      width: 20px;
      height: 20px;
  }
  
  .scroll-to-top {
      bottom: 20px;
      right: 18px;
      width: 50px;
      height: 50px;
  }
}


/* Улучшенный адаптив для layout-grid */
@media (max-width: 900px) {
  .layout-grid {
      grid-template-columns: 1fr;
      gap: 30px;
  }
  
  .sidebar-column {
      width: 100%;
      position: static;
      align-self: auto;
  }
  
  .sidebar-ad img {
    max-width: 50%;
    height: auto;
    padding: 0 15px;
  }
}

/* Исправление для article-item на мобильных */
@media (max-width: 768px) {
  .article-item {
      flex-direction: column;
      gap: 15px;
  }
  
  .article-image {
      width: 100%;
      max-width: 100%;
      flex-shrink: 0;
  }
  
  .article-image img {
      width: 100%;
      object-fit: cover;
  }
  
  .author-content {
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 30px 20px;
  }
  
  .author-avatar img {
      width: 100px;
      height: 100px;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
  .container {
      padding: 0 15px;
  }
  
  .articles-container {
      padding: 30px 20px;
  }
  
  .tabs-header {

      overflow-x: auto;
      white-space: nowrap;
  }
  
  .author-info h1 {
      font-size: 20px;
  }

  /* Предотвращение переполнения */
.layout-grid,
.content-column,
.articles-container {
  max-width: 100%;
  overflow-x: hidden;
  margin-top: 10px;
  margin-bottom: 0;
  gap: 20px;
}


}

@media (max-width: 480px) {
  .sidebar-column {

      padding: 0 0 15px;
  }

  .sidebar-ad img {
  
    padding: 0;
  }
}