.key {
    padding: var(--spacing-section) 0;
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg);
    background-image:
        linear-gradient(to bottom, var(--color-bg) 0%, transparent 30%),
        linear-gradient(to top left, rgb(244 244 244), transparent);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.key::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/img/directory/img/background-img-footer.png');
    background-size: 75vh 190vh;
    background-repeat: no-repeat;
    background-position: calc(100% + 200px) bottom;
    transform: scaleY(-1);
    pointer-events: none;
    z-index: 0;
}

.key-header {
    text-align: center;
    position: relative;
    z-index: 1;
}

.key-title-wrapper {
    position: relative;
    display: inline-block;
}

@keyframes decor-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%       { transform: translateY(-6px) rotate(6deg); }
    66%       { transform: translateY(3px) rotate(-4deg); }
}

.key-stars {
    position: absolute;
    top: -25px;
    left: -35px;
    width: 40px;
    animation: decor-float 4s ease-in-out infinite;
}

.key-title {
    font-size: var(--fs-section-title);
    font-weight: 500;
    margin-bottom: 70px;
}

.key-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.key-card {
    display: flex;
    align-items: center;
    gap: 25px;
}

.key-card-image img {
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.key-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.key-label {
    font-size: 1.1rem;
}

.key-card--right {
    margin-top: 100px;
}

.key-card--center {
    grid-column: 1 / span 2;
    justify-content: center;
    margin-top: 40px;
}

/* ── Responsive key ── */
@media (max-width: 1024px) {
    .key-grid {
        gap: 40px;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .key { padding: var(--spacing-section-sm) 20px; }
    .key-title { margin-bottom: 36px; font-size: var(--fs-section-title-lg); }
    .key-grid { grid-template-columns: 1fr; gap: 28px; padding: 0; }
    .key-card { flex-direction: row; gap: 50px; }
    .key-card--right { margin-top: 0; flex-direction: row-reverse; }
    .key-card--center { display: none; }
    .key-card-image { flex-shrink: 0; width: 45%; }
    .key-card-image img { height: auto; width: 100%; }
}