/***********************************************************
 * AirTheme — Responsive
 ***********************************************************/

 @media (min-width: 768px) and (max-width: 1023px) {
  .airtheme-content {
    padding: 24px 20px;
    margin: 0; /* обязательно */
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .airtheme-content {
    padding: 20px 16px;
    margin: 40px 10px;
    text-wrap: pretty;
  }
  .airtheme-content p {
  line-height: 1.6;
  margin-bottom: 1.2em;
  }

}

/* Fix long titles in cards */
@media (max-width: 480px) {
  .post-grid {
    grid-template-columns: 1fr;
  }

  .thumb-overlay {
    display: flex;
    align-items: flex-end;
    padding: 10px 14px;
    min-width: 0;
  }

  .thumb-title {
    max-width: 90%;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.35;
  }
}

/* Tablets */
@media (min-width: 601px) and (max-width: 1100px) {
  .post-grid {
    grid-template-columns: repeat(2, 340px);
    justify-content: center;
  }
}
/* === Grid safety breakpoint === */
/* Устраняет разрыв сетки на узких экранах */

@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-grid-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Hero container */
@media (max-width: 768px) {
  .hero-container {
    aspect-ratio: 16 / 9;
    max-width: 100%;
    margin: 10px auto;
  }

  .hero-subtitle {
    max-width: 92% !important;
    font-size: 12px !important;
    padding: 8px 14px !important;
    margin: 10px auto 18px !important;
    background: rgba(255,255,255,0.35) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 6px 22px rgba(0,0,0,0.15);
    border-radius: 12px !important;
    line-height: 1.45;
    letter-spacing: 0.2px;
  }
}

.hero-container + .hero-subtitle {
  display: block;
  margin-top: 12px;
}

/* Mobile header + menu */
@media (max-width: 768px) {
  .site-header .header-flex {
    flex-direction: row;
    justify-content: space-between;
  }

  .site-tagline {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header-right {
    display: none;
  }

  .main-menu {
    padding: 5px 0 15px;
  }

  .main-menu .menu-items {
    display: none;
    flex-direction: column;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 10px 0;
  }

  .main-menu.active .menu-items {
    display: flex;
  }

  .main-menu .menu-items li + li::before {
    content: none;
  }

  .main-menu .menu-items a {
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  .main-menu .menu-items a:hover {
    background: none;
    color: var(--accent-color);
    box-shadow: none;
  }
}

/* Images inside content */
@media (max-width: 768px) {
  .airtheme-content img {
    max-width: 100%;
    margin: 16px 0;
    box-shadow: none;
  }
}

/* Pagination compact */
@media (max-width: 480px) {
  .pagination .page-numbers {
    padding: 6px 10px;
    margin: 2px;
    font-size: 13px;
  }
}


/***********************************************************
 * AirTheme — Mobile Comments
 ***********************************************************/

@media (max-width: 480px) {
  .comment-form textarea,
  .comment-form input[type="text"],
  .comment-form input[type="email"],
  .comment-form input[type="url"] {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .airtheme-comment-list .children {
    margin-left: 20px;
  }
}

@media (max-width: 600px) {

  .airtheme-comment-body {
      grid-template-columns: 40px auto;
      padding: 14px;
      grid-column-gap: 10px;
  }

  .comment-author-avatar img {
      width: 40px;
      height: 40px;
  }

  .comment-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
  }

  .comment-author-name {
      font-size: 14px;
  }

  .comment-date {
      font-size: 11px;
  }

  .comment-content p {
      font-size: 15px;
      line-height: 1.45;
  }

  .comment-footer a {
      font-size: 13px;
  }
}


/***********************************************************
 * AirTheme — Sidebar & Layout Responsive
 ***********************************************************/

@media (min-width: 1024px) {
  .airtheme-has-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
  }

  .sidebar-left {
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 1023px) {
  .airtheme-has-sidebar {
    display: block;
  }

  .airtheme-content,
  .airtheme-sidebar {
    width: 100%;
    max-width: 100%;
  }

  .airtheme-sidebar {
    margin-top: 24px;
    padding: 5px;
  }
}

@media (min-width: 1024px) {
  .sticky-widget {
      position: sticky;
      top: 100px;
      z-index: 3;
  }
}
@media (max-width: 420px) {
  .airtheme-footer-badge {
    right: 6px;
    bottom: 6px;

    font-size: 11px;
    letter-spacing: 0.1em;

    color: rgba(255, 255, 255, 0.16) !important;
    opacity: 0.65;

    text-shadow:
      0 -1px 1px rgba(0, 0, 0, 0.65),
      0  1px 1px rgba(255, 255, 255, 0.12);
  }
}
/***********************************************************
 * AirTheme — Disable submenu on mobile
 ***********************************************************/
@media (max-width: 768px) {

  /* Прячем все подменю */
  .main-menu .menu-items li ul {
    display: none !important;
  }

  /* Убираем hover-раскрытие */
  .main-menu .menu-items li:hover > ul {
    display: none !important;
  }

  /* Убираем визуальные разделители | */
  .main-menu .menu-items li + li::before {
    content: none;
  }

  /* Чуть компактнее пункты */
  .main-menu .menu-items {
    gap: 6px;
  }

  .main-menu .menu-items a {
    padding: 10px 14px;
  }
}

