body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 30px;
    background-color: #ffffff;
    color: rgb(0, 0, 0);
}

/* Title */
p:first-of-type {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
}

/* Gallery layout */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 100px;
    max-width: 1200px;
    margin: auto;
}

/* Card */
.item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

/* 🔥 FIX: force same image size */
.item img {
    width: 100%;
    height: 250px;        /* IMPORTANT: same height */
    object-fit: cover;    /* prevents stretching */
    display: block;
    transition: transform 0.5s ease;
}

/* Overlay */
.item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: 0.3s;
}

/* Text */
.item p {
    position: absolute;
    bottom: 10px;
    left: 15px;
    margin: 0;
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s;
}

/* Hover */
.item:hover img {
    transform: scale(1.1);
}

.item:hover::after {
    opacity: 1;
}

.item:hover p {
    opacity: 1;
    transform: translateY(0);
}
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.item img {
    width: 100%;
    height: auto;   /* 🔥 important: remove fixed height */
    display: block;
    border-radius: 10px;
}
.item p {
    margin-top: 10px;
    font-size: 20px;
    opacity: 1;   /* always visible */
    position: static;
}