/* ============================================================
   EgyptFun PWA — раздел «Блог».
   Классы префиксованы efb- (у .chip и др. есть коллизии с app.css).
   Использует общие .ef-press / .ef-card-press / навбар из app.css.
   Палитра совпадает с app.css (brand/sea/aqua/coral).
   ============================================================ */

:root{
  --efb-deep:#0A3B43; --efb-brand:#0E4D56; --efb-sea:#12707E; --efb-aqua:#1AA0AE;
  --efb-foam:#7FD4D9; --efb-sand:#F3EDE1; --efb-coral:#FF6B4A; --efb-coralDeep:#E4502F;
  --efb-ink:#0C2A2E; --efb-mute:#5C7B7F; --efb-gold:#F5B54A;
}

#ef-blog-root{ background:var(--efb-sand); min-height:100%; }
.efb-card-press{ transition:transform .18s ease; cursor:pointer; }
.efb-card-press:active{ transform:scale(.975); }

/* ---------- Шапка ---------- */
.efb-head{
  position:relative;
  background:linear-gradient(160deg,var(--efb-brand),var(--efb-sea) 60%,var(--efb-aqua));
  padding:calc(env(safe-area-inset-top) + 26px) 20px 26px;
  border-bottom-left-radius:30px; border-bottom-right-radius:30px;
  overflow:hidden; color:#fff;
}
.efb-head::before{
  content:''; position:absolute; inset:0; pointer-events:none;
  background-image:
    radial-gradient(circle at 85% 15%,rgba(127,212,217,.4),transparent 45%),
    radial-gradient(circle at 10% 90%,rgba(255,107,74,.2),transparent 40%);
}
.efb-head>*{ position:relative; }
.efb-headRow{ display:flex; align-items:center; gap:11px; margin-bottom:18px; }
.efb-logo{
  width:42px; height:42px; border-radius:13px; overflow:hidden; background:#fff;
  display:grid; place-items:center; box-shadow:0 6px 18px rgba(10,59,67,.35); flex-shrink:0;
}
.efb-logo img{ width:100%; height:100%; object-fit:cover; }
.efb-brandName{ color:#fff; font-weight:800; font-size:17px; line-height:1; }
.efb-brandSub{ color:rgba(255,255,255,.75); font-size:12px; margin-top:4px; }
.efb-title{ font-size:26px; font-weight:800; letter-spacing:-.02em; line-height:1.15; }
.efb-lead{ margin-top:8px; font-size:13.5px; color:rgba(255,255,255,.8); max-width:320px; }

.efb-search{
  margin-top:18px; display:flex; align-items:center; gap:10px;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.22);
  border-radius:16px; padding:12px 16px;
}
.efb-search svg{ flex-shrink:0; opacity:.8; }
.efb-search input{
  border:none; background:transparent; outline:none; color:#fff;
  font-family:inherit; font-size:14px; width:100%;
}
.efb-search input::placeholder{ color:rgba(255,255,255,.65); }

/* ---------- Чипы категорий ---------- */
.efb-chips{ display:flex; gap:8px; overflow-x:auto; padding:16px 16px 4px; scrollbar-width:none; }
.efb-chips::-webkit-scrollbar{ display:none; }
.efb-chip{
  flex-shrink:0; border:none; font-size:13px; font-weight:700; padding:9px 16px;
  border-radius:30px; background:#fff; color:var(--efb-mute);
  box-shadow:0 2px 8px rgba(10,59,67,.06); cursor:pointer;
}
.efb-chip.on{ background:var(--efb-ink); color:#fff; }

/* ---------- Заголовки секций ---------- */
.efb-secHead{ display:flex; justify-content:space-between; align-items:baseline; padding:22px 16px 12px; }
.efb-secTitle{ font-size:19px; font-weight:800; color:var(--efb-ink); letter-spacing:-.01em; }

/* ---------- Главная статья ---------- */
.efb-feat{
  display:block; margin:0 16px; border-radius:22px; overflow:hidden; position:relative;
  box-shadow:0 14px 34px rgba(10,59,67,.18); color:#fff; aspect-ratio:4/3;
}
.efb-feat img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.efb-feat::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(10,59,67,0) 30%,rgba(10,59,67,.88) 100%);
}
.efb-featBody{ position:absolute; left:0; right:0; bottom:0; padding:18px; z-index:1; }
.efb-featMeta{ display:flex; align-items:center; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.efb-featTitle{ font-size:19px; font-weight:800; line-height:1.25; letter-spacing:-.01em; }
.efb-featRead{ margin-top:10px; display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:700; color:var(--efb-foam); }

.efb-pill{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:800; padding:5px 11px; border-radius:30px; background:var(--efb-coral); color:#fff; }
.efb-pill--glass{ background:rgba(255,255,255,.2); font-weight:600; }
.efb-pill--gold{ background:var(--efb-gold); color:var(--efb-ink); }

/* ---------- Лента ---------- */
.efb-list{ display:flex; flex-direction:column; gap:12px; padding:0 16px; }
.efb-row{ display:grid; grid-template-columns:108px 1fr; gap:14px; background:#fff; border-radius:18px; padding:10px; box-shadow:0 4px 14px rgba(10,59,67,.07); }
.efb-rowImg{ border-radius:13px; overflow:hidden; aspect-ratio:1/1; position:relative; background:#e7eeef; }
.efb-rowImg img{ width:100%; height:100%; object-fit:cover; }
.efb-rowBody{ padding:4px 6px 4px 0; display:flex; flex-direction:column; }
.efb-rowCat{ font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; color:var(--efb-coral); }
.efb-rowCat.sea{ color:var(--efb-aqua); }
.efb-rowTitle{ margin-top:5px; font-size:14px; font-weight:800; color:var(--efb-ink); line-height:1.3; letter-spacing:-.01em; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.efb-rowMeta{ margin-top:auto; padding-top:8px; display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--efb-mute); font-weight:600; }
.efb-rowMeta .sep{ width:3px; height:3px; border-radius:50%; background:var(--efb-mute); opacity:.5; }

.efb-more{ margin:18px 16px 0; display:flex; }
.efb-moreBtn{ flex:1; border:none; background:#fff; color:var(--efb-brand); font-weight:800; font-size:14px; padding:13px; border-radius:15px; box-shadow:0 4px 14px rgba(10,59,67,.07); cursor:pointer; }
.efb-moreBtn[disabled]{ opacity:.6; }

/* ---------- CTA ---------- */
.efb-band{ margin:22px 16px 8px; background:linear-gradient(135deg,var(--efb-brand),var(--efb-sea)); border-radius:22px; padding:22px 20px; color:#fff; position:relative; overflow:hidden; }
.efb-band::before{ content:''; position:absolute; inset:0; background:radial-gradient(circle at 90% 10%,rgba(127,212,217,.35),transparent 55%); }
.efb-band>*{ position:relative; }
.efb-band h3{ font-size:17px; font-weight:800; letter-spacing:-.01em; }
.efb-band p{ margin-top:6px; font-size:13px; color:rgba(255,255,255,.8); }
.efb-btnCoral{ margin-top:14px; display:inline-flex; align-items:center; justify-content:center; gap:7px; border:none; background:var(--efb-coral); color:#fff; font-weight:800; font-size:14px; padding:12px 22px; border-radius:15px; box-shadow:0 10px 24px rgba(255,107,74,.4); cursor:pointer; }

/* ---------- Состояния (загрузка / пусто / офлайн) ---------- */
.efb-state{ padding:60px 28px; text-align:center; color:var(--efb-mute); }
.efb-state .efb-stateIco{ font-size:38px; margin-bottom:12px; }
.efb-state .efb-stateT{ font-size:16px; font-weight:800; color:var(--efb-ink); }
.efb-state .efb-stateS{ font-size:13.5px; margin-top:6px; line-height:1.5; }
.efb-state .efb-btnCoral{ margin-top:16px; }

.efb-skel{ background:linear-gradient(100deg,#eef3f3 30%,#e2eaea 50%,#eef3f3 70%); background-size:200% 100%; animation:efbShimmer 1.2s linear infinite; border-radius:13px; }
@keyframes efbShimmer{ to{ background-position:-200% 0; } }
.efb-skelRow{ display:grid; grid-template-columns:108px 1fr; gap:14px; background:#fff; border-radius:18px; padding:10px; margin:0 16px 12px; }
.efb-skelRow .a{ aspect-ratio:1/1; border-radius:13px; }
.efb-skelRow .b{ height:12px; border-radius:6px; margin:6px 0; }
@media(prefers-reduced-motion:reduce){ .efb-skel{ animation:none; } }

/* ============================================================
   Экран статьи
   ============================================================ */
.efb-progress{ position:fixed; top:env(safe-area-inset-top,0); left:50%; transform:translateX(-50%); width:100%; max-width:480px; height:3px; z-index:60; pointer-events:none; }
.efb-progress span{ display:block; height:100%; width:0; background:linear-gradient(90deg,var(--efb-coral),var(--efb-gold)); transition:width .1s linear; }

.efb-cover{ position:relative; aspect-ratio:4/3; overflow:hidden; background:#0A3B43; }
.efb-cover img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.efb-cover::after{ content:''; position:absolute; inset:0; background:linear-gradient(180deg,rgba(10,59,67,.35) 0%,rgba(10,59,67,0) 40%,rgba(10,59,67,.25) 100%); }
.efb-coverBar{ position:absolute; top:0; left:0; right:0; display:flex; justify-content:space-between; padding:calc(env(safe-area-inset-top) + 12px) 16px 0; z-index:4; }
.efb-round{ width:40px; height:40px; border-radius:14px; border:none; background:rgba(255,255,255,.92); color:var(--efb-ink); display:grid; place-items:center; box-shadow:0 6px 16px rgba(10,59,67,.25); cursor:pointer; }
.efb-coverActs{ display:flex; gap:8px; }

.efb-sheet{ position:relative; margin-top:-26px; background:var(--efb-sand); border-radius:26px 26px 0 0; padding:22px 18px 20px; z-index:3; }
.efb-metaRow{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.efb-postTitle{ margin-top:14px; font-size:22px; font-weight:800; color:var(--efb-ink); line-height:1.22; letter-spacing:-.02em; }
.efb-author{ margin-top:14px; display:flex; align-items:center; gap:10px; background:#fff; border-radius:16px; padding:11px 14px; box-shadow:0 3px 12px rgba(10,59,67,.06); }
.efb-ava{ width:36px; height:36px; border-radius:12px; background:linear-gradient(135deg,var(--efb-sea),var(--efb-aqua)); color:#fff; display:grid; place-items:center; font-weight:800; font-size:13px; flex-shrink:0; }
.efb-who{ font-size:13px; font-weight:800; color:var(--efb-ink); line-height:1.2; }
.efb-when{ font-size:11.5px; color:var(--efb-mute); font-weight:600; margin-top:2px; }

/* Контент статьи (HTML из WP the_content) */
.efb-article{ margin-top:20px; font-size:15px; line-height:1.65; color:#24444a; }
.efb-article > p:first-of-type{ font-size:16px; font-weight:600; color:var(--efb-brand); margin-bottom:18px; }
.efb-article h2{ font-size:18px; font-weight:800; color:var(--efb-ink); letter-spacing:-.01em; margin:28px 0 12px; scroll-margin-top:20px; }
.efb-article h3{ font-size:16px; font-weight:800; color:var(--efb-ink); margin:22px 0 10px; }
.efb-article p{ margin-bottom:13px; }
.efb-article a{ color:var(--efb-coralDeep); font-weight:700; }
.efb-article strong{ color:var(--efb-ink); }
.efb-article img,.efb-article figure img{ border-radius:16px; margin:16px 0; width:100%; height:auto; }
.efb-article figure{ margin:16px 0; }
.efb-article figcaption{ font-size:12px; color:var(--efb-mute); text-align:center; margin-top:6px; }
.efb-article ul,.efb-article ol{ margin:0 0 16px 0; padding-left:22px; }
.efb-article li{ margin-bottom:8px; }

/* Инфо-боксы: и демо (.box), и реальные WP (.info-box) */
.efb-article .info-box,.efb-article .box{ border-radius:16px; padding:14px 16px 14px 46px; margin:16px 0; font-size:13.5px; position:relative; line-height:1.55; }
.efb-article .info-box::before,.efb-article .box::before{ position:absolute; left:15px; top:14px; font-size:17px; }
.efb-article .info-box--tip,.efb-article .box--tip{ background:rgba(26,160,174,.1); border:1px solid rgba(26,160,174,.22); }
.efb-article .info-box--tip::before,.efb-article .box--tip::before{ content:'💡'; }
.efb-article .info-box--warn,.efb-article .box--warn{ background:rgba(245,181,74,.14); border:1px solid rgba(245,181,74,.35); }
.efb-article .info-box--warn::before,.efb-article .box--warn::before{ content:'⚠️'; }

/* Чек-лист: и демо (.check), и WP (.checklist) */
.efb-article .checklist,.efb-article .check{ list-style:none; margin:0 0 16px; padding-left:0; }
.efb-article .checklist li,.efb-article .check li{ position:relative; padding-left:32px; margin-bottom:10px; }
.efb-article .checklist li::before,.efb-article .check li::before{ content:'✓'; position:absolute; left:0; top:1px; width:21px; height:21px; border-radius:8px; background:var(--efb-coral); color:#fff; font-size:12px; font-weight:800; display:grid; place-items:center; }

/* Цитата */
.efb-article blockquote{ margin:18px 0; padding:16px 18px; background:#fff; border-left:4px solid var(--efb-aqua); border-radius:4px 16px 16px 4px; font-style:italic; font-size:14px; color:var(--efb-brand); box-shadow:0 3px 10px rgba(10,59,67,.05); }
.efb-article blockquote p{ margin:0; }

/* FAQ: и демо (.faq), и WP (.faq-item) */
.efb-article details.faq,.efb-article details.faq-item{ border-radius:16px; margin-bottom:10px; background:#fff; box-shadow:0 3px 10px rgba(10,59,67,.05); overflow:hidden; }
.efb-article details summary{ cursor:pointer; list-style:none; padding:15px 46px 15px 16px; font-weight:800; font-size:14px; color:var(--efb-ink); position:relative; }
.efb-article details summary::-webkit-details-marker{ display:none; }
.efb-article details summary::after{ content:'+'; position:absolute; right:14px; top:50%; transform:translateY(-50%); width:24px; height:24px; border-radius:9px; background:var(--efb-sand); color:var(--efb-coral); font-size:16px; font-weight:800; display:grid; place-items:center; transition:transform .25s,background .25s,color .25s; }
.efb-article details[open] summary::after{ transform:translateY(-50%) rotate(45deg); background:var(--efb-coral); color:#fff; }
.efb-article details .faq-body,.efb-article details .faq-a{ padding:0 16px 15px; font-size:13.5px; color:var(--efb-mute); line-height:1.55; }
.efb-article details .faq-body p{ margin:0; }

/* Таблицы (.table-scroll из WP) */
.efb-article .table-scroll{ overflow-x:auto; margin:16px 0; -webkit-overflow-scrolling:touch; }
.efb-article table{ width:100%; border-collapse:collapse; font-size:13px; background:#fff; border-radius:12px; overflow:hidden; }
.efb-article th,.efb-article td{ padding:10px 12px; text-align:left; border-bottom:1px solid rgba(10,59,67,.08); }
.efb-article th{ background:rgba(18,112,126,.08); font-weight:800; color:var(--efb-ink); }

/* Теги */
.efb-tags{ display:flex; gap:7px; flex-wrap:wrap; margin-top:22px; }
.efb-tag{ font-size:12px; font-weight:700; background:#fff; color:var(--efb-mute); padding:7px 13px; border-radius:30px; box-shadow:0 2px 8px rgba(10,59,67,.05); }

/* Похожие */
.efb-relScroll{ display:flex; gap:12px; overflow-x:auto; padding:4px 16px 8px; scrollbar-width:none; }
.efb-relScroll::-webkit-scrollbar{ display:none; }
.efb-rel{ flex-shrink:0; width:210px; background:#fff; border-radius:18px; overflow:hidden; box-shadow:0 4px 14px rgba(10,59,67,.07); }
.efb-relImg{ aspect-ratio:16/9; overflow:hidden; background:#e7eeef; }
.efb-relImg img{ width:100%; height:100%; object-fit:cover; }
.efb-relBody{ padding:12px 14px 14px; }
.efb-relCat{ font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; color:var(--efb-coral); }
.efb-relTitle{ margin-top:5px; font-size:13px; font-weight:800; color:var(--efb-ink); line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.efb-relMeta{ margin-top:7px; font-size:11px; color:var(--efb-mute); font-weight:600; }

/* ---------- Плавающий колокольчик уведомлений (заменил вкладку) ---------- */
.ef-bellFab{ position:fixed; top:calc(12px + env(safe-area-inset-top)); right:14px; z-index:55; width:42px; height:42px; border-radius:14px; border:none; background:rgba(14,77,86,.55); backdrop-filter:blur(8px); color:#fff; display:grid; place-items:center; box-shadow:0 6px 18px rgba(10,59,67,.28); cursor:pointer; -webkit-tap-highlight-color:transparent; }
/* На экране чтения статьи колокольчик скрыт — сверху свои кнопки «Назад/Поделиться». */
html.ef-blogpost .ef-bellFab{ display:none; }
.ef-bellFab .ef-bellBadge{ position:absolute; top:-5px; right:-5px; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--efb-coral); color:#fff; font-size:11px; font-weight:800; display:grid; place-items:center; border:2px solid #fff; box-sizing:content-box; }
