/* ===================================================== */
/* CATEGORIES PAGE - CLEAN GRID LAYOUT                   */
/* ===================================================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page Background */
.categories-page {
    background-color: var(--white);
    min-height: 80vh;
}

/* --- Page Header --- */
.page-header {
    background-color: var(--surface-alt); /* Warm peach background */
    padding: 5rem 0;
    text-align: center;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary); /* Dark text */
    margin-bottom: 1rem;
    font-family: 'Georgia', serif; /* Matches the serif font in the image */
    animation: fadeInUp 0.6s ease-out;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* --- Grid Layout --- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns on desktop */
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Category Card --- */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1.5px solid var(--primary); /* Vibrant orange border */
    border-radius: 12px; /* Rounded corners */
    padding: 2rem 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out both;
}

/* Add a slight staggered delay for the grid */
.category-card:nth-child(5n+1) { animation-delay: 0.05s; }
.category-card:nth-child(5n+2) { animation-delay: 0.1s; }
.category-card:nth-child(5n+3) { animation-delay: 0.15s; }
.category-card:nth-child(5n+4) { animation-delay: 0.2s; }
.category-card:nth-child(5n+5) { animation-delay: 0.25s; }

/* Hover Effect */
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 140, 75, 0.15);
    background-color: var(--surface);
    border-color: var(--primary-dark);
}

/* --- Circular Icon --- */
.icon-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--primary);
    font-size: 1.6rem;
    transition: all 0.3s ease;
}

.category-card:hover .icon-circle {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: transparent;
    transform: scale(1.05) rotate(5deg);
}

/* --- Category Name --- */
.category-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.category-card:hover .category-name {
    color: var(--primary-dark);
}

/* ===================================================== */
/* RESPONSIVE DESIGN                                     */
/* ===================================================== */

@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .page-header {
        padding: 4rem 0;
    }
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .category-card {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr; /* 1 column on very small screens */
    }
}
/* --- Circular Icon Image Container --- */
.icon-circle {
    width: 75px; /* Slightly increased size to fit images nicely */
    height: 75px;
    border-radius: 50%;
    border: 2px solid var(--primary); /* Vibrant orange border */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    background: var(--white); /* White background so transparent PNGs look good */
    transition: all 0.3s ease;
    overflow: hidden; /* Ensures image stays inside the circle */
    padding: 12px; /* Adds breathing room around the image */
}

/* --- The Image Itself --- */
.category-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures the whole image fits without stretching */
    transition: all 0.3s ease;
}

/* --- Hover Effects --- */
.category-card:hover .icon-circle {
    background: var(--primary-lighter); /* Soft peach background on hover */
    border-color: var(--primary-dark);
    transform: scale(1.05) translateY(-3px); /* Gentle lift instead of rotation */
    box-shadow: 0 8px 15px rgba(255, 140, 75, 0.2);
}

.category-card:hover .category-img {
    transform: scale(1.1); /* Slight zoom on the image */
}