/* Общие стили для страниц проектов */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    font-weight: 400;
}

/* Hero секция с видео-фоном */
.hero {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    min-height: 100%;
    min-width: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.logo-link {
    display: inline-block;
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
}

.logo {
    height: 20px;
    width: auto;
    display: inline-block;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.hero-text {
    color: #ffffff;
    margin-top: auto;
    margin-bottom: 44px;
    text-align: center;
}

.hero-title {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 8px;
}

.hero-description {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    margin: 0 auto;
}

/* Блок с информацией и планами */
.info-section {
    max-width: 1200px;
    width: fit-content;
    margin: 0 auto;
    padding: 15px 40px;
}

.info-text {
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    color: #333333;
    margin: 15px 0;
    padding: 0 40px;
}

.info-image {
    text-align: center;
    margin: 0;
}

.info-image img {
    max-height: 500px;
    width: auto;
    max-width: 100%;
    display: inline-block;
    cursor: default;
    pointer-events: none;
}

/* Черный блок с концепцией */
.concept-section {
    background-color: #000000;
    color: #ffffff;
    padding: 15px 0 0 0;
}

.concept-text {
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    color: #ffffff;
    margin: 15px 0;
    padding: 0 40px;
}

.concept-image {
    width: 100%;
    margin: 0;
}

.concept-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: default;
    pointer-events: none;
}

/* Светло-коричневый блок */
.beige-section {
    background-color: #ac977a;
    color: #ffffff;
    padding: 15px 0 0 0;
}

.beige-text {
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    color: #ffffff;
    margin: 15px 0;
    padding: 0 40px;
}

.beige-image {
    width: 100%;
    margin: 0;
}

.beige-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: default;
    pointer-events: none;
}

/* Коричневый блок с текстом и изображением */
.brown-section {
    background-color: #5a3a19;
    color: #ffffff;
    padding: 15px 0 0 0;
}

.brown-text {
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    color: #ffffff;
    margin: 15px 0;
    padding: 0 40px;
}

.brown-image {
    width: 100%;
    margin-bottom: 0;
}

.brown-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: default;
    pointer-events: none;
}

/* Зеленый блок с текстом и изображением */
.green-section {
    background-color: #1d341f;
    color: #ffffff;
    padding: 15px 0 0 0;
}

.green-text {
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    color: #ffffff;
    margin: 15px 0;
    padding: 0 40px;
}

.green-image {
    width: 100%;
    margin-bottom: 0;
}

.green-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: default;
    pointer-events: none;
}

/* Белый блок с растягивающимся изображением */
.white-section {
    background-color: #ffffff;
    color: #333333;
    padding: 15px 0;
}

.white-text {
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    color: #333333;
    margin: 15px 0;
    padding: 0 40px;
}

.white-image {
    width: 100%;
    margin-bottom: 0;
}

.white-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: default;
    pointer-events: none;
}

/* Белый блок с фоновым изображением */
.white-bg-section {
    background-color: #ffffff;
    color: #333333;
    padding: 15px 0;
}

.white-bg-text {
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    color: #333333;
    margin: 15px 0;
    padding: 0 40px;
}

.white-bg-image {
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.white-bg-image img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* Белый блок с видео */
.white-video-section {
    background-color: #ffffff;
    color: #333333;
    padding: 15px 0;
}

.white-video-text {
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    color: #333333;
    margin: 15px 0;
    padding: 0 40px;
}

.white-video-text a {
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.2s;
}

.white-video-text a:hover {
    color: #004499;
}

.white-video-container {
    width: 100%;
    margin: 0;
    line-height: 0;
}

.white-video-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* Слайдер старых фото */
.slider-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 40px;
    text-align: center;
}

.slider-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-image {
    max-height: 500px;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-counter {
    margin-top: 15px;
    font-size: 14px;
    color: #666666;
}

/* Блок с текстом на изображении */
.image-text-block {
    position: relative;
    width: 100%;
    margin: 0;
}

.image-text-block img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s;
}

.image-text-block img:hover {
    opacity: 0.95;
}

.image-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 40px;
    color: #ffffff;
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.6);
    padding-top: calc(40px + 1.5em);
    padding-bottom: calc(40px + 1.5em);
}

/* Галерея проекта */
.gallery-section {
    background-color: #ffffff;
    padding: 0;
}

/* Видео после галереи */
.video-after-gallery {
    background-color: #ffffff;
    padding: 10px 0;
}

.video-after-gallery .white-video-container {
    padding: 0 10px;
}

.gallery-title {
    text-align: center;
    font-size: 24px;
    font-weight: 400;
    margin: 15px 0 40px 0;
    padding: 0 40px;
    color: #000000;
}

/* Умная плитка галереи */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.gallery-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    height: 250px;
}

.gallery-row:last-child {
    margin-bottom: 0;
}

.gallery-item {
    position: relative;
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s;
}

.gallery-item img:hover {
    opacity: 0.95;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: #ffffff;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: #ffffff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Футер */
.footer {
    background-color: #f5f5f5;
    padding: 60px 40px;
    text-align: center;
    margin-top: 0;
}

.footer a {
    display: inline-block;
    margin-bottom: 20px;
    transition: opacity 0.3s;
}

.footer a:hover {
    opacity: 0.8;
}

.footer-logo {
    width: 150px;
    height: auto;
    display: block;
}

.footer-info {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-email {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-email:hover {
    color: #004499;
}

.footer-social {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.footer-social a {
    display: block;
    transition: opacity 0.3s;
}

.footer-social a:hover {
    opacity: 0.8;
}

.footer-social img {
    width: 50px;
    height: 50px;
    display: block;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero {
        height: 240px;
    }

    .hero-content {
        padding: 15px 20px;
    }

    .logo {
        height: 15px;
    }

    .hero-title {
        font-size: 16px;
        font-weight: 400;
        margin-bottom: 8px;
    }

    .hero-description {
        font-size: 13px;
        line-height: 1.4;
    }

    .hero-text {
        margin-bottom: 20px;
    }

    .info-section {
        padding: 10px 20px;
    }

    .info-text {
        font-size: 14px;
        margin: 10px 0;
        padding: 0 20px;
    }

    .info-image {
        margin: 0;
    }

    .concept-section {
        padding: 10px 0 0 0;
    }

    .concept-text {
        font-size: 14px;
        margin: 10px 0;
        padding: 0 20px;
    }

    .concept-image {
        margin: 0;
    }

    .beige-section {
        padding: 10px 0 0 0;
    }

    .beige-text {
        font-size: 14px;
        margin: 10px 0;
        padding: 0 20px;
    }

    .brown-section {
        padding: 10px 0 0 0;
    }

    .brown-text {
        font-size: 14px;
        margin: 10px 0;
        padding: 0 20px;
    }

    .green-section {
        padding: 10px 0 0 0;
    }

    .green-text {
        font-size: 14px;
        margin: 10px 0;
        padding: 0 20px;
    }

    .white-section {
        padding: 10px 0;
    }

    .white-text {
        font-size: 14px;
        margin: 10px 0;
        padding: 0 20px;
    }

    .white-bg-section {
        padding: 10px 0;
    }

    .white-bg-text {
        font-size: 14px;
        margin: 10px 0;
        padding: 0 20px;
    }

    .white-video-section {
        padding: 10px 0;
    }

    .white-video-text {
        font-size: 14px;
        margin: 10px 0;
        padding: 0 20px;
    }

    .slider-section {
        padding: 10px 20px;
    }

    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .slider-prev {
        left: 10px;
    }

    .slider-next {
        right: 10px;
    }

    .gallery-section {
        padding: 0;
    }

    .gallery-title {
        font-size: 18px;
        margin: 10px 0 30px 0;
        padding: 0 20px;
    }

    .content {
        padding: 0 5px;
    }

    .gallery-row {
        gap: 5px;
        margin-bottom: 5px;
        height: 150px;
    }

    .video-after-gallery {
        padding: 5px 0;
    }

    .video-after-gallery .white-video-container {
        padding: 0 5px;
    }

    .image-text-overlay {
        padding: 20px;
        font-size: 14px;
        background-color: rgba(0, 0, 0, 0.6);
        padding-top: calc(20px + 1.5em);
        padding-bottom: calc(20px + 1.5em);
    }

    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }

    .modal-close {
        font-size: 30px;
        right: 20px;
        top: 10px;
    }

    .footer {
        padding: 40px 20px;
    }

    .footer-logo {
        width: 100px;
        height: auto;
    }

    .footer-info {
        font-size: 16px;
        margin: 15px 0;
    }

    .footer-social {
        gap: 10px;
        flex-wrap: wrap;
    }

    .footer-social img {
        width: 40px;
        height: 40px;
    }
}
