/*
  Mobil görünüm düzeltmeleri. Ziyaretçilerin %79'u telefondan geliyor.
  responsive.css'ten sonra yüklenir; şablonun masaüstü kurallarına dokunmaz, sadece küçük ekranları ezer.
*/

/* ---------- Genel: taşan içerik ekranın sağından çıkıp gitmesin ---------- */
@media (max-width: 991px) {
  /* Masaüstündeki kutulu düzenin kenar boşlukları ve arka plan resmi telefonda gereksiz */
  body.boxed_layout {
    margin: 0 !important;
    background-image: none !important;
    background-color: #fff;
  }

  .boxed_layout,
  body > .boxed_layout,
  .wide_layout {
    width: 100% !important;
    margin: 0 !important;
  }

  .content img,
  .section img,
  .page_theme img {
    max-width: 100%;
    height: auto;
  }

  .content table {
    max-width: 100%;
  }

  .content p,
  .content li,
  .content h1,
  .content h2,
  .content h3,
  .content h4,
  .content td {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /* Sayfa metinlerinde sabit genişlik, yan yana kolon ve iç boşluk veren satır içi stilleri sıfırla */
  .content [style*='width'],
  .content [style*='margin-left'],
  .content [style*='padding-left'],
  .content [style*='text-indent'] {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .content table[style*='width'],
  .content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .content iframe,
  .content video,
  .content embed,
  .content object {
    max-width: 100%;
  }
}

/* ---------- Header ---------- */
@media (max-width: 991px) {
  header.header_6 {
    display: flex;
    flex-direction: column;
  }

  /* Üstte logo ve WhatsApp hattı */
  header.header_6 .h_bot_part {
    order: 1;
    padding: 12px 0 !important;
    background-color: #083a6f;
  }

  header.header_6 .h_bot_part .container > .row {
    display: flex;
    align-items: center;
    margin: 0;
  }

  header.header_6 .h_bot_part .col-xs-7 {
    flex: 1 1 58%;
    max-width: 62%;
    float: none;
    padding: 0 8px 0 14px;
  }

  header.header_6 .h_bot_part .col-xs-5 {
    flex: 1 1 38%;
    max-width: 42%;
    float: none;
    padding: 0 14px 0 0;
    margin-top: 0 !important;
  }

  header.header_6 .h_bot_part .logo,
  header.header_6 .h_bot_part .logo img {
    display: block;
    max-width: 100%;
    height: auto;
  }

  header.header_6 .h_bot_part .logo {
    padding: 0;
    float: none;
  }

  header.header_6 .h_bot_part .col-xs-5 .logo {
    margin-left: auto;
    cursor: pointer;
  }

  /* Hızlı bağlantılar: kaydırılabilir çip şeridi */
  header.header_6 .h_top_part {
    order: 2;
    padding: 0;
    background-color: #0b2f57;
    background-image: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  header.header_6 .h_top_part .container {
    padding: 0;
    width: 100%;
  }

  header.header_6 .h_top_part .row {
    margin: 0;
  }

  header.header_6 .h_top_part .col-xs-12 {
    padding: 0;
  }

  header.header_6 .header_top {
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 10px 0 12px;
    text-align: left;
  }

  header.header_6 .header_top nav {
    width: 100%;
    margin: 0 0 10px;
  }

  header.header_6 .header_top nav > ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    padding: 0 14px;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  header.header_6 .header_top nav > ul::-webkit-scrollbar {
    display: none;
  }

  header.header_6 .header_top nav > ul > li {
    flex: none;
    margin: 0;
    padding: 0;
    border: 0;
    float: none;
  }

  header.header_6 .header_top nav > ul > li:first-child {
    display: none;
  }

  header.header_6 .header_top nav > ul > li::before,
  header.header_6 .header_top nav > ul > li::after {
    display: none;
  }

  header.header_6 .header_top nav > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* Telefon düğmesi ve sosyal medya simgeleri tek satırda */
  header.header_6 .header_top .login_block {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0 14px;
    overflow: visible;
  }

  header.header_6 .header_top .login_block > ul {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  header.header_6 .header_top .login_block > ul > li {
    margin: 0 !important;
    padding: 0;
    float: none;
  }

  header.header_6 .header_top .login_block .tooltip {
    display: none;
  }

  /* Sosyal medya: sadece simge */
  header.header_6 .header_top .login_block > ul > li:not(:last-child) > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
  }

  header.header_6 .header_top .login_block > ul > li:not(:last-child) > a i {
    font-size: 15px;
    margin: 0;
  }

  /* Telefon: belirgin düğme, ilk sırada */
  header.header_6 .header_top .login_block > ul > li:last-child {
    order: -1;
  }

  header.header_6 .header_top .login_block > ul > li:last-child > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fff;
    color: #083a6f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* Menü düğmesi */
  header.header_6 .menu_wrap {
    order: 3;
  }

  #menu_button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 15px 16px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: #013a6f;
    border: 0;
  }

  #menu_button::before {
    content: '\f0c9';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 18px;
    margin: 0;
  }
}

/* ---------- Ana sayfa hizmet kutuları ve haberler ---------- */
@media (max-width: 767px) {
  .section ul.social_media_list.clearfix {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 !important;
    padding: 0 10px;
  }

  .section ul.social_media_list.clearfix > li {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
  }

  .section ul.social_media_list.clearfix > li a {
    display: block;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .section ul.social_media_list.clearfix .scale_image_container,
  .section ul.social_media_list.clearfix .div-image {
    width: 100%;
    float: none !important;
    margin: 0 !important;
  }

  .section ul.social_media_list.clearfix img {
    display: block;
    width: 100%;
    height: auto !important;
    object-fit: contain;
  }
}

/* ---------- Açılır menü ---------- */
@media (max-width: 991px) {
  #navMenu.main_menu,
  .menu_wrap .main_menu {
    background: #0b3566 !important;
  }

  #navMenu.main_menu > ul {
    margin: 0;
    padding: 0;
  }

  #navMenu.main_menu > ul > li {
    border: 0;
    margin: 0;
  }

  #navMenu.main_menu > ul > li > a {
    position: relative;
    display: block;
    padding: 15px 44px 15px 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #fff;
    font-size: 17px;
    line-height: 1.25;
  }

  #navMenu.main_menu > ul > li > a:active,
  #navMenu.main_menu > ul > li > a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  /* Alt menüsü olan satırlarda ok işareti */
  #navMenu.main_menu > ul > li > a:has(+ .sub_menu_wrap)::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 12px;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
  }

  #navMenu .sub_menu_wrap,
  #navMenu .sub_menu_wrap.type_2 {
    background: #082a52;
    border: 0;
    box-shadow: none;
  }

  #navMenu .sub_menu_wrap ul {
    margin: 0;
    padding: 0;
  }

  #navMenu .sub_menu_wrap li {
    margin: 0;
    padding: 0;
    border: 0;
  }

  #navMenu .sub_menu_wrap li a {
    display: block;
    padding: 13px 18px 13px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #d6e4f5;
    font-size: 15px;
    line-height: 1.3;
    background: transparent;
  }

  #navMenu .sub_menu_wrap li a:active,
  #navMenu .sub_menu_wrap li a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
  }

  #menu_button.active {
    background: #0e4a8a;
  }
}

/* ---------- Yukarı çık düğmesi: sağ altta ---------- */
@media (max-width: 991px) {
  .go-to-top {
    bottom: 20px;
    right: 16px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #083a6f;
    color: #fff;
    font-size: 22px;
    line-height: 46px !important;
    border: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    opacity: 0.92;
  }

  .go-to-top:hover,
  .go-to-top:active {
    background: #0e4a8a;
    color: #fff;
  }
}

/* ---------- Alt bilgi (footer) ---------- */
@media (max-width: 991px) {
  footer.footer .footer_bottom_part {
    padding: 28px 0 24px;
    background: #082b52;
    border: 0;
  }

  footer.footer .footer_bottom_part .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
    width: 100%;
  }

  footer.footer .footer_bottom_part .mobile_menu {
    order: 1;
    float: none;
    width: 100%;
  }

  footer.footer .footer_bottom_part .mobile_menu nav {
    width: 100%;
  }

  footer.footer .footer_bottom_part .mobile_menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  footer.footer .footer_bottom_part .mobile_menu li {
    float: none;
    margin: 0 !important;
    padding: 0;
    border: 0;
  }

  footer.footer .footer_bottom_part .mobile_menu li::before,
  footer.footer .footer_bottom_part .mobile_menu li::after {
    display: none;
  }

  footer.footer .footer_bottom_part .tooltip {
    display: none;
  }

  /* Sosyal medya: yuvarlak simgeler, alt satırda e-hizmet düğmeleri */
  footer.footer .footer_bottom_part .mobile_menu li:nth-child(-n + 5) {
    order: 1;
  }

  footer.footer .footer_bottom_part .mobile_menu li:nth-child(-n + 5) > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
  }

  footer.footer .footer_bottom_part .mobile_menu li:nth-child(-n + 5) > a i {
    font-size: 20px;
    margin: 0;
  }

  footer.footer .footer_bottom_part .mobile_menu li:nth-child(n + 6) {
    order: 2;
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
  }

  footer.footer .footer_bottom_part .mobile_menu li:nth-child(n + 6) > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    padding: 12px 18px;
    color: #fff;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
  }

  footer.footer .footer_bottom_part .mobile_menu li:nth-child(n + 6) > a:active {
    background: rgba(255, 255, 255, 0.16);
  }

  /* Telif satırı en altta, sade */
  footer.footer .footer_bottom_part p {
    order: 2;
    float: none;
    margin: 22px 0 0;
    padding: 16px 0 0;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
  }

  footer.footer .footer_bottom_part p span {
    color: #fff;
  }
}
