/* CSS Variables for Theme Support */
:root {
    /* Light Theme Colors */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: #334155;
    --border-light: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--bg-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.contact-info span {
    margin-right: 20px;
    color: var(--text-secondary);
}

.contact-info i {
    margin-right: 5px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.main-header {
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
}

/* Navigation Styles */
.navigation {
    background: var(--primary-color);
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--secondary-color);
}

.nav-link i {
    margin-right: 8px;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-light);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
}

/* Breaking News Ticker */
.breaking-news {
    background: var(--danger-color);
    color: white;
    padding: 10px 0;
    overflow: hidden;
}

.breaking-news-content {
    display: flex;
    align-items: center;
}

.breaking-label {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    margin-right: 20px;
    white-space: nowrap;
}

.news-ticker {
    flex: 1;
    overflow: hidden;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Main Content Styles */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.category {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.date {
    color: var(--text-secondary);
}

.post-title {
    margin-bottom: 15px;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.category-card a {
    text-decoration: none;
    color: var(--text-primary);
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.post-count {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Ad Spaces */
.ad-space {
    margin: 40px 0;
}

.ad-banner {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

.ad-placeholder {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 500;
}

/* Footer Styles */
.footer {
    background: var(--bg-secondary);
    margin-top: 60px;
}

.main-footer {
    padding: 50px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.contact-item i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
}

.newsletter {
    margin-top: 30px;
}

.newsletter h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.newsletter-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

.footer-ad {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.bottom-footer {
    padding: 20px 0;
    background: var(--bg-tertiary);
}

.bottom-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: var(--text-secondary);
}

.footer-menu ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.footer-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--bg-card);
    z-index: 1999;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease;
}

.mobile-nav-menu a:hover {
    background: var(--bg-secondary);
}

.mobile-nav-menu i {
    margin-right: 10px;
    width: 20px;
}

.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-toggle {
    justify-content: space-between;
}

.mobile-dropdown-menu {
    display: none;
    background: var(--bg-secondary);
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    display: block;
}

.mobile-dropdown-menu a {
    padding-left: 50px;
    font-size: 14px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}