/* tpl-projects-v2.css — projects portfolio page v2.1 */

/* ===== HERO ===== */
.proj-hero {
    position: relative;
    background: #0d1117;
    padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
    overflow: hidden;
    border-bottom: 1px solid #21262d;
}

.proj-hero__glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(37,99,235,.16) 0%, transparent 70%);
    pointer-events: none;
}

.proj-hero__inner {
    position: relative;
    text-align: center;
}

.proj-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #3b82f6;
    margin-bottom: 1.1rem;
}

.proj-hero__title {
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
    font-weight: 800;
    line-height: 1.18;
    color: #e6edf3;
    margin: 0 0 .9rem;
}

.proj-hero__sub {
    font-size: clamp(.9rem, 1.3vw, 1.05rem);
    color: #8b949e;
    line-height: 1.65;
    margin: 0 auto 2rem;
    max-width: 560px;
}

.proj-hero__stats {
    display: inline-flex;
    gap: 0;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
}

.proj-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem;
    border-right: 1px solid #30363d;
}

.proj-hero__stat:last-child { border-right: none; }

.proj-hero__stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
    letter-spacing: -.02em;
}

.proj-hero__stat-label {
    font-size: .68rem;
    color: #8b949e;
    margin-top: 4px;
    white-space: nowrap;
}

/* ===== HERO FILTERS ===== */
.proj-hero__filters {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.proj-hero__filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== FILTER BUTTONS ===== */
.projects__filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.projects__filter {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #30363d;
    background: transparent;
    color: #8b949e;
    transition: all .15s;
    white-space: nowrap;
}

.projects__filter:hover {
    border-color: #2563eb;
    color: #3b82f6;
    background: rgba(37,99,235,.05);
}

.projects__filter--active,
.projects__filter.projects__filter--active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}

/* ===== PROJECTS GRID ===== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

/* ===== PROJECT CARD ===== */
.project-card {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, border-color .2s;
    background-size: cover;
    background-position: center;
    background-color: #161b22;
    border: 1px solid #30363d;
    min-height: 320px;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0,0,0,.6), 0 0 0 1px rgba(37,99,235,.3);
    border-color: #2563eb;
}

/* Base gradient */
.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.05) 100%);
    z-index: 1;
    transition: background .3s;
}

.project-card:hover::before {
    background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.35) 60%, rgba(37,99,235,.1) 100%);
}


/* No-photo placeholder */
.project-card:not([style*="background-image"]) {
    background: linear-gradient(135deg, #1a3a5c 0%, #161b22 100%);
}

/* ===== CARD OVERLAY ===== */
.project-card__overlay {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}

/* "Смотреть проект" button revealed on hover */
.project-card__overlay::after {
    content: 'Смотреть проект →';
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #93c5fd;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s, transform .2s;
}

.project-card:hover .project-card__overlay::after {
    opacity: 1;
    transform: translateY(0);
}

.project-card__overlay h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}


.project-card__meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.project-card__meta {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,.4);
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.project-card__client {
    font-weight: 600;
    color: rgba(255,255,255,.85);
}

.project-card__tonnage {
    background: rgba(37,99,235,.65);
    color: #fff;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

/* ===== SUMMARY ===== */
.projects__summary {
    text-align: center;
    padding: 20px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    font-size: 14px;
    color: #8b949e;
    margin-bottom: 24px;
}

.projects__summary-count {
    font-size: 24px;
    font-weight: 800;
    color: #3b82f6;
}

/* ===== REFERENCE NOTE ===== */
.reference-note {
    background: #161b22;
    border: 1px solid #30363d;
    border-left: 3px solid #2563eb;
    border-radius: 12px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.reference-note p {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .proj-hero__stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .proj-hero__stat { border-right: 1px solid #30363d; }
    .proj-hero__stat:nth-child(even) { border-right: none; }
    .proj-hero__stat:nth-child(n+3) { border-top: 1px solid #30363d; }
    .projects-grid { grid-template-columns: 1fr; }
    .projects__filters-wrapper { position: static; }
    .projects__filters { padding: 0 16px; }
    .reference-note { flex-direction: column; }
}
