/* Global reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Prevents content from causing overflow */
}

/* Body styling */
body {
    background-color: #191724; /* Dark muted purple */
    color: #e0def4; /* Soft cream text */
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures the footer is at the bottom */
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Header */
header {
    text-align: center;
    padding: 20px;
    background-color: #26233a;
    color: #e0def4;
}

h1 {
    font-size: 2rem;
}

p {
    font-size: 1rem;
}

/* Flexbox grid container for cards */
.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns per row */
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    flex-grow: 1;
}

/* Card design */
.card {
    background: #26233a;
    border: 1px solid #393552;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    overflow: hidden;
}

.card:hover {
    transform: scale(1.05);
    background-color: #393552;
}

.card a {
    text-decoration: none;
    color: #9ccfd8;
    display: block;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
}

.card img {
    width: 100%;
    height: 300px; /* Adjust image height for vertical rectangle */
    object-fit: cover;
    border-bottom: 1px solid #393552;
}

/* Footer */
footer {
    text-align: center;
    padding: 10px;
    background-color: #26233a;
    color: #e0def4;
    width: 100%;
    position: relative;
}

footer a {
    color: #9ccfd8;
    text-decoration: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr; /* Stack cards vertically on small screens */
        padding: 10px;
    }

    .card img {
        height: 200px; /* Adjust image size for smaller screens */
    }
}
