/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

body.ur {
    font-family: 'Noto Nastaliq Urdu', serif;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: linear-gradient(135deg, #1e40af 0%, #7e22ce 100%);
    color: #fff;
    padding: 15px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    font-weight: 700;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.logo a {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-switch button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 20px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.lang-switch button:hover,
.lang-switch button.active {
    background: rgba(255,255,255,0.3);
    border-color: #fff;
}

/* Navigation */
.navbar {
    background: #fff;
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    padding: 15px 0;
}

.nav-menu li a {
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
}

.mobile-toggle {
    display: none;
}

/* Featured Section */
.featured-section {
    background: #fff;
    padding: 40px 0;
    margin-top: 20px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #1e40af;
    display: inline-block;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.featured-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.featured-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0;
}

.featured-content {
    padding: 25px;
}

.category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1e40af 0%, #7e22ce 100%);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.featured-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.featured-content h3 a {
    color: #333;
}

.featured-content h3 a:hover {
    color: #1e40af;
}

.featured-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #999;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    margin-top: 15px;
}

/* Latest Articles */
.latest-section {
    padding: 40px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.article-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.article-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0;
}

.article-body {
    padding: 20px;
}

.article-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-body h3 a {
    color: #333;
}

.article-body h3 a:hover {
    color: #1e40af;
}

.article-body p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Article Page */
.article-page {
    background: #fff;
    padding: 40px 0;
    margin-top: 20px;
}

.article-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
}

.article-header h1 {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-header .article-meta {
    justify-content: center;
    border-top: none;
    padding-top: 0;
}

.article-featured-image {
    max-width: 900px;
    margin: 30px auto;
}

.article-featured-image img {
    width: 100%;
    border-radius: 10px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.share-buttons {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.share-buttons h4 {
    margin-bottom: 15px;
}

.share-buttons button {
    background: #1e40af;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.share-buttons button:hover {
    background: #7e22ce;
}

/* Related Articles */
.related-articles {
    padding: 40px 0;
    background: #f9f9f9;
}

/* Category Page */
.category-header {
    background: linear-gradient(135deg, #1e40af 0%, #7e22ce 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-top: 20px;
}

.category-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.no-articles {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 10px;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #999;
}

/* RTL Adjustments */
body.ur .nav-menu,
body.ur .article-meta,
body.ur .share-buttons {
    flex-direction: row-reverse;
}

body.ur .featured-content,
body.ur .article-body,
body.ur .article-content {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .article-header h1 {
        font-size: 28px;
    }
}