/**
 * Legacy theme — compact home layout aligned with production (ishnews.tv):
 * Breaking News + four category blocks in a dense vertical rhythm.
 * Loaded only when body has .ish-theme-legacy.
 */

body.ish-theme-legacy {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.ish-theme-legacy header.active .navbar {
  background: #232323 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body.ish-theme-legacy header.active .navbar::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 57px;
  background: #232323;
  z-index: -1;
}

/* Centered main column on legacy home only; header/nav/footer stay full viewport width */
body.ish-theme-legacy .ish-main-column {
  max-width: 1190px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ——— Main column: match live tighter padding between the five sections ——— */
body.ish-theme-legacy #content-section {
  padding: 14px 0 20px;
}

body.ish-theme-legacy #content-section .posts-block {
  margin-bottom: 10px;
}

body.ish-theme-legacy div.search-box {
  margin: 18px 0 16px;
}

body.ish-theme-legacy #BreakingNews-section {
  padding: 8px 0 0;
}

/* Section row titles: “Breaking News”, “Awareness”, … + More */
body.ish-theme-legacy .title-section {
  margin-bottom: 8px;
}

body.ish-theme-legacy .title-section h1 {
  font-size: 15px;
  line-height: 1.3;
  padding-bottom: 8px;
  margin: 0;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
}

body.ish-theme-legacy .title-section h1 .btn-more {
  font-size: 10px;
  padding: 3px 8px;
  line-height: 1.2;
  font-weight: 600;
}

/* Owl prev/next sits beside title — pull up slightly vs default -60px */
body.ish-theme-legacy #content .owl-theme .owl-controls {
  margin-top: -50px;
}

body.ish-theme-legacy #BreakingNews-section .owl-theme .owl-controls,
body.ish-theme-legacy .posts-block--horizontal-scroll .owl-theme .owl-controls {
  margin-right: 68px;
}

/* Card headlines (Breaking + horizontal carousels + grids): live uses small, dense titles */
body.ish-theme-legacy #content .standart-post h2,
body.ish-theme-legacy #content .video-post h2 {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

body.ish-theme-legacy #content .standart-post .post-image {
  margin-bottom: 8px;
}

body.ish-theme-legacy #content-section .standard-box .entertain-sec .standart-post .post-image {
  overflow: hidden;
  background: #eceff1;
  border-radius: 14px;
}

body.ish-theme-legacy #content-section .standard-box .entertain-sec .standart-post .post-image > a:first-child {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

body.ish-theme-legacy #content-section .standard-box .entertain-sec .standart-post .post-image > a:first-child img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

body.ish-theme-legacy #content .thumb-post h2 {
  font-size: 11px;
  line-height: 1.38;
}

/* Sort-3: two-column grid — tighter gutters like a dense news grid */
body.ish-theme-legacy .posts-block--sort-3 > .row {
  margin-left: -8px;
  margin-right: -8px;
}

body.ish-theme-legacy .posts-block--sort-3 > .row > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

/* Sort-2: featured + 2×2 */
body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__row {
  margin-left: -8px;
  margin-right: -8px;
}

body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__row > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__feature .post-image,
body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__thumbs .post-image {
  overflow: hidden;
  background: #eceff1;
}

body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__feature .post-image > a:first-child,
body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__thumbs .post-image > a:first-child {
  display: block;
  aspect-ratio: 16 / 9;
}

body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__feature .post-image img,
body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__thumbs .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__thumbs {
  margin-left: -6px;
  margin-right: -6px;
}

body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__thumbs > [class*="col-"] {
  padding-left: 6px;
  padding-right: 6px;
}

body.ish-theme-legacy .posts-block--sort-2 .posts-block--sort-2__thumbs .news-post {
  margin-bottom: 12px;
}

body.ish-theme-legacy .posts-block--sort-2 .standart-post p {
  font-size: 12px;
  line-height: 1.42;
  margin-top: 4px;
}

body.ish-theme-legacy .posts-block--sort-2 .thumb-post h2 {
  font-size: 11px;
  min-height: 0;
}

/* Sort-5: featured + small-posts list */
body.ish-theme-legacy .posts-block--sort-5 > .row {
  margin-left: -8px;
  margin-right: -8px;
}

body.ish-theme-legacy .posts-block--sort-5 > .row > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

body.ish-theme-legacy #content .posts-block--sort-5 ul.small-posts > li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

body.ish-theme-legacy #content .posts-block--sort-5 ul.small-posts > li > a {
  flex: 0 0 168px;
  width: 168px;
  margin-right: 0;
}

body.ish-theme-legacy #content .posts-block--sort-5 ul.small-posts > li .post-cont {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 0;
  padding-top: 4px;
}

body.ish-theme-legacy #content .posts-block--sort-5 ul.small-posts > li h2 {
  font-size: 15px;
  line-height: 1.38;
}

@media (max-width: 991px) {
  body.ish-theme-legacy #content .posts-block--sort-5 ul.small-posts > li > a {
    flex-basis: 140px;
    width: 140px;
  }
}

@media (max-width: 575px) {
  body.ish-theme-legacy #content .posts-block--sort-5 ul.small-posts > li {
    display: block;
  }

  body.ish-theme-legacy #content .posts-block--sort-5 ul.small-posts > li > a {
    float: none;
    display: block;
    width: 100%;
    margin-bottom: 8px;
  }
}

body.ish-theme-legacy #ish-featured .image-post,
body.ish-theme-legacy #ish-featured .large-image-post {
  background: #111827;
  aspect-ratio: 16 / 9;
  height: auto;
  position: relative;
}

body.ish-theme-legacy #ish-featured .image-post > a:first-child {
  display: block;
  height: 100%;
}

body.ish-theme-legacy #ish-featured .flexslider,
body.ish-theme-legacy #ish-featured .flexslider .slides,
body.ish-theme-legacy #ish-featured .flexslider .slides > li {
  height: 100%;
}

body.ish-theme-legacy #ish-featured .image-post img,
body.ish-theme-legacy #ish-featured .large-image-post img,
body.ish-theme-legacy #ish-featured .ish-featured-fallback-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Meta lines under cards */
body.ish-theme-legacy #content ul.post-tags {
  margin-top: 2px;
}

body.ish-theme-legacy #content ul.post-tags li {
  font-size: 10px;
}

body.ish-theme-legacy #content ul.post-tags li i {
  font-size: 10px;
  margin-right: 3px;
}

body.ish-theme-legacy #content a.category {
  font-size: 9px;
  padding: 1px 6px;
  line-height: 1.35;
}

/* Owl carousels (Breaking + horizontal category) */
body.ish-theme-legacy #content .owl-carousel {
  margin-left: -8px;
  margin-right: -8px;
}

body.ish-theme-legacy #content .owl-carousel .item {
  padding: 0 8px;
}

body.ish-theme-legacy #content .owl-carousel .news-post {
  margin-bottom: 8px;
}

/* Home search */
body.ish-theme-legacy #content .ish-main-column > .container:first-child {
  padding-top: 0;
}

body.ish-theme-legacy #content form.search-form {
  position: relative;
  display: block;
}

body.ish-theme-legacy #content form.search-form input.form-control,
body.ish-theme-legacy #content form.search-form input[type="search"] {
  font-size: 12px;
  height: 36px;
  padding: 7px 46px 7px 10px;
  text-transform: none;
  line-height: 1.35;
}

body.ish-theme-legacy #content form.search-form .btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #232323;
  font-size: 13px;
  line-height: 1;
}

body.ish-theme-legacy #content form.search-form .my-2 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Main + sidebar: slightly tighter sidebar widgets on legacy home */
body.ish-theme-legacy #content-section .sidebar {
  padding-left: 8px;
}

body.ish-theme-legacy #content-section .sidebar .widget {
  margin-bottom: 18px;
}

body.ish-theme-legacy #content-section .sidebar h1 {
  font-size: 14px;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

/* Legacy search page */
body.ish-theme-legacy.ish-search-page #content-section {
  padding-top: 26px;
}

body.ish-theme-legacy.ish-search-page #content-section .search-results-box {
  margin-bottom: 22px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #eceff3;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(18, 25, 38, 0.06);
}

body.ish-theme-legacy.ish-search-page #content-section .search-results-banner {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

body.ish-theme-legacy.ish-search-page #content-section .search-results-banner h1 {
  margin: 0 0 8px;
  color: #1f2933;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
  text-transform: none;
}

body.ish-theme-legacy.ish-search-page #content-section .search-results-banner h1 span {
  color: #e66f00;
  font-weight: 800;
}

body.ish-theme-legacy.ish-search-page #content-section .search-results-banner h3 {
  margin: 0;
  color: #697386;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

body.ish-theme-legacy.ish-search-page #content-section .search-results-banner h3 b {
  color: #f88c00;
}

body.ish-theme-legacy.ish-search-page #content-section div.search-box {
  margin: 0;
  background: transparent;
}

body.ish-theme-legacy.ish-search-page #content-section form.search-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

body.ish-theme-legacy.ish-search-page #content-section form.search-form input.form-control,
body.ish-theme-legacy.ish-search-page #content-section form.search-form input[type="search"] {
  min-height: 46px;
  margin: 0 !important;
  padding: 11px 14px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  color: #1f2933;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: none;
}

body.ish-theme-legacy.ish-search-page #content-section form.search-form .btn {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 46px;
  margin: 0 !important;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #f88c00;
  color: #ffffff;
  line-height: 1;
}

body.ish-theme-legacy.ish-search-page #content-section form.search-form .btn:hover,
body.ish-theme-legacy.ish-search-page #content-section form.search-form .btn:focus {
  background: #df7d00;
  color: #ffffff;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box {
  margin-bottom: 18px;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box > .row {
  margin-left: -10px;
  margin-right: -10px;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box > .row > [class*="col-"] {
  padding-left: 10px;
  padding-right: 10px;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  background: #ffffff;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post > .row {
  align-items: flex-start;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post .post-image {
  margin-bottom: 0;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post .post-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.28;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post ul.post-tags {
  margin-bottom: 8px;
}

body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post p {
  color: #565f6f;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

body.ish-theme-legacy.ish-search-page #content-section .alert-warning {
  padding: 28px;
  border-radius: 8px;
  background: #fff7e6;
  border: 1px solid #ffe0a3;
}

body.ish-theme-legacy.ish-search-page #content-section .alert-warning .entry-title {
  margin: 0;
  color: #7a4b00;
  font-size: 18px;
}

@media (max-width: 575px) {
  body.ish-theme-legacy.ish-search-page #content-section .search-results-box {
    padding: 18px;
  }

  body.ish-theme-legacy.ish-search-page #content-section .search-results-banner h1 {
    font-size: 23px;
  }

  body.ish-theme-legacy.ish-search-page #content-section form.search-form {
    gap: 8px;
  }

  body.ish-theme-legacy.ish-search-page #content-section form.search-form .btn {
    min-width: 46px;
    padding: 0 14px;
  }

  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post {
    padding: 14px;
  }

  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post .post-image {
    margin-bottom: 14px;
  }
}

@media (max-width: 767px) {
  body.ish-theme-legacy.ish-search-page #js-search-video-grid {
    row-gap: 18px;
  }

  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post {
    height: 100%;
    margin-bottom: 0;
    padding: 12px;
  }

  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post > .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post .post-image {
    margin-bottom: 10px;
  }

  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post h2 {
    font-size: 14px;
    line-height: 1.3;
  }

  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post ul.post-tags,
  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post p,
  body.ish-theme-legacy.ish-search-page #content-section .articles-box .article-post ul.tags-list {
    display: none;
  }
}
