/* ═══════════════════════════════════════════════════════
   OWFR News Hub – Stylesheet
   Plugin: owfr-news-hub  v2.2
   ═══════════════════════════════════════════════════════ */

/* ── Reset Divi / theme defaults ── */
.owfr-news *,
.owfr-news *::before,
.owfr-news *::after { box-sizing: border-box; }
.owfr-news h1,.owfr-news h2,.owfr-news h3,.owfr-news h4,.owfr-news h5,.owfr-news h6 {
  font-size: inherit !important; font-weight: inherit !important;
  line-height: inherit !important; margin: 0 !important; padding: 0 !important;
  letter-spacing: normal !important; text-transform: none !important; color: inherit !important;
}
.owfr-news { font-family: inherit; margin: 0 auto; max-width: 100%; padding: 0; }
.owfr-news a { text-decoration: none; }
.owfr-news-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */
.owfr-news-hero {
  background: linear-gradient(135deg, #006B3F 0%, #004d2e 100%);
  padding: 2.5rem 0; margin-bottom: 0; position: relative;
}
.owfr-news-hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: flex-start; gap: 1.25rem;
}
.owfr-news-hero-icon {
  flex-shrink: 0; width: 52px; height: 52px;
  background: rgba(255,255,255,0.15); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.owfr-news-hero-icon svg { width: 28px; height: 28px; color: #fff; }
.owfr-news-hero h2 {
  font-size: 1.6rem !important; font-weight: 800 !important;
  color: #fff !important; margin: 0 0 0.4rem 0 !important;
}
.owfr-news-hero p {
  font-size: 1rem !important; line-height: 1.55 !important;
  color: rgba(255,255,255,0.85) !important; margin: 0 !important;
}

/* ══════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════ */
.owfr-news-search-wrap {
  background: #f8faf9; border-bottom: 1px solid rgba(0,107,63,0.1);
  padding: 1rem 0;
}
.owfr-news-search-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1rem;
  display: flex; align-items: center; gap: 0.75rem; position: relative;
}
.owfr-news-search-icon {
  width: 20px; height: 20px; color: #999; flex-shrink: 0;
  position: absolute; left: 1.75rem; top: 50%; transform: translateY(-50%);
  pointer-events: none;
}
.owfr-news-search {
  width: 100%; padding: 0.7rem 1rem 0.7rem 3.25rem;
  border: 1px solid #ddd; border-radius: 8px;
  font-size: 0.95rem; font-family: inherit;
  background: #fff; transition: border-color 0.2s;
  text-align: center;
}
.owfr-news-search:focus { border-color: #006B3F; outline: none; box-shadow: 0 0 0 2px rgba(0,107,63,0.12); }
.owfr-news-search-count {
  font-size: 0.82rem; color: #888; white-space: nowrap;
  position: absolute; right: 1.75rem; top: 50%; transform: translateY(-50%);
}

/* ══════════════════════════════════════
   TAB NAVIGATION
   ══════════════════════════════════════ */
.owfr-news-tabs-wrap {
  background: #fff; border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100;
  margin-bottom: 2rem;
}
.owfr-news-tabs {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0; margin: 0 auto; padding: 0; list-style: none;
  max-width: 1200px;
}
.owfr-news-tabs li { list-style: none; margin: 0; padding: 0; }
.owfr-news-tab {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.25rem; border: none; background: transparent;
  cursor: pointer; font-family: inherit; font-size: 0.9rem; font-weight: 600;
  color: #555; border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s; white-space: nowrap;
}
.owfr-news-tab svg { width: 16px; height: 16px; flex-shrink: 0; }
.owfr-news-tab:hover { color: #006B3F; }
.owfr-news-tab.active { color: #006B3F; border-bottom-color: #006B3F; }

/* ══════════════════════════════════════
   LOADING OVERLAY
   ══════════════════════════════════════ */
.owfr-news-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 1rem; color: #006B3F;
  transition: opacity 0.35s ease;
}
.owfr-news-loading.owfr-news-loading-done { opacity: 0; pointer-events: none; }
.owfr-news-loading p { margin: 0.75rem 0 0; font-size: 0.9rem; font-weight: 500; color: #666; }
.owfr-news-loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(0,107,63,0.15);
  border-top-color: #006B3F;
  border-radius: 50%;
  animation: owfrSpin 0.7s linear infinite;
}
@keyframes owfrSpin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   WELCOME / NAVIGATION BANNER
   ══════════════════════════════════════ */
.owfr-news-welcome {
  background: linear-gradient(135deg, #f0faf5 0%, #e6f4ed 100%);
  border: 1px solid rgba(0,107,63,0.15);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
  animation: owfrNewsFadeIn 0.4s ease;
}
.owfr-news-welcome-inner { max-width: 640px; margin: 0 auto; }
.owfr-news-welcome-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(0,107,63,0.1); color: #006B3F; margin-bottom: 1rem;
}
.owfr-news-welcome-icon svg { width: 28px; height: 28px; }
.owfr-news-welcome h3 {
  margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: 700; color: #006B3F;
}
.owfr-news-welcome p {
  margin: 0 0 1.5rem; font-size: 0.92rem; line-height: 1.6; color: #444;
}
.owfr-news-welcome-steps {
  display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap;
}
.owfr-news-welcome-step {
  display: flex; align-items: center; gap: 0.6rem;
  background: #fff; padding: 0.65rem 1rem; border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); font-size: 0.85rem; color: #333;
}
.owfr-news-welcome-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: #006B3F; color: #fff; font-weight: 700; font-size: 0.78rem;
}

/* ══════════════════════════════════════
   PANELS
   ══════════════════════════════════════ */
.owfr-news-panel { display: none; animation: owfrNewsFadeIn 0.3s ease; }
.owfr-news-panel.active { display: block; }
@keyframes owfrNewsFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Section Header ── */
.owfr-news-section-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.5rem; padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(0,107,63,0.15); position: relative;
}
.owfr-news-section-title {
  font-size: 1.2rem !important; font-weight: 700 !important; color: #006B3F !important;
}
.owfr-news-section-count {
  font-size: 0.82rem; color: #888; margin-left: auto;
}

/* ══════════════════════════════════════
   CARD GRID  (12-column for size variants)
   ══════════════════════════════════════ */
.owfr-news-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem; margin-bottom: 2.5rem;
}

/* Default: all cards span 12 cols (mobile-first) */
.owfr-news-card { grid-column: span 12; }
.owfr-news-admin-add-card { grid-column: span 12; }

@media (min-width: 860px) {
  .owfr-news-card          { grid-column: span 4; }  /* Standard = 1/3 */
  .owfr-news-card-half     { grid-column: span 6; }  /* Half = 1/2 */
  .owfr-news-card-wide     { grid-column: span 12; } /* Full width */
  .owfr-news-admin-add-card { grid-column: span 4; }
}

/* ══════════════════════════════════════
   CARD
   ══════════════════════════════════════ */
.owfr-news-card {
  border: 1px solid rgba(0,0,0,0.10); border-radius: 14px;
  overflow: hidden; background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  display: flex; flex-direction: column;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.owfr-news-card:hover {
  transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.10);
}
.owfr-news-card-featured {
  border-color: rgba(0,107,63,0.3);
  box-shadow: 0 4px 16px rgba(0,107,63,0.12);
}
.owfr-news-card-featured::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #006B3F, #00a65e);
}

/* Card image (logo) */
.owfr-news-card-image {
  width: 100%; height: 120px; object-fit: contain; flex-shrink: 0;
  padding: 0.75rem 1rem; background: #f8f8f8; cursor: pointer;
}

/* Card content */
.owfr-news-card-content {
  padding: 1.15rem; display: flex; flex-direction: column; flex: 1;
}

/* Meta top (badges) */
.owfr-news-card-meta-top {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem;
}
.owfr-news-badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: 4px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; background: rgba(0,107,63,0.08); color: #006B3F;
}
.owfr-news-badge-featured {
  background: rgba(255,165,0,0.12); color: #b37400;
}

/* Title */
.owfr-news-card h3 {
  font-size: 1.05rem !important; font-weight: 700 !important;
  line-height: 1.3 !important; color: #222 !important;
  margin: 0 0 0.5rem 0 !important;
}

/* Summary */
.owfr-news-card-summary {
  font-size: 0.9rem !important; line-height: 1.5 !important;
  color: #555 !important; margin: 0 0 0.25rem 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; /* stylelint-disable-line property-no-vendor-prefix -- required for line-clamp */
  line-clamp: 3;
  overflow: hidden;
}
.owfr-news-card-summary.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
.owfr-news-card-newsletter .owfr-news-card-summary {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
/* Read-more toggle button */
.owfr-news-read-more {
  display: none;
  align-self: flex-start;
  background: none; border: none; padding: 0;
  font-size: 0.82rem; font-weight: 600;
  color: var(--owfr-primary, #006B3F);
  cursor: pointer; margin-bottom: 0.75rem;
  text-decoration: underline; text-underline-offset: 2px;
}
.owfr-news-read-more:hover { opacity: 0.75; }

/* Meta bottom (date, source, lang) */
.owfr-news-card-meta-bottom {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem;
  font-size: 0.8rem; color: #888;
}
.owfr-news-date { display: inline-flex; align-items: center; gap: 0.3rem; }
.owfr-news-date svg { color: #aaa; }
.owfr-news-source { opacity: 0.85; }
.owfr-news-lang {
  background: #f0f0f0; padding: 0.1rem 0.4rem; border-radius: 3px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
}

/* Card actions */
.owfr-news-card-actions {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-top: auto; align-items: stretch; width: 100%;
}
.owfr-news-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 0.45rem; padding: 0.65rem 1.25rem; border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.18); text-decoration: none !important;
  font-weight: 600; font-family: inherit; font-size: 0.88rem;
  line-height: 1; text-align: center; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.owfr-news-btn:hover { transform: translateY(-1px); }
.owfr-news-btn-primary { background: #006B3F; color: #fff !important; border-color: #006B3F; }
.owfr-news-btn-primary:hover { background: #005a34; }
.owfr-news-btn-secondary { background: #fff; color: #006B3F !important; border-color: #006B3F; }
.owfr-news-btn-secondary:hover { background: #f0f8f4; }

/* File language group header */
.owfr-news-files-lang-header {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #006B3F; margin-bottom: 0.3rem;
  grid-column: 1 / -1;
}
.owfr-news-files-lang-header svg { flex-shrink: 0; opacity: 0.6; }

/* Language group — 2-column button grid */
.owfr-news-files-lang-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.owfr-news-files-lang-group:last-child { margin-bottom: 0; }

/* Card file links container */
.owfr-news-card-files {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-top: 0.35rem; padding: 0.75rem;
  background: #f8faf9; border: 1px solid rgba(0,107,63,0.12); border-radius: 8px;
}

/* File link buttons */
.owfr-news-file-link {
  display: flex; align-items: center; justify-content: center;
  gap: 0.4rem; padding: 0.5rem 0.65rem;
  border: 1px solid rgba(0,107,63,0.25); border-radius: 6px;
  background: #fff; font-size: 0.78rem; font-weight: 600;
  color: #006B3F !important; text-decoration: none !important;
  text-align: center; line-height: 1.3;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  word-break: break-word; min-height: 38px;
}
.owfr-news-file-link:hover {
  background: #006B3F; color: #fff !important;
  border-color: #006B3F;
  box-shadow: 0 2px 6px rgba(0,107,63,0.18);
}
.owfr-news-file-link:hover svg { color: #fff; opacity: 1; }
.owfr-news-file-link svg { flex-shrink: 0; color: #006B3F; opacity: 0.7; }

/* Bottom image (below files — full width) */
.owfr-news-card-bottom-image {
  width: 100%; border-radius: 8px; margin-top: 0.65rem;
  object-fit: cover; cursor: pointer;
}

/* ══════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════ */
.owfr-news-empty {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem;
  color: #999; font-size: 0.95rem;
}
.owfr-news-empty svg { width: 48px; height: 48px; color: #ccc; margin-bottom: 0.75rem; }

/* ══════════════════════════════════════
   NO-RESULTS (search)
   ══════════════════════════════════════ */
.owfr-news-no-results {
  display: none; text-align: center; padding: 2.5rem 1rem;
  color: #888; font-size: 0.95rem;
}

/* ══════════════════════════════════════
   CARD: hidden by search/filter
   ══════════════════════════════════════ */
.owfr-news-card.owfr-news-hidden { display: none; }


/* ╔═══════════════════════════════════════════════════════╗
   ║  ADMIN-ONLY STYLES                                    ║
   ║  Buttons appear on hover, matching the services plugin ║
   ╚═══════════════════════════════════════════════════════╝ */

/* ── Edit Button (top-right of each card) ── */
.owfr-news-admin-edit-btn {
  position: absolute; top: 10px; right: 10px; z-index: 10;
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; background: #006B3F; color: #fff;
  border: 2px solid #fff; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  font-family: inherit; line-height: 1.3;
}
.owfr-news-card:hover .owfr-news-admin-edit-btn,
.owfr-news-admin-edit-btn:focus { opacity: 1; }

/* ── Delete Button (top-right, next to edit) ── */
.owfr-news-admin-delete-btn {
  position: absolute; top: 10px; right: 78px; z-index: 10;
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; background: #c00; color: #fff;
  border: 2px solid #fff; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  font-family: inherit; line-height: 1.3;
}
.owfr-news-card:hover .owfr-news-admin-delete-btn,
.owfr-news-admin-delete-btn:focus { opacity: 1; }

/* ── Hero Edit Button ── */
.owfr-news-admin-hero-edit-btn {
  position: absolute; top: 50%; right: 1.5rem; transform: translateY(-50%); z-index: 10;
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; background: rgba(255,255,255,0.95); color: #006B3F;
  border: 2px solid #006B3F; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  font-family: inherit; line-height: 1.3;
}
.owfr-news-hero:hover .owfr-news-admin-hero-edit-btn,
.owfr-news-welcome:hover .owfr-news-admin-hero-edit-btn,
.owfr-news-admin-hero-edit-btn:focus { opacity: 1; }

/* ── Section Header Edit Button ── */
.owfr-news-admin-section-edit-btn {
  margin-left: auto; flex-shrink: 0;
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px; background: #006B3F; color: #fff;
  border: 2px solid #fff; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  font-family: inherit; line-height: 1.3;
}
.owfr-news-section-header:hover .owfr-news-admin-section-edit-btn,
.owfr-news-admin-section-edit-btn:focus { opacity: 1; }

/* ── Section Header Delete Button ── */
.owfr-news-admin-section-delete-btn {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px; background: #c00; color: #fff;
  border: 2px solid #fff; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  font-family: inherit; line-height: 1.3;
}
.owfr-news-section-header:hover .owfr-news-admin-section-delete-btn,
.owfr-news-admin-section-delete-btn:focus { opacity: 1; }

/* ── Add Card Button (in each grid) ── */
.owfr-news-admin-add-card {
  border: 2px dashed rgba(0,107,63,0.3); border-radius: 14px;
  background: rgba(0,107,63,0.03); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.5rem;
  padding: 2rem 1rem; cursor: pointer; transition: all 0.2s ease;
  min-height: 160px; font-family: inherit;
}
.owfr-news-admin-add-card:hover {
  border-color: #006B3F; background: rgba(0,107,63,0.07);
  box-shadow: 0 2px 12px rgba(0,107,63,0.12);
}
.owfr-news-admin-add-card svg { width: 32px; height: 32px; color: #006B3F; opacity: 0.6; }
.owfr-news-admin-add-card:hover svg { opacity: 1; }
.owfr-news-admin-add-card span { font-size: 0.9rem; font-weight: 600; color: #006B3F; opacity: 0.7; }
.owfr-news-admin-add-card:hover span { opacity: 1; }

/* ── Add Section Button (in tab bar) ── */
.owfr-news-add-section-li { display: flex; align-items: center; }
.owfr-news-admin-add-section {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; border: 2px dashed rgba(0,107,63,0.4);
  background: transparent; color: #006B3F; cursor: pointer;
  transition: all 0.2s; margin: 0 0.5rem; flex-shrink: 0;
}
.owfr-news-admin-add-section:hover { border-color: #006B3F; background: rgba(0,107,63,0.08); }
.owfr-news-admin-add-section svg { width: 16px; height: 16px; }

/* ── Section Tab Delete Button ── */
.owfr-news-tab-section { position: relative; padding-right: 22px !important; }
.owfr-news-admin-delete-section-tab {
  position: absolute; top: 4px; right: 4px; width: 18px; height: 18px;
  display: none; align-items: center; justify-content: center;
  background: #c00; color: #fff; border-radius: 50%; font-size: 13px; line-height: 1;
  cursor: pointer; z-index: 5; border: none;
}
.owfr-news-tab-section:hover .owfr-news-admin-delete-section-tab { display: flex; }

/* ── Drag Handle ── */
.owfr-news-drag-handle {
  position: absolute; top: 10px; left: 10px; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(0,107,63,0.9); color: #fff;
  border: 2px solid #fff; cursor: grab;
  opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.owfr-news-drag-handle:active { cursor: grabbing; }
.owfr-news-card:hover .owfr-news-drag-handle,
.owfr-news-drag-handle:focus { opacity: 1; }
.owfr-news-drag-handle svg { width: 18px; height: 18px; pointer-events: none; }

.owfr-news-card.owfr-news-dragging {
  opacity: 0.35; transform: scale(0.97);
  box-shadow: 0 0 0 2px #006B3F; border-style: dashed;
}
.owfr-news-drop-indicator {
  min-height: 100px; border: 2px dashed #006B3F;
  border-radius: 14px; background: rgba(0,107,63,0.06);
  transition: all 0.15s ease; pointer-events: none;
}
.owfr-news-grid.owfr-news-drag-active {
  outline: 2px dashed rgba(0,107,63,0.3); outline-offset: 6px; border-radius: 12px;
}

/* ── Save Order Floating Button ── */
.owfr-news-save-order-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 99999;
  display: none; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 10px; border: none;
  background: #006B3F; color: #fff; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 20px rgba(0,107,63,0.4); transition: all 0.2s ease;
}
.owfr-news-save-order-btn:hover { background: #005a34; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,107,63,0.5); }
.owfr-news-save-order-btn.visible { display: flex; }
.owfr-news-save-order-btn svg { width: 18px; height: 18px; }

/* ══════════════════════════════════════
   EDIT MODAL
   ══════════════════════════════════════ */
#owfr-news-edit-modal {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; align-items: center; justify-content: center;
}
.owfr-news-edit-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.owfr-news-edit-panel {
  position: relative; background: #fff; border-radius: 12px;
  width: 92%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.owfr-news-edit-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid #e0e0e0;
  position: sticky; top: 0; background: #fff; border-radius: 12px 12px 0 0; z-index: 1;
}
.owfr-news-edit-panel-header h3 {
  margin: 0 !important; font-size: 1.05rem !important;
  color: #333 !important; font-weight: 700 !important;
}
.owfr-news-edit-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  padding: 0 4px; line-height: 1; color: #666;
}
.owfr-news-edit-form { padding: 1.25rem 1.5rem; }
.owfr-news-edit-field { margin-bottom: 0.85rem; }
.owfr-news-edit-field label {
  display: block; font-weight: 600; font-size: 0.86rem;
  margin-bottom: 0.3rem; color: #333;
}
.owfr-news-edit-field label .owfr-news-label-hint {
  font-weight: normal; opacity: 0.6; font-size: 0.82rem;
}
.owfr-news-edit-field input,
.owfr-news-edit-field textarea,
.owfr-news-edit-field select {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid #ccc; border-radius: 6px;
  font-size: 0.92rem; font-family: inherit; box-sizing: border-box;
}
.owfr-news-edit-field input:focus,
.owfr-news-edit-field textarea:focus,
.owfr-news-edit-field select:focus {
  border-color: #006B3F; outline: none; box-shadow: 0 0 0 2px rgba(0,107,63,0.15);
}

/* Toggle / checkbox row */
.owfr-news-edit-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.owfr-news-edit-toggle input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: #006B3F;
}
.owfr-news-edit-toggle label {
  font-weight: 600; font-size: 0.86rem; color: #333; margin: 0;
}

.owfr-news-edit-actions {
  display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 1.25rem;
  padding-top: 1rem; border-top: 1px solid #e0e0e0;
}
.owfr-news-edit-status {
  width: 100%; margin-top: 0.65rem; font-size: 0.88rem; min-height: 1.2em;
}

/* ══════════════════════════════════════
   IMAGE LIGHTBOX
   ══════════════════════════════════════ */
.owfr-news-lightbox {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.82); cursor: zoom-out;
  animation: owfrLbFadeIn 0.2s ease;
}
@keyframes owfrLbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.owfr-news-lightbox img {
  max-width: 90vw; max-height: 88vh; border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45); cursor: default;
  animation: owfrLbZoomIn 0.22s ease;
}
@keyframes owfrLbZoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.owfr-news-lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem;
  background: none; border: none; color: #fff; font-size: 2.2rem;
  cursor: pointer; line-height: 1; opacity: 0.8; transition: opacity 0.15s;
}
.owfr-news-lightbox-close:hover { opacity: 1; }

/* Layout picker (edit modal) */
.owfr-news-layout-picker {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.owfr-news-layout-opt {
  padding: 0.45rem 1rem; border-radius: 6px;
  border: 2px solid #ddd; background: #fff;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  font-family: inherit; color: #555; transition: all 0.15s;
}
.owfr-news-layout-opt:hover { border-color: #006B3F; color: #006B3F; }
.owfr-news-layout-opt.selected {
  border-color: #006B3F; background: rgba(0,107,63,0.08); color: #006B3F;
}

/* Files repeater lang tab */
.owfr-news-files-tab-bar {
  display: flex; gap: 0; border-bottom: 2px solid #e0e0e0; margin-bottom: 0.6rem;
}
.owfr-news-files-tab {
  padding: 0.4rem 1rem; border: none; background: transparent;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  font-family: inherit; color: #777; transition: all 0.15s;
}
.owfr-news-files-tab:hover { color: #006B3F; }
.owfr-news-files-tab.active { color: #006B3F; border-bottom-color: #006B3F; }
.owfr-news-files-panel { display: none; }
.owfr-news-files-panel.active { display: block; }

/* WP Media modal z-index override */
.media-modal { z-index: 9999999 !important; }
.media-modal-backdrop { z-index: 9999998 !important; }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 640px) {
  .owfr-news-grid { grid-template-columns: repeat(12, 1fr); }
  .owfr-news-hero-inner { flex-direction: column; text-align: center; align-items: center; }
  .owfr-news-tabs { justify-content: flex-start; }
}

/* ══════════════════════════════════════
   NEWSLETTERS — CYBERIMPACT
   ══════════════════════════════════════ */
.owfr-news-card-newsletter {
  border-left: none;
  border-top: none;
}
.owfr-news-card-newsletter-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
}
.owfr-news-card-newsletter-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 1rem 1.5rem;
}
.owfr-news-card-newsletter-logo img {
  max-width: 80px;
  width: 80px;
  height: auto;
  object-fit: contain;
}
.owfr-news-card-newsletter .owfr-news-card-content {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 600px) {
  .owfr-news-card-newsletter-inner { flex-direction: column; gap: 1rem; }
  .owfr-news-card-newsletter-logo { padding: 1rem 1rem 0; }
  .owfr-news-card-newsletter-logo img { max-width: 35px; width: 35px; }
}
.owfr-news-ci-notice {
  grid-column: 1 / -1;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 0.95rem;
  margin: 0;
}
.owfr-news-ci-notice a { color: #006B3F; text-decoration: underline; }
.owfr-news-ci-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* ══════════════════════════════════════
   MULTI-LOGO CARD HEADER
   ══════════════════════════════════════ */
.owfr-news-card-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.25rem 0.5rem;
  flex-wrap: wrap;
  background: #fff;
}
.owfr-news-logo-img {
  max-height: 60px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
}
