/* ===== Projects Section ===== */
.projects-section {
    background: #000;
    padding: 80px 40px;
    border-radius: 0 0 40px 40px;
    position: relative;
    z-index: 1;
}

.projects-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(180deg, #888888 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-sticky {
    min-height: inherit;
    position: relative;
}

.projects-stack {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.projects-stack::after {
    content: '';
    display: block;
    height: 50vh;
    flex-shrink: 0;
}


.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Project Card */
.stack-card {
    position: sticky;
    border-radius: 24px;
    padding: 30px;
    border: 2px solid transparent;
}

.stack-card:nth-of-type(1) {
    top: 80px;
    z-index: 1;
    background:
        linear-gradient(#0f0f0f, #0f0f0f) padding-box,
        linear-gradient(135deg, #ff6b9d, #ffa94d, #ff6b6b) border-box;
    box-shadow:
        0 0 20px rgba(255, 107, 157, 0.4),
        0 0 40px rgba(255, 169, 77, 0.3),
        0 0 60px rgba(255, 107, 107, 0.2);
}

.stack-card:nth-of-type(2) {
    top: 180px;
    z-index: 2;
    background:
        linear-gradient(#0f0f0f, #0f0f0f) padding-box,
        linear-gradient(135deg, #ffffff, #7dd3fc, #38bdf8) border-box;
    box-shadow:
        0 0 20px rgba(125, 211, 252, 0.4),
        0 0 40px rgba(56, 189, 248, 0.3),
        0 0 60px rgba(255, 255, 255, 0.2);
}

.stack-card:nth-of-type(3) {
    top: 280px;
    z-index: 3;
    background:
        linear-gradient(#0f0f0f, #0f0f0f) padding-box,
        linear-gradient(135deg, #e0e7ff, #c4b5fd, #a78bfa, #7c3aed) border-box;
    box-shadow:
        0 0 20px rgba(196, 181, 253, 0.4),
        0 0 40px rgba(167, 139, 250, 0.3),
        0 0 60px rgba(124, 58, 237, 0.2);
}

/* Карточка 4 - Контакты (белая, на всю ширину) */
.stack-card:nth-of-type(4) {
    top: 380px;
    z-index: 4;
    background: #fff;
    border: none;
    border-radius: 40px 40px 0 0;
    padding: 80px 60px;
    margin-left: -40px;
    margin-right: -40px;
    width: calc(100% + 80px);
}

.stack-card--contact {
    min-height: 500px;
}

.stack-card-contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    height: 100%;
}

.stack-card-contact-left {
    position: relative;
}

.stack-card-contact-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #000 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.stack-card-contact-email {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    color: #000;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.stack-card-contact-email:hover {
    opacity: 0.6;
}

.stack-card-contact-right {
    position: relative;
}

/* Card Footer */
.card-footer {
    background: #0a0a0a;
    border-radius: 30px 30px 0 0;
    padding: 40px 50px 60px;
    margin-top: 40px;
    margin-left: -60px;
    margin-right: -60px;
    margin-bottom: -80px;
}

.card-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 50px;
}

.card-footer-name {
    font-family: 'Anton', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    line-height: 1;
}

.card-footer-links {
    display: flex;
    gap: 80px;
}

.card-footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-footer-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.card-footer-col a {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-footer-col a:hover {
    color: #fff;
}

.card-footer-symbols {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    margin-left: -50px;
    margin-right: -50px;
    padding-left: 20px;
    padding-right: 20px;
}

.card-footer-symbols .symbol {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.card-footer-symbols .symbol:hover {
    transform: scale(1.1);
}

.card-footer-symbols .symbol svg {
    width: 100%;
    max-width: 180px;
    height: auto;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.card-footer-symbols .symbol svg path,
.card-footer-symbols .symbol svg circle,
.card-footer-symbols .symbol svg polygon,
.card-footer-symbols .symbol svg rect {
    transition: fill 0.3s ease;
}

/* Изначальные цвета символов */
.card-footer-symbols .symbol:nth-child(1) svg * { fill: #c4b5fd; }
.card-footer-symbols .symbol:nth-child(2) svg * { fill: #a3e635; }
.card-footer-symbols .symbol:nth-child(3) svg * { fill: #ffffff; }
.card-footer-symbols .symbol:nth-child(4) svg * { fill: #a78bfa; }
.card-footer-symbols .symbol:nth-child(5) svg * { fill: #fb923c; }
.card-footer-symbols .symbol:nth-child(6) svg * { fill: #ffffff; }
.card-footer-symbols .symbol:nth-child(7) svg * { fill: #4ade80; }
.card-footer-symbols .symbol:nth-child(8) svg * { fill: #f472b6; }

/* Цвета символов при наведении (меняются на другие) */
.card-footer-symbols .symbol:nth-child(1):hover svg * { fill: #f472b6; }
.card-footer-symbols .symbol:nth-child(2):hover svg * { fill: #c4b5fd; }
.card-footer-symbols .symbol:nth-child(3):hover svg * { fill: #a78bfa; }
.card-footer-symbols .symbol:nth-child(4):hover svg * { fill: #fb923c; }
.card-footer-symbols .symbol:nth-child(5):hover svg * { fill: #a3e635; }
.card-footer-symbols .symbol:nth-child(6):hover svg * { fill: #4ade80; }
.card-footer-symbols .symbol:nth-child(7):hover svg * { fill: #fb923c; }
.card-footer-symbols .symbol:nth-child(8):hover svg * { fill: #a3e635; }

.stack-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.stack-card-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stack-card-number {
    font-family: 'Anton', sans-serif;
    font-size: 3rem;
    color: #fff;
    opacity: 0.9;
}

.stack-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stack-card-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stack-card-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.stack-card-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.stack-card-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Project Card Content */
.stack-card-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: 300px;
}

.stack-card-preview {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.stack-card-preview--big {
    height: 100%;
}

.stack-card-preview-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stack-card-preview--small {
    height: 140px;
}

.stack-card-preview::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stack-card:hover .stack-card-preview::before {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .projects-section {
        padding: 60px 20px;
    }

    .projects-title {
        margin-bottom: 40px;
    }

    .projects-container {
        gap: 30px;
    }

    .stack-card {
        padding: 24px;
    }

    .stack-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 24px;
    }

    .stack-card-content {
        grid-template-columns: 1fr;
        grid-template-rows: 200px auto;
        height: auto;
    }

    .stack-card-preview-group {
        grid-template-columns: 1fr 1fr;
        display: grid;
        gap: 15px;
    }

    .stack-card-preview--small {
        height: 120px;
    }
}