/* =========================================================
   Layout blocks (HTML editor ke "Columns / Box" button se bante hain)
   Website aur admin editor dono yahi file use karte hain.
   ========================================================= */

.jdc-row { display: grid; gap: 24px; margin: 1.4em 0; align-items: start; }
.jdc-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jdc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jdc-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jdc-cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.jdc-cols-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.jdc-col { min-width: 0; }
.jdc-col > :first-child, .jdc-box > :first-child { margin-top: 0; }
.jdc-col > :last-child, .jdc-box > :last-child { margin-bottom: 0; }
.jdc-col img { max-width: 100%; height: auto; border-radius: 10px; }
.jdc-col h2, .jdc-col h3 { margin-top: 0; }

/* Columns as cards */
.jdc-cards { align-items: stretch; }
.jdc-cards > .jdc-col { background: #fff; border: 1.5px solid #E2E4F0; border-top: 4px solid #1B2A9A; border-radius: 14px; padding: 20px; }
.jdc-cards > .jdc-col:nth-child(3n+2) { border-top-color: #C8161D; }
.jdc-cards > .jdc-col:nth-child(3n+3) { border-top-color: #FFD21A; }

/* Boxes / containers */
.jdc-box { margin: 1.4em 0; padding: 20px 22px; border-radius: 14px; }
.jdc-box-info { background: #FFF9E6; border-left: 5px solid #FFD21A; }
.jdc-box-blue { background: #1B2A9A; color: #E3E7FF; }
.jdc-box-blue h2, .jdc-box-blue h3, .jdc-box-blue strong { color: #FFD21A; }
.jdc-box-blue a { color: #FFD21A; }
.jdc-box-card { background: #fff; border: 1.5px solid #E2E4F0; box-shadow: 0 14px 30px -20px rgba(14, 21, 84, .45); }
.jdc-box-red { background: #FDECEC; border-left: 5px solid #C8161D; }

@media (max-width: 1024px) {
  .jdc-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .jdc-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .jdc-box { padding: 16px; }
}

/* ---------- Sirf admin editor ke andar: columns ki seema dikhane ke liye ---------- */
.jodit-wysiwyg .jdc-row { outline: 1px dashed #9AA3D8; outline-offset: 6px; position: relative; }
.jodit-wysiwyg .jdc-col { outline: 1px dashed #C9CEEA; outline-offset: 2px; min-height: 60px; padding: 4px; }
.jodit-wysiwyg .jdc-box { outline: 1px dashed #9AA3D8; outline-offset: 4px; }
.jodit-wysiwyg .jdc-row::before { content: "Columns"; position: absolute; top: -18px; left: -6px; font: 600 10px/1 sans-serif; color: #6B74B8; letter-spacing: .04em; }
.jodit-wysiwyg .jdc-row, .jodit-wysiwyg .jdc-box { margin-top: 26px; }
