/*
 * gencalimler.az — responsive.css
 * Qaydalar <= 1299px ekranlarda işləyir, böyük ekranda sayt olduğu kimi qalır.
 * Addımlar: 1299 / 1039 / 991 / 600
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Məzmun redaktorundan gələn şəkil, cədvəl və videolar konteynerdən çıxmasın */
html .page-text img,
html .news-text img {
  max-width: 100%;
  height: auto;
}

html .page-text iframe,
html .news-text iframe,
html .page-text video,
html .news-text video {
  max-width: 100%;
}

html .page-text,
html .news-text {
  overflow-wrap: break-word;
}

html .menu-toggle,
html .sub-toggle {
  display: none;
}

/* Fotoslayder skripti xəta verdiyi üçün blok boş qalırdı: şəkillər tor kimi göstərilir */
html #amazingslider-1 {
  max-width: 100%;
}

html #amazingslider-1.r-gallery {
  width: auto !important;
  height: auto !important;
  margin: 0 0 16px !important;
}

html #amazingslider-1.r-gallery .amazingslider-slides {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

html #amazingslider-1.r-gallery .amazingslider-slides li:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

html #amazingslider-1.r-gallery .amazingslider-slides a {
  display: block;
  height: 100%;
}

html #amazingslider-1.r-gallery .amazingslider-slides img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ----- Sabit 1300px enli bloklar axıcı olur ----- */
@media (max-width: 1299px) {
  html .wrapper {
    width: auto;
    margin: 11px 0 0;
  }

  html .wrapper_header,
  html .menu,
  html .slider,
  html .footer-cont {
    width: auto;
    max-width: 100%;
  }

  html .header_top {
    box-sizing: border-box;
    width: 100%;
    max-width: 1032px;
    padding: 0 16px;
  }

  html #demo,
  html #demo .container,
  html #demo .row,
  html #demo .span12 {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    margin: 0;
  }

  /* Karusel skripti işləmir, bannerlər barmaqla sürüşdürülür */
  html #bottombanner_container .slideshow {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  html #bottombanner_container .slideshow::-webkit-scrollbar {
    display: none;
  }

  html #bottombanner_container .cycle-sentinel {
    display: none !important;
  }

  html .cycle-carousel-wrap {
    position: static !important;
    display: flex;
    width: max-content !important;
    left: 0 !important;
    top: 0 !important;
  }

  html .cycle-carousel-wrap .cycle-slide {
    position: static !important;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  html .cycle-carousel-wrap .r-dup {
    display: none !important;
  }

  html .menu > ul {
    text-align: center;
  }

  html .menu > ul > li {
    padding: 0 10px 0 16px;
  }

  html .menu > ul > li > a,
  html .menu > ul > li > a:hover {
    font-size: 12px;
  }

  html .footer {
    height: auto;
    min-height: 30px;
  }

  html .footer-text {
    margin: 0 16px;
  }
}

/* ----- 1000px enli məzmun axıcı olur, xəbərlər torla düzülür ----- */
@media (max-width: 1039px) {
  html .wrapper_content,
  html .content_bottom,
  html .latest-news {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  html .wrapper_content {
    padding: 0 16px;
  }

  html .wrapper_header .header_left {
    width: calc(100% - 470px);
  }

  html .logo_texts {
    width: auto;
  }

  /* Bu blok saytda məzmun konteynerindən kənardadır, boşluğu özü alır */
  html .right-gallery {
    padding-right: 16px;
  }

  html .logos {
    display: flex;
    flex-wrap: wrap;
    box-sizing: border-box;
    width: 100%;
    margin: 20px 0;
  }

  html .logo_l {
    box-sizing: border-box;
    float: none;
    flex: 0 0 25%;
    width: 25%;
    margin: 0 0 16px;
    padding: 0 8px;
  }

  html .logo_text,
  html span.text_title {
    width: auto;
  }

  html .latest-news .news4,
  html .page-content:has(> .news-li) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
  }

  html .latest-news .news4 > .clear,
  html .page-content:has(> .news-li) > .clear {
    display: none;
  }

  html .latest-news .news4 .news-li,
  html .latest-news .news4 .news-li:hover,
  html .page-content .news-li {
    box-sizing: border-box;
    float: none;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 3px 3px 10px;
  }

  html .latest-news .news4 .news-li:hover {
    border-bottom-width: 1px;
  }

  /* Saytın bağlanmamış <b> teqi kartları qalın edir */
  html .page-content .news-li,
  html .page-content .news-li * {
    font-weight: normal;
  }

  html .news-li img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 176 / 118;
    object-fit: cover;
    margin-bottom: 6px;
  }

  html .page-content .news-li br {
    display: none;
  }

  html .page-content .news-li .short-text,
  html .page-content .news-li .news-time {
    display: block;
  }

  html .page-content .news-li .news-time {
    margin-top: 6px;
  }

  html .text {
    width: auto;
  }

  html .page-content:has(> .gal-li) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
  }

  html .page-content:has(> .gal-li) > .clear {
    display: none;
  }

  html .page-content .gal-li {
    container-type: inline-size;
    float: none;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
  }

  html .page-content .gal-li > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 225 / 118;
    object-fit: cover;
    margin-bottom: 6px;
  }

  html .page-content .gal-li .vplay {
    top: calc(26.2cqw - 20px);
    left: calc(50% - 20px);
    padding: 0;
  }

  html .pagination-center {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  html .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 0;
  }

  html .bottom_left {
    box-sizing: border-box;
    width: 49%;
    margin-left: 0;
  }

  html .bottom_right {
    box-sizing: border-box;
    width: 50%;
    float: right;
    margin-left: 0;
  }

  html .bottom_right .bottom_right {
    width: 100%;
    float: none;
  }

  html .left-about p img {
    max-width: 100%;
  }
}

/* ----- Planşet və telefon: ☰ menyu, başlıq, tək sütun alt hissə ----- */
@media (max-width: 991px) {
  html .wrapper {
    margin-top: 0;
  }

  html .wrapper_header {
    display: flex;
    flex-direction: column;
  }

  html .wrapper_header > .clear {
    display: none;
  }

  html .header_top {
    position: relative;
    order: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: none;
    padding: 10px 16px;
  }

  html .wrapper_header .header_left {
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    width: 100%;
    float: none;
    padding-right: 52px;
    box-sizing: border-box;
  }

  html .logo {
    flex: 0 0 auto;
    float: none;
    width: 64px;
    margin: 0 12px 0 0;
  }

  html .logo img {
    display: block;
    width: 100%;
    height: auto;
  }

  html .logo_texts {
    width: auto;
    margin: 0;
    font: 14px/1.3 Cambria, Georgia, serif;
  }

  html .logo_texts a {
    font: 16px/1.3 Cambria, Georgia, serif;
  }

  html .wrapper_header .header_right {
    display: flex;
    flex: 0 0 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    float: none;
    width: 100%;
    margin: 10px 0 0;
  }

  html .search {
    position: relative;
    box-sizing: border-box;
    flex: 1 1 140px;
    float: none;
    width: auto;
    height: 36px;
    margin: 0;
    padding: 0 40px 0 10px;
    border: 1px solid #cccccc;
    border-radius: 3px;
  }

  html .search .search-inp {
    float: none;
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    padding: 0;
    background: transparent;
    font-size: 16px;
  }

  html .s-button {
    top: 0;
    right: 0;
    width: 38px;
    height: 34px;
    margin: 0;
    background-position: center;
    background-repeat: no-repeat;
  }

  html .top1,
  html .language,
  html .sitemap {
    float: none;
    width: auto;
    margin: 0;
  }

  /* Twitter və YouTube linkləri boşdur (href="#"), mobildə yer tutmasın */
  html .social .twt,
  html .social .ytb {
    display: none;
  }

  html .language a {
    display: inline-block;
    padding: 6px 8px;
    margin: 0;
  }

  html .sitemap {
    display: none;
  }

  /* Menyu loqonun altına keçir, banner ondan sonra gəlir */
  html .menu {
    order: 2;
    box-sizing: border-box;
    height: auto;
    padding: 0;
    position: static;
  }

  html .header_bottom {
    order: 3;
  }

  html .menu-toggle {
    position: absolute;
    top: 14px;
    right: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  html .menu-toggle span {
    display: block;
    height: 2px;
    background: #a42725;
    transition: transform .2s, opacity .2s;
  }

  html .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  html .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  html .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  html .menu > ul {
    display: none;
    padding: 0;
    text-align: left;
  }

  html .menu.is-open > ul {
    display: block;
  }

  html .menu > ul > li {
    position: relative;
    display: block;
    padding: 0;
    background: none;
    border-top: 1px solid #e4e4e4;
  }

  html .menu > ul > li > a,
  html .menu > ul > li > a:hover {
    display: block;
    padding: 13px 56px 13px 16px;
    font-size: 14px;
  }

  /* Hover skripti display yazır, ona görə !important lazımdır */
  html .menu li > ul {
    position: static !important;
    display: none !important;
    height: auto !important;
    min-width: 0;
    border: 0;
    background: #f6f6f6;
  }

  html .menu li.sub-open > ul {
    display: block !important;
  }

  html .menu li > ul br {
    display: none;
  }

  html .menu > ul > li > ul li {
    border: 0;
    border-top: 1px solid #e9e9e9;
  }

  html .menu ul li ul li a {
    padding: 11px 16px 11px 28px;
    font-size: 15px;
  }

  html .sub-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 52px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  html .sub-toggle::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 21px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #a42725;
    border-bottom: 2px solid #a42725;
    transform: rotate(45deg);
    transition: transform .2s;
  }

  html .sub-open > .sub-toggle::after {
    top: 19px;
    transform: rotate(-135deg);
  }

  html .bottom_left,
  html .bottom_right {
    float: none;
    width: 100%;
    margin: 0 0 24px;
  }

  html .bottom_right .bottom_right {
    margin-bottom: 0;
  }

  html .right-gallery {
    padding: 0 16px;
  }

  html .head-line-gallery-p-active,
  html .head-line-gallery-p-pas,
  html .head-line-gallery-v-active,
  html .head-line-gallery-v-pas {
    box-sizing: border-box;
    width: 50%;
  }

  html .stat {
    float: none;
    width: 88px;
    margin: 0 auto 16px;
  }

  html .bottom-menu {
    height: auto;
    padding: 10px 8px;
    border-radius: 0;
  }

  html .bottom-menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 0;
  }

  html .bottom-menu ul br {
    display: none;
  }

  html .bottom-menu ul li {
    float: none;
    padding: 0 12px;
    background: none;
  }

  html .bottom-menu ul li a {
    padding-bottom: 0;
    font-size: 12px;
  }

  /* Redaktordan gələn cədvəllərin sabit ölçüsü; enli cədvəl öz içində sürüşür */
  html .page-text table,
  html .news-text table {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    overflow-x: auto;
  }

  html .page-text tr,
  html .page-text td,
  html .news-text tr,
  html .news-text td {
    height: auto !important;
  }

  /* A+/A-/çap düymələri mobildə lazım deyil, oxunma sayı qalır */
  html .page-tools .option {
    display: none;
  }

  html .link-tree {
    height: auto;
    min-height: 31px;
    padding-bottom: 6px;
    line-height: 1.4;
  }

  html .logo_l {
    flex-basis: 50%;
    width: 50%;
  }
}

/* ----- Telefon: hər şey tək-tək alt-alta ----- */
@media (max-width: 600px) {
  html .logo {
    width: 52px;
    margin-right: 10px;
  }

  html .logo_texts a {
    font-size: 14px;
  }

  html .latest-news .news4,
  html .page-content:has(> .news-li),
  html .page-content:has(> .gal-li) {
    grid-template-columns: 1fr;
  }

  html .page-tools select {
    box-sizing: border-box;
    width: calc(100% - 48px);
    height: 36px;
    margin-left: 0;
    font-size: 16px;
  }

  html #datetimepicker6 {
    top: 5px;
    right: 0;
    margin: 0;
  }

  html .page-content .news-img {
    float: none;
    width: 100%;
    margin: 0 0 12px;
  }

  html .news-img img {
    display: block;
    width: 100%;
    height: auto;
  }

  html .page-title span.add_date {
    float: none;
    display: block;
    padding-top: 2px;
  }

  html .latest-news .head-line .head-word,
  html .left-about .head-line-about a.head-word {
    padding: 6px 14px;
    font-size: 15px;
  }

  html .right-gallery .head-line-gallery-p-active a.head-word,
  html .head-line-gallery-v-active a.head-word,
  html .head-line-gallery-p-pas a,
  html .head-line-gallery-v-pas a,
  html .head-line-gallery-p-pas a:hover,
  html .head-line-gallery-v-pas a:hover {
    padding: 6px 8px;
    font-size: 13px;
  }

  html ul.gallery_in {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  html ul.gallery_in li {
    float: none;
    margin: 0;
  }

  html ul.gallery_in br {
    display: none;
  }

  html ul.gallery_in li img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
}
