/**
 * Home Page Styling
 * Location: /var/www/saafee/public/css/home.css
 * Category grid + trending hero widget
 */

/* ============================================
   Main Wrapper
   ============================================ */

.main-wrapper {
    flex: 1;
}

/* ============================================
   Categories Grid
   ============================================ */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(228, 67, 53, 0.2);
    border-color: #E44335;
}

.category-emoji {
    font-size: 2em;
    margin-bottom: 8px;
}

.category-name {
    font-size: 1em;
    font-weight: bold;
    color: #333;
}

.category-count {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
}

/* ============================================
   Trending Hero Widget
   ============================================ */

.trending-hero {
    background: linear-gradient(135deg, #E44335 0%, #C53727 100%);
    color: white;
    padding: 32px 16px;
    text-align: center;
    margin-bottom: 20px;
}

.trending-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.trending-hero-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.trending-fire {
    font-size: 1.4em;
}

.trending-hero-heading h1 {
    font-size: 1.4em;
    margin: 0;
    color: white;
    font-weight: 700;
}

/* Platform Tabs */
.trending-hero-tabs {
    display: inline-flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.15);
    padding: 5px;
    border-radius: 50px;
}

.th-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 40px;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.th-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.th-tab.active {
    background: white;
    color: #E4405F;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Brand-colored active states set via JS inline style */

.th-tab svg {
    display: block;
}

/* Hashtag Tags */
.trending-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    min-height: 30px;
}

.th-tag {
    display: inline-flex;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    backdrop-filter: blur(4px);
}

.th-empty {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95em;
    padding: 8px 0;
}

.th-loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: th-spin 0.8s linear infinite;
}

@keyframes th-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CTA */
.trending-hero-cta {
    margin-top: 4px;
}

.th-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: linear-gradient(135deg, #D4A017 0%, #F2C94C 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 700;
    text-decoration: none;
    min-height: 40px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.th-cta-btn:hover {
    box-shadow: 0 4px 20px rgba(212, 160, 23, 0.5);
    transform: translateY(-1px);
}

/* ============================================
   Responsive
   ============================================ */

@media (min-width: 480px) {
    .trending-hero-heading h1 {
        font-size: 1.6em;
    }

    .th-tab {
        width: 52px;
        height: 44px;
    }
}

@media (min-width: 768px) {
    .trending-hero {
        padding: 48px 20px;
        margin-bottom: 30px;
    }

    .trending-hero-heading h1 {
        font-size: 1.8em;
    }

    .trending-hero-tabs {
        gap: 8px;
        padding: 6px;
    }

    .th-tab {
        width: 56px;
        height: 46px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 20px;
    }

    .category-card {
        padding: 20px;
    }

    .category-emoji {
        font-size: 3em;
        margin-bottom: 10px;
    }

    .category-name {
        font-size: 1.2em;
    }

    .category-count {
        font-size: 0.9em;
        margin-top: 10px;
    }
}
