* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 3rem 1rem;
}

.cards-section {
    max-width: 1150px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.cards-section > p {
    color: #64748b;
    margin-bottom: 3rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 55px rgba(15, 23, 42, 0.35);
}

.card-img {
    position: absolute;
    inset: 0;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-img img {
    transform: scale(1.15);
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem 1.6rem;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.92) 0%,
        rgba(15, 23, 42, 0.45) 55%,
        transparent 100%
    );
    color: #ffffff;
    text-align: left;
    opacity: 0;
    transform: translateY(60%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.card:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    color: #fbbf24;
    transform: translateY(20px);
    transition: transform 0.5s ease 0.1s;
}

.overlay p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #cbd5e1;
    transform: translateY(20px);
    transition: transform 0.5s ease 0.2s;
}

.card:hover .overlay h2,
.card:hover .overlay p {
    transform: translateY(0);
}

@media (max-width: 620px) {
    .cards {
        grid-template-columns: 1fr;
    }
}