/* projects.css - Стили для страницы проектов */

/* Переменные */
:root {
    --color-primary: #0056b3;
    --color-primary-dark: #004494;
    --color-primary-light: #e3f2fd;
    --color-dark: #212529;
    --color-light: #f8f9fa;
    --color-white: #ffffff;
    --color-success: #198754;
    --color-warning: #ffc107;
    --color-info: #0dcaf0;
    --color-secondary: #6c757d;
}

/* Герой-секция проектов */
.projects-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    min-height: 60vh;
    margin-top: -80px;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.min-vh-60 {
    min-height: 60vh !important;
}

.text-white-80 {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Графика в герое */
.hero-graphics {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.graphic {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.graphic-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.graphic-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: 10%;
    animation-delay: 5s;
    animation-direction: reverse;
}

.graphic-3 {
    width: 150px;
    height: 150px;
    top: 30%;
    left: -75px;
    animation-delay: 10s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

/* Хлебные крошки */
.breadcrumb {
    --bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='rgba(255,255,255,0.75)'/%3E%3C/svg%3E");
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-item a:hover {
    opacity: 0.8;
}

.breadcrumb-item.active {
    color: var(--color-white) !important;
    opacity: 0.9;
}

/* Статистика */
.stat-card {
    padding: 1.5rem;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .display-4 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Фильтр проектов */
.filter-group {
    margin-bottom: 1rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--color-light);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: var(--color-dark);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.form-select {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.15);
}

/* Карточки проектов */
.project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 86, 179, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary) !important;
    box-shadow: 0 20px 40px rgba(0, 86, 179, 0.15) !important;
}

.project-image {
    height: 250px;
    overflow: hidden;
}

.project-image img {
    transition: transform 0.6s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-meta {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
}

.meta-item {
    display: flex;
    align-items: center;
}

.project-tech .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* CTA секция */
.projects-cta {
    position: relative;
    overflow: hidden;
}

.projects-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,100 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

/* Модальные окна */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 1.5rem 1.5rem 0;
}

.modal-body {
    padding: 1.5rem;
}

.project-details {
    background: var(--color-primary-light);
    border-radius: 10px;
    padding: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Пагинация */
.pagination {
    --bs-pagination-color: var(--color-dark);
    --bs-pagination-hover-color: var(--color-primary);
    --bs-pagination-focus-color: var(--color-primary);
    --bs-pagination-active-bg: var(--color-primary);
    --bs-pagination-active-border-color: var(--color-primary);
}

.page-link {
    border: 1px solid rgba(0, 86, 179, 0.1);
    margin: 0 0.25rem;
    border-radius: 8px !important;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация появления элементов */
.project-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.stat-card .display-4 {
    animation: countUp 1s ease-out;
}

/* Эффект параллакса для картинок */
@media (min-width: 992px) {
    .project-image {
        transform-style: preserve-3d;
    }
    
    .project-image img {
        transform: translateZ(0);
        transition: transform 0.8s ease;
    }
    
    .project-card:hover .project-image img {
        transform: scale(1.05) translateZ(10px);
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .projects-hero {
        min-height: 50vh;
    }
    
    .min-vh-60 {
        min-height: 50vh !important;
    }
    
    .projects-hero h1 {
        font-size: 2.5rem;
    }
    
    .stat-card .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-graphics {
        display: none;
    }
}

@media (max-width: 768px) {
    .projects-hero {
        min-height: 40vh;
        padding-top: 70px;
    }
    
    .min-vh-60 {
        min-height: 40vh !important;
    }
    
    .projects-hero h1 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem !important;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .display-4 {
        font-size: 2rem;
    }
    
    .filter-options {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .projects-hero {
        min-height: 35vh;
    }
    
    .min-vh-60 {
        min-height: 35vh !important;
    }
    
    .projects-hero h1 {
        font-size: 1.75rem;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .meta-item {
        width: 100%;
        justify-content: space-between;
    }
    
    .projects-cta .row {
        text-align: center;
    }
    
    .projects-cta .btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Утилиты */
.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

.border-opacity-25 {
    --bs-border-opacity: 0.25;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* Эффект стекла */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}