/* =========================================================
   MOBİL / TABLET — masaüstü tasarımın duyarlı hâli
   (footer.blade.php en sonda yükler; tüm sayfalarda geçerli)
   ========================================================= */

/* Hamburger ve çekmece masaüstünde gizli */
.bx-burger, .bx-drawer { display: none; }
html.bx-lock, html.bx-lock body { overflow: hidden; }

@media (max-width: 1100px) {
  html body { height: auto !important; min-height: 100%; overflow-y: visible !important; overflow-x: hidden; overflow-x: clip !important; }

  /* ---------- HEADER ---------- */
  .bx__inner { height: 72px !important; padding: 0 16px !important; gap: .6rem; }
  .bx-nav { display: none !important; }
  .bx-ata, .bx-left__sep { display: none !important; }
  .bx-brand__medal { width: 56px !important; height: 56px !important; box-shadow: 0 8px 18px -8px rgba(0,0,0,.6); }
  .bx-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
  .bx-find { width: 44px !important; height: 44px !important; padding: 0 !important; justify-content: center; }
  .bx-find__text { display: none !important; }
  .bx-cta { height: 44px; padding: 0 .35rem 0 1rem !important; gap: .6rem !important; }
  .bx-cta__text { font-size: .85rem; }
  .bx-cta__icon { width: 34px !important; height: 34px !important; }
  .bx-search { padding: .8rem 16px 1rem; }
  .bx-search__box { height: 52px; padding-left: 1rem; }
  .bx-search button { padding: 0 1rem; }

  .bx-burger { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: none; }
  .bx-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #fff; }
  .bx-burger span:nth-child(2) { width: 12px; margin-left: 6px; }

  /* Çekmece */
  .bx-drawer { display: block; position: fixed; inset: 0; z-index: 2000; background: rgba(6, 18, 32, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  .bx-drawer.is-open { opacity: 1; visibility: visible; }
  .bx-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); display: flex; flex-direction: column; overflow-y: auto; padding: 0 0 1.5rem; background: #0b2540 url(/assets/img/header.svg) no-repeat right -260px bottom -120px / 640px auto; color: #fff; transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
  .bx-drawer.is-open .bx-drawer__panel { transform: none; }
  .bx-drawer__head { display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 20px; border-top: 4px solid #0080c7; font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; font-weight: 700; text-transform: uppercase; }
  .bx-drawer__close { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: none; color: #fff; font-size: 1.1rem; }
  .bx-drawer__search { display: flex; align-items: center; gap: .7rem; margin: 0 20px 1rem; height: 50px; padding: 0 1rem; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
  .bx-drawer__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; font-size: 1rem; }
  .bx-drawer__search input::placeholder { color: rgba(255,255,255,.5); }
  .bx-drawer__menu { margin: 0; padding: 0 20px; list-style: none; }
  .bx-drawer__menu > li { border-bottom: 1px solid rgba(255,255,255,.1); }
  .bx-drawer__link { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .95rem 0; border: 0; background: none; font-family: 'Barlow Condensed', sans-serif; font-size: 1.5rem; font-weight: 700; line-height: 1.1; text-transform: uppercase; text-align: left; color: #fff !important; text-decoration: none; }
  .bx-drawer__link i { font-size: .85rem; color: #8fc6ea; transition: transform .25s; }
  .has-sub.is-open > .bx-drawer__link i { transform: rotate(45deg); }
  .bx-drawer__sub { display: none; margin: 0; padding: 0 0 .8rem; list-style: none; }
  .has-sub.is-open > .bx-drawer__sub { display: block; }
  .bx-drawer__sub a { display: block; padding: .5rem 0 .5rem 1rem; border-left: 2px solid rgba(255,255,255,.12); font-size: .95rem; font-weight: 600; color: rgba(255,255,255,.8) !important; text-decoration: none; }
  .bx-drawer__sub a:active, .bx-drawer__sub a:hover { border-left-color: #0080c7; color: #fff !important; }
  .bx-drawer__cta { display: flex; align-items: center; justify-content: space-between; margin: 1.4rem 20px 0; padding: 1rem 1.3rem; border-radius: 999px; background: #fff; color: #0b2540 !important; font-weight: 700; text-decoration: none; }
  .bx-drawer__cta i { color: #0080c7; }
  .bx-drawer__contact { display: flex; flex-direction: column; gap: .6rem; margin: 1.4rem 20px 0; font-size: .9rem; }
  .bx-drawer__contact a { color: rgba(255,255,255,.75) !important; text-decoration: none; }
  .bx-drawer__contact i { width: 1.2rem; color: #8fc6ea; }

  /* ---------- ORTAK KENAR BOŞLUKLARI ---------- */
  .gx__wrap, .hm__wrap, .ex__wrap, .sahsiyet__wrap { padding-left: 16px !important; padding-right: 16px !important; }
  .fx__wrap { padding-left: 16px !important; padding-right: 16px !important; }

  /* ---------- SLIDER ---------- */
  .bh-hero { padding: .8rem 0 .4rem !important; }
  .bh-hero > .bh-wrap { padding: 0 16px !important; }
  .bh-frame { padding: 0 !important; }
  .bh-rail { display: none !important; }
  .bh-stage { border-radius: 14px !important; }
  .bh-under { margin-top: .7rem !important; padding: 0 !important; justify-content: center !important; }
  .bh-ctrl { margin-bottom: 0 !important; padding: .35rem .35rem .35rem 1rem !important; gap: .6rem !important; }
}

@media (max-width: 767px) {
  .bx-cta__text { display: none; }
  .bx-cta { width: 44px; padding: 0 !important; justify-content: center; background: #fff; }
}

/* ---------- İÇ SAYFALAR ---------- */
@media (max-width: 1100px) {
  html body .pb-band { margin-top: -76px !important; padding-top: 76px !important; height: auto !important; padding-bottom: 1.6rem !important; border-radius: 0 0 1.6rem 1.6rem !important; background-size: 100% 100%, 380px auto !important; background-position: 0 0, right -60px bottom -85px !important; }
  html body .pb-band--title { padding-top: calc(76px + .2rem) !important; }
  html body .pb-band .container, .pb-band [class*="container"] { padding-left: 16px !important; padding-right: 16px !important; }
  html body .pb-title { font-size: 1.75rem !important; }
}
@media (max-width: 991px) {
  html body .inner-page__row > .col-sidebar { display: none !important; }
  html body .inner-page__row > .col-article { flex: 0 0 100% !important; max-width: 100% !important; }
  html body .inner-page__wrapper > .container { padding-left: 16px !important; padding-right: 16px !important; }
  html body .inner-page__content.container { padding-left: 0 !important; padding-right: 0 !important; }
}

@media (max-width: 1100px) {
  :root, body, .pb-band, .inner-page__wrapper { --ic-gutter: 16px !important; }
  html body .pb-band ~ .inner-page__wrapper .inner-page__row { flex-direction: column; gap: 0; }
  html body .pb-band ~ .inner-page__wrapper .col-article { width: 100%; }
}

/* ---------- ANA SAYFA BÖLÜMLERİ ---------- */
@media (max-width: 1100px) {
  /* Eski CSS mobilde gizliyordu */
  .haberler-desktop, .gx.mobile-none, .hm.mobile-none, .ex.mobile-none, .fx.mobile-none { display: block !important; }

  /* Haberler */
  .gx { padding: 1.6rem 0 .5rem !important; }
  .gx-head { flex-wrap: wrap; gap: .8rem 1rem !important; margin-bottom: 1.1rem !important; }
  .gx-head__title h2 { font-size: 2.3rem !important; }
  .gx-head__line { display: none !important; }
  .gx-head__side { width: 100%; justify-content: space-between; }
  .gx-grid { grid-template-columns: 1fr !important; grid-auto-rows: auto !important; gap: 1rem !important; }
  .gx-feature { height: 250px; }
  .gx-card { border-radius: 16px !important; }
  .gx-feature .owl-stage-outer { border-radius: 16px !important; }
  .gx-bulletin { border-radius: 16px !important; }
  .gx-bulletin__scroll { max-height: 330px; }
  .gx-mayor { height: 380px; border-radius: 16px !important; }

  /* Hızlı menü */
  .hm { margin: 1.6rem 0 1rem !important; }
  .hm-head { flex-direction: column; align-items: flex-start !important; gap: .4rem !important; padding: 1.6rem 1.3rem 1.2rem !important; border-radius: 20px 20px 0 0 !important; background-size: 560px auto !important; background-position: right -160px top -30px !important; }
  .hm-head h2 { font-size: 2.3rem !important; }
  .hm-head h2 br { display: none; }
  .hm-table { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; padding: 0 1.1rem 1.3rem !important; border-radius: 0 0 20px 20px !important; }
  .hm-cell { min-width: 0; padding: 1rem .7rem !important; gap: .5rem !important; }
  .hm-cell__name { font-size: 1.15rem !important; line-height: 1.05 !important; min-width: 0; overflow-wrap: anywhere; }
  .hm-cell__go { display: none !important; }

  /* Etkinlikler + duyuru panosu */
  .ex { padding: 1.4rem 0 2rem !important; }
  .ex-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 2.4rem !important; }
  .ex-head { flex-wrap: wrap; gap: .6rem 1rem !important; }
  .ex-head h2, .ex-head__title h2 { font-size: 2.3rem !important; }
  .ex-head__side { margin-left: auto; }
  .ex-tabs { flex-wrap: wrap; gap: .3rem 1rem !important; }
  .ex-tab { font-size: 1.9rem !important; }

  /* Önemli şahsiyetler */
  .sahsiyet { padding: .5rem 0 2.5rem !important; }
  .sahsiyet__heading { font-size: 2.3rem !important; }
  .sh-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 2rem !important; }
  .sh-card { grid-template-columns: 42% minmax(0, 1fr) !important; gap: 1.1rem !important; }
  .sh-name { font-size: 1.9rem !important; }

  /* Footer */
  .fx__wrap { padding-top: 2.2rem !important; }
  .fx-top { gap: 1.4rem !important; padding-bottom: 1.6rem !important; }
  .fx-brand { align-items: flex-start; }
  .fx-news { flex-direction: column; align-items: stretch !important; gap: .7rem !important; width: 100%; }
  .fx-news__text { text-align: left !important; }
  .fx-news__text br { display: none; }
  .fx-news__form { width: 100% !important; min-width: 0; }
  .fx-news__form input { min-width: 0; flex: 1; }
  .fx-mid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1.8rem 1.2rem !important; padding: 1.8rem 0 !important; }
  .fx-mid > .fx-contact { grid-column: 1 / -1; }
  .fx-call { min-width: 0; }
  .fx-call strong, .fx-call b, .fx-call span { overflow-wrap: anywhere; }
  .fx-bottom { flex-direction: column; align-items: flex-start !important; gap: 1.2rem !important; }
  .fx-gov { flex-wrap: wrap; }
  .fx-sign, .fx-legal { flex-wrap: wrap; gap: .8rem; }
}

@media (max-width: 420px) {
  .hm-cell__no { display: none !important; }
  .sh-card { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 1100px) {
  .bx-brand__medal { transition: none !important; }
  .bx-actions { display: flex !important; align-items: center; gap: .5rem !important; }
  /* Duyuru panosu: mobilde sabit yükseklik yok, liste doğal akar */
  .ex-board__body { min-height: 0 !important; }
  .ex-board__body .tab-pane { position: static !important; overflow: visible !important; }
}

@media (max-width: 767px) {
  html body .kd-grid, html body .by-list, html body .cx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1.6rem 1rem !important; }
  html body .kd-id h3, html body .by-id h2, html body .cx-id h3 { font-size: 1.25rem !important; }
  html body .kd-id small, html body .by-id small { font-size: .62rem !important; }
  html body .bk-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body .bk-tab { font-size: 1.25rem !important; }
  html body .bk-tabs { gap: 1.2rem !important; }
}

@media (max-width: 1100px) {
  html body .gx-feature { height: 260px !important; }
}
@media (max-width: 420px) {
  html body .sh-body { padding-left: 0 !important; padding-right: 0 !important; }
}
@media (max-width: 1100px) {
  .bx-drawer__panel > * { flex-shrink: 0; }
}

/* Slider mobilde biraz daha büyük: kenar boşluğu daralır, oran 3:1 (yanlardan çok az kırpılır) */
@media (max-width: 767px) {
  html body .bh-hero > .bh-wrap { padding: 0 8px !important; }
  html body .bh-stage { aspect-ratio: 3.2 / 1 !important; border-radius: 12px !important; }
}

/* Etkinlikler mobilde kompakt: küçük afiş solda, bilgiler sağda */
@media (max-width: 767px) {
  html body .ex-event { display: grid !important; grid-template-columns: 120px minmax(0, 1fr); column-gap: 1rem; align-content: center; align-items: start; }
  html body .ex-event__img { grid-row: 1 / span 4; grid-column: 1; border-radius: 8px; }
  html body .ex-event > :not(.ex-event__img) { grid-column: 2; }
  html body .ex-event__date { margin-top: .3rem; }
  html body .ex-event__title { font-size: 1.3rem !important; }
  html body .ex-head h2 { font-size: 2.1rem !important; }
}

/* Duyurular/İhaleler panosu: mobilde 5 kayıt görünür, kalanı kutu içinde kaydırılır */
@media (max-width: 767px) {
  html body .ex-board__body .ex-list { max-height: var(--ex5, 340px); overflow-y: auto; overscroll-behavior: contain; padding-right: .5rem; scrollbar-width: thin; scrollbar-color: #c9d3dd transparent; border-bottom: 1px solid #e3e8ee; }
}

/* Slider kontrolü mobilde küçük ve sade */
@media (max-width: 767px) {
  html body .bh-under { margin-top: .55rem !important; }
  html body .bh-ctrl { gap: .5rem !important; padding: .2rem .2rem .2rem .75rem !important; box-shadow: 0 8px 18px -12px rgba(11, 37, 64, .35) !important; }
  html body .bh-ctrl__count { font-size: .75rem !important; }
  html body .bh-ctrl__count b { font-size: 1.05rem !important; margin-right: .1rem !important; }
  html body .bh-ctrl__bars { gap: .25rem !important; }
  html body .bh-ctrl__bars i { width: 8px !important; height: 3px !important; }
  html body .bh-ctrl__bars i.is-active { width: 24px !important; }
  html body .bh-ctrl__btn { width: 28px !important; height: 28px !important; font-size: .7rem !important; }
}

/* Footer: mobilde menü sütunları gizli, yalnızca iletişim kartları */
@media (max-width: 767px) {
  html body .fx-mid > .fx-col:not(.fx-contact) { display: none !important; }
  html body .fx-mid { grid-template-columns: minmax(0, 1fr) !important; padding: 1.4rem 0 .6rem !important; }
}

/*
 * orgChart.css ve mobilechart.css (all.css içinden) tüm sitede html, body { height:100% } veriyor.
 * body { overflow-x:hidden } ile birleşince sayfayı pencere değil body kaydırıyor ve
 * pencere kaydırmasını dinleyen WOW.js animasyonları (ör. Önemli Şahsiyetler) hiç açılmıyordu.
 */
html, html body { height: auto !important; }

/* Önemli şahsiyetler mobilde: kemerli portre üstte ortalı, metin altta */
@media (max-width: 767px) {
  html body .sh-card { grid-template-columns: minmax(0, 1fr) !important; gap: 1.2rem !important; }
  html body .sh-arch { height: 300px; width: min(74%, 280px); margin: 60px auto 0; }
  html body .sh-body { padding: 0 !important; }
  html body .sh-name br { display: none; }
}

/* Footer: kurum logoları mobilde gizli */
@media (max-width: 767px) {
  html body .fx-gov { display: none !important; }
}
