/* ============================================================
   RUSTY CUSTOMIZATION — rc.css  v6.0
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   STANDARD GRIDS
════════════════════════════════════════════════════════════ */
/* ── Grid container ── */
.rc-grid { display:grid; gap:6px; width:100%; }
.rc-grid--2 { grid-template-columns:repeat(2,1fr); }
.rc-grid--3 { grid-template-columns:repeat(3,1fr); }
.rc-grid--4 { grid-template-columns:repeat(4,1fr); }

/* ════════════════════════════════════════════════════════════
   FEATURED — 1 hero left (60%) + 2×2 right (40%)
════════════════════════════════════════════════════════════ */
.rc-featured { display:grid; grid-template-columns:60fr 40fr; gap:6px; width:100%; aspect-ratio:16/7; }
.rc-featured__hero { position:relative; overflow:hidden; border-radius:10px; }
.rc-featured__hero .rc-item { position:absolute; inset:0; border-radius:0; height:100%; }
.rc-featured__hero .rc-media { position:absolute; inset:0; width:100%; height:100%; padding-top:0; }
.rc-featured__grid { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:6px; }
.rc-featured__grid .rc-item { border-radius:8px; overflow:hidden; position:relative; }
.rc-featured__grid .rc-item .rc-media { position:absolute; inset:0; padding-top:0; width:100%; height:100%; }
.rc-item--hero  .rc-info h3  { font-size:24px; }
.rc-item--small .rc-info h3  { font-size:13px; }
.rc-item--small .rc-info span{ font-size:10px; }
.rc-item--small .rc-info     { padding:0 10px 10px; }
.rc-item--small .rc-play     { width:40px; height:40px; }

/* ════════════════════════════════════════════════════════════
   HERO GRID — [rc_portfolio_hero]
   Pure equal 2-col CSS grid. No flex. No padding tricks.
   Thumbnail covers 100%. Title appears on hover only.
════════════════════════════════════════════════════════════ */

.rc-hero-grid-hero { display:none; }

.rc-hero-grid-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #000;
    align-items: start;
}

/* Row div is invisible — its children go straight into the grid */
.rc-hero-grid-row { display: contents; }

/* ── The item cell ── */
.rc-hg-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
    display: block;
    border-radius: 12px;
}

/* Thumbnail: covers the full cell perfectly */
.rc-hg-item img.rc-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 1;
    margin: 0;
    padding: 0;
    border: none;
}

/* Vimeo iframe: hidden behind thumb, still plays for audio/autoplay logic */
.rc-hg-item iframe.rc-vbg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
    z-index: 0;
    opacity: 0;
}

/* Gradient + title overlay — hidden until hover */
.rc-hg-item .rc-hero-grid-info {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 22px 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.05) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.rc-hg-item:hover .rc-hero-grid-info { opacity: 1; }

.rc-hg-item .rc-hero-grid-info h3 {
    margin: 0;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
}

.rc-hero-grid-director { display: none !important; }

/* ════════════════════════════════════════════════════════════
   ITEM BASE — ზუსტად bmrng.ge სტილი
   • height: 27vw  (რეფერენსიდან)
   • display: flex / justify-content: flex-end
   • title hover-ზე ქვემოდან ამოდის (translateY 100% → 0)
   • gradient + title მხოლოდ hover-ზე
════════════════════════════════════════════════════════════ */
.rc-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 14px;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    height: 27vw;
}
a.rc-item { text-decoration:none; color:inherit; }

/* ვიდეო + thumb — absolute, მთლიანად ფარავს */
.rc-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    z-index: 0;
}

.rc-thumb {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    display: block; z-index: 1;
    transition: transform .6s ease;
}
.rc-item:hover .rc-thumb { transform: scale(1.04); }

/* Local video — object-fit:cover */
.rc-vbg--local {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    border: none;
    z-index: 2;
    transition: transform .6s ease;
}
.rc-item:hover .rc-vbg--local { transform: scale(1.04); }

/* Vimeo iframe fallback — 400% centered cover */
.rc-vbg--vimeo {
    position: absolute;
    top: 50%; left: 50%;
    width: 400%; height: 400%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
    z-index: 2;
}

/* Gradient overlay — hover-ზე გამოჩნდება */
.rc-overlay {
    position: absolute; inset: 0; z-index: 3;
    background: linear-gradient(to top, rgba(0,0,0,.80) 0%, rgba(0,0,0,.05) 50%, transparent 100%);
    opacity: 0; transition: opacity .3s ease;
    pointer-events: none;
}
.rc-item:hover .rc-overlay { opacity: 1; }

/* Play button */
.rc-play {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(.7);
    opacity: 0;
    transition: opacity .3s ease, transform .28s cubic-bezier(.34,1.56,.64,1);
    z-index: 5;
    pointer-events: none;
}
.rc-item:hover .rc-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* Info wrapper — flex-end-ზე ზის item-ში, z-index > overlay */
.rc-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 0 20px 20px;
    pointer-events: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* overflow:hidden — title clip container */
.rc-info-h { overflow: hidden; width: 100%; }
.rc-info-s  { overflow: hidden; width: 100%; }

.rc-info h3 {
    margin: 0 0 4px;
    text-align: center;
    font-size: 17px; font-weight: 700;
    color: #fff; letter-spacing: .05em;
    text-transform: uppercase; line-height: 1.2;
    transform: translateY(110%);
    transition: transform .4s cubic-bezier(.25,.46,.45,.94);
    display: block;
}
.rc-item:hover .rc-info h3 { transform: translateY(0); }

.rc-info span {
    font-size: 12px; color: rgba(255,255,255,.65);
    text-align: center;
    letter-spacing: .06em; font-style: italic;
    display: block;
    transform: translateY(110%);
    transition: transform .4s cubic-bezier(.25,.46,.45,.94) .05s;
}
.rc-item:hover .rc-info span { transform: translateY(0); }

/* ════════════════════════════════════════════════════════════
   LIGHTBOX
════════════════════════════════════════════════════════════ */
.rc-lb-bg { display:none; position:fixed; inset:0; background:rgba(0,0,0,.97); z-index:99998; backdrop-filter:blur(12px); }
.rc-lb-bg.active { display:block; }
.rc-lightbox { display:none; position:fixed; inset:0; z-index:99999; overflow-y:auto; }
.rc-lightbox.active { display:flex; align-items:flex-start; justify-content:center; }
.rc-lb-close { position:fixed; top:22px; right:28px; background:none; border:none; color:#fff; font-size:38px; line-height:1; cursor:pointer; z-index:100000; opacity:.55; transition:opacity .2s; padding:0; }
.rc-lb-close:hover { opacity:1; }
.rc-lb-inner { display:flex; width:90vw; max-width:1380px; padding:58px 0 50px; box-sizing:border-box; }
.rc-lb-left { flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:16px; }
.rc-lb-vwrap { position:relative; width:100%; padding-top:56.25%; background:#000; border-radius:12px; overflow:hidden; }
.rc-lb-vwrap iframe { position:absolute; inset:0; width:100%; height:100%; border:none; }
.rc-lb-meta h2 { margin:0 0 4px; font-size:20px; font-weight:700; color:#fff; letter-spacing:.05em; text-transform:uppercase; }
.rc-lb-meta p  { margin:0; font-size:12px; color:rgba(255,255,255,.4); letter-spacing:.1em; text-transform:uppercase; }
.rc-lb-gallery { display:flex; flex-direction:column; gap:8px; }
.rc-lb-gallery-main { width:100%; aspect-ratio:16/9; overflow:hidden; background:#111; border-radius:8px; }
.rc-lb-gallery-main img { width:100%; height:100%; object-fit:cover; display:block; transition:opacity .25s; }
.rc-lb-gallery-thumbs { display:flex; flex-wrap:wrap; gap:5px; }
.rc-lb-gallery-thumbs img { width:74px; height:50px; object-fit:cover; cursor:pointer; opacity:.5; transition:opacity .2s; border-radius:4px; border:2px solid transparent; }
.rc-lb-gallery-thumbs img:hover,.rc-lb-gallery-thumbs img.active { opacity:1; border-color:#fff; }
.rc-lb-right { width:240px; flex-shrink:0; padding-left:28px; }
.rc-lb-credits-outer { height:calc(56.25vw*.49); min-height:260px; max-height:540px; overflow:hidden; position:relative; mask-image:linear-gradient(to bottom,transparent 0%,#000 13%,#000 87%,transparent 100%); -webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 13%,#000 87%,transparent 100%); background:rgba(0,0,0,0.85); border-radius:8px; cursor:ns-resize; }
.rc-lb-credits { position:relative; will-change:transform; }
.rc-credit-content { display:flex; flex-direction:column; gap:20px; }
.rc-credit-spacer { height:28vh; min-height:120px; }
.rc-credit-row { display:flex; flex-direction:column; gap:3px; }
.rc-credit-role { font-size:9px; letter-spacing:.18em; text-transform:uppercase; color:rgba(255,255,255,.28); font-weight:500; }
.rc-credit-names { font-size:13px; color:rgba(255,255,255,.82); line-height:1.55; font-weight:300; }
.rc-credit-empty { color:rgba(255,255,255,.25); font-size:11px; letter-spacing:.14em; text-transform:uppercase; }

/* ════════════════════════════════════════════════════════════
   ABOUT US
════════════════════════════════════════════════════════════ */
.ra-wrap { max-width:100%; color:#fff; }
.ra-hero { padding:60px 0 50px; }
.ra-headline { font-size:clamp(48px,8vw,120px); font-weight:900; color:#fff; text-transform:uppercase; letter-spacing:-.025em; line-height:1; margin:0 0 36px; }
.ra-desc { font-size:16px; color:rgba(255,255,255,.65); line-height:1.75; }
.ra-desc p { margin:0 0 12px; }
.ra-section { padding:56px 0; border-top:1px solid rgba(255,255,255,.07); }
.ra-section-label { font-size:clamp(32px,4vw,56px); font-weight:400 !important; font-style:normal !important; font-family:'Bogart', sans-serif !important; color:#fff; margin:0 0 44px; letter-spacing:-.01em; }

/* ════════════════════════════════════════════════════════════
   TEAM — 4 columns desktop, 2 columns mobile
════════════════════════════════════════════════════════════ */
.ra-team-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:0; }
.ra-member { display:flex; flex-direction:column; gap:0; padding:28px 24px 28px 0; border-bottom:1px solid rgba(255,255,255,.07); }
.ra-member-name { display:inline-block; margin-bottom:6px; }
.ra-member-name span { display:inline-block; font-size:13px; font-weight:800; font-family:'Bogart', sans-serif; text-transform:uppercase; letter-spacing:.08em; color:#000; background:#f2672e; padding:5px 22px 5px 12px; clip-path:polygon(0 0,calc(100% - 12px) 0,100% 50%,calc(100% - 12px) 100%,0 100%); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.ra-member-name::after { display:none !important; }
.ra-member-role { display:inline-block; margin-bottom:14px; }
.ra-member-role span { display:inline-block; font-size:11px; font-weight:700; font-family:'Bogart', sans-serif; text-transform:uppercase; letter-spacing:.06em; color:#000; background:#bab032; padding:3px 16px 3px 10px; clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.ra-member-role::after { display:none !important; }
.ra-member-links { display:flex; flex-direction:column; gap:5px; }
.ra-link { display:inline-flex; align-items:center; gap:7px; font-size:12px; letter-spacing:.04em; color:rgba(255,255,255,.45); text-decoration:none; transition:color .2s; width:fit-content; }
.ra-link:hover { color:#f2672e; }
.ra-link::before { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:4px; font-size:11px; flex-shrink:0; }
.ra-link--email::before    { content:'@'; background:rgba(255,255,255,.08); color:rgba(255,255,255,.6); }
.ra-link--phone::before    { content:'✆'; background:rgba(255,255,255,.08); color:rgba(255,255,255,.6); }
.ra-link--linkedin::before { content:'in'; background:#0a66c2; color:#fff; font-weight:700; font-size:9px; }
.ra-link--imdb::before     { content:'db'; background:#f5c518; color:#000; font-weight:900; font-size:9px; }

/* ════════════════════════════════════════════════════════════
   SERVICES
════════════════════════════════════════════════════════════ */
.ra-services-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.ra-service { position:relative; overflow:hidden; border-radius:12px; aspect-ratio:16/9; display:block; text-decoration:none; background:#111; }
a.ra-service:hover .ra-service-img { transform:scale(1.04); }
.ra-service-img { position:absolute; inset:0; background-size:cover; background-position:center; transition:transform .5s ease; }
.ra-service-overlay { position:absolute; inset:0; background:linear-gradient(to top,rgba(0,0,0,.78) 0%,rgba(0,0,0,.1) 55%,transparent 75%); }
.ra-service-info { position:absolute; bottom:0; left:0; right:0; padding:22px 24px; z-index:2; }
.ra-service-info h3 { margin:0 0 5px; font-size:22px; font-weight:800; color:#fff; text-transform:uppercase; letter-spacing:.03em; line-height:1.1; }
.ra-service-info p  { margin:0; font-size:13px; color:rgba(255,255,255,.6); letter-spacing:.04em; }

/* ════════════════════════════════════════════════════════════
   WPBAKERY / SALIENT OVERRIDES
   Zero out all padding that WPBakery injects around the
   shortcode so grid rows sit flush with no black gaps.
════════════════════════════════════════════════════════════ */

/* The vc_column that wraps rc_portfolio / rc_portfolio_hero */
.wpb_column:has(.rc-grid),
.wpb_column:has(.rc-hero-grid-grid) {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* The vc_row that wraps the portfolio section */
.vc_row:has(.rc-grid),
.vc_row:has(.rc-hero-grid-grid) {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Salient wraps columns in .wpb_wrapper with extra padding */
.wpb_wrapper:has(.rc-grid),
.wpb_wrapper:has(.rc-hero-grid-grid) {
    padding: 0 !important;
    margin: 0 !important;
}

/* wpb_text_column sometimes adds bottom margin */
.wpb_content_element:has(.rc-grid),
.wpb_content_element:has(.rc-hero-grid-grid) {
    margin-bottom: 0 !important;
}

/* Raw HTML element margin-bottom creates the black gap between grid rows */
.wpb_raw_code:has(.rc-grid),
.wpb_raw_code:has(.rc-hero-grid-grid),
.wpb_raw_html:has(.rc-grid),
.wpb_raw_html:has(.rc-hero-grid-grid) {
    margin-bottom: 0 !important;
    padding: 0 !important;
}

@media (max-width:1024px) {
    .rc-grid--3,.rc-grid--4 { grid-template-columns:repeat(2,1fr); }
    .ra-team-grid            { grid-template-columns:repeat(2,1fr); }
    .rc-featured             { aspect-ratio:auto; grid-template-columns:1fr; }
    .rc-lb-inner             { flex-direction:column; padding:52px 0 32px; }
    .rc-lb-right             { width:100%; padding-left:0; padding-top:20px; }
    .rc-lb-credits-outer     { height:240px; }
}
@media (max-width:768px) {
    .ra-team-grid            { grid-template-columns:1fr; }
    
    /* Works grid - single column on mobile */
    .rc-grid--2,.rc-grid--3,.rc-grid--4 { grid-template-columns:1fr; }
    .rc-item                 { height:56vw; border-radius:10px; }
    .rc-info                 { padding:0 16px 16px; }
    .rc-info h3              { font-size:16px; transform:translateY(0) !important; }
    .rc-info span            { font-size:12px; transform:translateY(0) !important; }
    .rc-play                 { width:50px; height:50px; }
    .rc-overlay              { opacity:1 !important; background:linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%) !important; }
}
@media (max-width:640px) {
    .rc-grid--2,.rc-grid--3,.rc-grid--4 { grid-template-columns:1fr; }
    .rc-featured             { grid-template-columns:1fr; }
    .rc-featured__grid       { grid-template-columns:1fr 1fr; }
    .rc-hero-grid-grid       { grid-template-columns:1fr; }
    .ra-team-grid            { grid-template-columns:1fr; }
    .ra-services-grid        { grid-template-columns:1fr; }
    .rc-lb-inner             { width:96vw; padding-top:48px; }
    .rc-lb-close             { top:16px; right:18px; font-size:30px; }
    .ra-headline             { font-size:38px; }
    
    /* Works - full width beautiful cards */
    .rc-grid                 { gap:12px; }
    .rc-item                 { height:60vw; border-radius:12px; }
    .rc-info                 { padding:0 14px 14px; }
    .rc-info h3              { font-size:15px; font-weight:700; transform:translateY(0) !important; }
    .rc-info span            { font-size:11px; color:#f2672e; transform:translateY(0) !important; }
    .rc-play                 { width:46px; height:46px; }
    .rc-overlay              { opacity:1 !important; background:linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 45%) !important; }
}

/* ============================================================
   RUSTY VIMEO GRID HARD-CROP FIX v1.0.4
   Vimeo iframes ignore object-fit. This forces the player itself
   to be much larger than the grid tile and clips it inside the cell.
   Lightbox is excluded, so opened videos remain normal.
   ============================================================ */
.rc-media iframe[src*="vimeo.com"],
.rc-hg-item iframe[src*="vimeo.com"],
.rc-vbg.rc-vimeo-cover {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 320% !important;
    height: 320% !important;
    min-width: 320% !important;
    min-height: 320% !important;
    max-width: none !important;
    max-height: none !important;
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
    object-fit: cover !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2 !important;
    pointer-events: none !important;
    background: #000 !important;
}

.rc-media,
.rc-hg-item {
    overflow: hidden !important;
    isolation: isolate !important;
    background: #000 !important;
}

.rc-media > img.rc-thumb,
.rc-hg-item > img,
.rc-hg-item img.rc-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    max-width: none !important;
    max-height: none !important;
}

/* Do not crop the lightbox player */
.rc-lb-vwrap iframe,
#rc-lb-iframe {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    transform: none !important;
}

/* ════════════════════════════════════════════════════════════
   Z-INDEX FIXES - Prevent Salient elements from overlapping lightbox
════════════════════════════════════════════════════════════ */
/* Force Salient header/logo/sticky elements to stay below lightbox */
#header-outer,
#header-space,
.nectar-sticky-media-section,
.nectar-sticky-media-section__content,
#header-outer #top nav,
#header-outer .container,
body #header-outer[data-permanent-transparent="false"],
body #header-outer[data-transparent-header="true"] {
    z-index: 1000 !important;
}

/* Hide Salient header completely when lightbox is active */
body:has(.rc-lightbox.active) #header-outer {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}

/* Ensure lightbox stays on top of everything */
.rc-lb-bg { z-index: 999998 !important; }
.rc-lightbox { z-index: 999999 !important; }

/* Force body to hide overflow when lightbox active (prevent scrolling behind) */
body:has(.rc-lightbox.active) {
    overflow: hidden !important;
}

