/* user/themes/oxygen/css/custom.css */

/* =========================================
   1. VARIABLES
   ========================================= */
:root {
    /* Colors */
    --color-bg-body: #252525;
    /* Main background */
    --color-bg-project: #252525;
    /* Project page background */
    --color-bg-header: #202020;
    /* Header background */
    --color-bg-media: #1a1a1a;
    /* Media wrapper background */
    --color-bg-overlay: rgba(0, 0, 0, 0.9);
    --color-bg-lightbox: rgba(0, 0, 0, 0.3);

    --color-text-primary: #fff;
    --color-text-secondary: #ccc;

    --color-border: #333;
    --color-border-dotted: #999;

    /* Layout */
    --container-width: 95%;
    --container-max-width: 2000px;

    /* Spacing */
    --spacing-gap: 20px;
}

/* =========================================
   2. FONTS
   ========================================= */
@font-face {
    font-family: 'Genos';
    src: url('../fonts/genos/Genos-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

.brand-title {
    font-family: 'Genos', sans-serif;
    font-weight: 300;
    font-size: 4rem;
    letter-spacing: 10px;
    margin-bottom: 0;
    line-height: 1;
}

/* =========================================
   3. GLOBAL STYLES
   ========================================= */
body {
    background-color: var(--color-bg-body);
    color: var(--color-text-secondary);
}

.wrapper.style4 {
    background-color: var(--color-bg-body);
    color: var(--color-text-secondary);
}

.wrapper.style4 h1,
.wrapper.style4 h2,
.wrapper.style4 h3 {
    color: var(--color-text-secondary);
}

.wrapper.style4 a {
    color: var(--color-text-primary);
    border-bottom: 2px dotted var(--color-border-dotted);
}

.wrapper.style4 a:hover {
    border-bottom: none;
    color: #aaa;
}

.site-footer-tray {
    background-color: var(--color-bg-body);
    color: var(--color-text-secondary);
    padding: 3rem 0;
    text-align: center !important;
}

.site-footer-tray .container {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* Changed from center to allow children like button-divs to be full width */
}

.site-footer-tray hr {
    border: 0;
    border-bottom: 1px solid #505050;
    opacity: 1.0;
    width: 100%;
    margin: 0.25rem 0;
}

.ft-base-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 2rem;
}

.ft-links-col {
    flex: 1;
    text-align: left;
}

.ft-icons-col {
    flex: 1;
    text-align: right;
}

ul.ft-icons {
    display: flex;
    justify-content: center;
    cursor: default;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

ul.ft-icons li {
    display: flex;
    align-items: center;
    line-height: 1em;
    padding: 0.5em 1em;
}

ul.ft-icons li span {
    display: none;
}

ul.ft-icons li a {
    color: inherit;
    font-size: 2em;
    opacity: 0.35;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
    border: none !important;
    /* Remove bottom border if any */
}

ul.ft-icons li a:hover {
    color: inherit;
    opacity: 1;
}

.ft-base-row .ft-links {
    margin-bottom: 0;
}

/* Restoring ft-links (socials-links) appearance */
.ft-links {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none !important;
    padding: 1em 0 !important;
    margin: 0 auto !important;
    width: 100%;
    color: inherit;
    opacity: 0.6;
}

.ft-links p {
    margin: 0;
    width: 100%;
    text-align: center;
}

.ft-links a {
    color: inherit;
    text-decoration: none;
    border: none !important;
}

.ft-links li {
    display: flex !important;
    align-items: center;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ft-links li+li::before {
    content: "|";
    margin: 0 0.5em;
}

/* Specific alignment when inside the bottom row columns */
.ft-links-col .ft-links {
    justify-content: flex-start;
}

.ft-icons-col .ft-icons {
    justify-content: flex-end;
}

@media (max-width: 768px) {

    .ft-links-col .ft-links,
    .ft-icons-col .ft-icons {
        justify-content: center;
    }
}

.ft-base-row .ft-icons {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .ft-base-row {
        flex-direction: column;
        gap: 1rem;
    }

    .ft-links-col,
    .ft-icons-col {
        text-align: center;
    }

    ul.ft-icons li a {
        font-size: 1.6em;
    }
}

/* =========================================
   4. PROJECT PAGE STYLES
   ========================================= */
.project-container {
    background-color: var(--color-bg-project);
    color: var(--color-text-primary);
    min-height: 100vh;
    padding-bottom: 50px;
    overflow-x: hidden;
}

/* Unification: 95% Width Containers */
.work-gallery,
.project-video-header,
.project-content-wrapper {
    width: var(--container-width);
    max-width: var(--container-max-width);
    margin: 0 auto;
    box-sizing: border-box;
}

.work-gallery {
    background-color: var(--color-bg-body);
    color: #000;
    padding: 0;
}

.project-video-header {
    margin-top: 40px;
    margin-bottom: 40px;
}

.project-content-wrapper {
    padding: 0;
}

/* Project Text */
.project-header h1 {
    font-size: 3rem;
    margin-top: 30px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
    line-height: 1.1;
    color: var(--color-text-primary);
}

.project-body {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.project-body a {
    text-decoration: none;
    border: none;
}

/* Back Link */
.back-link {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.back-link a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   5. MEDIA COMPONENTS
   ========================================= */

/* Video Responsive */
.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    background: #111;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Media Wrapper (for work items) */
.media-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: var(--color-bg-media);
}

.media-wrapper img,
.media-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.75s ease;
}

.media-wrapper video {
    opacity: 0;
    z-index: 1;
}

.work-item:hover video {
    opacity: 1;
}

/* =========================================
   6. GALLERIES & GRIDS
   ========================================= */

/* Shared Grid Styles */
.work-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-gap);
    width: 100%;
}

.gallery-grid {
    margin-top: 30px;
}

/* Work Item */
.work-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    margin: 0;
    width: 100%;
    border-radius: 4px;
}

/* Gallery Item (Project Page) */
.gallery-grid a {
    display: block;
    width: 100%;
    text-decoration: none;
    border: none;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    cursor: zoom-in;
    transition: opacity 0.5s ease;
}

.gallery-grid img:hover {
    opacity: 0.7;
}

/* Work Info Overlay */
.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to top, var(--color-bg-overlay), transparent);
    padding: 40px 30px 30px 30px;
}

.work-info h3 {
    margin: 0;
    font-size: 1.2vw;
    color: var(--color-text-primary);
    text-shadow: 2px 2px 5px #000;
    letter-spacing: 2px;
    line-height: 1;
}

/* =========================================
   7. LIGHTBOX
   ========================================= */
#simple-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-lightbox);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: zoom-out;
}

#simple-lightbox.active {
    opacity: 1;
    visibility: visible;
}

#simple-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#simple-lightbox.active img {
    transform: scale(1);
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {

    .work-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .project-video-header,
    .project-content-wrapper {
        width: 100%;
        padding: 0 20px;
    }

    .work-info h3 {
        font-size: 1.5rem;
    }
}

/* =========================================
   9. WORK INFO ROW (Client/Year display)
   ========================================= */
.work-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 25%;
    padding-right: 25%;
}
.work-info-row h3 {
    margin: 0;
    font-size: 1.5rem;
}
@media (max-width: 768px) {
    .work-info-row {
        display: block;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }
    .work-info-row h3 {
        font-size: 1rem;
    }
}

/* =========================================
   10. Header
   ========================================= */

#header {
    background-color: var(--color-bg-header);
    color: #757575;
    height: 3em;
    width: 100%;
}

#header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    /* Ensure proper stacking context if needed */
}

/* Fix Navigation Vertical Alignment */
#nav {
    position: relative;
    /* Reset absolute positioning from main.css */
    top: auto;
    right: auto;
    height: 100%;
    display: flex;
    align-items: center;
}

#nav>ul {
    height: 100%;
    display: flex;
    align-items: center;
}

#nav>ul>li {
    padding: 0 1rem;
    /* Adjust horizontal padding, remove top/bottom */
    height: 100%;
    display: flex;
    align-items: center;
}

#nav>ul>li a {
    display: inline-block;
    /* Ensure link behaves correctly */
    font-family: 'Genos', sans-serif;
    text-transform: uppercase;
    font-size: 1.4em;
    font-weight: 300;
    letter-spacing: 4px;
}

/* Header for mobile */
#titleBar {
    background-color: var(--color-bg-header);
    height: 44px;
    line-height: normal;
}

#titleBar .title {
    font-family: 'Genos', sans-serif;
    font-weight: 300;
    letter-spacing: -4px;
    margin-bottom: 0;
    line-height: normal;
    color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5em;
    position: relative;
    text-align: center;
    text-transform: uppercase;
    z-index: 1;
}

/* =========================================
   10. Logo
   ========================================= */

/* Logo */
#logo {
    font-family: inherit;
    font-weight: normal;
    border: 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
    position: absolute;
    /*
    left: 50%;
    transform: translateX(-50%);
    */
    left: 0;
    transform: none;
    top: 0;
}

#logo img {
    height: 35%;
    width: auto;
    transition: opacity 0.4s ease;
}

/*
#logo:hover img {
    opacity: 0.8;
}
*/

#titleBar .title img {
    height: 35%;
    width: auto;
    fill: currentColor;
    display: block;
}

/* Gradient Logo Effect */
.gradient-logo,
#titleBar .title {
    /* Define your gradient here */
    /*
    background: linear-gradient(0deg, #ffbe0b, #fb5607, #ff006e, #8338ec, #3a86ff);
    */
    /*
    background: linear-gradient(0deg, hsl(0, 0%, 20%), hsl(0, 0%, 40%), hsl(0, 0%, 65%), hsl(0, 0%, 50%), hsl(0, 0%, 40%));
    */
    background: linear-gradient(340deg, hsl(0, 0%, 20%), hsl(0, 0%, 60%));

    /* Apply mask using the same logo image */
    -webkit-mask-image: url('../images/logo2.svg');
    mask-image: url('../images/logo2.svg');

    -webkit-mask-size: auto 35%;
    mask-size: auto 35%;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    /* Ensure gradient matches the mask size */
    background-size: 100% 35%;
    background-repeat: no-repeat;
    background-position: center;
}

.gradient-logo img,
#titleBar .title img {
    /* Hide the original image content so the background gradient shows through the mask */
    opacity: 0;
}

/* =========================================
   11. Banner Module
   ========================================= */

/* Banner Module */
.banner-module {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    /* Remove potential extra space below video */
    padding-top: 0.0em;
    padding-bottom: 0.5em;
}

.banner-module video {
    width: 95%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    height: auto;
    display: block;
    pointer-events: none;
    /* Disable interactions */
    object-fit: cover;
    filter: brightness(1.0);
}

/* =========================================
   12. SCROLL TO TOP BUTTON
   ========================================= */
/* left position start */
/*
#scroll-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 88px;
    height: 88px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(128, 128, 128, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
*/
/* left position end */

/* center position start */

#scroll-to-top {
    position: fixed;
    bottom: 24px;
    left: 50%;
    width: 200px;
    height: 50px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(64, 64, 64, 0.0);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* center position end */

/* Transition включается только после .ready — JS добавляет его
   уже после первого рендера, чтобы не было дёрганья при загрузке */
#scroll-to-top.ready {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
        background 0.25s ease, border-color 0.25s ease;
}

#scroll-to-top:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.9);
}

#scroll-to-top svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.75);
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.25s ease;
    pointer-events: none;
}

#scroll-to-top:hover svg {
    stroke: #000000;
}

/* left position start */
/*
@media (max-width: 768px) {
    #scroll-to-top {
        bottom: 36px;
        left: 18px;
        width: 120px;
        height: 60px;
    }
}
*/
/* left position end */

/* center position start */

@media (max-width: 768px) {
    #scroll-to-top {
        bottom: 36px;
        left: 50%;
        width: 150px;
        height: 50px;
    }
}

/* center position end */