/* Минимальные глобальные стили */
:root {
  --primary: #03a045;
  --primary-dark: #028a3c;
  --accent: #00b4d8;
  --dark: #0c0c0c;
  --dark-light: #1a1a2e;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--dark);
  color: var(--text);
}

main {
  flex: 1;
}

/* Хлебные крошки */
.breadcrumb-container {
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb {
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  background-color: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  padding: 0 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item.active {
  color: var(--text);
}

/* Футер - переписываем под темную тему */
.footer {
  background-color: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Убираем все конфликтующие стили для нового дизайна */


/* Адаптивная визуальная часть 12.11.2025 ----------------------------------------*/
.hero-visual {
    position: relative;
    width: 100%;
    height: clamp(300px, 50vh, 500px);
    min-height: 300px;
}

.main-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 100%;
    max-width: min(400px, 90vw);
    display: flex;
    justify-content: center;
}

.visual-card {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    aspect-ratio: 3/4;
}

.visual-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 1;
    transition: all 0.3s ease;
}

.visual-card:hover .card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

.tech-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(3, 160, 69, 0.95);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.visual-card:hover .tech-badge {
    transform: translateY(-5px);
    background: rgba(3, 160, 69, 1);
    box-shadow: 0 10px 20px rgba(3, 160, 69, 0.3);
}

/* Адаптивность для разных размеров экранов */
@media (max-width: 1200px) {
    .hero-visual {
        height: clamp(280px, 45vh, 450px);
    }

    .main-visual {
        max-width: min(350px, 85vw);
    }
}

@media (max-width: 992px) {
    .hero-visual {
        height: clamp(250px, 40vh, 400px);
        margin-top: 2rem;
    }

    .main-visual {
        max-width: min(300px, 80vw);
    }

    .visual-card {
        aspect-ratio: 4/5;
    }
}

@media (max-width: 768px) {
    .hero-visual {
        height: clamp(220px, 35vh, 350px);
    }

    .main-visual {
        max-width: min(280px, 90vw);
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto;
    }

    .visual-card {
        aspect-ratio: 3/4;
    }

    .card-overlay {
        padding: 1rem;
    }

    .tech-badge {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .hero-visual {
        height: clamp(200px, 30vh, 300px);
        min-height: 250px;
    }

    .main-visual {
        max-width: 95vw;
    }

    .visual-card {
        aspect-ratio: 2/3;
        border-radius: 15px;
    }

    .tech-badge {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }

    .card-overlay {
        padding: 0.8rem;
    }
}

@media (max-width: 400px) {
    .hero-visual {
        height: clamp(180px, 25vh, 250px);
    }

    .main-visual {
        max-width: 98vw;
    }

    .visual-card {
        border-radius: 12px;
    }
}

/* Для очень высоких экранов */
@media (min-height: 1000px) and (min-width: 1200px) {
    .hero-visual {
        height: clamp(400px, 40vh, 600px);
    }

    .main-visual {
        max-width: min(450px, 80vw);
    }
}

/* Портретная ориентация на мобильных */
@media (max-height: 600px) and (orientation: portrait) {
    .hero-visual {
        height: clamp(200px, 40vh, 300px);
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-visual {
        height: clamp(250px, 60vh, 350px);
    }

    .visual-card {
        aspect-ratio: 4/3;
    }
}

/* Поддержка aspect-ratio для старых браузеров */
@supports not (aspect-ratio: 3/4) {
    .visual-card::before {
        content: '';
        display: block;
        padding-top: 133.33%; /* 4/3 = 133.33% */
    }

    .image-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Оптимизация загрузки изображений */
.card-image {
    background: linear-gradient(45deg, #1a1a2e, #16213e);
}

.card-image[src] {
    background: none;
}

/* Плавное появление изображения */
.card-image {
    opacity: 0;
    animation: fadeInImage 0.8s ease forwards;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Улучшенный hover эффект для сенсорных устройств */
@media (hover: none) {
    .visual-card:hover {
        transform: none;
    }

    .visual-card:active {
        transform: scale(0.98);
    }

    .visual-card:hover .card-image {
        transform: none;
    }

    .visual-card:hover .tech-badge {
        transform: none;
    }
}