/**
 * 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,
.trending-hero-heading h2 {
    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);
}

/* ============================================
   Ramadan Seasonal Hero
   ============================================ */

.ramadan-hero {
    background: linear-gradient(135deg, #1B0A3C 0%, #2D1B69 100%);
    color: white;
    padding: 32px 16px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.ramadan-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.rm-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: rm-twinkle 2.5s ease-in-out infinite;
}

@keyframes rm-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}

.ramadan-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.ramadan-greeting {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 4px;
}

.rm-moon {
    margin-inline-end: 6px;
}

.ramadan-subtitle {
    opacity: 0.85;
    margin: 8px 0 20px;
    font-size: 1.05em;
}

.ramadan-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.rm-tag {
    display: inline-flex;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.rm-tag:hover {
    background: rgba(255, 255, 255, 0.22);
}

.rm-tag.copied {
    color: #F2C94C;
}

.ramadan-cta {
    margin-top: 4px;
}

.ramadan-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 28px;
    background: #E44335;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 700;
    text-decoration: none;
    min-height: 40px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ramadan-cta-btn:hover {
    background: #C53727;
    box-shadow: 0 4px 16px rgba(228, 67, 53, 0.4);
    transform: translateY(-1px);
}

.rm-arrow {
    font-size: 1.1em;
}

/* ============================================
   Eid al-Fitr Seasonal Hero
   ============================================ */

.eid-hero {
    background: linear-gradient(135deg, #0D4A2E 0%, #1B7A4A 100%);
    color: white;
    padding: 32px 16px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.eid-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.eid-particle {
    position: absolute;
    font-size: 14px;
    animation: eid-float 3s ease-in-out infinite;
}

@keyframes eid-float {
    0%, 100% { opacity: 0.4; transform: translateY(0) scale(1); }
    50% { opacity: 1; transform: translateY(-6px) scale(1.2); }
}

.eid-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.eid-greeting {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 4px;
}

.eid-icon {
    margin-inline-end: 6px;
}

.eid-subtitle {
    opacity: 0.85;
    margin: 8px 0 20px;
    font-size: 1.05em;
}

.eid-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.eid-tag {
    display: inline-flex;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.eid-tag:hover {
    background: rgba(255, 255, 255, 0.22);
}

.eid-tag.copied {
    color: #F2C94C;
}

.eid-cta {
    margin-top: 4px;
}

.eid-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    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;
}

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

.eid-arrow {
    font-size: 1.1em;
}

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

    .eid-greeting {
        font-size: 2.4em;
    }
}

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

@media (min-width: 480px) {
    .trending-hero-heading h1,
    .trending-hero-heading h2 {
        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,
    .trending-hero-heading h2 {
        font-size: 1.8em;
    }

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

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

    .ramadan-hero {
        padding: 48px 20px;
        margin-bottom: 30px;
    }

    .ramadan-greeting {
        font-size: 2.4em;
    }

    .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;
    }
}

/* ============================================
   Value Proposition Section
   ============================================ */

.value-prop {
    background: #fff;
    padding: 40px 16px;
    text-align: center;
}

/* Hero variant — when value-prop is the first section */
.value-prop--hero {
    background: linear-gradient(180deg, #FAFAFA 0%, #fff 100%);
    padding: 48px 16px 32px;
    border-bottom: 1px solid #E0E0E0;
}

.value-prop--hero .vp-headline {
    font-size: 1.8em;
}

/* CTA Row */
.vp-cta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.vp-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: #E44335;
    color: #fff;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.vp-cta-primary:hover {
    background: #C53727;
    box-shadow: 0 4px 16px rgba(228, 67, 53, 0.3);
    transform: translateY(-1px);
}

.vp-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: transparent;
    color: #E44335;
    border: 1.5px solid #E44335;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.vp-cta-secondary:hover {
    background: #FEF2F1;
}

.value-prop-inner {
    max-width: 900px;
    margin: 0 auto;
}

.vp-headline {
    font-size: 1.6em;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.vp-subheadline {
    font-size: 1.05em;
    color: #7A7A7A;
    margin: 0 0 32px;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Stats Row */
.vp-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.vp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.vp-stat-num {
    font-size: 1.8em;
    font-weight: 800;
    color: #E44335;
    line-height: 1.1;
}

.vp-stat-label {
    font-size: 0.8em;
    color: #7A7A7A;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.vp-stat-divider {
    width: 1px;
    height: 36px;
    background: #E0E0E0;
}

/* Feature Cards */
.vp-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.vp-feature {
    padding: 20px 16px;
}

.vp-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #FEF2F1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #E44335;
}

.vp-feature-icon--ai {
    background: #F0F0FF;
    color: #5B5BD6;
}

.vp-feature-icon--copy {
    background: #EEFBF4;
    color: #16A34A;
}

.vp-feature h3 {
    font-size: 1em;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 6px;
}

.vp-feature p {
    font-size: 0.88em;
    color: #7A7A7A;
    margin: 0;
    line-height: 1.5;
}

/* Mobile */
@media (max-width: 600px) {
    .value-prop {
        padding: 28px 16px;
    }

    .value-prop--hero {
        padding: 36px 16px 24px;
    }

    .value-prop--hero .vp-headline {
        font-size: 1.4em;
    }

    .vp-cta-row {
        margin-bottom: 24px;
    }

    .vp-cta-primary,
    .vp-cta-secondary {
        padding: 11px 22px;
        font-size: 0.9em;
    }

    .vp-headline {
        font-size: 1.3em;
    }

    .vp-subheadline {
        font-size: 0.95em;
        margin-bottom: 24px;
    }

    .vp-stats {
        gap: 4px 0;
    }

    .vp-stat {
        padding: 0 12px;
    }

    .vp-stat-num {
        font-size: 1.4em;
    }

    .vp-stat-label {
        font-size: 0.7em;
    }

    .vp-stat-divider {
        height: 28px;
    }

    .vp-features {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vp-feature {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        text-align: start;
        padding: 12px 0;
    }

    .vp-feature-icon {
        margin-bottom: 0;
        flex-shrink: 0;
        width: 42px;
        height: 42px;
    }

    .vp-feature h3 {
        margin-top: 0;
    }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 767px) {
    .vp-stat {
        padding: 0 16px;
    }

    .vp-stat-num {
        font-size: 1.5em;
    }
}

@media (min-width: 768px) {
    .value-prop {
        padding: 48px 20px;
    }

    .value-prop--hero {
        padding: 56px 20px 40px;
    }

    .value-prop--hero .vp-headline {
        font-size: 2.2em;
    }

    .vp-headline {
        font-size: 2em;
    }

    .vp-subheadline {
        font-size: 1.1em;
    }

    .vp-stat-num {
        font-size: 2.2em;
    }

    .vp-stat-label {
        font-size: 0.82em;
    }
}
