/*
 * property.az — responsive.css
 * <head>-ə style.css-dən SONRA əlavə olunmalıdır (viewport teqi saytda yoxdur, o da vacibdir):
 * <meta name="viewport" content="width=device-width, initial-scale=1">
 * <link rel="stylesheet" href="https://property.az/template/css/responsive.css?v=1.0">
 * <script src="https://property.az/template/js/responsive.js?v=1.0" defer></script>
 *
 * Seçicilərin önündəki "html" qaydaları gücləndirir ki, fayl harada qoşulsa da
 * style.css onu ləğv etməsin.
 *
 * Breakpoint-lər:
 *   <= 1199px : sabit 1200px en axıcı olur, 3 sütun qalır
 *   <=  991px : sol menyu + məzmun, "Faydalı linklər" aşağıda
 *   <=  767px : telefon — ☰ menyu, hər şey alt-alta
 */

/* responsive.js-in əlavə etdiyi elementlər — kompüterdə gizlidir */
html .menu-toggle,
html .m-nav { display: none; }

/* ================= Planşet / kiçik noutbuk ================= */
@media (max-width: 1199px) {
  html, body { overflow-x: hidden; }

  html .top_content,
  html .middle,
  html #banner,
  html #banner1,
  html .middle_content,
  html .footer_body { width: auto; max-width: 100%; }

  html .middle { padding: 0 12px; }

  /* ---------- Yuxarı zolaq ---------- */
  html .top { height: auto; }
  html .top_content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
  }
  html .top_content::after { display: none; }
  html .t_c_left { float: none; width: auto; margin: 0; display: flex; }
  html .t_c_right {
    float: none;
    flex: 1;
    width: auto;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  html .top_date { float: none; margin: 0; }
  html .top_search { float: none; width: 300px; margin-left: auto; }
  html .search { width: auto; display: block; padding: 0; height: auto; margin: 0; }
  html .search form { display: flex; align-items: center; }
  html .search .search-inp {
    float: none;
    flex: 1;
    min-width: 0;
    width: auto;
    height: 30px;
    box-sizing: border-box;
    font-size: 16px; /* iOS avtomatik zoom etməsin */
  }
  html .s-button { position: static; margin: 0 0 0 -32px; flex: none; }

  /* ---------- Manşet: solda loqo + əlaqə, sağda slayder ---------- */
  html #banner1 {
    height: auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-areas:
      "logos slider"
      "contact slider";
    align-items: center;
    column-gap: 16px;
    padding: 10px 12px;
    box-sizing: border-box;
  }
  html #logo1,
  html #logo2,
  html #contact {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
  }
  /* loqo1 və loqo2 bir sətirdə — ayrıca blok yoxdur, ona görə grid sahəsini paylaşırıq */
  html #logo1 { grid-area: logos; justify-self: start; width: 110px; }
  html #logo2 { grid-area: logos; justify-self: end; width: 190px; }
  html #logo1 img,
  html #logo2 img { display: block; width: 100%; height: auto; }
  html #contact { grid-area: contact; }
  html #contact p { padding-left: 0; font-size: 16px; line-height: 1.4; }
  html #contact .tel1,
  html #contact .tel2 { position: static; }

  /* Slayderi skript ekrana uyğun "zoom" ilə kiçildir (animasiya 600px addımla işləyir) */
  html #images_right {
    grid-area: slider;
    float: none;
    justify-self: end;
    padding: 0;
  }

  /* ---------- Üç sütun ---------- */
  html .content_body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
  html .content_body > .clear { display: none; }
  html .content_body .content_left,
  html .content_body .content_right {
    float: none;
    flex: none;
    width: 240px;
    height: auto;
  }
  html .content_left_body,
  html .content_left_body .c_left_body,
  html .c_right_body { width: auto; }
  html .c_left_body ul li { width: auto; }
  html .c_right_body { min-height: 0; padding-bottom: 12px; }
  html .c_right_body_li img { width: 90%; height: auto; }

  html .content_center {
    float: none;
    flex: 1;
    min-width: 0;
    width: auto;
    margin: 0;
    min-height: 0;
  }
  html .news_body { width: auto; }
  html .content_center_news { display: block; }
  html .news_content_li {
    width: auto;
    height: auto;
    margin: 10px 12px 0;
    display: flow-root;
  }
  html img.news_img {
    width: 38%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 200 / 145;
    object-fit: cover;
  }
  html .news_more { position: static; float: right; margin-top: 6px; }

  /* ---------- Daxili səhifələr ---------- */
  html .page-text { width: auto; padding: 0 12px; }
  html .page-text img,
  html .news-div img,
  html .page-content img { max-width: 100%; height: auto; }
  html .page-text table,
  html .news-div table { display: block; max-width: 100%; overflow-x: auto; }
  html .page-text,
  html .news-div { overflow-wrap: anywhere; }

  /* ---------- Footer ---------- */
  html .footer { height: auto; margin-top: 30px; }
  html .footer_body {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 20px;
    padding: 20px 12px;
  }
  html .footer_left,
  html .footer_right { float: none; width: auto; }
}

/* ================= Planşet (dar) ================= */
@media (max-width: 991px) {
  html .top_date { display: none; }

  html .content_body { flex-wrap: wrap; }
  html .content_body .content_right {
    order: 3;
    width: 100%;
    margin-top: 10px;
  }
  /* Faydalı linklər: şəbəkə */
  html .c_right_body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 12px;
  }
  html .c_right_body div:first-child,
  html .c_right_body_li { padding: 0; }
  html .c_right_body_li img { width: 100%; }

  html .liveinternet { display: none; }

  /* Daxili səhifə xəbəri: şəkil yuxarıda */
  html .news-img img {
    float: none;
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    padding: 12px 12px 0;
    box-sizing: border-box;
  }
}

/* ================= Telefon ================= */
@media (max-width: 767px) {
  /* Yuxarı zolaq: ikonlar + ☰, altında tam enli axtarış */
  html .top_content { flex-wrap: wrap; gap: 8px; }
  html .t_c_left img { width: 40px; height: auto; }
  html .t_c_right {
    order: 3;
    flex: 0 0 100%;
  }
  html .top_search { width: 100%; }

  html .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 40px;
    margin-left: auto;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
  }
  html .menu-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform .2s, opacity .2s;
  }
  html body.menu-open .menu-toggle { background: rgba(255, 255, 255, .15); }
  html body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  html body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  html body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Mobil menyu: soldakı "Xidmətlər" və "Digər" siyahılarının surəti (skript yaradır) */
  html body.menu-open .m-nav { display: block; }
  html .m-nav {
    background: #f6f6f6;
    border-bottom: 3px solid #00746b;
  }
  html .m-nav .c_left_title {
    padding: 10px 14px;
    background: #00746b;
    color: #fff;
    font: bold 16px "Palatino Linotype", serif;
  }
  html .m-nav ul { margin: 0; padding: 0; }
  html .m-nav ul li {
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    border-top: 1px solid #e2e2e2;
  }
  html .m-nav ul li:first-child { border-top: 0; }
  html .m-nav a.left_ul {
    display: block;
    padding: 12px 14px 12px 28px;
    color: #212121;
    font-size: 15px;
    line-height: 1.35;
    position: relative;
  }
  html .m-nav a.left_ul::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 19px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00746b;
  }
  /* skript menyunu yaradıbsa, soldakı orijinal sütun gizlənir (təkrar olmasın) */
  html body.has-menu-toggle .content_body .content_left { display: none; }

  /* Manşet: loqolar, slayder, əlaqə alt-alta */
  html #banner1 {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logos"
      "slider"
      "contact";
    row-gap: 10px;
  }
  html #logo1 { width: 30%; max-width: 120px; }
  html #logo2 { width: 64%; max-width: 230px; }
  html #images_right { justify-self: center; }
  html #contact { text-align: center; }

  /* Məzmun tək sütun */
  html .content_body { flex-direction: column; align-items: stretch; }
  html .content_body .content_left,
  html .content_body .content_right { width: auto; }

  html img.about_img { width: 120px; height: auto; }
  html .c_center_body { line-height: 1.7; }

  /* Yeniliklər: şəkil yuxarıda tam enli */
  html img.news_img {
    float: none;
    display: block;
    width: 100%;
    max-width: none;
    padding: 0 0 10px;
  }

  html .c_right_body { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  html .footer_body { justify-content: center; text-align: center; }
}
