/* eKnaw Modern Design System */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --accent: #f72585;
    --success: #4cc9f0;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border: #dee2e6;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f9f9f9;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(67, 97, 238, 0.2);
    z-index: -1;
}

/* Top Bar */
.top-bar {
    background: var(--dark);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar-text {
    display: flex;
    align-items: center;
}

.top-bar-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.top-bar-links a:hover {
    color: white;
}

/* Main Navigation */
.main-nav {
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
}

.brand-container {
    display: flex;
    align-items: center;
}

.brand-logo {
    border-radius: 10px;
    margin-right: 15px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
}

.brand-tagline {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: -5px;
}

.navbar-nav .nav-link {
    padding: 8px 20px !important;
    font-weight: 500;
    color: var(--dark);
    border-radius: 30px;
    margin: 0 3px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-actions .btn {
    border-radius: 30px;
    padding: 8px 20px;
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 80px 0;
    overflow: hidden;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-buttons .btn {
    border-radius: 30px;
    padding: 12px 30px;
    font-weight: 500;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    height: 400px;
}

.main-illustration img {
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.floating-card {
    position: absolute;
    background: white;
    color: var(--dark);
    padding: 15px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
}

.card1 {
    top: 20px;
    left: 20px;
    background: var(--primary);
    color: white;
    animation-delay: 0s;
}

.card2 {
    top: 100px;
    right: 40px;
    background: var(--accent);
    color: white;
    animation-delay: 0.5s;
}

.card3 {
    bottom: 50px;
    left: 60px;
    background: var(--secondary);
    color: white;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Categories */
.section-categories {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

.category-card {
    display: block;
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: var(--category-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--category-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 1.5rem;
}

.category-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.category-content p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.category-link {
    color: var(--category-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Articles */
.section-trending,
.section-recent {
    padding: 80px 0;
}

.article-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.article-content {
    padding: 25px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.article-title a {
    color: var(--dark);
    text-decoration: none;
}

.article-title a:hover {
    color: var(--primary);
}

.article-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    color: var(--primary);
}

/* Knowledge Highlight */
.section-highlight {
    padding: 80px 0;
}

.knowledge-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius);
    padding: 60px;
}

.knowledge-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: 20px;
    font-weight: 500;
}

.knowledge-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.knowledge-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.knowledge-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature i {
    color: var(--success);
}

.knowledge-illustration {
    text-align: center;
    font-size: 8rem;
    opacity: 0.3;
}

/* Recent Cards */
.recent-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.recent-card:hover {
    transform: translateY(-5px);
}

.recent-image {
    height: 200px;
    overflow: hidden;
}

.recent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recent-card:hover .recent-image img {
    transform: scale(1.05);
}

.recent-content {
    padding: 25px;
}

.recent-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.recent-category {
    background: var(--light-gray);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.recent-date {
    color: var(--gray);
    font-size: 0.85rem;
}

.recent-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.recent-title a {
    color: var(--dark);
    text-decoration: none;
}

.recent-title a:hover {
    color: var(--primary);
}

.recent-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Newsletter */
.section-newsletter {
    padding: 80px 0;
}

.newsletter-card {
    background: white;
    border-radius: var(--radius);
    padding: 60px;
    box-shadow: var(--shadow);
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.newsletter-form .input-group {
    max-width: 500px;
}

.newsletter-form .form-control {
    border-radius: 30px 0 0 30px;
    padding: 15px 25px;
    border: 2px solid var(--border);
}

.newsletter-form .btn {
    border-radius: 0 30px 30px 0;
    padding: 15px 30px;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    width: 100%;
    max-width: 800px;
    padding: 40px;
}

.close-search {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.search-overlay h3 {
    color: white;
    margin-bottom: 30px;
}

.search-overlay .input-group {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* FAB */
.fab-mobile {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.fab-mobile:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
}

.footer-main {
    padding: 80px 0 40px;
}

.footer-about {
    color: rgba(255, 255, 255, 0.7);
    margin: 20px 0;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.disclaimer-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .knowledge-card {
        padding: 30px;
    }
    
    .knowledge-content h2 {
        font-size: 1.8rem;
    }
    
    .newsletter-card {
        padding: 30px;
    }
    
    .floating-card {
        display: none;
    }
    
    .main-nav .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-top: 10px;
    }
}