/* ==============================================
   REEMCO — ALL CATEGORIES PAGE
   Premium card grid for category browsing
   ============================================== */

/* --- Hero Section --- */
.rc-categories-hero {
    position: relative;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #43a047 100%);
    padding: 60px 30px;
    text-align: center;
    overflow: hidden;
    margin-bottom: 40px;
}

.rc-categories-hero__overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.rc-categories-hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.rc-categories-hero__title {
    font-family: 'Cairo', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.rc-categories-hero__title i {
    font-size: 2rem;
    color: #a5d6a7;
}

.rc-categories-hero__desc {
    font-family: 'Cairo', sans-serif;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.8;
}

/* --- Categories Grid --- */
.rc-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
    padding: 0 30px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Category Card --- */
.rc-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 32px 20px 28px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(46, 125, 50, 0.08);
    text-decoration: none;
    color: #333;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.rc-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2e7d32, #43a047, #66bb6a);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.rc-category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(46, 125, 50, 0.15);
    border-color: rgba(46, 125, 50, 0.25);
    text-decoration: none;
    color: #1b5e20;
}

.rc-category-card:hover::before {
    opacity: 1;
}

/* --- Icon Wrap --- */
.rc-category-card__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    font-size: 1.8rem;
    transition: all 0.35s ease;
}

.rc-category-card:hover .rc-category-card__icon-wrap {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    transform: scale(1.1) rotate(-5deg);
}

/* --- Category Name --- */
.rc-category-card__name {
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: inherit;
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

/* --- Subcategory Count --- */
.rc-category-card__count {
    font-family: 'Cairo', sans-serif;
    font-size: 0.8rem;
    color: #888;
    background: #f5f5f5;
    padding: 3px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.rc-category-card:hover .rc-category-card__count {
    background: #e8f5e9;
    color: #2e7d32;
}

/* --- Arrow --- */
.rc-category-card__arrow {
    position: absolute;
    bottom: 12px;
    left: 14px;
    font-size: 0.75rem;
    color: #bbb;
    opacity: 0;
    transform: translateX(8px);
    transition: all 0.35s ease;
}

.rc-category-card:hover .rc-category-card__arrow {
    opacity: 1;
    transform: translateX(0);
    color: #2e7d32;
}

/* --- Body class overrides (remove Astra default padding etc.) --- */
.reemco-categories-page .entry-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.reemco-categories-page .ast-container {
    max-width: 100%;
    padding: 0;
}

.reemco-categories-page #primary {
    padding: 0;
    margin: 0;
}

.reemco-categories-page .entry-header {
    display: none;
}

.reemco-categories-page .ast-article-single {
    padding: 0;
}

/* --- Archive Subcategory Cards Section --- */
.rc-archive-subcats {
    padding: 30px 0 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.rc-archive-subcats__header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 20px;
}

.rc-archive-subcats__title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1b5e20;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rc-archive-subcats__title i {
    color: #43a047;
    font-size: 1.3rem;
}

.rc-archive-subcats__desc {
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    color: #888;
    margin: 0;
}

/* Archive grid variant: slightly more compact */
.rc-categories-grid--archive {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 0 0 20px;
    max-width: 100%;
}

.rc-categories-grid--archive .rc-category-card {
    padding: 22px 14px 20px;
    gap: 10px;
}

.rc-categories-grid--archive .rc-category-card__icon-wrap {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
    border-radius: 14px;
}

.rc-categories-grid--archive .rc-category-card__name {
    font-size: 0.95rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .rc-categories-hero {
        padding: 40px 20px;
    }

    .rc-categories-hero__title {
        font-size: 1.8rem;
    }

    .rc-categories-hero__desc {
        font-size: 1rem;
    }

    .rc-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
        padding: 0 16px 40px;
    }

    .rc-category-card {
        padding: 24px 14px 22px;
        gap: 10px;
    }

    .rc-category-card__icon-wrap {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
        border-radius: 14px;
    }

    .rc-category-card__name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .rc-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 12px 30px;
    }

    .rc-category-card__icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}