/*
 * jpit.az — responsive.css
 * Mövcud style.css / style_.css / owl.carousel.css-dən SONRA qoşulmalıdır:
 * <link rel="stylesheet" href="https://jpit.az/template/css/responsive.css?v=1.0">
 *
 * Qeyd: style_.css seçiciləri "div.xxx" formasındadır, ona görə burada da
 * eyni spesifiklik saxlanılır ki, bu fayl onları üstələsin.
 *
 * Breakpoint-lər:
 *   <= 1060px : planşet — kənar kölgələr götürülür, səhifə eni axıcı olur
 *   <=  900px : mobil — tək sütun, header şəkli miqyaslanır, menyu kart şəklində
 *   <=  600px : kiçik telefon — məzmun tam tək sütun
 */

/* ---------- Planşet ---------- */
@media (max-width: 1060px) {
  html, body { overflow-x: hidden; }

  div.body { width: auto; margin: 0; }

  div.m_shadow_l,
  div.m_shadow_b {
    width: auto;
    min-height: 0;
    margin: 0;
    background: none;
  }

  div.main {
    width: auto;
    min-height: 0;
    margin: 0;
  }
  div.main_t { min-height: 0; }

  div.main_c { padding-right: 20px; }

  div.sec_r {
    width: calc(100% - 191px);
    box-sizing: border-box;
  }

  div.c_l_d { width: 48%; }
  div.c_r_d { width: 48%; }

  div.footer { padding-right: 20px; }
  div.footer div.copy {
    float: none;
    width: auto;
    height: auto;
    margin-left: 53px;
    overflow: hidden;
  }

  div.sec_r img,
  div.sec_r iframe,
  div.sec_r video { max-width: 100%; height: auto; }
  div.sec_r table { max-width: 100%; }
  div.sec_r a { overflow-wrap: anywhere; }
}

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  /* Kitab "cild" fonunu sadə ağ vərəqlə əvəz edirik */
  div.body { background: none; }
  div.main,
  div.main_t { background: #fff; }

  /* Header şəkli (ISSN + başlıq) konteynerin eninə görə miqyaslanır */
  div.main_c,
  div.az_main_c,
  div.en_main_c,
  div.ru_main_c {
    margin: 0;
    padding: 0 14px;
    background-size: 100% auto;
    background-position: 0 14px;
    background-origin: content-box;
  }
  div.head { height: auto; }
  div.head_t {
    height: 0;
    margin: 0;
    /* 752x211 header şəklinin nisbəti (211/752) + yuxarı boşluq */
    padding: calc(28.06% + 14px) 0 0;
  }
  div.head_l { float: none; width: auto; }

  div.search {
    display: flex;
    align-items: center;
    width: auto;
    height: 40px;
    margin: 12px 0 0;
    box-sizing: border-box;
    border-radius: 4px;
    background: #fff;
  }
  div.search > div { display: flex; align-items: center; flex: 1; min-width: 0; }
  div.search input {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 38px;
    font-size: 16px; /* iOS avtomatik zoom etməsin */
    box-sizing: border-box;
  }
  div.search .src-btn { flex: none; margin: 0 4px 0 0; }
  div.search button:not(.src-btn) { display: none; } /* markup-dakı boş artıq düymə */

  /* Sıra: menyu -> məzmun -> giriş paneli */
  div.section {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
  }
  div.sec_l { display: contents; }

  div.menu_pl {
    order: 1;
    margin: 14px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px;
  }
  div.menu_pl a,
  div.menu_pl a:first-child {
    display: flex;
    align-items: center;
    width: auto;
    min-height: 42px;
    margin: 0;
    padding: 6px 10px;
    box-sizing: border-box;
    list-style: none;
    font-size: 13px;
    letter-spacing: 0;
    line-height: 1.3;
    background: #eef3f8;
    border: 0;
    border-left: 3px solid #022144;
    border-radius: 4px;
  }
  div.menu_pl a:hover,
  div.menu_pl a:focus { background: #dce7f2; }

  div.sec_r {
    order: 2;
    float: none;
    width: auto;
    padding: 24px 0 0;
  }

  div.user_pl {
    order: 3;
    width: 100%;
    max-width: 380px;
    margin: 28px auto 0;
    background: none;
  }
  div.user_pl_l,
  div.user_pl_r { width: auto; background: none; }
  div.user_pl_b {
    background: #f7f9fb;
    border: 1px solid #d5dbe1;
    border-radius: 6px;
    padding: 14px;
  }
  div.fr_t input {
    width: 100%;
    height: 38px;
    box-sizing: border-box;
    font-size: 16px;
  }

  /* Məzmun */
  div.content_d,
  div.content,
  div.c_l_d,
  div.item,
  div.art { font-size: 14px; line-height: 1.5; }
  div.item,
  div.item div,
  div.item a { text-align: left; } /* dar ekranda justify böyük boşluqlar yaradır */
  div.item div a { font-size: 13px; line-height: 1.4; }
  div.art h1 { font-size: 19px; line-height: 1.35; }
  div.art h2 { font-size: 16px; }
  div.sec_r p,
  div.sec_r div[style*="justify"] { text-align: left !important; } /* inline justify-u üstələyir */
  div.c_l_d img { display: block; margin: 10px auto; }
  div.sec_r table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Formlar (qeydiyyat, axtarış) */
  .form-item { flex-wrap: wrap; }
  .form-item label { float: none; width: 100%; margin-bottom: 4px; }
  .form-item input[type="text"],
  .form-item input[type="password"],
  .form-item select { float: none; width: 100%; box-sizing: border-box; }
  .adv_search input,
  .adv_search select,
  .adv_search button { width: 100%; margin: 0 0 8px; box-sizing: border-box; }

  /* Footer */
  div.footer {
    margin: 0 14px;
    padding: 20px 0 24px;
  }
  div.footer div.ict_logo { float: none; margin: 0 auto 10px; }
  div.footer div.copy { margin: 0; padding: 8px; line-height: 1.6; text-align: center; }
  div.footer div.copy span,
  div.footer div.copy span + span { float: none; display: block; }
  div.lsn { margin-top: 12px; line-height: 1.5; }
}

/* ---------- Kiçik telefon ---------- */
@media (max-width: 600px) {
  div.c_l_d,
  div.c_r_d { float: none; width: auto; }
  div.c_r_d { margin-top: 24px; }
}
