/* 
 * Consolidated Styles CSS
 * This file combines and optimizes duplicate container definitions from multiple CSS files
 */

/* === CONTAINER DEFINITION === */
.container {
    width: 100%;
    max-width: var(--container-max-width, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding, 1rem);
    padding-right: var(--container-padding, 1rem);
    box-sizing: border-box;
}

/* === PRINT STYLES === */
@media print {
    /* Hide unnecessary elements when printing */
    header nav,
    footer,
    .ad-container,
    .sidebar,
    button,
    .social-links,
    .no-print {
        display: none !important;
    }
    
    /* Ensure full width for content */
    main,
    .container,
    .article-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Adjust typography for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    /* Make sure links are readable */
    a {
        color: #000;
        text-decoration: underline;
    }
    
    /* Show full URL after links */
    a:after {
        content: " (" attr(href) ")";
    }
}

/* === DARK MODE DEFINITIONS === */
.dark {
    --color-background: #1a202c;
    --color-surface: #2d3748;
    --color-surface-variant: #4a5568;
    --color-text-primary: #f7fafc;
    --color-text-secondary: #e2e8f0;
    --color-text-muted: #a0aec0;
    --color-border: #4a5568;
    
    /* Adjust shadows for dark mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.12);
}

/* Basic dark mode element styling */
body.dark {
    color: #f3f4f6;
    background-color: #111827;
}

.dark header {
    background-color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark a {
    color: #60a5fa;
}

.dark footer {
    background-color: #1f2937;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3);
}

.dark .homepage {
    background-color: #111827;
}

/* Dark mode for UI components */
.dark .search-container input {
    background-color: #374151 !important;
    border-color: #4b5563;
    color: #f3f4f6 !important;
}

.dark .dark-mode-toggle {
    background-color: rgba(255,255,255,0.1);
}

/* Dark mode for articles and widgets */
.dark .article-card,
.dark .article-content,
.dark .sidebar > div,
.dark .sidebar-widget,
.dark .update-card,
.dark .featured-article,
.dark .grid-hero {
    background-color: #1f2937;
    color: #f3f4f6;
}

.dark .article-content h3 a,
.dark .sidebar-widget h3,
.dark .update-content h3 a {
    color: #f3f4f6;
}

.dark .article-content p,
.dark .update-content p,
.dark .sidebar-widget p {
    color: #d1d5db;
}

.dark .article-meta,
.dark .update-meta {
    color: #9ca3af;
}

.dark .sidebar-links li a {
    color: #d1d5db;
}

.dark .sidebar-links li a:hover {
    color: #f3f4f6;
}

.dark .ad-container {
    background-color: #1f2937;
}

.dark .ad-placeholder {
    background-color: #374151;
    color: #9ca3af;
}

.dark .sidebar-widget h3 {
    border-bottom-color: #374151;
}

.dark .section-title {
    border-bottom-color: #4b5563;
    color: #f3f4f6;
}

.dark .grid-hero-content h2 {
    color: #f3f4f6;
}

.dark .tag {
    background-color: #374151;
    color: #d1d5db;
}

.dark .tag:hover {
    background-color: var(--color-primary, #3490dc);
    color: white;
}

.dark .article-category,
.dark .update-category {
    background-color: #374151;
    color: #d1d5db;
}

/* === AD CONTAINERS === */
.ad-container {
    margin: var(--space-component, 2rem) 0;
    padding: var(--space-element, 1rem);
    background-color: var(--color-surface-variant, #f9f9f9);
    border-radius: var(--border-radius-md, 5px);
    text-align: center;
}