/* Контейнер страницы */
.projects-container {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 40px;
}

.projects-header {
    margin-bottom: 100px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 30px;
}

.projects-title {
    font-size: 48px;
    letter-spacing: 8px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #fff;
}

.projects-subtitle {
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

/* Сетка проектов */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 40px;
}

.project-item {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-10px);
}

.project-number {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Изображение с эффектом */
.project-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    margin-bottom: 30px;
    background: #000;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.6s ease;
}

.project-item:hover .project-image img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Контент карточки */
.project-name {
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.project-desc {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Технологии */
.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tech-badge {
    font-size: 10px;
    letter-spacing: 1px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

/* Кнопка */
.project-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 2px;
    color: #fff;
    font-weight: bold;
    transition: gap 0.3s ease;
}

.project-button i {
    font-size: 16px;
}

.project-button:hover {
    gap: 15px;
    color: #fff;
}

/* Адаптивность */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    position: relative;
    overflow-y: auto;
    padding: 50px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.modal-image-side img {
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
}

.project-actions-row {
    display: flex;
    gap: 20px;
    margin-top: auto;
}

.region-lock {
    font-size: 11px;
    color: #ff4444;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255, 68, 68, 0.1);
    padding: 8px;
    border-left: 2px solid #ff4444;
}

.project-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none;
}

/* Кнопка деталей */
.project-button.btn-details {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    color: #fff;
    transition: all 0.3s ease;
}

.project-button.btn-details:hover {
    background: #fff;
    color: #000;
}

/* Фикс картинок */
.project-item.locked .project-image img {
    filter: grayscale(1) blur(5px);
    opacity: 0.3;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Фикс для кнопки DETAILS */
.btn-details {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: white !important;
    padding: 8px 16px !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
}

.btn-details:hover {
    background: white !important;
    color: black !important;
}

/* Стили модалки (если их еще нет) */
/* Обновленная модалка */
.modal-overlay {
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(25px);
}

.modal-content {
    background: transparent;
    border: none;
    max-width: 1600px;
    height: 90vh;
    padding: 0;
}

.modal-grid {
    grid-template-columns: 1.1fr 0.9fr;
    height: 100%;
    gap: 0;
}

/* Картинка слева */
.modal-image-side {
    height: 100%;
    padding: 40px;
}

.image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #111;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

/* Текст справа */
.modal-info-side {
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0a0a0a;
}

.modal-label {
    font-size: 10px;
    letter-spacing: 5px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 20px;
}

#modalTitle {
    font-size: clamp(40px, 6vw, 80px) !important;
    line-height: 0.9 !important;
    letter-spacing: -2px !important;
    margin-bottom: 50px !important;
    font-weight: 700;
}

.info-section {
    margin-bottom: 40px;
}

.info-section label {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.info-section p {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255,255,255,0.7);
}

/* Кнопка действия */
.btn-live-action {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 20px 40px;
    background: #fff;
    color: #000;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 20px;
    transition: 0.4s;
}

.btn-live-action:hover {
    background: #ccc;
    transform: translateY(-5px);
}

.close-modal {
    top: 40px;
    right: 40px;
    z-index: 100;
    opacity: 0.5;
    transition: 0.3s;
}

.close-modal:hover {
    opacity: 1;
    transform: rotate(90deg);
}
/* Секция заголовка */
.projects-header {
    margin-bottom: 80px;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
    animation: fadeInSlide 1s ease forwards;
}

.projects-title {
    font-size: clamp(32px, 6vw, 64px); /* Адаптивный размер */
    font-weight: 800;
    letter-spacing: 12px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.1;
    position: relative;
}

/* Эффект свечения для заголовка */
.projects-title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    filter: blur(15px);
    opacity: 0.3;
    color: #fff;
}

.projects-subtitle {
    font-size: 14px;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    line-height: 1.8;
    max-width: 600px;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.projects-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 120px 40px 100px 40px; /* 120px сверху дает место под фиксированный хедер */
}

.image-wrapper {
    background: linear-gradient(45deg, #111, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Шапка карточки со статусом */
.project-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Стили статус-тега */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 2px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: block;
}

.status-text {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Цвета индикаторов */
.status-green .status-dot { background: #00ff88; box-shadow: 0 0 8px #00ff88; }
.status-orange .status-dot { background: #ffaa00; box-shadow: 0 0 8px #ffaa00; }
.status-red .status-dot { background: #ff4444; box-shadow: 0 0 8px #ff4444; }

/* ФИКС МОДАЛКИ: Картинка и прокрутка */
.modal-content {
    display: flex;
    overflow: hidden !important; /* Отключаем общую прокрутку */
    align-items: stretch;
    background: #080808;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
}

.modal-image-side {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 90%;
    max-height: 85vh; /* Ограничиваем высоту картинки по экрану */
    object-fit: contain;
}

/* Исправленная правая часть модалки */
.modal-info-side {
    height: 100vh; /* Занимает всю высоту экрана */
    overflow-y: auto; /* Разрешаем скролл */
    background: #0a0a0a;
    display: block; /* Убираем flex, если он мешает прокрутке вверх */
    padding: 0; /* Обнуляем, чтобы настроить внутренний отступ */
    position: relative;
}

/* Внутренний контейнер для отступов, который и будет скроллиться */
.modal-info-scroll {
    padding: 100px 60px; /* Большой верхний отступ, чтобы текст не прилипал к верху */
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Чтобы скроллбар выглядел красиво в стиле студии */
.modal-info-side::-webkit-scrollbar {
    width: 4px;
}

.modal-info-side::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.modal-info-side::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Fix for the "smashed" status/client text */
/* Разделяем статус и клиента */
.modal-meta-row {
    display: flex;
    gap: 50px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Отступ между заголовком и значением */
}

.meta-item label {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.3);
}

#modalClient {
    font-size: 12px;
    color: #fff;
    letter-spacing: 1px;
}

/* Ensure the scrollable area starts from the very top */
.modal-info-scroll {
    padding: 60px 60px 100px 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ── LAUNCH PROJECT button ── */
.btn-live-action {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 20px 40px;
    background: #fff;
    color: #000 !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 20px;
    transition: 0.4s;
    width: auto !important;
    align-self: flex-start;
}

.btn-live-action:hover {
    background: #ccc;
    transform: translateY(-5px);
}

/* Restricted Projects */
.project-restricted {
  opacity: 0.6;
  position: relative;
}

.project-restricted::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0.1) 10px,
    transparent 10px,
    transparent 20px
  );
  pointer-events: none;
  z-index: 1;
}

.project-image.blurred img {
  filter: blur(8px);
  opacity: 0.5;
}

.btn-details.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-details.disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.05);
}

/* Status Indicator Improvements */
.status-indicator.status-red {
  background-color: #e74c3c;
  animation: pulseRed 2s infinite;
}

.status-indicator.status-orange {
  background-color: #f39c12;
  animation: pulseOrange 2s infinite;
}

@keyframes pulseRed {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
  }
  50% {
    box-shadow: 0 0 12px 6px rgba(231, 76, 60, 0.2);
  }
}

@keyframes pulseOrange {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4);
  }
  50% {
    box-shadow: 0 0 12px 6px rgba(243, 156, 18, 0.2);
  }
}

.restriction-info {
  background: rgba(231, 76, 60, 0.1);
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 2px solid #e74c3c;
  font-size: 12px;
  margin: 8px 0;
}

.restriction-info strong {
  color: #e74c3c;
  font-weight: 600;
}

.user-location {
  font-size: 12px;
  color: #888888;
  margin-top: 4px;
}
/* ── modal-info-scroll: не растягивать детей ── */
.modal-info-scroll {
  align-items: flex-start !important;
}