/* ===== PROJECTS PAGE STYLES ===== */

/* ==========================================================================
   TRANSPARENT HEADER & NAVIGATION (СКОПИРОВАНО С ЭБАУТ)
   ========================================================================== */

/* 1. Делаем шапку прозрачной и накладываем поверх фото */
.site-header--transparent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent !important;
    z-index: 100;
}

/* 2. Светлые (белые) пункты меню */
.nav-menu--light a {
    color: rgba(255, 255, 255, 0.7) !important;
}

.nav-menu--light a:hover,
.nav-menu--light a.active {
    color: var(--color-white) !important;
    border-bottom-color: var(--color-white) !important;
}

/* 3. Переключатель языков: темный текст в белом кружочке */
.lang-switch--light .lang-switch-current {
    background: #ffffff !important;
    color: #444444 !important;

    /* Дополнительная подстраховка для идеальной формы круга */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    width: 32px; /* подстройте размеры, если в оригинале они другие */
    height: 32px;
}

/* Белая стрелочка выбора языка */
.lang-switch--light .lang-switch-toggle {
    color: #ffffff !important; /* Красит SVG-стрелку, так как у нее fill="currentColor" */
}
.lang-switch--light .lang-switch-arrow {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* 4. Кнопка Let's Talk: белая с подчеркиванием */
.btn-text-white {
    background: transparent !important;
    color: #ffffff !important;
    padding: 0;
    border: none;
    border-radius: 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8) !important;
    font-weight: 400;
    transition: 0.3s;
}

.btn-text-white:hover {
    color: #ffffff !important;
    border-bottom-color: #ffffff !important;
}

/* 5. Иконка мобильного меню (гамбургер) — делаем белой, чтобы не терялась на фото */
.site-header--transparent .hamburger span {
    background-color: #ffffff !important;
}


/* ----- HERO WITH BACKGROUND PHOTO ----- */
.projects-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 80vh;
}
.projects-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.projects-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}
.projects-hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: var(--section-padding-x);
    padding-top: 100px;
    padding-bottom: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}
.projects-hero-plate {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: auto;
    padding: 48px;
    background: rgba(20, 20, 20, 0.42);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: none;
    border-radius: 0;
    color: white;
    margin-left: 0;
}
.projects-hero-plate h1 {
    color: var(--color-white);
    margin-bottom: 1rem;
    font-size: 2rem;
}
.projects-hero-plate p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* ----- SECTION SPACING ----- */
.projects-section {
    padding: 80px 0 0;
    background: var(--color-white);
}

/* ----- GRID (1/3 title + 2/3 text) ----- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 40px;
}
.projects-grid-left h3 {
    font-size: 2.2rem;
    line-height: 1.2;
}
.projects-grid-right h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-dark);
}
.projects-grid-right p {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ----- COLLAGE SYSTEM ----- */
.projects-collage {
    width: 100%;
    padding: 0 var(--section-padding-x);
    margin: 0;
    line-height: 0;
}
.collage-row {
    display: flex;
    width: 100%;
    gap: 0;
}
.collage-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.collage-row img:hover {
    opacity: 0.85;
}

/* Row: 3 equal columns */
.collage-row--3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.collage-row--3 img {
    aspect-ratio: 3/2;
}

/* Row: 3 tall columns */
.collage-row--3-tall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.collage-row--3-tall img {
    aspect-ratio: 2/3;
}

/* Row: 4 equal columns */
.collage-row--4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.collage-row--4 img {
    aspect-ratio: 1/1;
}

/* Row: 1/3 + 2/3 (stack left, tall right) */
.collage-row--1-2-1 {
    display: grid;
    grid-template-columns: 1fr 2fr;
}
.collage-cell--stack {
    display: grid;
    grid-template-rows: 1fr 1fr;
}
.collage-cell--stack img {
    aspect-ratio: 3/2;
}
.collage-cell--tall img {
    aspect-ratio: 3/2;
    height: 100%;
}

/* Row: 2/3 + 1/3 (wide left, stack right) */
.collage-row--2-1-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
}
.collage-cell--wide img {
    aspect-ratio: 3/2;
    height: 100%;
}

/* Row: 1/2 + 1/2 (half + 2x2 grid) */
.collage-row--1-2-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.collage-cell--half > img {
    aspect-ratio: 1/1;
    height: 100%;
}
.collage-cell--grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.collage-cell--grid-2x2 img {
    aspect-ratio: 1/1;
}

/* Row: 1/3 stack-3 + 2/3 tall-3 */
.collage-row--1-3-1 {
    display: grid;
    grid-template-columns: 1fr 2fr;
}
.collage-cell--stack-3 {
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
}
.collage-cell--stack-3 img {
    aspect-ratio: 3/2;
}
.collage-cell--tall-3 img {
    aspect-ratio: 3/4;
    height: 100%;
}

/* ----- LIGHTBOX ----- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    padding: 10px;
    transition: opacity 0.3s ease;
}
.lightbox-close:hover {
    opacity: 0.7;
}
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--color-white);
    font-size: 3rem;
    cursor: pointer;
    z-index: 10001;
    width: 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    border-radius: 4px;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}
.lightbox-prev {
    left: 20px;
}
.lightbox-next {
    right: 20px;
}
.lightbox-image-wrapper {
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-family: var(--font-body);
    z-index: 10001;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .projects-grid {
        gap: 40px;
    }
    .projects-collage {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .projects-hero {
        min-height: 400px;
    }
    .projects-hero-plate {
        width: 100%;
        max-width: 100%;
    }
    .projects-section {
        padding: 50px 0 0;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .projects-grid-left h3 {
        font-size: 1.8rem;
    }
    .projects-grid-left h3 br {
        display: none;
    }
    .projects-collage {
        padding: 0 10px;
    }
    .collage-row--1-2-1,
    .collage-row--2-1-1,
    .collage-row--1-2-2,
    .collage-row--1-3-1 {
        grid-template-columns: 1fr;
    }
    .collage-row--3-tall {
        grid-template-columns: repeat(2, 1fr);
    }
    .collage-cell--grid-2x2 {
        grid-template-columns: 1fr 1fr;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 60px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .projects-hero-plate {
        padding: 24px;
    }
    .projects-section {
        padding: 40px 0 0;
    }
    .projects-collage {
        padding: 0 8px;
    }
    .collage-row--3,
    .collage-row--4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .collage-row--3-tall {
        grid-template-columns: 1fr 1fr;
    }
    .lightbox-prev {
        left: 8px;
    }
    .lightbox-next {
        right: 8px;
    }
}
