/* Rineo Digital Mega Projekti — isolated styles, no header or hero selectors */
.rdm{background:#0d0e10;color:#f5f5f5;font-family:inherit;box-sizing:border-box}
.rdm *, .rdm *:before,.rdm *:after{box-sizing:border-box}
.rdm [hidden]{display:none!important}
.rdm a{color:inherit;text-decoration:none}
.rdm button{font:inherit;cursor:pointer}
.rdm-shell{max-width:1640px;width:calc(100% - 8vw);margin:0 auto}
.rdm h1,.rdm h2,.rdm h3,.rdm p{color:inherit;margin-top:0}

/* FIX V1.2 — Prevent legacy site-wide `header {position:fixed}` from
   affecting the content headers inside Mega Projects. The real navigation
   is `body > header` and intentionally remains unchanged. */
.rdm header.rdm-listing__head,
.rdm header.rdm-detail__hero {
  position:relative;
  inset:auto;
  z-index:auto;
  padding:0;
  border:0;
  margin:0;
  box-shadow:none;
}
.rdm header.rdm-listing__head { background:transparent; }
.rdm header.rdm-detail__hero { background:#16191a; }

.rdm-outline{border:1px solid rgba(255,255,255,.66);padding:12px 19px;display:inline-flex;align-items:center;justify-content:center;gap:12px;background:transparent;color:#fff!important;font-size:12px;font-weight:600;letter-spacing:.045em;text-transform:uppercase;transition:background .25s,border .25s,color .25s}
.rdm-outline:hover,.rdm-outline:focus-visible{background:#fff;border-color:#fff;color:#111!important}
.rdm-outline--white{background:rgba(0,0,0,.2)}
.rdm :focus-visible{outline:2px solid #6ac1db;outline-offset:3px}
.rdm-home{padding:105px 0 115px}
.rdm-home .rdm-shell{display:grid;grid-template-columns: minmax(210px, 26%) minmax(0,1fr);align-items:stretch;gap:4.7vw}
.rdm-home__nav{display:flex;flex-direction:column;align-items:flex-start;min-height:570px}
.rdm-home__nav h2{font-size:clamp(20px,1.65vw,27px);font-weight:700;letter-spacing:.02em;margin:4px 0 47px}
.rdm-home__tabs{display:flex;flex-direction:column;gap:4px;width:100%;margin-bottom:40px}
.rdm-tab{display:block;color:#d9d9d9!important;border:0!important;background:transparent!important;text-align:left!important;font-size:clamp(15px,1.0vw,19px)!important;font-weight:400!important;line-height:1.28;padding:11px 15px!important;border-radius:4px;transition:background .2s,color .2s}
.rdm-tab.is-active,.rdm-tab:hover{background:#33363a!important;color:#fff!important}
.rdm-home__all{margin-top:auto}
.rdm-home__stage{position:relative;min-height:570px;aspect-ratio:16/9;align-self:center;overflow:hidden;background:#1a1b1d}
.rdm-panel{position:absolute;inset:0;overflow:hidden}
.rdm-panel__media,.rdm-panel__media>img,.rdm-panel__media>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rdm-panel__shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.55),transparent 80%),linear-gradient(0deg,rgba(0,0,0,.72),transparent 38%)}
.rdm-panel__content{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:clamp(24px,4vw,70px)}
.rdm-panel__intro{max-width:700px;padding-top:16%}
.rdm-panel__intro h3{font-size:clamp(28px,3.2vw,58px);letter-spacing:-.025em;line-height:1.04;font-weight:700;margin-bottom:12px;text-shadow:0 2px 12px rgba(0,0,0,.3)}
.rdm-panel__location{border:1px solid rgba(255,255,255,.6);background:rgba(0,0,0,.2);display:inline-block;padding:7px 12px;font-size:13px;margin:0 0 12px}
.rdm-panel__summary{font-size:15px;line-height:1.5;max-width:570px;text-shadow:0 1px 5px #000}
.rdm-panel__bottom{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;font-size:13px}
.rdm-panel__bottom>span{border-bottom:1px solid rgba(255,255,255,.7);padding-bottom:7px}
.rdm-listing{min-height:70vh;padding:115px 0}
.rdm-listing__head{margin-bottom:45px}
.rdm-kicker{font-size:12px!important;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:#b9c9d1!important}
.rdm-listing__head h1{font-size:clamp(38px,5vw,79px);letter-spacing:-.03em;line-height:1.1;margin:18px 0}
.rdm-listing__head>p:last-child{font-size:17px;color:#b9b9b9;max-width:680px}
.rdm-filter{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:35px}
.rdm-filter button{background:transparent;color:#ddd;border:1px solid #565656;border-radius:2px;padding:10px 16px;font-size:13px;transition:.2s}
.rdm-filter button:hover,.rdm-filter button.is-active{background:#f5f5f5;color:#111;border-color:#f5f5f5}
.rdm-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:36px 22px}
.rdm-card{min-width:0}
.rdm-card__link{display:block}
.rdm-card__media{position:relative;display:block;width:100%;aspect-ratio:4/3;overflow:hidden;background:#242628}
.rdm-card__media>img,.rdm-card__media>video{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;transition:transform .35s ease}
.rdm-card__media>video{opacity:0;transition:opacity .3s ease}
.rdm-card:hover .rdm-card__media>img,.rdm-card:focus-within .rdm-card__media>img{transform:scale(1.05)}
.rdm-card:hover .rdm-card__media>video,.rdm-card:focus-within .rdm-card__media>video{opacity:1}
.rdm-card__arrow{position:absolute;right:15px;bottom:15px;background:rgba(0,0,0,.65);width:38px;height:38px;display:grid;place-items:center;font-size:22px;border:1px solid #777}
.rdm-card__info{display:flex;flex-direction:column;gap:6px;padding:16px 0}
.rdm-card__info strong{font-size:clamp(16px,1.25vw,21px);line-height:1.2;font-weight:600}
.rdm-card__info small{font-size:13px;color:#bebebe}
.rdm-card__cat{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#8fb6c9}
.rdm-morewrap{text-align:center;margin-top:52px}
.rdm-listing__empty{padding:50px 0}
.rdm-detail{padding-top:48px;padding-bottom:100px}
.rdm-detail__back{display:inline-block;padding:14px 0;margin-bottom:30px;font-size:13px;color:#ddd!important}
.rdm-detail__hero{position:relative;min-height:550px;height:min(70vw,690px);background:#16191a;overflow:hidden}
.rdm-detail__media,.rdm-detail__media>img,.rdm-detail__media>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rdm-detail__media>video{z-index:2}
.rdm-detail__hero:before{content:'';position:absolute;z-index:3;inset:0;background:linear-gradient(0deg,rgba(0,0,0,.67),transparent 45%);pointer-events:none}
.rdm-detail__heroTitle{position:absolute;bottom:9%;left:5%;right:5%;z-index:4;pointer-events:none}
.rdm-detail__heroTitle h1{font-size:clamp(42px,5vw,86px);line-height:1.06;max-width:1100px;margin:0 0 12px}
.rdm-detail__heroTitle>p:last-child{font-size:17px}
.rdm-detail__body{display:grid;grid-template-columns:minmax(0,2fr) minmax(250px,1fr);gap:8vw;padding:90px 0}
.rdm-detail__body h2{font-size:clamp(28px,2.4vw,46px);margin:20px 0 30px}
.rdm-lead{font-size:clamp(19px,1.5vw,25px);line-height:1.5;color:#e5e5e5!important}
.rdm-prose{font-size:16px;line-height:1.8;white-space:normal;color:#c1c1c1}
.rdm-detail__body aside{padding-top:15px}
.rdm-detail__body aside>div{border-top:1px solid #4a4b4d;padding:18px 0 25px;display:flex;flex-direction:column;gap:10px}
.rdm-detail__body aside small{font-size:12px;color:#a6a6a6}
.rdm-detail__body aside strong{font-size:17px;line-height:1.4;font-weight:500}
.rdm-detail__body aside>a{margin-top:20px}
.rdm-gallery{margin-top:0}
.rdm-gallery h2{font-size:28px;margin-bottom:28px}
.rdm-gallery__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.rdm-gallery__grid a{aspect-ratio:4/3;overflow:hidden;display:block;background:#222}
.rdm-gallery__grid img{height:100%;width:100%;object-fit:cover;transition:transform .25s}
.rdm-gallery__grid a:hover img{transform:scale(1.04)}
.rdm-detail__end{margin-top:60px}
@media(max-width:1350px){.rdm-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.rdm-home__stage,.rdm-home__nav{min-height:485px}}
@media(max-width:980px){.rdm-shell{width:calc(100% - 40px)}.rdm-home{padding:65px 0}.rdm-home .rdm-shell{grid-template-columns:1fr;gap:25px}.rdm-home__nav{min-height:0}.rdm-home__nav h2{margin-bottom:22px}.rdm-home__tabs{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;gap:7px;margin-bottom:15px;padding-bottom:10px}.rdm-tab{white-space:nowrap;flex-shrink:0;font-size:14px!important}.rdm-home__all{margin:0 0 10px}.rdm-home__stage{aspect-ratio:16/9;min-height:0}.rdm-panel__intro{padding-top:3%}.rdm-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rdm-detail__hero{height:58vw;min-height:400px}.rdm-detail__body{gap:35px}}
@media(max-width:600px){.rdm-shell{width:calc(100% - 28px)}.rdm-home{padding:46px 0 60px}.rdm-home__stage{aspect-ratio:4/4.5}.rdm-panel__content{padding:24px}.rdm-panel__intro h3{font-size:clamp(28px,8vw,42px)}.rdm-panel__summary{font-size:13px}.rdm-panel__bottom{flex-direction:column;align-items:flex-start}.rdm-outline{padding:10px 13px;font-size:11px}.rdm-listing{padding:55px 0}.rdm-grid{grid-template-columns:1fr;gap:20px}.rdm-card__media{aspect-ratio:16/10}.rdm-detail{padding-top:15px}.rdm-detail__hero{height:86vw;min-height:340px}.rdm-detail__heroTitle{bottom:4%;left:5%}.rdm-detail__heroTitle h1{font-size:32px}.rdm-detail__body{grid-template-columns:1fr;padding:48px 0}.rdm-gallery__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}
@media(prefers-reduced-motion:reduce){.rdm *{transition:none!important}}

/* Mega projekti V1.3: names are navigable links, preview remains on hover/focus. */
.rdm-home__tabs a.rdm-tab, .rdm-home__tabs a.rdm-tab:visited { text-decoration:none!important; cursor:pointer; }
.rdm-home__tabs a.rdm-tab:focus-visible { outline:2px solid #fff!important; outline-offset:2px; }

/* FIX V1.5 — scroll-linked theme transition. No image/gradient/spacer.
   JavaScript updates these RGB values only while scrolling near the end of
   Mega projekti. The entire section changes uniformly from black to white;
   text changes with it to retain contrast. Not used on gallery/detail pages. */
.rdm.rdm-home {
    background-color: var(--rdm-scroll-bg, #0d0e10);
    color: var(--rdm-scroll-fg, #f5f5f5);
}
.rdm.rdm-home .rdm-home__nav h2 {
    color: var(--rdm-scroll-fg, #f5f5f5) !important;
}
.rdm.rdm-home .rdm-home__tabs .rdm-tab,
.rdm.rdm-home .rdm-home__tabs .rdm-tab:visited {
    color: var(--rdm-scroll-muted, #d9d9d9) !important;
}
.rdm.rdm-home .rdm-home__tabs .rdm-tab.is-active,
.rdm.rdm-home .rdm-home__tabs .rdm-tab:hover,
.rdm.rdm-home .rdm-home__tabs .rdm-tab:focus-visible {
    background-color: var(--rdm-scroll-tab-bg, #33363a) !important;
    color: var(--rdm-scroll-fg, #f5f5f5) !important;
}
.rdm.rdm-home .rdm-home__all,
.rdm.rdm-home .rdm-home__all:visited {
    color: var(--rdm-scroll-fg, #f5f5f5) !important;
    border-color: var(--rdm-scroll-border, #a5a5a5);
}
.rdm.rdm-home .rdm-home__all:hover,
.rdm.rdm-home .rdm-home__all:focus-visible {
    background-color: var(--rdm-scroll-fg, #f5f5f5);
    color: var(--rdm-scroll-bg, #0d0e10) !important;
}
/* Video/card overlay always stays white, independent of the outer theme. */
.rdm.rdm-home .rdm-panel,
.rdm.rdm-home .rdm-panel h3,
.rdm.rdm-home .rdm-panel p,
.rdm.rdm-home .rdm-panel .rdm-panel__bottom {
    color: #fff !important;
}
.rdm.rdm-home .rdm-panel .rdm-outline,
.rdm.rdm-home .rdm-panel .rdm-outline:visited {
    color: #fff !important;
    border-color: rgba(255,255,255,.7) !important;
}
.rdm.rdm-home .rdm-panel .rdm-outline:hover,
.rdm.rdm-home .rdm-panel .rdm-outline:focus-visible {
    background: #fff !important;
    color: #111 !important;
}
