/* ===== ЗАГЛАВНАЯ ЧАСТЬ ===== */
.page-header {
    background: linear-gradient(135deg, #dcc2aa 0%, #201f1e 100%);
    padding: 120px 0 120px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 194, 170, 0.3) 0%, rgba(32, 31, 30, 0.7) 100%),
                url('../../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.page-header .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== СЕКЦИЯ С ФИЛЬТРАМИ И ПОИСКОМ ===== */
.filters-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    margin-bottom: 50px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 12px 28px;
    border: 2px solid #e8e8e8;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.95rem;
    color: #555;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #dcc2aa 0%, #201f1e 100%);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50px;
}

.filter-btn span {
    position: relative;
    z-index: 2;
}

.filter-btn:hover {
    border-color: #dcc2aa;
    color: #dcc2aa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.filter-btn.active {
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.filter-btn.active::before {
    opacity: 1;
}

/* ===== ПОИСК ===== */
.search-box {
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    position: relative;
}

.search-input input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    border: 2px solid #f0f0f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #f8f9fa;
}

.search-input input:focus {
    outline: none;
    border-color: #dcc2aa;
    background: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.search-input button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 50px;
    background: linear-gradient(135deg, #dcc2aa 0%, #201f1e 100%);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.search-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* ===== СЧЕТЧИК ПРОЕКТОВ ===== */
.projects-counter {
    text-align: center;
    margin: 40px 0;
    font-size: 1.1rem;
    color: white;
}

.projects-counter span {
    font-weight: 700;
    color: white;
    font-size: 1.3rem;
}

/* ===== ГАЛЕРЕЯ ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    padding-bottom: 60px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* ===== ПОДПИСЬ ПРОЕКТА ===== */
.gallery-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.gallery-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* ===== ОВЕРЛЕЙ С ДОПОЛНИТЕЛЬНОЙ ИНФОРМАЦИЕЙ ===== */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(220, 194, 170, 0.9), rgba(32, 31, 30, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s;
    padding: 30px;
    text-align: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.overlay-title {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.overlay-description {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ===== МЕТА ИНФОРМАЦИЯ ===== */
.project-meta {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #333;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-meta i {
    color: #dcc2aa;
}

/* ===== БЕЙДЖ ===== */
.gallery-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

.badge {
    padding: 8px 16px;
    background: rgba(255,255,255,0.95);
    color: #dcc2aa;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ===== КНОПКИ ===== */
.gallery-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: white;
    color: #333;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid white;
}

.compare-btn:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

.btn-small {
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-white {
    background: white;
    color: #dcc2aa;
    border: 2px solid white;
}

.btn-white:hover {
    background: transparent;
    color: white;
}

/* ===== НЕТ РЕЗУЛЬТАТОВ ===== */
.no-results {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.no-results i {
    color: #ddd;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    color: #888;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 60px 0 40px;
}

.pagination-arrow, .pagination-link, .pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination-arrow {
    background: #f0f0f0;
    color: #666;
}

.pagination-arrow:hover {
    background: #dcc2aa;
    color: white;
    transform: translateY(-2px);
}

.pagination-link {
    background: #f8f9fa;
    color: #666;
}

.pagination-link:hover {
    background: #dcc2aa;
    color: white;
    transform: translateY(-2px);
}

.pagination-current {
    background: linear-gradient(135deg, #dcc2aa 0%, #201f1e 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }

    .filters-section {
        padding: 20px;
        margin-top: -20px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-actions {
        flex-direction: column;
        width: 100%;
    }

    .compare-btn, .btn-small {
        width: 100%;
        justify-content: center;
    }
}
