/* ================================================================
   xGamerss MVC supplement — fills gaps in original styles.css
   ================================================================ */

/* ── Font declarations (repeated here in case BOM in styles.css
      causes the first @font-face rule to be silently dropped) ── */
@font-face {
  font-family: 'PTSans';
  font-style: normal;
  font-weight: 400;
  src: local('PTSans'),
       url('/fonts/PTSans.woff2') format('woff2'),
       url('/fonts/PTSans.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'PTSansBold';
  font-style: normal;
  font-weight: 700;
  src: local('PTSansBold'),
       url('/fonts/PTSansBold.woff2') format('woff2'),
       url('/fonts/PTSansBold.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'PTSansItalic';
  font-style: italic;
  font-weight: 400;
  src: local('PTSansItalic'),
       url('/fonts/PTSansItalic.woff2') format('woff2'),
       url('/fonts/PTSansItalic.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Lobster-Regular';
  font-style: normal;
  font-weight: 400;
  src: local('Lobster-Regular'),
       url('/fonts/Lobster-Regular.woff2') format('woff2'),
       url('/fonts/Lobster-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'PTSans-Web-Bold';
  font-style: normal;
  font-weight: 400;
  src: local('PTSans-Web-Bold'),
       url('/fonts/PTSans-Web-Bold.woff2') format('woff2');
  font-display: swap;
}

/* Ensure body uses PTSans just like the original */
body { font-family: 'PTSans', Arial, sans-serif; }

/* ── Layout width — matches original template breakpoints ─────── */
.desktop-layout { width: 960px; margin: 0 auto; }
@media only screen and (min-width: 1200px) {
    .desktop-layout { width: 1170px; }
}

/* ── Article left column width override ─────────────────────────── */
.b-left-side { width: 72% !important; }

/* ── Featured hero section ─────────────────────────────────────── */
.features-top { display: flex !important; width: 100%; margin-bottom: 6px; gap: 2px; }
/* Left hero: 55% */
.features-top .main-side { flex: 0 0 55%; min-width: 0; }
.features-top .main-side a { display: block; text-decoration: none; }
.features-top .parent-0 { width: 100%; height: 340px; overflow: hidden; }
/* Right 2×2 grid: 45% — use nested flex */
.features-top .ride-side { flex: 0 0 45%; min-width: 0; display: flex !important; flex-wrap: wrap; gap: 2px; align-content: flex-start; }
.features-top .ride-side a { display: block !important; flex: 0 0 calc(50% - 1px); text-decoration: none; }
.features-top .ride-side .parent-main { width: 100% !important; height: 168px !important; display: block !important; overflow: hidden; margin: 0; }
.features-top .parent-0:hover,
.features-top .parent-main:hover { filter: brightness(1.07); }

/* ── Hero right-side panels (Latest / Most Viewed) ───────────────── */
.features-top .ride-side .side-panel {
    flex: 0 0 100%;
    background: #18181e;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.side-panel-head {
    background: #222233;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 7px 10px;
    border-left: 3px solid #4CAF50;
    flex-shrink: 0;
}
.side-panel--orange .side-panel-head { border-left-color: #f85600; }
.features-top .ride-side .side-panel-item {
    display: flex !important;
    flex: 1 !important;
    align-items: center !important;
    gap: 8px;
    padding: 4px 8px;
    text-decoration: none !important;
    border-bottom: 1px solid #28283a;
    overflow: hidden;
    min-height: 0;
}
.features-top .ride-side .side-panel-item:hover { background: #25253a; }
.side-panel-item img {
    width: 70px;
    height: 46px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 2px;
}
.side-panel-item > span:first-of-type {
    color: #ddd;
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.side-panel-views {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
    padding-left: 4px;
}

/* ── 3-column article grid (flexbox — reliable regardless of parent width) */
#Main_Content { display: flex; flex-wrap: wrap; }
#Main_Content .item {
    flex: 0 0 calc(33.33% - 14px) !important;
    width: auto !important;
    margin: 10px 7px !important;
    box-sizing: border-box;
}
#Main_Content .b-size-parametrs { width: 100% !important; height: 164px; }
#Main_Content .parent-img-item { display: block !important; width: 100% !important; height: 164px; overflow: hidden; }
#Main_Content .img-item { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Responsive image heights — match styles.css breakpoints but win via ID specificity */
@media only screen and (min-width: 801px) and (max-width: 1000px) {
    #Main_Content .parent-img-item { height: 194px; }
    #Main_Content .b-size-parametrs { height: 194px; }
}
@media only screen and (min-width: 1001px) and (max-width: 1200px) {
    #Main_Content .parent-img-item { height: 164px; }
    #Main_Content .b-size-parametrs { height: 164px; }
}
@media only screen and (min-width: 1200px) {
    #Main_Content .parent-img-item { height: 240px; }
    #Main_Content .b-size-parametrs { height: 240px; }
}

/* ── Right panel article list ────────────────────────────────── */
#main-right-panel .news-item { border-bottom: 1px dotted #cdcdcd; padding: 4px 0; }
#main-right-panel .table-preview { width: 100%; border-collapse: collapse; }
#main-right-panel .left-side { width: 120px; text-align: center; vertical-align: top; padding: 2px; }
#main-right-panel .left-side img { max-width: 118px; max-height: 70px; padding: 3px; background-color: #fff; border: 1px solid #dee2e6; border-radius: 3px; }
#main-right-panel .rigth-side { vertical-align: top; padding-left: 6px; }
#main-right-panel .title-short-news {
    font-size: 13px; font-weight: bold; line-height: 16px;
    overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    color: #000;
}
#main-right-panel a { text-decoration: none; }
#main-right-panel a:hover .title-short-news { color: #038754; }

/* ── Article page sidebar ────────────────────────────────────── */
#ContentPlaceHolder1_MostPopular_Article .news-item { border-bottom: 1px dotted #cdcdcd; padding: 4px 0; }
#ContentPlaceHolder1_MostPopular_Article .table-preview { width: 100%; border-collapse: collapse; }
#ContentPlaceHolder1_MostPopular_Article .left-side { width: 120px; text-align: center; vertical-align: top; padding: 2px; }
#ContentPlaceHolder1_MostPopular_Article .left-side img { max-width: 118px; max-height: 70px; padding: 3px; background-color: #fff; border: 1px solid #dee2e6; border-radius: 3px; }
#ContentPlaceHolder1_MostPopular_Article .rigth-side { vertical-align: top; padding-left: 6px; }
#ContentPlaceHolder1_MostPopular_Article .title-short-news {
    font-size: 13px; font-weight: bold; line-height: 16px;
    overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
#ContentPlaceHolder1_MostPopular_Article a { text-decoration: none; color: #000; }
#ContentPlaceHolder1_MostPopular_Article a:hover .title-short-news { color: #038754; }


/* ── Responsive — mirrors original template breakpoints ───────── */
@media only screen and (min-width: 801px) and (max-width: 1000px) {
    .desktop-layout { width: 770px; }
    .features-top .parent-0 { height: 250px; }
    .features-top .ride-side .parent-main { height: 122px !important; }
}
@media only screen and (min-width: 601px) and (max-width: 800px) {
    .desktop-layout { width: 600px; }
    .features-top { flex-direction: column !important; }
    .features-top .main-side,
    .features-top .ride-side { flex: 0 0 100% !important; }
    .features-top .parent-0 { height: 220px; }
    .features-top .ride-side .parent-main { height: 100px !important; }
    #Main_Content .item { flex: 0 0 calc(50% - 14px) !important; }
    .table-data { display: block !important; }
    .table-data .sub-cell { display: block !important; width: 100% !important; }
    #main-right-panel { display: none !important; }
}
@media only screen and (max-width: 600px) {
    .desktop-layout { width: 98%; }
    .features-top { flex-direction: column !important; }
    .features-top .main-side,
    .features-top .ride-side { flex: 0 0 100% !important; }
    .features-top .parent-0 { height: 180px; }
    .features-top .ride-side .parent-main { height: 90px !important; }
    #Main_Content .item { flex: 0 0 calc(100% - 14px) !important; }
    .table-data { display: block !important; }
    .table-data .sub-cell { display: block !important; width: 100% !important; }
    #main-right-panel { display: none !important; }
}
