
:root{
  --blue:#103f67;
  --blue2:#1c628f;
  --ink:#103553;
  --gold:#c99539;
  --paper:#fffdf8;
  --cream:#f7f1e5;
  --line:rgba(16,53,83,.14);
}
*{box-sizing:border-box}
.history-page{
  background:#f8f5ee;
  color:var(--ink);
  font-family:"Heebo","Noto Sans Hebrew",Arial,sans-serif;
}
.history-page button,.history-page input{font:inherit}

/* HERO — intentionally very close to the approved mockup */
.history-hero{
  position:relative;
  min-height:330px;
  overflow:hidden;
  background:
    linear-gradient(90deg, rgba(8,27,41,.94) 0%, rgba(10,30,44,.82) 31%, rgba(10,30,44,.38) 58%, rgba(10,30,44,.12) 100%),
    url("/nav-history/assets/img/breslov-historic.jpg") center 42%/cover no-repeat;
}
.history-hero::after{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(to bottom,rgba(5,25,39,.04),rgba(5,25,39,.10)),
    linear-gradient(to top,rgba(5,25,39,.18),transparent 40%);
  pointer-events:none;
}
.history-hero-overlay{position:absolute;inset:0;box-shadow:inset 0 -18px 45px rgba(0,0,0,.14)}
.history-hero-inner{
  position:relative;z-index:2;
  min-height:330px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding-top:38px;padding-bottom:38px;
}
.history-hero-copy{
  width:min(690px,63%);
  margin-inline-end:auto;
  text-align:right;
  color:#fff;
  text-shadow:0 2px 12px rgba(0,0,0,.32);
}
.history-hero h1{
  margin:0;
  font-size:clamp(58px,7vw,92px);
  line-height:.95;
  font-weight:800;
  letter-spacing:-.04em;
}
.history-hero-tagline{
  margin:22px 0 0;
  font-size:clamp(24px,2.6vw,35px);
  font-weight:700;
  line-height:1.3;
}
.history-hero-lead{
  margin:10px 0 0;
  max-width:680px;
  font-size:18px;
  line-height:1.6;
  color:#f8efe0;
}

/* Search + categories */
.history-search-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 235px;
  gap:24px;
  padding-top:20px;
  padding-bottom:17px;
}
.history-search{
  height:54px;
  display:grid;
  grid-template-columns:auto 1fr 124px;
  align-items:center;
  border:1px solid #cbd5dc;
  border-radius:8px;
  background:#fff;
  overflow:visible;
  box-shadow:0 2px 7px rgba(16,53,83,.04);
}
.search-glyph{padding-inline:15px 6px;font-size:27px;color:#28678f}
.history-search input{
  border:0;outline:0;background:transparent;min-width:0;padding:10px;
  font-size:17px;color:var(--ink);
}
.history-search button{
  align-self:stretch;border:0;border-radius:7px;background:#155a86;color:#fff;
  font-weight:800;cursor:pointer;
}
.browse-all{
  border:1px solid #e6dcc8;border-radius:8px;background:#eee5d6;color:var(--ink);
  font-weight:800;cursor:pointer;
}
.history-categories{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:12px;
  padding-bottom:22px;
}
.history-category{
  min-height:100px;
  border:1px solid rgba(16,53,83,.13);
  border-radius:8px;
  background:#fffdf9;
  display:flex;
  flex-direction:column;
  gap:6px;
  justify-content:center;
  align-items:center;
  color:var(--ink);
  font-weight:750;
  cursor:pointer;
  overflow:visible;
  transition:.15s ease;
}
.history-category:hover,.history-category.is-active{
  transform:translateY(-2px);
  box-shadow:0 7px 18px rgba(16,53,83,.08);
  border-color:rgba(28,98,143,.34);
}
.category-icon{
  font:700 31px/1 Georgia,serif;
  color:#2a6890;
}
.history-category:nth-child(2) .category-icon{color:#b55250}
.history-category:nth-child(3) .category-icon{color:#8a704f}
.history-category:nth-child(8) .category-icon{color:#bd8b31}

/* Main two-column composition */
.history-layout{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(300px,.93fr);
  gap:20px;
  align-items:start;
  padding-bottom:26px;
}
.history-main,.history-side{display:grid;gap:18px;min-width:0}
.panel{
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(255,255,255,.91);
  box-shadow:0 3px 12px rgba(16,53,83,.045);
  overflow:visible;
}
.panel-title-row{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 17px;
  border-bottom:1px solid rgba(16,53,83,.09);
}
.panel-title-row h2{
  margin:0;
  font-size:22px;
  line-height:1.2;
}
.panel-gold{color:#d49a31}
.small-link{
  border:0;background:transparent;color:#2471a0;font-weight:700;cursor:pointer;
}

/* featured block: photo left, text right, matching mockup */
.featured-body{
  display:grid;
  grid-template-columns:minmax(280px,.98fr) minmax(0,1.02fr);
  gap:24px;
  padding:18px;
  align-items:center;
}
.featured-photo{
  margin:0;
  min-height:310px;
  border:1px solid #cdbb9d;
  border-radius:5px;
  overflow:hidden;
  background:#d8cab2;
}
.featured-photo img{
  width:100%;height:100%;min-height:310px;display:block;object-fit:cover;
  object-position:center;
  filter:saturate(.82) sepia(.08) contrast(.96);
}
.featured-text h3{
  margin:0 0 14px;
  font-size:28px;
  line-height:1.3;
}
.featured-text p{
  margin:0 0 20px;
  color:#3d596b;
  line-height:1.8;
  font-size:16px;
}
.read-more{
  display:inline-flex;
  min-height:40px;
  align-items:center;
  padding:0 20px;
  border-radius:6px;
  background:#eee6d8;
  color:var(--ink);
  text-decoration:none;
  font-weight:800;
}

/* recently added */
.recent-grid,.entries-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  padding:16px;
}
.history-card{min-width:0}
.history-card a{color:inherit;text-decoration:none}
.archive-visual{
  position:relative;
  min-height:128px;
  border:1px solid #d4c3a4;
  border-radius:5px;
  overflow:hidden;
  background:
    repeating-linear-gradient(0deg,rgba(76,51,25,.05) 0 1px,transparent 1px 6px),
    linear-gradient(135deg,#ead9b9,#c0aa86 55%,#8b775e);
}
.visual-place{
  background:
    linear-gradient(rgba(255,255,255,.07),rgba(0,0,0,.12)),
    url("/nav-history/assets/img/breslov-historic.jpg") center/cover no-repeat;
}
.visual-document::after{
  content:"ברסלב  ·  כתבי קודש\A────────\A───────\A────────";
  white-space:pre;
  position:absolute;inset:17% 12%;
  color:rgba(70,47,26,.48);
  font:700 13px/1.75 Georgia,serif;
  transform:rotate(-2deg);
}
.visual-community::after{
  content:"●  ●  ●\A   ●  ●";
  white-space:pre;
  position:absolute;inset:0;
  display:grid;place-items:center;text-align:center;
  font-size:24px;color:rgba(52,65,69,.48);
}
.visual-event::after{
  content:"תק״ע";
  position:absolute;inset:0;display:grid;place-items:center;
  font:700 42px/1 Georgia,serif;color:rgba(63,47,32,.52);
}
.visual-person::after{
  content:"ספר\Aתולדות";
  white-space:pre;
  position:absolute;inset:0;display:grid;place-items:center;text-align:center;
  font:700 27px/1.35 Georgia,serif;color:rgba(63,47,32,.52);
}
.history-card-body{padding:9px 2px 3px}
.history-card h3{margin:0;font-size:16px;line-height:1.35}
.history-card-summary{margin:6px 0 0;color:#5e7482;font-size:13px;line-height:1.5}
.history-tag{
  display:inline-block;margin-top:7px;padding:3px 9px;border-radius:999px;
  background:#f0ece4;color:#415e70;font-size:11px;font-weight:700;
}
.entries-grid{grid-template-columns:repeat(3,1fr)}
.entry-count{font-size:13px;color:#6d818c}
.history-empty{
  padding:22px;border:1px dashed #bdc9d0;border-radius:8px;background:#fff;text-align:center;
}

/* sidebar */
.popular-list{list-style:none;margin:0;padding:2px 0;counter-reset:pop}
.popular-list li{
  counter-increment:pop;
  display:grid;
  grid-template-columns:36px 1fr;
  gap:8px;
  align-items:center;
  padding:10px 13px;
  border-bottom:1px solid rgba(16,53,83,.08);
}
.popular-list li:last-child{border-bottom:0}
.popular-list li::before{
  content:counter(pop);
  width:31px;height:31px;display:grid;place-items:center;
  color:#536f7f;font-weight:800;
}
.popular-list a{color:var(--ink);text-decoration:none;font-weight:750;line-height:1.35}
.explore-links{display:grid}
.explore-links a{
  display:flex;justify-content:space-between;gap:10px;padding:13px 15px;
  color:#17547b;text-decoration:none;border-bottom:1px solid rgba(16,53,83,.08);font-weight:700;
}
.explore-links a:last-child{border-bottom:0}

/* closing strip */
.history-closing{
  border-top:1px solid rgba(16,53,83,.12);
  background:
    radial-gradient(circle at 15% 50%,rgba(197,149,57,.20),transparent 18rem),
    linear-gradient(90deg,#eadcc3,#f5eddc 55%,#e4d6bf);
}
.closing-inner{
  min-height:135px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  padding-top:24px;padding-bottom:24px;
}
.closing-inner strong{font-size:25px}
.closing-inner p{margin:6px 0 0;max-width:760px;color:#556d7a;line-height:1.6}
.share-history{
  flex:0 0 auto;
  min-width:240px;min-height:56px;padding:0 22px;border-radius:7px;
  display:inline-flex;align-items:center;justify-content:center;
  background:#145b88;color:#fff;text-decoration:none;font-weight:800;
}

@media(max-width:1120px){
  .history-categories{grid-template-columns:repeat(4,1fr)}
  .recent-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:900px){
  .history-hero-copy{width:min(760px,84%)}
  .history-layout{grid-template-columns:1fr}
  .history-side{grid-template-columns:repeat(2,1fr)}
  .entries-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:700px){
  .history-hero{min-height:285px;background-position:58% 42%}
  .history-hero-inner{min-height:285px}
  .history-hero-copy{width:100%;margin:0}
  .history-search-row{grid-template-columns:1fr}
  .browse-all{min-height:50px}
  .history-categories{grid-template-columns:repeat(2,1fr)}
  .featured-body{grid-template-columns:1fr}
  .featured-photo,.featured-photo img{min-height:230px}
  .recent-grid,.entries-grid{grid-template-columns:1fr}
  .history-side{grid-template-columns:1fr}
  .closing-inner{flex-direction:column;align-items:stretch}
  .share-history{width:100%}
}
