/* ==========================================================================
   Clinall — Klinik detay sayfası v3 (klinik-detay)
   Mevcut CSS dosyalarından SONRA yüklenmelidir.
   Birlikte çalıştığı dosya: clinall-klinik-detay-v3.js
   Bölümler: 1) Yerleşim  2) Profil kartı  3) Galeri slider  4) Butonlar
             5) Sekme çubuğu ve bölüm kartları  6) Modallar  7) Sahiplenme kutusu
   ========================================================================== */

/* ---------- 1) YERLEŞİM (yalnızca masaüstü) ---------- */
@media (min-width:992px){
html body section.listeleme-detay>.container{max-width:1160px!important}
html body section.listeleme-detay .container>.row{display:grid!important;grid-template-columns:350px minmax(0,1fr);gap:20px 24px;align-items:start;margin:0!important}
html body section.listeleme-detay .container>.row>[class*="col-"]{display:contents!important}
html body section.listeleme-detay .cln-profil-sutun{grid-column:1;grid-row:1;position:sticky;top:12px;display:flex;flex-direction:column;gap:16px;min-width:0}
html body section.listeleme-detay .klinik-detay-top-container{grid-column:1;grid-row:1}
html body section.listeleme-detay .cl-tabs{grid-column:2;grid-row:1;background:transparent!important;border:0!important;box-shadow:none!important;margin:0!important;overflow:visible!important}
/* Kenardaki sabit form kalktı: form artık "Bilgi Al" modalında açılıyor */
html body section.listeleme-detay .listeleme-detay-form.desktop{display:none!important}
}
@media (min-width:992px) and (max-height:780px){
html body section.listeleme-detay .cln-profil-sutun{position:static}
}

/* ---------- 2) PROFİL KARTI ---------- */
@media (min-width:992px){
html body section.listeleme-detay .klinik-detay-top-container{display:flex!important;flex-direction:column!important;padding:0!important;overflow:hidden;border-radius:20px!important;gap:0!important;margin:0!important;width:auto!important}
html body section.listeleme-detay .listeleme-detay-gallery,
html body section.listeleme-detay .listeleme-detay-gallery .swiper{width:100%!important;height:210px!important;border-radius:0!important;margin:0!important;border:0!important}
html body section.listeleme-detay .swiper-clinic-gallery-img{height:210px!important;border-radius:0!important}
html body section.listeleme-detay .swiper-clinic-gallery-img img{width:100%;height:210px!important;object-fit:cover;border-radius:0!important}
html body section.listeleme-detay .listeleme-detaylar-container{padding:20px 20px 18px!important;width:100%!important;margin:0!important}
html body section.listeleme-detay .listeleme-detaylar-top{display:block!important;padding:0!important;margin:0!important}
html body section.listeleme-detay .listeleme-detay-title h1{font-size:24px!important;line-height:1.25!important;margin:0!important}
html body section.listeleme-detay .clinic-last-update{margin:8px 0 0!important}
html body section.listeleme-detay .klinik-detay-adres{margin:12px 0 0!important}
html body section.listeleme-detay .klinik-detay-adres span{display:inline-flex;align-items:center;background:#eaf5fd;color:#0b78c2!important;font-style:normal!important;font-weight:600;font-size:14px!important;padding:6px 14px;border-radius:999px}
html body section.listeleme-detay .klinik-detay-adres-detay{margin:10px 0 0!important;font-size:14px!important;color:#5b6678!important}
html body section.listeleme-detay .listeleme-detaylar-bottom{margin:16px 0 0!important;padding:16px 0 0!important;border-top:1px solid #e6eaf0!important}
}

/* ---------- 3) GALERİ SLIDER (ok, nokta, sayaç — JS ekler) ---------- */
.swiper-clinic-gallery{position:relative}
.cln-gal-prev,.cln-gal-next{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:32px;height:32px;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:#12233d;display:flex;align-items:center;justify-content:center;font-size:14px;box-shadow:0 2px 8px rgba(16,24,40,.18);cursor:pointer;opacity:0;transition:opacity .15s}
.swiper-clinic-gallery:hover .cln-gal-prev,.swiper-clinic-gallery:hover .cln-gal-next,.cln-gal-prev:focus-visible,.cln-gal-next:focus-visible{opacity:1}
.cln-gal-prev{left:10px}
.cln-gal-next{right:10px}
.cln-gal-dots{position:absolute;left:0;right:0;bottom:10px;z-index:3;display:flex;justify-content:center;gap:6px}
.cln-gal-dots button{width:7px;height:7px;padding:0;border:0;border-radius:999px;background:rgba(255,255,255,.6);cursor:pointer;transition:width .2s,background .2s}
.cln-gal-dots button.on{width:20px;background:#fff}
.cln-gal-count{position:absolute;top:10px;right:10px;z-index:3;background:rgba(18,35,61,.6);color:#fff;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px}
.swiper-clinic-gallery .swiper-clinic-gallery-img.cln-gallery-placeholder{display:flex!important;align-items:center!important;justify-content:center!important;background:linear-gradient(145deg,#f2f8fd,#e6f2fb)!important}
.swiper-clinic-gallery .swiper-clinic-gallery-img.cln-gallery-placeholder::after{content:"";display:block;width:84px;height:84px;background:url("/Clinall/Main/assets/images/detay-icons/1.svg") center/contain no-repeat;opacity:.75}
.swiper-clinic-gallery img.cln-gallery-fallback{display:none!important}
@media (max-width:991px){.cln-gal-prev,.cln-gal-next{opacity:1}}

/* ---------- 4) BUTONLAR ---------- */
.listeleme-detay-butonlar .cln-wa{display:none}
@media (min-width:992px){
html body section.listeleme-detay .listeleme-detay-butonlar{display:grid!important;grid-template-columns:1fr 1fr;gap:10px!important;margin:0!important;padding:0!important}
html body section.listeleme-detay .listeleme-detay-butonlar .detay-buton{width:100%!important;min-width:0!important;margin:0!important;height:44px!important;border-radius:999px!important;font-size:14px!important}
html body section.listeleme-detay .listeleme-detay-butonlar .randevu-al{order:1;grid-column:1 / -1;height:48px!important;font-size:15px!important}
/* Bilgi Al: Ön Randevu ile aynı biçim, bir ton koyu mavi */
html body section.listeleme-detay .listeleme-detay-butonlar .bilgi-al{order:2;grid-column:1 / -1;display:flex!important;height:48px!important;font-size:15px!important;background:linear-gradient(135deg,#1f6fd1 0%,#134a9c 100%)!important;border-color:transparent!important;box-shadow:0 6px 16px rgba(19,74,156,.28)!important;text-transform:none!important;letter-spacing:0!important}
html body section.listeleme-detay .listeleme-detay-butonlar .bilgi-al,
html body section.listeleme-detay .listeleme-detay-butonlar .bilgi-al *{color:#fff!important;fill:#fff!important;opacity:1!important;-webkit-text-fill-color:#fff;text-transform:none!important}
html body section.listeleme-detay .listeleme-detay-butonlar .bilgi-al svg path{stroke:#fff}
html body section.listeleme-detay .listeleme-detay-butonlar .cln-wa{order:3;display:flex!important;align-items:center;justify-content:center;gap:8px;text-decoration:none}
html body section.listeleme-detay .listeleme-detay-butonlar .cln-wa i{color:#25d366;font-size:17px}
html body section.listeleme-detay .listeleme-detay-butonlar .klinik-arama-butonu{order:4}
/* Temel profil: Ara butonu tek başınaysa tam genişlik */
html body section.listeleme-detay .listeleme-detay-butonlar .klinik-arama-butonu:first-child{grid-column:1 / -1}
html body section.listeleme-detay .listeleme-detay-butonlar .klinik-harita-detay{order:5;grid-column:1 / -1}
}

/* Tablet and mobile actions keep equal widths; the map action gets its own full row. */
@media (max-width:991.98px){
html body section.listeleme-detay .listeleme-detay-butonlar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch;gap:10px!important;margin:0!important;padding:0!important}
html body section.listeleme-detay .listeleme-detay-butonlar .detay-buton:not(.d-none):not(.d-md-none){display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;width:100%!important;min-width:0!important;height:auto!important;min-height:46px!important;margin:0!important;padding:10px 12px!important;border-radius:14px!important;font-size:13px!important;line-height:1.2!important;text-align:center!important;white-space:nowrap!important}
html body section.listeleme-detay .listeleme-detay-butonlar .detay-buton.d-md-none.d-flex{align-items:center!important;justify-content:center!important;gap:8px!important;width:100%!important;min-width:0!important;height:auto!important;min-height:46px!important;margin:0!important;padding:10px 12px!important;border-radius:14px!important;font-size:13px!important;line-height:1.2!important;text-align:center!important;white-space:nowrap!important}
html body section.listeleme-detay .listeleme-detay-butonlar .randevu-al{grid-column:1 / -1!important;min-height:48px!important}
html body section.listeleme-detay .listeleme-detay-butonlar .klinik-harita-detay{grid-column:1 / -1!important;white-space:nowrap!important}
}
@media (min-width:768px) and (max-width:991.98px){
html body section.listeleme-detay .listeleme-detay-butonlar .bilgi-al.d-none.d-md-flex{width:100%!important;min-width:0!important;margin:0!important;grid-column:1 / -1!important}
}
@media (max-width:379.98px){
html body section.listeleme-detay .listeleme-detay-butonlar{grid-template-columns:minmax(0,1fr)!important}
html body section.listeleme-detay .listeleme-detay-butonlar .detay-buton{grid-column:1 / -1!important}
}

/* ---------- 5) SEKME ÇUBUĞU ve BÖLÜM KARTLARI ---------- */
/* Başlıklar SEO düzenlemesinde H2 oldu; ikonlar H3'e özel eski ölçüde kalmasın. */
html body section.listeleme-detay .listeleme-detay-hizmetler h2>img,
html body section.listeleme-detay .listeleme-detay-hizmetler h3>img{
  display:inline-block!important;width:30px!important;height:30px!important;max-width:30px!important;max-height:30px!important;object-fit:contain!important;flex:0 0 30px!important;vertical-align:middle!important
}
@media (min-width:992px){
html body section.listeleme-detay .cl-tabs-nav{position:sticky!important;top:12px!important;z-index:5;background:#fff!important;border:1px solid #e6eaf0!important;border-radius:18px!important;padding:8px!important;display:flex!important;gap:4px;box-shadow:0 -14px 0 0 #f6f8fb,0 4px 14px rgba(16,24,40,.04)}
html body section.listeleme-detay .cl-tab-btn{flex:1 1 auto;justify-content:center;border-radius:12px!important;white-space:nowrap;padding-left:10px!important;padding-right:10px!important;font-size:14px!important}
html body section.listeleme-detay .cl-tab-btn.active{background:#eaf5fd!important;color:#0b78c2!important;box-shadow:none!important}
/* Tüm paneller alt alta kart olarak görünür */
html body section.listeleme-detay .cl-tab-panel{display:block!important;background:#fff!important;border:1px solid #e6eaf0!important;border-radius:20px!important;padding:24px!important;margin-top:16px!important;scroll-margin-top:84px!important}
html body section.listeleme-detay .cl-tab-panel>hr{display:none!important}
html body section.listeleme-detay .cl-tab-panel h3{display:flex!important;align-items:center;gap:8px;font-size:20px!important;font-weight:600!important;color:#12233d;margin:0 0 16px!important}
html body section.listeleme-detay .cl-tab-panel h3 img{width:22px;height:22px}
/* Özet kartı: başlık + tekrar eden Hakkında / Değerlendirmeler bölümleri gizli */
html body section.listeleme-detay .cl-tab-panel:nth-child(2)::before{content:"Özet";display:block;font-size:20px;font-weight:600;color:#12233d;margin:0 0 16px}
html body section.listeleme-detay .cl-tab-panel .cln-overview-repeat,
html body section.listeleme-detay .cl-tab-panel:nth-child(2) .cl-ov-head .cl-link{display:none!important}
html body section.listeleme-detay .cl-tab-panel:nth-child(2) .cl-ov-section{border:0!important;padding-bottom:0!important}
/* Hizmetler: iki sütunlu satır listesi */
html body section.listeleme-detay .cl-tab-panel>.row{display:grid!important;grid-template-columns:1fr 1fr;gap:10px;margin:0!important;padding:0!important}
html body section.listeleme-detay .cl-tabs .cl-tab-panel .row .listeleme-detay-each-hizmet{width:auto!important;max-width:none!important;margin:0!important;padding:14px 16px!important;border:1px solid #e6eaf0!important;border-radius:14px!important;background:#fff!important;display:flex!important;align-items:center;transition:border-color .15s,background .15s}
html body section.listeleme-detay .cl-tabs .cl-tab-panel .row .listeleme-detay-each-hizmet:hover{border-color:#8ccbf3!important;background:#f6fbff!important}
html body section.listeleme-detay .listeleme-detay-each-hizmet span{font-size:15px!important;font-weight:500;color:#12233d!important}
html body section.listeleme-detay .listeleme-detay-hizmetler-more{display:inline-flex;margin-top:14px;padding:9px 20px;border:1px solid #e6eaf0;border-radius:999px;font-size:14px;font-weight:600}
/* Çalışma saatleri: satır listesi */
html body section.listeleme-detay .calisma-saatleri-wrapper{display:flex!important;flex-direction:column!important;gap:8px!important}
html body section.listeleme-detay .calisma-saatleri-wrapper .item{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;background:#f6f8fb!important;border:0!important;border-radius:12px!important;padding:12px 16px!important;margin:0!important;width:100%!important;text-align:left!important}
html body section.listeleme-detay .calisma-saatleri-wrapper .item h2{font-size:14px!important;font-weight:600!important;margin:0!important}
html body section.listeleme-detay .calisma-saatleri-wrapper .item span{font-size:13px;color:#7a8597}
html body section.listeleme-detay .calisma-saatleri-wrapper .item p{margin:0 0 0 auto!important;font-size:14px!important;color:#12233d}
}

/* ---------- 6) MODALLAR ---------- */
@media (min-width:992px){
html body #fixed-detail-form-modal .modal-dialog{max-width:860px!important}
html body #fixed-detail-form-modal .modal-content,
html body #cln-sahiplen-modal .modal-content{border:0!important;border-radius:20px!important;overflow:hidden;position:relative;box-shadow:0 24px 60px rgba(16,24,40,.25)}
html body #fixed-detail-form-modal .modal-body,
html body #fixed-detail-form-modal .listeleme-detay-form{border-radius:20px!important;border:0!important;box-shadow:none!important;margin:0!important}
html body #fixed-detail-form-modal .modal-content>.btn-close,
html body #cln-sahiplen-modal .modal-content>.btn-close{position:absolute!important;inset:14px 14px auto auto!important;transform:none!important;margin:0!important;padding:0!important;width:32px!important;height:32px!important;background-color:#f1f4f8!important;border-radius:50%!important;opacity:1!important;z-index:10!important}
/* Bilgi Al modalı: solda hizmet seçimi, sağda iletişim alanları */
html body #fixed-detail-form-modal .listeleme-detay-form{padding:28px!important;max-height:none!important;overflow:visible!important}
html body #fixed-detail-form-modal .listeleme-detay-form-title h4{font-size:22px!important;font-weight:700!important;color:#12233d!important;text-transform:none!important;margin:0!important}
html body #fixed-detail-form-modal .listeleme-detay-form>p{font-size:13.5px!important;color:#5b6678!important;margin:6px 0 20px!important;max-width:560px}
html body #fixed-detail-form-modal form{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:24px;row-gap:12px;align-items:start}
html body #fixed-detail-form-modal form>*{grid-column:2;margin:0!important}
html body #fixed-detail-form-modal form>.cln-svc{grid-column:1;grid-row:1 / span 12;background:#f6f8fb;border:1px solid #e6eaf0;border-radius:16px;padding:16px;align-self:stretch;display:flex;flex-direction:column;min-height:0}
html body #fixed-detail-form-modal .cln-svc-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:12px}
html body #fixed-detail-form-modal .cln-svc-head b,
html body #fixed-detail-form-modal .cln-ct-title{font-size:15px;font-weight:600;color:#12233d}
html body #fixed-detail-form-modal .cln-svc-head span{font-size:12px;color:#7a8597}
html body #fixed-detail-form-modal .cln-svc-list{display:flex;flex-direction:column;gap:8px;max-height:380px;overflow-y:auto;padding-right:4px}
html body #fixed-detail-form-modal .cln-svc-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:#fff;border:1px solid #e6eaf0;border-radius:12px;padding:10px 12px;font-size:14px;font-weight:500;color:#12233d;cursor:pointer;transition:border-color .15s,background .15s}
html body #fixed-detail-form-modal .cln-svc-item:hover{border-color:#8ccbf3}
html body #fixed-detail-form-modal .cln-svc-check{flex:0 0 20px;width:20px;height:20px;border-radius:6px;border:1.5px solid #c3ccd9;display:flex;align-items:center;justify-content:center;color:transparent;font-size:13px;background:#fff}
html body #fixed-detail-form-modal .cln-svc-item.on{border-color:#1f6fd1;background:#eef5fe}
html body #fixed-detail-form-modal .cln-svc-item.on .cln-svc-check{background:#1f6fd1;border-color:#1f6fd1;color:#fff}
/* Eski açılır hizmet menüsü görünmez ama formda kalır (değer ve zorunluluk kontrolü için) */
html body #fixed-detail-form-modal form>.bootstrap-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
html body #fixed-detail-form-modal form>input[name=Clinic_ID],
html body #fixed-detail-form-modal form>input[type=hidden]{display:none!important}
html body #fixed-detail-form-modal form .blue-button{width:100%!important;height:48px!important;border-radius:999px!important;border:0!important;background:linear-gradient(135deg,#1f6fd1 0%,#134a9c 100%)!important;box-shadow:0 6px 16px rgba(19,74,156,.28)!important;color:#fff!important;margin-top:4px!important}
}
@media (max-width:991px){
#fixed-detail-form-modal .cln-svc,#fixed-detail-form-modal .cln-ct-title{display:none}
}

/* ---------- 7) SAHİPLENME KUTUSU ve TALEP MODALI (yalnızca Temel profiller) ---------- */
.cln-sahiplen{display:flex;flex-direction:column;gap:12px;background:#fff;border:1px dashed #c3ccd9;border-radius:16px;padding:16px;margin-top:16px}
.cln-profil-sutun .cln-sahiplen{margin-top:0}
.cln-map-panel{scroll-margin-top:88px}
.cln-map-panel .owner-wrap{padding:12px!important}
.cln-map-panel .owner-wrap iframe{display:block;width:100%;height:clamp(320px,42vh,420px);border:0!important;border-radius:12px}
@media (min-width:992px){
html body section.listeleme-detay .cln-profil-sutun.cln-map-open{position:static!important}
html body section.listeleme-detay .cln-map-panel .owner-wrap iframe{height:clamp(360px,52vh,480px)}
}
.cln-sahiplen-ust{display:flex;align-items:flex-start;gap:12px}
.cln-sahiplen-ikon{flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:#eef5fe;color:#134a9c;display:flex;align-items:center;justify-content:center;font-size:17px}
.cln-sahiplen-metin{display:flex;flex-direction:column;gap:2px;min-width:0}
.cln-sahiplen-metin b{font-size:14px;font-weight:600;color:#12233d}
.cln-sahiplen-metin span{font-size:12.5px;color:#5b6678;line-height:1.4}
.cln-sahiplen-btn{width:100%;height:40px;border:0;border-radius:999px;background:linear-gradient(135deg,#00a8e8 0%,#0079b3 100%);box-shadow:0 4px 12px rgba(0,121,179,.25);font-size:13.5px;font-weight:600;color:#fff;cursor:pointer;transition:filter .15s}
.cln-sahiplen-btn:hover{filter:brightness(1.06)}
#cln-sahiplen-modal .modal-dialog{max-width:460px}
#cln-sahiplen-modal .cln-modal-body{padding:28px}
#cln-sahiplen-modal h4{font-size:20px;font-weight:700;color:#12233d;margin:0 36px 6px 0}
#cln-sahiplen-modal p{font-size:13.5px;color:#5b6678;margin:0 0 18px;line-height:1.5}
#cln-sahiplen-modal form{display:flex;flex-direction:column;gap:12px}
#cln-sahiplen-modal input[type=text],
#cln-sahiplen-modal input[type=tel],
#cln-sahiplen-modal input[type=email]{width:100%;height:46px;border:1px solid #e6eaf0;border-radius:12px;background:#f6f8fb;padding:0 14px;font-size:14px;color:#12233d;outline:0}
#cln-sahiplen-modal input:focus{border-color:#1f6fd1;background:#fff}
#cln-sahiplen-modal .cln-onay{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:#5b6678;line-height:1.45;margin:2px 0}
#cln-sahiplen-modal .cln-onay input{margin-top:2px;flex:0 0 auto}
#cln-sahiplen-modal .cln-onay a{color:#12233d;font-weight:600;text-decoration:underline}
#cln-sahiplen-modal .cln-btn-koyu{height:48px;border:0;border-radius:999px;font-size:15px;font-weight:600;color:#fff;background:linear-gradient(135deg,#1f6fd1 0%,#134a9c 100%);box-shadow:0 6px 16px rgba(19,74,156,.28);cursor:pointer}
#cln-sahiplen-modal .cln-sahiplen-sonuc{font-size:13px;border-radius:12px;padding:10px 14px;background:#eef5fe;color:#134a9c}
#cln-sahiplen-modal .cln-sahiplen-sonuc.hata{background:#fdecec;color:#a12626}

#cln-sahiplen-modal .modal-content{position:relative;border:0;border-radius:20px}
#cln-sahiplen-modal .modal-content>.btn-close{position:absolute;top:14px;right:14px;z-index:2}
#cln-sahiplen-modal .modal-dialog{margin:24px auto;width:calc(100% - 32px)}
#cln-sahiplen-modal .modal-content{max-height:calc(100dvh - 48px);overflow-y:auto;overflow-x:hidden}
#cln-sahiplen-modal .cln-onay span{min-width:0;overflow-wrap:anywhere}
.cln-service-error{color:#b42318;margin-top:12px;font-size:13px}
@media(min-width:992px){
html body #fixed-detail-form-modal .modal-dialog{margin-top:24px;margin-bottom:24px}
html body #fixed-detail-form-modal .modal-content{max-height:calc(100dvh - 48px);overflow-y:auto}
}
