/* assets/css/style.css */

:root {
    /* --- NCDC / UGANDA BRAND COLORS --- */
    --primary-color: #009900; /* Uganda Flag Green */
    --primary-dark: #004d00;  /* Deep Forest Green */
    --primary-gradient: linear-gradient(135deg, #004d00 0%, #009900 100%);
    --accent-yellow: #ffcc00; /* Uganda Yellow */
    
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.98);
    --bottom-nav-height: 70px;
}

/* --- BOOTSTRAP OVERRIDES (Instant Green Theme) --- */
.bg-primary { background-color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.btn-primary { 
    background-color: var(--primary-color) !important; 
    border-color: var(--primary-color) !important;
}
.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}
.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    overscroll-behavior-y: none;
}

/* --- MOBILE LAYOUT FIXES --- */
@media (max-width: 991px) {
    body {
        padding-top: 70px; 
        padding-bottom: 90px; 
    }
}

@media (min-width: 992px) {
    body {
        padding-top: 80px; 
        padding-bottom: 40px;
    }
}

/* --- TYPOGRAPHY & BRANDING --- */
.brand-text {
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- MOBILE TOP BAR --- */
.mobile-top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--accent-yellow); /* Branding Touch */
    z-index: 1050;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* --- DESKTOP NAV --- */
.desktop-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
}

/* --- MOBILE BOTTOM NAV --- */
.mobile-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.03);
}

.nav-item-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 500;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-item-link i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.nav-item-link.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* --- CARD DESIGN --- */
.app-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateZ(0);
}

.app-card:active {
    transform: scale(0.98);
}

.card-img-wrapper {
    position: relative;
    padding-top: 55%; /* 1-Column Mobile Ratio */
    overflow: hidden;
    background: #e2e8f0;
}

.card-img-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
}

.author-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}