
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Quicksand', sans-serif;
    color: #fff;
    background-color: #00060f;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

li {
    line-height: 1.6;
    margin-bottom: 6px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



/* Секция проектов */
.projects-page {
    padding: 100px 0 100px;
}

/* Герой-секция для страницы проектов */
.projects-hero {
    height: 60vh;
    background-image: url('https://images.unsplash.com/photo-1497366754035-f200968a6e72?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2069&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 80px;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.7));
}

.projects-hero .container {
    position: relative;
    z-index: 1;
}

.projects-hero-title {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 3px;
    line-height: 1.2;
    color: #fff;
}

.projects-hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #fff;
    opacity: 0.9;
}

/* Адаптивность для герой-секции проектов */
@media (max-width: 768px) {
    .projects-hero {
        height: 50vh;
        margin-bottom: 60px;
    }
    
    .projects-hero-title {
        font-size: 36px;
    }
    
    .projects-hero-subtitle {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .projects-hero {
        height: 40vh;
        margin-bottom: 40px;
    }
    
    .projects-hero-title {
        font-size: 28px;
    }
    
    .projects-hero-subtitle {
        font-size: 14px;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    margin-bottom: 80px;
}

.project-card-large {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card-large:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.project-content {
    padding: 30px;
}

.project-category {
    color: #FF6B35;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 15px;
}

.project-link {
    color: #FF6B35;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.project-link:hover {
    gap: 12px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .nav-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .projects-page {
        padding: 120px 0 80px;
    }
    
    .projects-hero-title {
        font-size: 36px;
    }
    
    .project-content {
        padding: 25px;
    }
    
    .project-title {
        font-size: 22px;
    }
}



/* Стили для карточек проектов */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* Карточка проекта в стиле примера */
.project-card {
    background-color: transparent;
    overflow: hidden;
    cursor: pointer;
    border: 0;
    padding: 0;
    transition: transform 0.3s ease;
}


.project-card-inner {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* Соотношение 4:3 */
    border-radius: 10px;
    overflow: hidden;
}

.project-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    border-radius: 10px;
}

.project-card:hover .project-card-image {
    transform: scale(1.05);
}

.project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
    z-index: 1; /* Оверлей поверх изображения */
}

.project-card:hover .project-card-overlay {
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.3) 100%);
}

.project-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 25px;
    z-index: 2; /* Контент поверх оверлея и изображения */
    color: #fff;
}

.project-card-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
    font-family: 'Quicksand', sans-serif;
}

.project-card-category {
    color: #FF6B35;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.project-card-arrow {
    position: absolute;
    bottom: 25px;
    right: 25px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 3; /* Стрелка поверх всего */
}

.project-card:hover .project-card-arrow {
    opacity: 1;
    transform: translateX(0);
}


/* Улучшенные стили для модальных окон проектов на мобильных устройствах */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 10, 24, 0.9);
    backdrop-filter: blur(5px);
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.project-modal-content {
    position: relative;
    background-color: #00060f;
    margin: 0;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    overflow: auto;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
}

.project-modal-body {
    display: flex;
    flex-direction: column; /* текст сверху, галерея снизу */
    height: auto;           /* не ограничиваем высоту */
    overflow: visible;      /* разрешаем растягиваться */
}

.project-info {
    padding: 20px;
    max-height: none;       /* убираем ограничение */
    overflow: visible;      /* текст может быть любой длины */
}

.project-gallery {
    flex: 0 0 auto;         /* галерея занимает "свой размер" после текста */
    min-height: 50vh;       /* чтобы картинки были заметны */
    margin-top: 20px;
}


.gallery-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slider {
    background-color: #00060f;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-slide {
    background-color: #00060f;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;               /* или любое удобное значение */
    max-width: 600px;         /* по желанию, ограничение размера */
    aspect-ratio: 1 / 1;      /* квадрат */
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}


.gallery-slide.active {
    opacity: 1;
}

.gallery-image {
    width: 100%;
    aspect-ratio: 1 / 1;       /* квадрат */
    background-size: cover;     /* обрезка по центру */
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    border-radius: 10px;
}

.gallery-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.gallery-control:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-control svg {
    width: 24px;
    height: 24px;
}

/* Кнопка закрытия для мобильных */
.modal-close-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Адаптивность для модальных окон на мобильных устройствах */
@media (max-width: 768px) {
    .project-modal-content {
        padding-bottom: 80px !important;
    }
    
    .project-modal-body {
        flex-direction: column;
    }
    
    .project-info {
        padding: 15px;
        overflow-y: auto;
    }
    
    .project-gallery {
        height: 60vh;
        min-height: 60vh;
    }
    
    .project-info .project-category {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .project-features {
        margin-bottom: 20px;
    }
    
    .project-features li {
        margin-bottom: 15px;
        font-size: 14px;
        line-height: 1.5;
    }
    
    .project-features li strong {
        display: block;
        margin-bottom: 5px;
        font-size: 15px;
    }
    
    .gallery-control {
        width: 45px;
        height: 45px;
    }
    
    .gallery-control svg {
        width: 20px;
        height: 20px;
    }

    .gallery-image {
        border-radius: 10px;
    }

    .gallery-slide {
        padding-left: 10px;
        padding-right: 10px;
    }

    .gallery-slider {
        margin-bottom: 40px;
    }

    .gallery-slide img {
        max-height: calc(100vh - 120px) !important;
        object-fit: contain;
    }
    
    .modal-close-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .project-info {
        padding: 12px;
    }
    
    .project-gallery {
        height: 55vh;
        min-height: 55vh;
    }
    
    .project-info .project-category {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .project-features li {
        margin-bottom: 12px;
        font-size: 13px;
    }
    
    .project-features li strong {
        font-size: 14px;
    }
    
    .gallery-control {
        width: 40px;
        height: 40px;
    }
    
    .gallery-control svg {
        width: 18px;
        height: 18px;
    }
    
    .gallery-prev {
        left: 8px;
    }
    
    .gallery-next {
        right: 8px;
    }

    .gallery-image {
        border-radius: 10px;
    }
    
    .modal-close-btn {
        top: 8px;
        right: 8px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .project-info {
        padding: 10px;
    }
    
    .project-gallery {
        height: 50vh;
        min-height: 50vh;
    }
    
    .project-features li {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .project-features li strong {
        font-size: 13px;
    }
    
    .gallery-control {
        width: 35px;
        height: 35px;
    }
    
    .gallery-control svg {
        width: 16px;
        height: 16px;
    }

    .gallery-image {
        border-radius: 10px;
    }
}

/* Горизонтальная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .project-modal-body {
        flex-direction: row;
    }
    
    .project-info {
        flex: 1;
        padding: 15px;
    }
    
    .project-gallery {
        flex: 1;
        height: 100vh;
        min-height: auto;
    }
    
    .modal-close-btn {
        top: 10px;
        right: 10px;
    }
}

/* Для планшетов и десктопов */
@media (min-width: 769px) {
    .project-modal-content {
        margin: 2% auto;
        width: 90%;
        max-width: 1200px;
        max-height: 90vh;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        height: auto;
    }
    
    .project-modal-body {
        flex-direction: row;
        height: calc(90vh - 60px);
    }
    
    .project-info {
        flex: 1;
        padding-left: 15px;
        padding-right: 15px;
        overflow-y: auto;
    }
    
    .project-gallery {
        flex: 1;
        height: auto;
        min-height: auto;
    }
    
    .modal-close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        background: rgba(0, 0, 0, 0.5);
    }
}

/* Улучшения для жестов на мобильных устройствах */
.gallery-slider {
    -webkit-overflow-scrolling: touch;
}

.project-info {
    -webkit-overflow-scrolling: touch;
}

/* Предотвращение масштабирования при касании на мобильных */
@media (max-width: 768px) {
    .project-modal-content {
        touch-action: pan-y;
    }
}

/* Анимация открытия модального окна */
@keyframes modalOpen {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal[style*="display: block"] .project-modal-content {
    animation: modalOpen 0.3s ease-out;
}


/* Мобильное меню для страницы проектов */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    z-index: 1002;
    position: relative;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.mobile-menu-btn i {
    color: #e0e0e0;
    font-size: 18px;
    transition: color 0.3s ease;
}

.mobile-menu-btn.active {
    background-color: rgba(0, 0, 0, 0.9);
}

.mobile-menu-btn.active i {
    color: #fff;
    transform: rotate(90deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100svh;
    background-color: #00060f;
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    padding: 80px 30px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
}

.mobile-nav-menu {
    list-style: none;
    flex: 1;
}

.mobile-nav-menu li {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-menu li:last-child {
    border-bottom: none;
}

.mobile-nav-menu a {
    display: block;
    padding: 15px 0;
    color: #fff;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    border: none;
}

.mobile-nav-menu a:hover {
    color: #FF6B35;
}

.mobile-menu-contact {
    background-color: #FF6B35;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-align: center;
    margin-top: 10px;
    display: inline-block;
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.mobile-copyright {
    text-align: center;
    color: #c2c2c4;
    font-size: 14px;
}

/* Адаптивность для мобильного меню */
@media (max-width: 991px) {
    .nav, .header-buttons {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .header-container {
        position: relative;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 280px;
    }
    
    .mobile-menu-container {
        padding: 70px 20px 20px;
    }
    
    .mobile-nav-menu a {
        font-size: 16px;
        padding: 12px 0;
    }
    
    .mobile-menu-btn {
        width: 28px;
        height: 28px;
    }
    
    .mobile-menu-btn i {
        font-size: 16px;
    }
}

/* Улучшения для шапки на странице проектов */
.projects-page {
    padding: 100px 0 100px;
}

/* Адаптивность для шапки проектов */
@media (max-width: 768px) {
    .projects-page {
        padding: 120px 0 80px;
    }
}

/* Улучшения для мобильного меню */
.mobile-menu, .mobile-menu-overlay {
    transform: translateZ(0);
    backface-visibility: hidden;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Плавные переходы */
.mobile-nav-menu a,
.mobile-menu-contact,
.social-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Улучшения для иконки меню на разных устройствах */
@media (max-width: 768px) {
    .mobile-menu-btn {
        background-color: rgba(0, 0, 0, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu-btn i {
        color: #d0d0d0;
    }
}

/* Улучшение доступности */
.mobile-menu-btn:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

/* Плавная анимация иконки */
.mobile-menu-btn i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Стили для иконок соцсетей в шапке */
.header-social-links {
    display: flex;
    gap: 10px;
    margin-right: 15px;
}

.header-social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
}

.header-social-link:hover {
    background-color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Адаптивность для иконок в шапке */
@media (max-width: 768px) {
    .header-social-links {
        display: none; /* Скрываем на мобильных, так как они есть в мобильном меню */
    }
}