/* =========================================
   Category Grid (Homepage)
========================================= */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 { font-size: 1.4rem; }

.category-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 column on mobile (320px) */
    gap: 20px;
}

/* Category Card Design */
.cat-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    border-color: var(--accent-color);
}
.cat-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-color);
    margin-bottom: 15px;
}
.cat-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-main);
}
.cat-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}
.cat-btn {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.95rem;
}

/* =========================================
   How It Works
========================================= */
.how-section {
    margin-top: 70px;
}

.how-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.how-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.how-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: #fff;
    font-weight: 700;
}

.how-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.how-card p {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.6;
}

.how-note {
    max-width: 760px;
    margin: 30px auto 0 auto;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

.how-note a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
}

.how-note a:hover {
    text-decoration: underline;
}

/* =========================================
   Desktop & Tablet Layout (Media Queries)
========================================= */
@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    /* Center the 7th card in the last row */
    .category-grid .cat-card:last-child:nth-child(3n + 1) {
        grid-column: 2;
    }
    .how-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}
