/* ==================================================
   HERO V3 – PREMIUM SLIDER
   - V1/V2/V4 bağımsızdır
   - Ana slider + sağ haber rail'i + 4x2 alt grid
================================================== */

.hero-v3{
  background:transparent;
  padding:20px 0 24px;
  margin-top:10px;
}

.hero-v3 .hero-v3-panel{
  background:#f7f8fa;
  border-radius:20px;
  box-shadow:0 10px 26px rgba(0,0,0,.05);
  padding:15px 15px 14px;
  box-sizing:border-box;
}

.hero-v3-stage{
  display:grid;
  grid-template-columns:minmax(0, 2.15fr) minmax(280px, .85fr);
  min-height:510px;
  gap:15px;
}

.hero-v3-slides{
  position:relative;
  min-width:0;
  min-height:510px;
  overflow:hidden;
  border-radius:17px;
  background:#0c0d10;
  isolation:isolate;
}

.hero-v3-slide{
  position:absolute;
  inset:0;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:scale(1.018);
  transition:opacity .48s ease, visibility .48s ease, transform .65s cubic-bezier(.22,.61,.36,1);
  z-index:1;
}

.hero-v3-slide.is-active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:scale(1);
  z-index:2;
}

.hero-v3-slide-link{
  position:relative;
  display:block;
  width:100%;
  height:100%;
  color:#fff;
  overflow:hidden;
}

.hero-v3-slide-image{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform:none !important;
}

.hero-v3-slide-shade{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(7,8,10,.84) 0%,rgba(7,8,10,.40) 54%,rgba(7,8,10,.08) 82%),
    linear-gradient(0deg,rgba(7,8,10,.88) 0%,rgba(7,8,10,.12) 58%,rgba(7,8,10,.08) 100%);
  z-index:1;
}

.hero-v3-slide-copy{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:2;
  max-width:78%;
  padding:42px 42px 50px;
}

.hero-v3-slide-kicker{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:12px;
  color:rgba(255,255,255,.72);
  font-size:12px;
  font-weight:700;
}

.hero-v3-slide-cat{
  display:inline-flex;
  min-height:25px;
  align-items:center;
  padding:0 10px;
  border-radius:999px;
  background:#c51f26;
  color:#fff;
  font-size:10px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.hero-v3-slide-copy h2{
  max-width:880px;
  margin:0;
  color:#fff;
  font-size:clamp(28px,2.4vw,42px);
  line-height:1.08;
  letter-spacing:-.025em;
  text-wrap:balance;
  text-shadow:0 2px 18px rgba(0,0,0,.28);
}

.hero-v3-slide-copy p{
  max-width:680px;
  margin:14px 0 0;
  color:rgba(255,255,255,.78);
  font-size:14px;
  line-height:1.55;
}

.hero-v3-slider-controls{
  position:absolute;
  right:18px;
  bottom:18px;
  z-index:5;
  display:flex;
  align-items:center;
  gap:7px;
  padding:6px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:999px;
  background:rgba(9,10,13,.62);
  box-shadow:0 8px 30px rgba(0,0,0,.20);
  backdrop-filter:blur(10px);
}

.hero-v3-arrow{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.10);
  color:#fff;
  cursor:pointer;
  transition:background .2s ease,transform .2s ease;
}

.hero-v3-arrow:hover{background:#c51f26;transform:scale(1.04)}
.hero-v3-arrow:focus-visible{outline:2px solid #fff;outline-offset:2px}

.hero-v3-counter{
  min-width:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  color:rgba(255,255,255,.62);
  font-size:11px;
  font-variant-numeric:tabular-nums;
}

.hero-v3-counter strong{color:#fff;font-size:13px}

.hero-v3-progress{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:5;
  height:3px;
  background:rgba(255,255,255,.10);
}

.hero-v3-progress span{
  display:block;
  width:0;
  height:100%;
  background:#c51f26;
}

.hero-v3-slider.is-playing .hero-v3-progress span{
  animation:heroV3Progress 6s linear forwards;
}

@keyframes heroV3Progress{from{width:0}to{width:100%}}

.hero-v3-rail{
  display:flex;
  min-height:0;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(15,23,42,.06);
  border-radius:17px;
  background:#fff;
}

.hero-v3-rail-head{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:52px;
  padding:0 15px;
  border-bottom:1px solid rgba(15,23,42,.07);
}

.hero-v3-rail-head span{
  color:#11151a;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hero-v3-rail-head span::before{
  content:"";
  display:inline-block;
  width:7px;
  height:7px;
  margin-right:8px;
  border-radius:50%;
  background:#c51f26;
  box-shadow:0 0 0 4px rgba(197,31,38,.10);
}

.hero-v3-rail-head strong{
  color:#8b9098;
  font-size:10px;
  font-weight:800;
}

.hero-v3-rail-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  scrollbar-width:thin;
  scrollbar-color:rgba(15,23,42,.18) transparent;
}

.hero-v3-rail-item{
  position:relative;
  width:100%;
  min-height:65px;
  display:grid;
  grid-template-columns:54px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:8px 11px;
  border:0;
  border-bottom:1px solid rgba(15,23,42,.055);
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
  transition:background .2s ease;
}

.hero-v3-rail-item:last-child{border-bottom:0}
.hero-v3-rail-item:hover{background:#f6f7f9}
.hero-v3-rail-item.is-active{background:linear-gradient(90deg,rgba(197,31,38,.095),rgba(197,31,38,.015))}
.hero-v3-rail-item.is-active::before{
  content:"";
  position:absolute;
  left:0;
  top:9px;
  bottom:9px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:#c51f26;
}

.hero-v3-rail-index{
  color:#a1a6ae;
  font-size:11px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}

.hero-v3-rail-item.is-active .hero-v3-rail-index{color:#c51f26}

.hero-v3-rail-thumb{
  width:54px;
  height:45px;
  display:block;
  overflow:hidden;
  border-radius:9px;
  background:#e9ebef;
}

.hero-v3-rail-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform:none !important;
}

.hero-v3-rail-copy{
  min-width:0;
  display:block;
}

.hero-v3-rail-cat{
  display:block;
  margin-bottom:3px;
  color:#c51f26;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.hero-v3-rail-copy strong{
  display:-webkit-box;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#16191e;
  font-size:12px;
  font-weight:800;
  line-height:1.28;
}

.hero-v3-bottom-wrap{
  margin-top:15px;
  padding-top:15px;
  border-top:1px solid rgba(0,0,0,.07);
}

.hero-v3-bottom-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.hero-v3-card{
  overflow:hidden;
  border:1px solid rgba(15,23,42,.06);
  border-radius:16px;
  background:#fff;
  box-shadow:0 4px 18px rgba(0,0,0,.04);
  transition:transform .22s ease,box-shadow .22s ease;
}

.hero-v3-card a{display:block;height:100%;color:inherit}
.hero-v3-card-media{position:relative;aspect-ratio:16/10;background:#e9ebef}
.hero-v3-card-media img{width:100%;height:100%;object-fit:cover;display:block;transform:none !important;transition:transform .35s ease}

.hero-v3-chip{
  position:absolute;
  left:10px;
  top:10px;
  min-height:24px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#111;
  color:#fff;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
}

.hero-v3-card-body{padding:13px}
.hero-v3-card-meta{display:flex;align-items:center;gap:10px;margin-bottom:8px;font-size:11px;color:#878787}
.hero-v3-card-cat{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#c40000}
.hero-v3-card-body h4{margin:0 0 8px;font-size:15px;line-height:1.42;color:#111}
.hero-v3-card-body p{margin:0;font-size:13px;line-height:1.55;color:#666}

@media (hover:hover){
  .hero-v3-card:hover{transform:translateY(-4px);box-shadow:0 14px 26px rgba(15,23,42,.10)}
  .hero-v3-card:hover .hero-v3-card-media img{transform:scale(1.025) !important}
  .hero-v3-card:hover h4{color:#c40000}
}

@media (max-width:1280px){
  .hero-v3-stage{grid-template-columns:minmax(0,1.85fr) minmax(270px,.9fr);min-height:480px}
  .hero-v3-slides{min-height:480px}
  .hero-v3-slide-copy{max-width:84%;padding:34px 34px 44px}
  .hero-v3-bottom-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:992px){
  .hero-v3-stage{display:block;min-height:0}
  .hero-v3-slides{min-height:440px}
  .hero-v3-rail{margin-top:12px}
  .hero-v3-rail-head{display:none}
  .hero-v3-rail-list{
    display:flex;
    overflow-x:auto;
    gap:8px;
    padding:8px;
    scroll-snap-type:x proximity;
  }
  .hero-v3-rail-item{
    flex:0 0 min(300px,82vw);
    min-height:66px;
    grid-template-columns:22px 52px minmax(0,1fr);
    border:1px solid rgba(15,23,42,.06);
    border-radius:12px;
    scroll-snap-align:start;
  }
  .hero-v3-rail-item.is-active::before{top:8px;bottom:8px}
}

@media (max-width:860px){
  .hero-v3-bottom-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:700px){
  .hero-v3{padding-top:0;margin-top:0}
  .hero-v3 .hero-v3-panel{padding:10px;border-radius:0}
  .hero-v3-slides{min-height:390px;border-radius:15px}
  .hero-v3-slide-copy{max-width:100%;padding:28px 20px 56px}
  .hero-v3-slide-copy h2{font-size:28px;line-height:1.1}
  .hero-v3-slide-copy p{display:none}
  .hero-v3-slider-controls{right:12px;bottom:12px}
  .hero-v3-slide-kicker{margin-bottom:9px}
}

@media (max-width:540px){
  .hero-v3-slides{min-height:350px}
  .hero-v3-slide-copy h2{font-size:24px}
  .hero-v3-bottom-grid{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  .hero-v3-slide{transition:none}
  .hero-v3-slider.is-playing .hero-v3-progress span{animation:none;width:100%}
}

/* Dark mode — site uses data-me-theme */
:root[data-me-theme="dark"] .hero-v3 .hero-v3-panel{
  background:#11151a;
  border-color:rgba(255,255,255,.06);
  box-shadow:0 10px 30px rgba(0,0,0,.34);
}
:root[data-me-theme="dark"] .hero-v3-rail,
:root[data-me-theme="dark"] .hero-v3-card{
  background:#171c22;
  border-color:rgba(255,255,255,.07);
}
:root[data-me-theme="dark"] .hero-v3-rail-head,
:root[data-me-theme="dark"] .hero-v3-rail-item{
  border-color:rgba(255,255,255,.07);
}
:root[data-me-theme="dark"] .hero-v3-rail-head span,
:root[data-me-theme="dark"] .hero-v3-rail-copy strong,
:root[data-me-theme="dark"] .hero-v3-card-body h4{
  color:#f4f6f8;
}
:root[data-me-theme="dark"] .hero-v3-rail-head strong,
:root[data-me-theme="dark"] .hero-v3-rail-index,
:root[data-me-theme="dark"] .hero-v3-rail-cat,
:root[data-me-theme="dark"] .hero-v3-card-meta{
  color:#9ba3ad;
}
:root[data-me-theme="dark"] .hero-v3-rail-item:hover{background:#20262d}
:root[data-me-theme="dark"] .hero-v3-rail-item.is-active{
  background:linear-gradient(90deg,rgba(197,31,38,.20),rgba(197,31,38,.03));
}
:root[data-me-theme="dark"] .hero-v3-card-body p{color:#aeb4bc}

/* ==================================================
   HERO V3 – WIDTH SYNC + MERGE FIXES
================================================== */
body.home .home-hero.hero-v3{max-width:var(--home-shell-width);margin:0 auto}
body.home .home-hero.hero-v3 .container{max-width:none;width:100%;padding-left:0;padding-right:0}
body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend{max-width:var(--home-shell-width);margin:0 auto}
body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend .container-wide{max-width:none;width:100%;padding-left:0;padding-right:0}
body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend .race-weekend-grid{gap:0}
body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend .race-weekend-box,
body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend .race-weekend-strip{border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}
body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend .race-weekend-box{margin-bottom:0;border-bottom-color:transparent}
body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend + .home-hero.hero-v3{margin-top:0;padding-top:0}
body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend + .home-hero.hero-v3 .hero-v3-panel{border-top-left-radius:0;border-top-right-radius:0}
body.home:has(.front-race-weekend + .home-hero.hero-v3 + .section-divider + .home-sponsors) .home-hero.hero-v3{padding-bottom:0}
body.home:has(.home-hero.hero-v3 + .section-divider + .home-sponsors) .home-hero.hero-v3 .hero-v3-panel{border-bottom-left-radius:0;border-bottom-right-radius:0}
body.home:has(.home-hero.hero-v3 + .section-divider + .home-sponsors) .home-hero.hero-v3 + .section-divider{display:none}

@media (max-width:700px){
  body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend .race-weekend-box,
  body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend .race-weekend-strip,
  body.home:has(.front-race-weekend + .home-hero.hero-v3) .front-race-weekend + .home-hero.hero-v3 .hero-v3-panel,
  body.home:has(.home-hero.hero-v3 + .section-divider + .home-sponsors) .home-hero.hero-v3 .hero-v3-panel{border-radius:0}
}

/* 2026-09-03: right rail numbering intentionally removed */
.hero-v3-rail-index{display:none !important}

/* 2026-09-03: Hero V3 mobile rail — numbering removed, keep image/text columns clean */
@media (max-width:992px){
  .hero-v3-rail-item{
    grid-template-columns:54px minmax(0,1fr);
    column-gap:10px;
  }
  .hero-v3-rail-thumb{
    grid-column:1;
    min-width:54px;
  }
  .hero-v3-rail-copy{
    grid-column:2;
    min-width:0;
    overflow:hidden;
  }
  .hero-v3-rail-copy strong{
    overflow:hidden;
    overflow-wrap:anywhere;
  }
}
