.portfolio-hero { padding: 100px 0 60px; text-align: center; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }

.portfolio-section { padding: 60px 0 90px; background: var(--bg-gray); }
.pf-filters-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 50px; }
.pf-filter-btn { 
    background: transparent; border: 1px solid #cbd5e1; color: var(--dark-blue); 
    padding: 12px 24px; border-radius: 40px; font-size: 14px; font-weight: 600; 
    cursor: pointer; transition: all 0.3s ease; 
}

.sub-filters-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    min-height: 35px;
}
.sub-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}
.pf-subfilter-btn {
    background: #fff;
    border: 1px solid #dcdcdc;
    color: #555;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}
.pf-subfilter-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}
.pf-subfilter-btn.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: #fff;
}

.pf-filter-btn:hover { border-color: var(--primary-orange); color: var(--primary-orange); }
.pf-filter-btn.active { 
    background: var(--primary-orange); 
    color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3); 
}

.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px; }

.pf-card { 
    position: relative; border-radius: 16px; overflow: hidden; display: block; 
    aspect-ratio: 4 / 3; background: #1a1c24; box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    transition: transform 0.4s ease, box-shadow 0.4s ease; text-decoration: none;
    
    opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease;
}
.pf-card.d-none { display: none !important; }
.pf-card.show { opacity: 1; transform: translateY(0); }
.pf-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(255, 107, 0, 0.15); z-index: 2; }

.pfc-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1); }
.pfc-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(43, 48, 64, 0.95) 0%, rgba(43, 48, 64, 0.4) 50%, transparent 100%); transition: 0.4s ease; }
.pfc-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.pfc-cat { font-size: 11px; font-weight: 700; color: var(--primary-orange); text-transform: uppercase; letter-spacing: 1px; }
.pfc-title { color: var(--white); font-size: 20px; font-weight: 800; line-height: 1.3; transition: transform 0.4s ease; margin: 0; }

.pf-card:hover .pfc-img { transform: scale(1.08); }
.pf-card:hover .pfc-overlay { background: linear-gradient(to top, rgba(43, 48, 64, 0.95) 0%, rgba(255, 107, 0, 0.6) 60%, rgba(255, 107, 0, 0.2) 100%); }
.pf-card:hover .pfc-title { transform: translateY(-5px); color: var(--primary-orange); }

.scroll-trigger { display: flex; justify-content: center; align-items: center; padding: 20px 0 40px; opacity: 0; transition: opacity 0.3s; height: 80px; }
.scroll-trigger.loading { opacity: 1; }
.loading-spinner { width: 40px; height: 40px; border: 4px solid rgba(255, 107, 0, 0.2); border-top-color: var(--primary-orange); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

@media (max-width: 1200px) { .pf-grid { gap: 20px; } }
@media (max-width: 992px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { 
    .pf-grid { grid-template-columns: 1fr; }
    .pf-filters-wrap { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .pf-filters-wrap::-webkit-scrollbar { display: none; }
    .pf-filter-btn { flex: 0 0 auto; scroll-snap-align: start; }
}

.service-hero { 
    position: relative; 
    padding: 140px 0 120px; 
    overflow: hidden; 
    color: var(--white); 
    background: var(--dark-blue); 
}

.sh-bg { 
    position: absolute; 
    inset: 0; 
    background-size: cover; 
    background-position: center; 
}

.sh-overlay { 
    position: absolute; 
    inset: 0; 
    background: rgba(43, 48, 64, 0.85); 
}

.sh-content { 
    max-width: 850px; 
    position: relative;
    z-index: 2;
}

.sh-breadcrumbs { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-size: 13px; 
    font-weight: 500; 
    margin-bottom: 30px; 
    color: rgba(255, 255, 255, 0.7);
}
.sh-breadcrumbs a { color: var(--white); transition: 0.3s; }
.sh-breadcrumbs a:hover { color: var(--primary-orange); }
.sh-sep { font-size: 12px; opacity: 0.5; }
.sh-current { color: rgba(255, 255, 255, 0.5); }

/* Заголовок и текст */
.sh-content h1 { 
    font-size: 52px; 
    font-weight: 800; 
    margin-bottom: 25px; 
    line-height: 1.15; 
    color: var(--white);
}
.sh-content p { 
    font-size: 18px; 
    line-height: 1.6; 
    color: rgba(255, 255, 255, 0.9); 
    margin-bottom: 45px; 
    max-width: 700px; 
}

.sh-action { display: flex; align-items: center; gap: 20px; }
.sh-helper-text { font-size: 14px; color: rgba(255, 255, 255, 0.5); font-weight: 500; }

@media (max-width: 992px) {
    .sh-content h1 { font-size: 38px; }
}
@media (max-width: 768px) {
    .service-hero { padding: 70px 0 60px; }
    .sh-content h1 { font-size: 32px; }
    .sh-action { flex-direction: column; align-items: flex-start; gap: 15px; }
}

.page-header-light {
    padding: 40px 0 50px;
    background: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.phl-inner {
    max-width: 1000px;
}

.phl-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    color: #666;
}

.phl-breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.phl-breadcrumbs a:hover {
    color: var(--primary-orange);
}

.phl-sep {
    color: #ccc;
}

.phl-current {
    color: var(--dark-blue);
}

.page-header-light h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark-blue);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-header-light p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 992px) {
    .page-header-light h1 { font-size: 36px; }
}

@media (max-width: 768px) {
    .page-header-light { padding: 30px 0 40px; }
    .page-header-light h1 { font-size: 32px; }
    .phl-breadcrumbs { font-size: 13px; margin-bottom: 15px; }
}