/* Categories page styles — also linked from category/index.php inline fallback */

.categories-page {
    padding: 2.5rem 0 4rem;
    background: #fff;
}

.categories-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
}

.categories-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.categories-subtitle {
    max-width: 520px;
    color: #6c757d;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.6;
}

.categories-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    flex: 1 1 520px;
    justify-content: flex-end;
}

.categories-stat {
    min-width: 118px;
    flex: 1 1 118px;
    max-width: 150px;
    padding: 1rem 0.85rem;
    border-radius: 14px;
    text-align: center;
    border: 1px solid transparent;
}

.categories-stat-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.2rem;
    margin-bottom: 0.55rem;
}

.categories-stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.1;
}

.categories-stat-label {
    display: block;
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 0.2rem;
}

.categories-stat-categories { background: #fff8e7; border-color: #ffe8a3; }
.categories-stat-categories .categories-stat-icon { background: rgba(240, 165, 0, 0.18); color: #c78600; }
.categories-stat-subcategories { background: #eefbf3; border-color: #ccefd8; }
.categories-stat-subcategories .categories-stat-icon { background: rgba(25, 135, 84, 0.14); color: #198754; }
.categories-stat-images { background: #f3f0ff; border-color: #ddd3ff; }
.categories-stat-images .categories-stat-icon { background: rgba(111, 66, 193, 0.14); color: #6f42c1; }
.categories-stat-videos { background: #fff4eb; border-color: #ffd9b8; }
.categories-stat-videos .categories-stat-icon { background: rgba(253, 126, 20, 0.14); color: #fd7e14; }
.categories-stat-youtube { background: #fff0f0; border-color: #ffcaca; }
.categories-stat-youtube .categories-stat-icon { background: rgba(220, 53, 69, 0.12); color: #dc3545; }

.categories-group { margin-bottom: 3.5rem; }

.categories-group-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.categories-group-intro {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.categories-group-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 165, 0, 0.16);
    color: #c78600;
    font-size: 1.5rem;
}

.categories-group-icon-nature { background: rgba(25, 135, 84, 0.14); color: #198754; }

.categories-group-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 0.35rem;
}

.categories-group-desc { margin: 0; color: #6c757d; max-width: 640px; }

.categories-group-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: #1a1a2e;
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.categories-group-badge:hover { background: #2d2d44; color: #fff; transform: translateY(-1px); }
.categories-group-badge-nature { background: #198754; }
.categories-group-badge-nature:hover { background: #157347; }

.cat-tile {
    position: relative;
    display: block;
    min-height: 260px;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none !important;
    color: #fff !important;
    background-color: #dfe3ea;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(26, 26, 46, 0.18);
    color: #fff !important;
}

.cat-tile-placeholder {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cat-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.25) 48%, rgba(0, 0, 0, 0.08) 100%);
}

.cat-tile-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 1.1rem;
}

.cat-tile-meta { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }

.cat-tile-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1rem;
}

.cat-tile-text { min-width: 0; }

.cat-tile-name {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.cat-tile-count {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.cat-tile-go {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1a1a2e;
    font-size: 0.95rem;
}

.cat-tile:hover .cat-tile-go { background: #f0a500; color: #1a1a2e; }

.categories-view-all-wrap { text-align: center; margin-top: 1.75rem; }

.categories-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.35rem;
    border: 2px solid #f0a500;
    border-radius: 999px;
    color: #c78600;
    font-weight: 700;
    text-decoration: none;
}

.categories-view-all:hover { background: #f0a500; color: #1a1a2e; }
.categories-view-all-nature { border-color: #198754; color: #198754; }
.categories-view-all-nature:hover { background: #198754; color: #fff; }

.categories-nature-divider {
    margin: 4rem 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.categories-nature-heading h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.35rem; }
.categories-nature-heading p { color: #6c757d; margin: 0; }

@media (max-width: 991px) {
    .categories-stats { justify-content: flex-start; }
    .categories-stat { max-width: none; }
}

@media (max-width: 575px) {
    .categories-page { padding-top: 1.5rem; }
    .cat-tile { min-height: 190px; }
    .categories-group-title { font-size: 1.35rem; }
}

/* Category detail page (subcategories grid) */
.category-show-page {
    padding-top: 2rem;
}

.category-show-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.category-show-subcategories {
    margin-bottom: 3rem;
}

.category-show-subhead {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 1.25rem;
}

.category-show-subtitle {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}

.category-show-submeta {
    font-size: 0.9rem;
    color: #6c757d;
}

.category-show-designs {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.category-show-designs .category-show-subtitle {
    margin-bottom: 1.25rem;
}

.category-show-empty {
    margin-top: 1rem;
    border-radius: 12px;
}
