/* CHERY CLUB — historical homepage v1
   Header/footer intentionally reuse the installed forum design. */
html,body{margin:0;padding:0;}
body.history-standalone{background:#f7f6f2;color:#252a30;font-family:Arial,Helvetica,sans-serif;}
body.history-standalone .cc-adslot{display:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;}
body.history-standalone .cc-modern-shell{background:#fff;}
body.history-standalone .cc-topbar-inner,body.history-standalone .cc-nav-inner,body.history-standalone .cc-hero,body.history-standalone .cc-footer-inner,body.history-standalone .cc-footer-bottom{max-width:1536px;}
body.history-standalone .cc-nav a,body.history-standalone .cc-topbar a{box-sizing:border-box;}

.history-main{position:relative;overflow:hidden;background:linear-gradient(180deg,#fff 0,#fbfaf6 14%,#f8f6f0 100%);}
.history-main:before,.history-main:after{content:"";position:absolute;left:0;right:0;height:160px;pointer-events:none;opacity:.45;background:url('./images/chery-body-waves.png') center/cover no-repeat;}
.history-main:before{top:40px;}.history-main:after{bottom:60px;transform:rotate(180deg);opacity:.25;}
.history-wrap{position:relative;z-index:1;width:min(1280px,calc(100% - 44px));margin:0 auto;padding:34px 0 56px;}

.history-hero{position:relative;min-height:330px;padding:42px 46px 38px;border:1px solid rgba(202,194,180,.55);background:rgba(255,253,248,.88);box-shadow:0 14px 42px rgba(71,53,41,.07);overflow:hidden;box-sizing:border-box;}
.history-hero:after{content:"";position:absolute;right:-45px;top:-15px;width:550px;height:390px;background:url('./images/chery-panel-frame.png') center/contain no-repeat;opacity:.18;pointer-events:none;}
.history-kicker{font-size:15px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#b51f2d;margin-bottom:12px;}
.history-hero h1{font-size:46px;line-height:1.04;margin:0 0 18px;max-width:720px;color:#25272b;font-weight:800;}
.history-hero h1 span{color:#b51f2d;}
.history-lead{font-size:17px;line-height:1.72;max-width:720px;color:#50565c;margin:0 0 30px;}
.history-stats{display:grid;grid-template-columns:repeat(5,1fr);border-top:1px solid #e7ded3;border-bottom:1px solid #e7ded3;background:rgba(255,255,255,.58);}
.history-stat{padding:19px 16px 17px;text-align:center;border-right:1px solid #eee5dc;}
.history-stat:last-child{border-right:0;}.history-stat strong{display:block;color:#b51f2d;font-size:25px;line-height:1.05;margin-bottom:6px}.history-stat span{display:block;font-size:12px;line-height:1.35;color:#60666c;}

.history-section{position:relative;padding:58px 20px 52px;border-bottom:1px solid rgba(193,181,168,.38);}
.history-section:before{content:"";position:absolute;left:-6px;top:64px;width:95px;height:70%;background:url('./images/chery-side-ornament.png') left top/contain no-repeat;opacity:.26;pointer-events:none;}
.section-head{display:flex;align-items:center;gap:17px;margin:0 0 22px;}
.section-num{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border:1px solid rgba(181,31,45,.55);font-size:17px;font-weight:800;color:#b51f2d;background:#fffaf5;clip-path:polygon(10% 0,93% 3%,100% 88%,84% 100%,2% 94%,0 13%);flex:0 0 auto;}
.section-head h2{font-size:30px;line-height:1.15;margin:0;color:#282b2f;}.section-head h2 em{font-style:normal;color:#b51f2d;}
.section-head:after{content:"";height:1px;flex:1;max-width:240px;background:linear-gradient(90deg,#b51f2d,transparent);opacity:.55;}
.history-copy{font-size:16px;line-height:1.78;color:#454b50;max-width:850px;}
.history-copy p{margin:0 0 15px;}.history-copy strong{color:#292d31;}

.story-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr);gap:42px;align-items:start;}
.story-grid.reverse{grid-template-columns:minmax(380px,.9fr) minmax(0,1.1fr);}
.story-grid.reverse .history-copy{order:2}.story-grid.reverse .visual-stack{order:1}
.visual-stack{position:relative;display:grid;gap:16px;}
.archive-shot{display:block;position:relative;padding:10px;background:#fffdfa;border:1px solid #e5dbcf;box-shadow:0 14px 32px rgba(57,44,37,.08);transform:rotate(-.35deg);text-decoration:none;}
.archive-shot:nth-child(even){transform:rotate(.4deg)}
.archive-shot img{display:block;width:100%;height:auto;-webkit-mask-image:radial-gradient(ellipse at center,#000 72%,rgba(0,0,0,.98) 78%,rgba(0,0,0,.7) 88%,transparent 100%);mask-image:radial-gradient(ellipse at center,#000 72%,rgba(0,0,0,.98) 78%,rgba(0,0,0,.7) 88%,transparent 100%);}
.archive-shot:after{content:"";position:absolute;left:18px;right:18px;bottom:6px;height:2px;background:linear-gradient(90deg,transparent,#b51f2d 30%,#b51f2d 70%,transparent);opacity:.45;}
.archive-caption{display:block;padding:8px 4px 1px;font-size:11px;color:#77716c;text-align:center;}

.old-site-card{padding:13px;background:#fff;border:1px solid #dfd7cf;box-shadow:0 15px 40px rgba(50,42,37,.08);}
.old-site-card img{display:block;width:100%;height:auto;}
.old-site-card small{display:block;text-align:center;margin-top:9px;color:#81786f;font-size:11px;line-height:1.45;}

.context-card{margin:8px 20px 12px auto;max-width:980px;display:grid;grid-template-columns:155px 1fr;background:linear-gradient(115deg,#edf3f6,#f4f7f7);border:1px solid #dce5e8;box-shadow:0 10px 28px rgba(44,62,70,.05);position:relative;overflow:hidden;}
.context-card:after{content:"";position:absolute;right:-30px;bottom:-52px;width:230px;height:170px;background:url('./images/chery-body-pattern.svg') center/contain no-repeat;opacity:.055;}
.context-year{padding:24px 20px;border-right:1px solid rgba(135,158,168,.22);font-size:42px;line-height:1;font-weight:800;color:#697e88;display:flex;align-items:center;justify-content:center;}
.context-body{padding:21px 30px 20px;position:relative;z-index:1;}.context-label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;font-weight:700;color:#8a3b42;margin-bottom:7px}.context-body h3{font-size:18px;margin:0 0 8px;color:#39464c}.context-body p{font-size:13px;line-height:1.65;color:#5d686d;margin:0;max-width:760px;}

.photo-feature{display:grid;grid-template-columns:1.28fr .72fr;gap:20px;align-items:stretch;}
.photo-feature .big{min-height:410px;}.photo-feature .big img{height:100%;object-fit:cover;}
.photo-side{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.photo-side .archive-shot{padding:7px}.photo-side img{height:180px;object-fit:cover;}
.photo-feature.autoshow{grid-template-columns:1.08fr .92fr}.photo-feature.autoshow .big{min-height:380px}.photo-feature.autoshow .photo-side img{height:165px}

.event-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:24px;}
.event-card{position:relative;background:#fff;padding:8px 8px 34px;border:1px solid #e5ddd4;box-shadow:0 10px 28px rgba(58,46,39,.06);}
.event-card img{display:block;width:100%;height:220px;object-fit:cover;-webkit-mask-image:radial-gradient(ellipse at center,#000 76%,rgba(0,0,0,.86) 88%,transparent 100%);mask-image:radial-gradient(ellipse at center,#000 76%,rgba(0,0,0,.86) 88%,transparent 100%);}
.event-card strong{position:absolute;left:18px;bottom:10px;font-size:14px;color:#a82430;}

.quote-line{margin:28px 0 0;padding:20px 26px;border-left:3px solid #b51f2d;background:rgba(255,255,255,.55);font-size:18px;line-height:1.55;font-weight:700;color:#3d4246;}
.next-story{margin-top:48px;padding:32px 36px;background:rgba(181,31,45,.055);border-top:1px solid rgba(181,31,45,.17);border-bottom:1px solid rgba(181,31,45,.17);display:flex;align-items:center;justify-content:space-between;gap:30px;}.next-story strong{font-size:23px;color:#33383c}.next-story span{font-size:13px;line-height:1.55;color:#686e72;max-width:650px}.next-story a{white-space:nowrap;text-decoration:none;background:#b51f2d;color:#fff;padding:13px 20px;font-weight:700;font-size:13px;clip-path:polygon(4% 0,100% 0,96% 100%,0 100%);}

.lightbox{position:fixed;inset:0;background:rgba(14,15,16,.91);z-index:99999;display:none;align-items:center;justify-content:center;padding:40px;box-sizing:border-box;}.lightbox.open{display:flex}.lightbox img{max-width:92vw;max-height:88vh;box-shadow:0 18px 80px rgba(0,0,0,.55)}.lightbox-close,.lightbox-prev,.lightbox-next{position:fixed;border:0;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;font-size:29px;line-height:1;width:48px;height:48px}.lightbox-close{right:20px;top:20px}.lightbox-prev{left:20px;top:50%}.lightbox-next{right:20px;top:50%}

@media(max-width:1000px){.history-wrap{width:min(94%,1280px)}.history-hero h1{font-size:39px}.history-stats{grid-template-columns:repeat(3,1fr)}.history-stat:nth-child(3){border-right:0}.story-grid,.story-grid.reverse{grid-template-columns:1fr}.story-grid.reverse .history-copy,.story-grid.reverse .visual-stack{order:initial}.context-card{margin-left:20px}.photo-feature,.photo-feature.autoshow{grid-template-columns:1fr}.photo-feature .big,.photo-feature.autoshow .big{min-height:auto}.event-strip{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.history-wrap{width:100%;padding-top:16px}.history-hero{padding:30px 20px;border-left:0;border-right:0}.history-hero h1{font-size:31px}.history-lead{font-size:15px}.history-stats{grid-template-columns:1fr 1fr}.history-stat{border-bottom:1px solid #eee5dc}.history-section{padding:40px 18px}.section-head h2{font-size:24px}.history-copy{font-size:15px}.context-card{margin:0 12px;grid-template-columns:1fr}.context-year{justify-content:flex-start;border-right:0;border-bottom:1px solid rgba(135,158,168,.22);font-size:30px;padding:17px 22px}.context-body{padding:18px 22px}.photo-feature,.photo-side{display:block}.photo-side .archive-shot{margin-top:14px}.photo-side img{height:auto}.event-strip{grid-template-columns:1fr}.event-card img{height:auto}.next-story{margin:32px 18px 0;padding:26px 22px;display:block}.next-story a{display:inline-block;margin-top:18px}.lightbox{padding:18px}.lightbox-prev,.lightbox-next{top:auto;bottom:20px}.lightbox-prev{left:calc(50% - 60px)}.lightbox-next{right:calc(50% - 60px)}}

/* === HISTORY v2: panoramic illustrated chapter system === */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}
.story-section{position:relative;padding:28px 0 42px;border-bottom:1px solid rgba(190,176,163,.34);}
.story-section--intro{padding-top:4px;}
.story-banner{position:relative;width:100%;height:clamp(230px,24vw,320px);overflow:hidden;background:#f3eee6;box-shadow:0 14px 38px rgba(65,49,39,.07);}
.story-banner:before{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(168,145,126,.24),inset 0 0 42px rgba(255,255,255,.36);}
.story-banner img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;}
.story-banner--intro{height:clamp(250px,25vw,335px);}
.history-stats--under-banner{margin:0 18px 26px;position:relative;z-index:3;box-shadow:0 10px 26px rgba(54,42,34,.05);}
.story-text{max-width:1020px;margin:25px auto 0;padding:0 34px;font-size:17px;line-height:1.82;color:#41474c;box-sizing:border-box;}
.story-text p{margin:0 0 16px;}
.story-text strong{color:#272b2f;}
.story-text--lead{font-size:18px;max-width:1080px;}
.story-grid--text-artifact{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(330px,.85fr);gap:34px;align-items:start;margin:26px 34px 0;}
.story-grid--text-artifact .story-text{margin:0;padding:0;}
.story-grid--text-artifact .old-site-card{margin:0;}

/* Real archival photos: enhanced WebP preview + transparent artwork frame. */
.archive-shot{overflow:hidden;padding:13px!important;background:transparent!important;border:0!important;box-shadow:none!important;isolation:isolate;}
.archive-shot:before{content:"";position:absolute;inset:0;z-index:3;background:url('./images/archive-frame.webp') center/100% 100% no-repeat;pointer-events:none;}
.archive-shot:after{display:none!important;}
.archive-shot img{position:relative;z-index:1;-webkit-mask-image:none!important;mask-image:none!important;filter:saturate(1.04) contrast(1.03);}
.archive-caption{position:relative;z-index:4;background:rgba(255,251,245,.82);margin:-6px 12px 4px;padding:7px 10px 5px!important;color:#7c5d57!important;}
.photo-feature{margin:28px 26px 0;}
.event-strip{margin:28px 34px 0;}
.event-card{overflow:hidden;padding:12px 12px 38px;background:rgba(255,253,249,.92);}
.event-card:after{content:"";position:absolute;inset:0;z-index:2;background:url('./images/archive-frame.webp') center/100% 100% no-repeat;pointer-events:none;opacity:.86;}
.event-card img{position:relative;z-index:1;-webkit-mask-image:none!important;mask-image:none!important;filter:saturate(1.05) contrast(1.04);}
.event-card strong{z-index:3;}

.context-card{margin:18px auto 24px;max-width:1030px;}
.context-card .context-label:before{content:"ДОДАТКОВО · ";color:#7d8f97;}
.context-year{font-family:Georgia,'Times New Roman',serif;font-weight:700;}
.context-body h3{font-weight:700;}

.history-actions{display:flex;justify-content:center;gap:14px;margin:26px 0 4px;}
.history-button{display:inline-flex;align-items:center;justify-content:center;min-width:150px;padding:13px 22px;text-decoration:none;font-weight:700;font-size:14px;color:#9f1f2a;background:#fffaf5;border:1px solid rgba(164,43,53,.36);clip-path:polygon(4% 0,100% 0,96% 100%,0 100%);transition:.18s ease;}
.history-button:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(77,48,39,.08);}
.history-button--primary{background:#b51f2d;color:#fff;border-color:#b51f2d;}
.story-section--final{border-bottom:0;padding-bottom:18px;}

@media(max-width:1000px){
  .story-banner,.story-banner--intro{height:clamp(220px,31vw,300px)}
  .story-grid--text-artifact{grid-template-columns:1fr;margin-left:24px;margin-right:24px}
  .story-text{padding-left:26px;padding-right:26px}
  .history-stats--under-banner{margin-left:10px;margin-right:10px}
}
@media(max-width:700px){
  .story-section{padding:16px 0 30px}
  .story-banner,.story-banner--intro{height:190px}
  .story-banner img{object-position:center}
  .story-text,.story-text--lead{font-size:15px;line-height:1.72;padding:0 18px;margin-top:19px}
  .story-grid--text-artifact{margin:20px 18px 0;gap:22px}
  .story-grid--text-artifact .story-text{padding:0}
  .history-stats--under-banner{grid-template-columns:1fr 1fr;margin-bottom:20px}
  .photo-feature{margin:20px 12px 0}
  .event-strip{margin:20px 18px 0}
  .context-card{margin:14px 12px 20px}
  .history-actions{flex-direction:column;align-items:center;padding:0 18px}
  .history-button{width:100%;max-width:300px;box-sizing:border-box}
}

/* === HISTORY v3: no cropped chapter art + pre-rendered archival previews === */
body.history-standalone .cc-hero{
  background-image:url('./images/chery-header-bg-v4.jpg')!important;
}

/* Chapter images are complete artworks. Never crop them. */
.story-banner,
.story-banner--intro{
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  line-height:0;
  background:transparent;
}
.story-banner img,
.story-banner--intro img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center!important;
}
.story-banner:before{border-radius:0;}

.story-text{
  max-width:1040px;
  font-size:17px;
  line-height:1.86;
}
.story-text--lead{max-width:1080px;font-size:18px;}

/* These previews are already artistically prepared as complete images.
   CSS must not crop them or draw another frame over them. */
.art-gallery{
  width:min(1120px,calc(100% - 52px));
  margin:30px auto 4px;
  display:grid;
  gap:20px;
  align-items:start;
}
.art-gallery--single{grid-template-columns:1fr;max-width:900px;}
.art-gallery--autoshow{grid-template-columns:1fr 1fr;}
.art-gallery--autoshow .art-preview--main{grid-column:1 / -1;max-width:980px;justify-self:center;}
.art-gallery--events{grid-template-columns:repeat(3,1fr);}
.art-preview{
  display:block;
  position:relative;
  text-decoration:none!important;
  color:#7d5550!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  transition:transform .18s ease,filter .18s ease;
}
.art-preview:hover{transform:translateY(-2px);filter:brightness(1.02);}
.art-preview img{
  display:block;
  width:100%;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
  border:0;
  box-shadow:none;
}
.art-preview span{
  display:block;
  margin:-3px 42px 0;
  padding:5px 8px 0;
  text-align:center;
  font-size:11px;
  line-height:1.4;
  color:#8d625b;
}

/* Old v2 frame system is no longer used for rendered previews. */
.art-gallery .archive-shot:before,
.art-gallery .archive-shot:after{display:none!important;}

@media(max-width:900px){
  .art-gallery{width:calc(100% - 28px);gap:14px;}
  .art-gallery--events{grid-template-columns:1fr 1fr;}
}
@media(max-width:700px){
  .story-banner,.story-banner--intro{height:auto!important;}
  .story-text,.story-text--lead{font-size:15px;line-height:1.76;}
  .art-gallery--autoshow,.art-gallery--events{grid-template-columns:1fr;}
  .art-gallery--autoshow .art-preview--main{grid-column:auto;}
  .art-preview span{margin:-2px 18px 0;}
}

/* === HISTORY v4.1: match forum hero width ===
   On the forum the hero is full viewport width, while inner top/nav content
   remains capped at 1536px. history.css previously re-applied max-width:1536px
   to .cc-hero, which became visibly narrower at browser zoom < 100%. */
body.history-standalone .cc-hero{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* === HISTORY v4.2: justified narrative text on desktop === */
.story-text p,
.history-copy p,
.history-lead,
.context-body p{
  text-align:justify;
  text-justify:inter-word;
  -webkit-hyphens:auto;
  hyphens:auto;
}
@media(max-width:700px){
  .story-text p,
  .history-copy p,
  .history-lead,
  .context-body p{
    text-align:left;
    -webkit-hyphens:none;
    hyphens:none;
  }
}
