#hd-fab{
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1050;
}

.hd-panel{
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    z-index: 1049;
    transition: right .25s ease-in-out;
    display: flex;
    flex-direction: column;
}
.hd-panel.open{ right: 0; }
.hd-panel .hd-panel-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}
.hd-panel .hd-panel-body{
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
}

.home-sections{ margin-top: 20px; }
.home-section{ margin-bottom: 24px; }
.hd-banner{ position: relative; }
.hd-banner img{ width: 100%; height: auto; display:block; }
.hd-banner-overlay{ position:absolute; left:0; top:0; right:0; bottom:0; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#fff; text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.hd-two-col .hd-left, .hd-two-col .hd-right{ padding: 10px; }
.hd-video{ width: 100%; max-height: 520px; }

#hd-section-list .list-group-item{ cursor: move; }

/* YENİ VIZUAL EDİTÖR STILLERI */
body.hd-editor-active {
    margin-left: 280px; /* Panel genişliği kadar kaydır */
    transition: margin-left 0.3s ease;
}

#hd-editor-left-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #f7f7f7;
    border-right: 1px solid #ddd;
    z-index: 1051; /* FAB butondan daha üstte */
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

body.hd-editor-active #hd-editor-left-panel {
    transform: translateX(0);
}

#hd-editor-left-panel .hd-panel-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
}

#hd-editor-left-panel .hd-panel-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#hd-editor-left-panel .hd-panel-body {
    padding: 10px;
    overflow-y: auto;
    flex-grow: 1;
    display: block; /* Grid'den normale çevir */
}

#hd-editor-left-panel .hd-panel-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

.hd-widget {
    background-color: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 15px 10px;
    text-align: center;
    cursor: grab;
    transition: all 0.2s ease;
}

.hd-widget:hover {
    background-color: #3BB77E;
    color: #fff;
    border-color: #3BB77E;
}

.hd-widget i {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.hd-widget span {
    font-size: 13px;
    display: block;
}

#hd-fab {
    transition: right 0.3s ease;
}

body.hd-editor-active #hd-fab {
    right: auto;
    left: 20px; /* Panel açıkken butonu sola al */
}

/* Editör aktifken blokların stilleri */
.hd-editor-active .home-section {
    position: relative;
    border: 2px dashed transparent;
    transition: border-color 0.2s ease;
}

.hd-editor-active .home-section:hover {
    border-color: #3BB77E; /* Yeşil */
}

.hd-block-toolbar {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #3BB77E;
    color: white;
    border-radius: 5px;
    padding: 5px;
    display: none;
    z-index: 100;
}

.hd-editor-active .home-section:hover .hd-block-toolbar {
    display: flex;
}

.hd-block-toolbar button {
    background: none;
    border: none;
    color: white;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
}

.hd-block-toolbar button:hover {
    background-color: rgba(255,255,255,0.2);
}

.hd-block-toolbar .hd-move {
    cursor: move;
}

.hd-sortable-placeholder {
    height: 100px;
    background-color: #e6f7f0;
    border: 2px dashed #3BB77E;
    margin-bottom: 24px;
}

/* Drop alanı boşken görünür ve işlevsel yap (YENİ YÖNTEM) */
.hd-editor-active #homeSections.is-empty {
    min-height: 200px;
    border: 2px dashed #a5d6b8;
    background-color: #f0f9f4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hd-editor-active #homeSections.is-empty::after {
    content: "Elementleri buraya sürükleyin";
    color: #3BB77E;
    font-size: 16px;
    font-weight: 500;
}


/* Üzerine gelince belirginleştir */
.hd-editor-active #homeSections.ui-droppable-hover {
    border-color: #3BB77E;
    background-color: #e6f7f0;
}

/* Sütun ve Template Stilleri */
.hd-column {
    padding: 15px;
    min-height: 100px;
}
.hd-editor-active .hd-column-content {
    border: 1px dashed #ccc;
    padding: 20px;
    height: 100%;
    min-height: 100px; /* Boşken de bir yüksekliği olsun */
    position: relative; 
    transition: all 0.2s ease;
}

.hd-editor-active .hd-column-content.hd-column-hover {
    border-color: #3BB77E;
    background-color: #e6f7f0;
}

.hd-hero-template {
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    color: #fff;
    text-align: center;
    position: relative;
}
.hd-hero-template::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.4);
}
.hd-hero-content {
    position: relative;
    z-index: 1;
}
.hd-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
}
.hd-hero-content p {
    font-size: 1.25rem;
    margin: 20px 0;
}

/* Modal ve Summernote z-index ayarları */
.modal {
    z-index: 1051; 
}
.note-editor.note-frame .note-editing-area .note-editable, .note-editor.note-airframe .note-editing-area .note-editable {
    background-color: #fff;
}
.modal-backdrop {
    z-index: 1050;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* İçerik Düzenleme Formu Stilleri */
#hd-content-editor-form .form-group {
    margin-bottom: 15px;
}

#hd-content-editor-form label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

#hd-editor-left-panel .hd-panel-footer {
    display: flex;
    justify-content: space-between;
}

/* Widget Grupları */
.hd-widget-group {
    width: 100%;
    margin-bottom: 15px;
}
.hd-widget-group h6 {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
}
.hd-widgets-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Modal ve TinyMCE z-index ayarları */
.modal {
    z-index: 1051; 
}
.tox-tinymce-aux {
    z-index: 1052 !important; /* TinyMCE dialoglarının modal üzerinde görünmesi için */
}

/* Custom Modal (non-Bootstrap) */
.hd-modal-open {
    overflow: hidden;
}

.hd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Bootstrap modal'dan daha yukarıda */
}

.hd-modal-overlay.open { display: flex; }

.hd-modal {
    width: 90%;
    max-width: 1100px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.hd-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.hd-modal-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.hd-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.hd-modal-body {
    padding: 12px 16px;
    overflow: auto;
    flex: 1;
}

.hd-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid #eee;
}

/* Summernote z-index ayarı (dropdown/popover vs) */
.note-popover, .note-toolbar, .note-dropdown-menu {
    z-index: 2100; /* overlay'in üzerinde kalmalı */
}

/* Summernote modalları (Insert Image, Insert Link vs.) */
.note-modal {
    z-index: 2200 !important; /* Bizim modalın üzerinde olmalı */
}

.note-modal-backdrop {
    z-index: 2150 !important; /* Modal ile overlay arasında */
}

.note-modal-content {
    min-height: 500px !important;
}

/* Küçük ekran uyumu */
@media (max-width: 576px) {
    .hd-modal { width: 98%; max-width: none; }
}


