body {
    font-family: 'Baloo 2', cursive;
    background: url('assets/index/kids-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
}

/* ✅ Semi-transparent overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.6);
    z-index: -1;
}

header h1 {
    text-align: center;
    color: #2b6cb0;
    margin: 20px 0;
    font-size: 2em;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.category {
    padding: 20px;
    margin: 15px auto;
    background: #fff;
    border-radius: 15px;
    max-width: 1200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.category h2 {
    font-size: 1.6em;
    color: #4c51bf;
    margin-bottom: 5px;
}

.category p {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
}

/* ✅ Responsive grid that keeps at least two columns */
.card-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

/* ✅ Card styling */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
    padding: 10px;
    transition: transform 0.2s, background-color 0.2s;
}

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

.card img {
    border-radius: 8px;
    max-width: 100px;
}

.card h3 {
    font-size: 1em;
    margin-top: 8px;
    color: #333;
}

footer {
    text-align: center;
    padding: 15px;
    background: rgba(237,242,247,0.9);
    font-size: 0.9em;
    color: #555;
}

/* ✅ Mobile optimizations */
@media (max-width: 768px) {
    .category {
        padding: 15px;
        margin: 10px;
    }
    header h1 {
        font-size: 1.6em;
    }
}

/* ✅ Ensure two columns on small phones */
@media (max-width: 480px) {
    .card-row {
        grid-template-columns: repeat(2, 1fr); /* Force two columns */
    }
    .card img {
        max-width: 80px;
    }
    .card h3 {
        font-size: 0.9em;
    }
}
