/* NewsKFF v238-m57 — inline edit only. Add-News and read-only cards are unchanged.
   Components: compact data rows, optional supporting centers, detail and media sections. */
#homeNewsDetailModal.kff-direct-edit {
  --edit-top: #352332; --edit-deep: #0b2132; --edit-accent: #deb0bd;
  --edit-line: rgba(183, 131, 150, .38); --edit-panel: rgba(10, 30, 46, .70);
  --edit-input: #0b2032; --edit-title: #eed4a0;
}
#homeNewsDetailModal.kff-direct-edit[data-edit-sector="prevention"] {
  --edit-top: #173e59; --edit-accent: #a2cbea; --edit-line: rgba(118, 164, 201, .40);
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .home-news-detail-card {
  background: linear-gradient(180deg, var(--edit-top), var(--edit-deep) 78%) !important;
  border: 1px solid var(--edit-line) !important;
  box-shadow: 0 18px 56px #0006 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] :is(.kff-field-shell, .kff-field-scroll) {
  background: linear-gradient(180deg, var(--edit-top), var(--edit-deep) 78%) !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] :is(.kff-field-body, .kff-field-hero, .home-news-detail-summary, .home-news-detail-content, .home-news-detail-text) {
  background: transparent !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] :is(.kff-direct-employee, .kff-direct-phone-info, .kff-direct-description, .kff-direct-media-section) {
  background: var(--edit-panel) !important;
  border: 1px solid var(--edit-line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  width: 100% !important; min-width: 0 !important;
  margin: 0 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-section-heading {
  display: block !important;
  margin: 0 !important; padding: 12px 12px 7px !important;
  font-size: 15px !important; font-weight: 800 !important;
  line-height: 1.5 !important;
  color: var(--edit-title) !important;
  border: 0 !important; background: transparent !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] :is(.kff-field-label, .home-news-detail-info-label, .home-news-employee-heading, .kff-direct-status-field > span) {
  color: #dce7f1 !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 13px !important; font-weight: 700 !important;
  line-height: 1.5 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-control {
  min-height: 46px !important; padding: 9px 11px !important;
  font-size: 16px !important; line-height: 1.5 !important;
  border: 1px solid var(--edit-line) !important;
  border-radius: 10px !important; color: #f3f7fc !important;
  background: var(--edit-input) !important;
  box-shadow: none !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] select.kff-direct-control { color-scheme: dark; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-control:focus-visible,
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] button:focus-visible,
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-add-media:focus-within {
  outline: 2px solid var(--edit-accent) !important; outline-offset: 2px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-control::placeholder { color: #a9bbc9 !important; opacity: 1; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-control:disabled { opacity: .7 !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] :is(.kff-direct-row, .kff-direct-support) { padding: 8px 12px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-row label { margin-bottom: 6px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-time {
  display: flex !important; align-items: center !important; justify-content: space-between !important;
  flex-wrap: wrap !important; gap: 5px 12px !important;
  padding: 10px 12px !important; background: rgba(5, 18, 30, .36) !important;
  border-bottom: 1px solid var(--edit-line) !important;
  border-radius: 15px 15px 0 0 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-time > * {
  display: flex !important; flex-direction: row !important;
  align-items: baseline !important; flex-wrap: wrap !important;
  gap: 5px !important; padding: 0 !important; margin: 0 !important;
  color: #c9d7e4 !important; font-size: 12px !important; line-height: 1.6 !important;
  background: none !important; border: 0 !important; box-shadow: none !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-time :is(.kff-field-label, .home-news-detail-info-label, .home-news-detail-info-value) {
  color: #aebdcb !important; font-size: 12px !important; margin: 0 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-support-grid {
  display: grid !important; grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important; margin-top: 6px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-support-item {
  display: grid !important; grid-template-columns: minmax(0, 1fr) 44px !important;
  gap: 7px !important; align-items: center !important; min-width: 0 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-remove-support {
  width: 44px; height: 46px; padding: 0; border-radius: 10px;
  border: 1px solid #a7687c70; color: #f4c5d2; background: #46263670;
  font-size: 24px; cursor: pointer;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-add-support {
  display: block; width: 100%; min-height: 44px; margin-top: 8px;
  padding: 8px 12px; color: var(--edit-accent); background: #112b3c99;
  border: 1px dashed var(--edit-line); border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-support-hint,
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-hint {
  margin: 7px 0 0; color: #adc0cf; font-size: 11px; line-height: 1.75;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] [hidden] { display: none !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-description { padding: 0 0 12px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-description > :is(.kff-field-description, .home-news-detail-description-value) {
  display: block !important; padding: 2px 12px 0 !important; width: 100% !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-description textarea {
  display: block; min-height: 144px !important; max-height: none !important;
  resize: vertical; overflow-x: hidden; white-space: pre-wrap;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-section { padding: 0 12px 12px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-section > .kff-direct-section-heading { padding-inline: 0 !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-summary { margin: 0 0 9px; color: #c5d8e8; font-size: 12px; line-height: 1.7; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-tools {
  display: flex !important; flex-wrap: wrap !important; justify-content: flex-start !important;
  gap: 7px !important; margin: 0 0 10px !important; padding: 0 !important;
  background: transparent !important; box-shadow: none !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-add-media {
  flex: 1 1 100%; min-height: 46px !important;
  color: #f2f7fc !important; background: #1e4967 !important;
  border: 1px solid var(--edit-line) !important; font-size: 15px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] :is(.kff-direct-clear-media, .kff-direct-remove-current-media) {
  min-height: 44px !important; padding: 6px 9px !important;
  background: #382333 !important; border-color: #98647b70 !important;
  font-size: 12px !important; color: #f2cbd7 !important; flex: 1 1 auto;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-section #homeNewsDetailMedia {
  position: relative !important; inset: auto !important; display: block !important;
  width: 100% !important; height: auto !important; margin: 0 !important;
  padding: 0 !important; border: 0 !important; border-radius: 12px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-section #homeNewsDetailMedia[hidden] { display: none !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-section .governorate-news-carousel-track {
  width: 100% !important; height: 200px !important; max-height: 240px !important;
  min-height: 0 !important; aspect-ratio: auto !important;
  border-radius: 12px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-section :is(.governorate-news-slide img, .governorate-news-slide video) {
  object-fit: contain !important; max-height: 200px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-section .governorate-news-carousel-actions {
  position: relative !important; inset: auto !important; padding: 7px 0 !important;
  display: flex !important; justify-content: center !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-attachment-list { display: grid; gap: 7px; margin-top: 10px; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-attachment {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px;
  border: 1px solid var(--edit-line); border-radius: 9px; background: #081b2b7a;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-attachment-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-attachment-name { color: #e2ebf5; font-size: 12px; overflow-wrap: anywhere; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-pending { color: #f3d18c; font-size: 11px; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-media-saved { color: #a6c2d8; font-size: 11px; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-attachment-remove {
  flex: 0 0 auto; min-height: 44px; padding: 6px 9px;
  color: #f3c4d1; background: #43263688; border: 1px solid #99607680;
  border-radius: 8px; cursor: pointer; font-size: 12px;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-actions {
  background: #0b2031 !important; border-color: var(--edit-line) !important;
  box-shadow: none !important; gap: 8px !important;
  grid-template-columns: minmax(0,1.5fr) minmax(0,.8fr) 58px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-actions > .kff-direct-save {
  background: #1a765e !important; color: #fff !important;
  border-color: #61b59c !important; font-weight: 800 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-actions > .kff-direct-cancel {
  background: #17354c !important; border-color: #52738e !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-actions > .kff-direct-delete {
  background: #412535 !important; color: #f7ced8 !important;
  border-color: #9a6577 !important; margin-inline-start: 3px;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] button:disabled { opacity: .55; cursor: default; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-feedback:not(:empty) { font-size: 12px !important; line-height: 1.6; padding: 7px 12px !important; }
/* Both modes scroll only the form; header and save/cancel/delete remain outside it. */
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .home-news-detail-media-column { display: none !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .home-news-detail-scroll { grid-template-columns: 1fr !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .home-news-detail-content { width: 100% !important; flex: 1 1 100% !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .kff-direct-summary { display: flex !important; flex-direction: column !important; gap: 12px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .home-news-centers-card { background: var(--edit-panel) !important; border-color: var(--edit-line) !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-field-hero {
  height: auto !important; min-height: 0 !important; max-height: none !important;
  padding: 0 !important; margin: 0 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-field-title { padding: 11px 12px 3px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-title-input { min-height: 52px !important; font-size: 17px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-meta {
  margin: 6px 12px !important; padding: 8px !important; gap: 7px 9px !important;
  background: var(--edit-panel) !important; border-color: var(--edit-line) !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-status-field { flex: 1 1 0 !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-enabled { min-height: 32px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-enabled input { min-height: 20px !important; width: 20px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-field-body { padding: 7px 12px 14px !important; gap: 10px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-employee { padding: 10px 12px !important; gap: 6px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-employee-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 8px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-topbar {
  min-height: 64px !important; padding: 9px 12px !important;
  background: linear-gradient(180deg, var(--edit-top), #102637) !important;
  border-color: var(--edit-line) !important; box-shadow: none !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-dialog-title { font-size: clamp(17px,4.6vw,20px) !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-phone-info > * + * { border-color: var(--edit-line) !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-support > .kff-field-label { font-size: 13px !important; margin-bottom: 6px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-phone-info .kff-direct-row { padding: 8px 12px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-phone-info .kff-direct-row .kff-field-label { font-size: 13px !important; margin-bottom: 6px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-time .kff-field-label { font-size: 12px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-prevention { padding: 10px 12px !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-prevention .kff-prevention-governorates { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-support[hidden],
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-support.hidden,
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-prevention.hidden { display: none !important; }
@media (max-width: 350px) {
  html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-direct-employee-grid { grid-template-columns: 1fr !important; }
  html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .kff-field-body { padding-inline: 9px !important; }
}

/* Respect the measured visual viewport when the phone keyboard is open. */
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode .home-news-detail-card {
  height: min(850px, calc(var(--kff-visible-height, 100dvh) - 28px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
  max-height: calc(var(--kff-visible-height, 100dvh) - 20px) !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector].kff-field-mode {
  top: var(--kff-visible-top, 0px) !important;
  bottom: auto !important;
  height: var(--kff-visible-height, 100dvh) !important;
  min-height: 0 !important;
  max-height: var(--kff-visible-height, 100dvh) !important;
}
/* Explicit desktop flex order prevents legacy read-only scroll ordering
   from placing the save bar between the header and the form. */
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .home-news-detail-card {
  gap: 0 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .home-news-detail-head {
  order: 0 !important; margin: 0 !important; padding: 12px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .home-news-detail-scroll {
  order: 1 !important; padding: 12px !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .kff-direct-feedback {
  order: 2 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-feedback:empty {
  display: none !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector]:not(.kff-field-mode) .kff-direct-actions {
  order: 3 !important; margin: 0 !important;
}
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .kff-direct-topbar:focus,
html body > #homeNewsDetailModal.home-news-detail-modal.detail-layout-split.kff-direct-edit[data-edit-sector] .home-news-detail-title[tabindex="-1"]:focus {
  outline: none !important;
}
