/* Arya News Hub - Main CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00f5d4;
    --secondary-color: #8b5cf6;
    --accent-color: #ff6b6b;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-dark: #1a202c;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    --transition: all 0.3s ease;
    
    /* Theme Variables */
    --header-bg: #20B2AA;
    --header-bg-dark: #1a1a1a;
    --nav-bg: #f8f9fa;
    --nav-bg-dark: #2d2d2d;
    --nav-text: #333333;
    --nav-text-dark: #ffffff;
    --nav-hover: #e9ecef;
    --nav-hover-dark: #404040;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --border-color: rgba(255, 255, 255, 0.2);
    --header-bg: var(--header-bg-dark);
    --nav-bg: var(--nav-bg-dark);
    --nav-text: var(--nav-text-dark);
    --nav-hover: var(--nav-hover-dark);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Global Styles */
[data-theme="dark"] body {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
}

[data-theme="dark"] html {
    background: var(--bg-primary) !important;
}

[data-theme="dark"] .container {
    background: var(--bg-primary);
}

[data-theme="dark"] .card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn:hover {
    background: var(--nav-hover);
}

[data-theme="dark"] .form-control {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-control:focus {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

[data-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .bg-light {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-white {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .border {
    border-color: var(--border-color) !important;
}

/* Force dark backgrounds for all elements */
[data-theme="dark"] * {
    background-color: inherit;
}

[data-theme="dark"] div, 
[data-theme="dark"] section, 
[data-theme="dark"] article, 
[data-theme="dark"] aside, 
[data-theme="dark"] main {
    background: var(--bg-primary);
}

[data-theme="dark"] .row {
    background: var(--bg-primary);
}

[data-theme="dark"] .col, 
[data-theme="dark"] .col-12, 
[data-theme="dark"] .col-md-6, 
[data-theme="dark"] .col-lg-4 {
    background: var(--bg-primary);
}

/* Blog-specific Dark Mode Styles */
[data-theme="dark"] .article-card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .article-card:hover {
    background: var(--nav-hover) !important;
}

[data-theme="dark"] .article-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .article-excerpt {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .article-meta {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .category-badge {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color);
}

[data-theme="dark"] .hero-section {
    background: var(--bg-secondary) !important;
    color: var(--text-primary);
}

[data-theme="dark"] .section-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .newsletter-form {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .newsletter-form input {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color);
}

[data-theme="dark"] .newsletter-form button {
    background: var(--primary-color) !important;
    color: var(--bg-primary) !important;
}

[data-theme="dark"] .footer {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .footer a {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .footer a:hover {
    color: var(--text-primary) !important;
}

/* Additional dark mode overrides */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] p {
    color: var(--text-primary) !important;
}

[data-theme="dark"] a {
    color: var(--text-primary) !important;
}

[data-theme="dark"] a:hover {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-black {
    color: var(--text-primary) !important;
}

/* Force override all white backgrounds */
[data-theme="dark"] *[style*="background-color: white"],
[data-theme="dark"] *[style*="background: white"],
[data-theme="dark"] *[style*="background-color: #fff"],
[data-theme="dark"] *[style*="background: #fff"],
[data-theme="dark"] *[style*="background-color: #ffffff"],
[data-theme="dark"] *[style*="background: #ffffff"] {
    background: var(--bg-primary) !important;
}

/* Override any inline styles that might force white backgrounds */
[data-theme="dark"] * {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .article-card,
[data-theme="dark"] .newsletter-form,
[data-theme="dark"] .hero-section {
    background: var(--bg-secondary) !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Language toggle removed */

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo a {
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 12px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    padding: 8rem 0 4rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Category Grid */
.categories {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.categories h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.category-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Articles Section */
.articles {
    padding: 4rem 0;
}

.articles h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.article-category {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ai-category {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
}

.business-category {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.tech-category {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
}

.news-category {
    background: linear-gradient(135deg, #00f5d4, #00d4aa);
    color: white;
}

.education-category {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
}

.health-category {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.environment-category {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.article-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-title {
    margin-bottom: 1rem;
}

.article-title a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.article-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #a0aec0;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-toggle {
        top: 10px;
        right: 10px;
        padding: 0.25rem 0.75rem;
    }

    .nav-right-section { display:flex; align-items:center; margin-left:auto; }
    .hamburger { display:flex; margin-left:12px; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 1rem 15px;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .categories h2,
    .articles h2 {
        font-size: 2rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
