/* ============================================================ */
/* BRIGHTSURF SHARED STYLES */
/* ============================================================ */

/* ============================================================ */
/* WEB OPTIMIZATION */
/* ============================================================ */

/* Performance optimizations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Optimize font rendering */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #000;
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Optimize video elements */
video {
    max-width: 100%;
    height: auto;
}

/* Focus management for accessibility */
/* Remove outline on mouse click */
a:focus,
button:focus {
    outline: none;
}

/* Show outline only for keyboard navigation (Tab key) */
/* :focus-visible only triggers on keyboard focus, not mouse clicks */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    box-sizing: border-box;
}

/* Article detail page container - same width as index */
.article-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    box-sizing: border-box;
}

/* Standard article/page title styling - matches detail.php */
.article-container h1,
.article-container h1:first-of-type {
    font-size: 1.7rem;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    margin-top: 0;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.02em;
}

.policy-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.policy-page p {
    font-size: 1rem;
    line-height: 1.55;
    color: #222;
    margin-bottom: 1.25rem;
}

.policy-page h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #0f1826;
}

.policy-page section:first-of-type h2 {
    margin-top: 1.5rem;
}

.policy-page ul {
    margin: 0 0 1.25rem 1.25rem;
    padding-left: 1rem;
    color: #222;
}

.policy-page ul li {
    margin-bottom: 0.65rem;
    line-height: 1.5;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.55;
    color: #222;
    margin-bottom: 1.25rem;
}

.about-content h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #0f1826;
}

.about-content h2:first-of-type {
    margin-top: 1.5rem;
}

.rss-instructions {
    background: #f5f9ff;
    border-left: 4px solid #2563eb;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    color: #222;
}

.rss-letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0 1.5rem;
}

.rss-letter-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #f2f6ff;
    color: #0b3d91;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.rss-letter-nav a:hover {
    background: #0b3d91;
    color: #fff;
}

.rss-letter-section {
    margin-bottom: 2.5rem;
}

.rss-keyword-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem 1.5rem;
}

.rss-keyword-list li a {
    font-weight: 600;
    color: #0b3d91;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rss-keyword-list li a:hover {
    color: #072c66;
}

.rss-count {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ============================================================ */
/* HEADER STYLES */
/* ============================================================ */

header {
    border-bottom: 1px solid #000;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: #000;
    text-decoration: none;
    letter-spacing: -0.5px;
    line-height: 1;
    transition: opacity 0.2s ease;
    margin: 0;
    padding: 0;
}

.logo:hover {
    opacity: 0.7;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.desktop-nav a {
    color: #666;
    text-decoration: none;
    margin-left: 0;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: #000;
}

.desktop-nav a.active {
    color: #000;
    font-weight: 600;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
    outline: none;
    box-shadow: none;
    margin-left: 3rem;
}

.mobile-menu-toggle:focus {
    outline: none;
    box-shadow: none;
}

.mobile-menu-toggle span {
    width: 1.5rem;
    height: 2px;
    background: #000;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #000;
    border-top: 1px solid #000; /* keep the black rule visible under the header when open */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 0;
    gap: 0;
    z-index: 1000;
    width: 100%;
    margin: 0;
}

.mobile-nav.active {
    display: flex;
}


.mobile-nav-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}


.mobile-nav a {
    color: #666 !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    padding: 0.75rem 2rem !important;
    margin: 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    transition: color 0.2s ease !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover {
    color: #000;
}

.mobile-nav a.active {
    color: #000;
    font-weight: 600;
}

/* ============================================================ */
/* KEYWORDS/TAGS - CONSISTENT STYLING */
/* ============================================================ */

.article-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: #f5f5f5;
    color: #333;
    padding: 0.4rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
}

.keyword-tag:hover {
    background: #e8e8e8;
    border-color: #999;
    transform: translateY(-1px);
}

/* ============================================================ */
/* ARTICLE CARDS */
/* ============================================================ */

.articles-grid {
    margin-bottom: 2rem;
}

.article-card {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.2s ease;
}

.article-card:last-child {
    border-bottom: none;
}

.article-card:hover {
    background-color: #fafafa;
}

.affiliate-ad-card {
    display: block;
    background: #f2f6ff;
    border: 1px solid #c8d9f6;
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    margin: 0.4rem 0;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.affiliate-ad-card:hover {
    background: #e9f1ff;
    border-color: #acc7f2;
    text-decoration: none !important;
}

.affiliate-ad-card a,
.affiliate-ad-card * {
    text-decoration: none !important;
}

.affiliate-ad-body {
    display: block;
}

.affiliate-ad-title {
    margin: 0 0 0.22rem 0;
    font-size: 1.05rem;
    line-height: 1.1;
    font-weight: 700;
    color: #0b3d91;
}

.affiliate-ad-card:hover .affiliate-ad-title {
    color: #072c66;
}

.affiliate-ad-description {
    color: #1f2a44;
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

.articles-grid .article-card:has(+ .affiliate-ad-card) {
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 1rem;
    margin-bottom: 0.75rem;
}

.articles-grid .affiliate-ad-card {
    margin: 0.75rem 0;
}

.articles-grid .affiliate-ad-card + .article-card {
    border-top: 1px solid #e8e8e8;
    padding-top: 1rem;
    margin-top: 0.75rem;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.article-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
    outline: none;
}

/* Remove outline on mouse click */
.article-title a:focus,
.article-title a:active {
    outline: none;
    border: none;
}

/* Show outline only for keyboard navigation (Tab key) */
.article-title a:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
    border: none;
}

.article-title a:hover {
    color: #000;
}

.article-subtitle {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.article-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.article-meta span {
    margin-right: 1rem;
}

.article-excerpt {
    font-size: 1rem;
    color: #333;
    line-height: 1.4;
    margin: 0;
}

/* Article content - base styles */
.article-content p {
    font-size: 1rem;
    line-height: 1.6;
}

/* ============================================================ */
/* DATE SECTIONS */
/* ============================================================ */

.date-section {
    margin: 3rem 0 2rem;
    position: relative;
    text-align: center;
}

.date-section:first-child {
    margin-top: 0;
}

.date-section::before,
.date-section::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ccc;
}

.date-section::before {
    left: 0;
}

.date-section::after {
    right: 0;
}

.date-header {
    display: inline-block;
    background: #fff;
    padding: 0 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ============================================================ */
/* SEARCH FORM STYLES (Common across search.php and results.php) */
/* ============================================================ */

.search-form {
    margin: 0 0 3rem 0;
    padding: 2rem;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.search-form form {
    margin-bottom: -0.5rem;
    padding-bottom: 0;
}

.search-input-group {
    position: relative;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.search-submit {
    padding: 0.75rem 2rem;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: #000;
}

.search-submit:active {
    transform: translateY(1px);
}

.search-stats {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.search-suggestion:hover,
.search-suggestion.selected {
    background: #f8f9fa;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion .operator {
    color: #155724;
    font-weight: bold;
}

.search-suggestion .description {
    color: #666;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Advanced Search Link */
.advanced-search-link-container {
    margin-top: 0.25rem;
    margin-bottom: 0;
    padding-left: 1rem;
    padding-bottom: 0;
}

.advanced-search-link {
    font-size: 0.875rem;
    color: #666;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease;
}

.advanced-search-link:hover {
    color: #333;
    text-decoration: underline;
}

/* ============================================================ */
/* MODAL STYLES (Common across results.php) */
/* ============================================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8e8e8;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================================ */
/* PAGINATION STYLES (Common across results.php and archive.php) */
/* ============================================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background-color: #f8f9fa;
    border-color: #999;
}

.pagination-link.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

/* ============================================================ */
/* SEARCH RESULTS HEADER STYLES */
/* ============================================================ */

.search-results {
    margin-top: 2rem;
}

.results-header {
    margin-bottom: 0;
}

.results-header .date-section {
    margin: 0.75rem 0 0 0;
    padding: 0;
    border: none;
    position: relative;
    text-align: left;
}

.results-header .date-section::before,
.results-header .date-section::after {
    display: none !important;
    content: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}

.results-header .date-header {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    margin-top: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
}

.search-query-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-weight: 600;
    color: #333;
}

.results-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Advanced Search Content (Modal) */
.advanced-search-content {
    padding: 0;
    margin: 0;
}

.advanced-search-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #333;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 0.5rem;
}

.advanced-search-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #333;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 0.25rem;
}

.advanced-search-content h3:first-of-type {
    margin-top: 0;
}

.advanced-search-content p {
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.6;
}

.advanced-search-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.advanced-search-content li {
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.5;
}

.advanced-search-content code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: #155724;
    font-weight: bold;
}

.advanced-search-content strong {
    font-weight: 600;
    color: #000;
}

.advanced-search-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.advanced-search-content th,
.advanced-search-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.advanced-search-content th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.advanced-search-content tr:last-child td {
    border-bottom: none;
}

/* Page Layout - Footer to Bottom */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

/* Advanced Search Documentation (search.php) */
.advanced-search-docs {
    margin: 0 0 3rem 0;
    padding: 2rem;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    line-height: 1.6;
}

.advanced-search-docs h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.advanced-search-docs h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #000;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.advanced-search-docs p {
    margin-bottom: 1rem;
    color: #333;
}

.advanced-search-docs ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.advanced-search-docs li {
    margin-bottom: 0.5rem;
    color: #333;
}

.advanced-search-docs code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    color: #155724;
}

.advanced-search-docs strong {
    font-weight: 600;
    color: #000;
}

.search-reference-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.85rem;
}

.search-reference-table th {
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #000;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.search-reference-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 0.85rem;
}

.search-reference-table tr:last-child td {
    border-bottom: none;
}

.search-reference-table code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    font-weight: bold;
    color: #155724;
}

.search-toc {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    margin: 2rem 0 1rem 0;
}

.search-toc h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #000;
}

.toc-list {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin: 0 0 0.125rem 0;
}

.toc-list a {
    display: block;
    padding: 0.125rem 0.375rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.toc-list a:hover {
    background: #e9ecef;
    color: #000;
    text-decoration: underline;
}

.search-form p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* ============================================================ */
/* FOOTER STYLES */
/* ============================================================ */

.site-footer {
    background-color: #0a0a0a;
    color: #e0e0e0;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}

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

.footer-content {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Brand Section */
.footer-brand {
    max-width: 400px;
}

.footer-logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
    color: #ffffff;
}

.footer-tagline {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #a0a0a0;
    margin: 0;
}

/* Navigation */
.footer-nav {
    display: grid;
    gap: 2rem;
}

.footer-nav-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin: 0 0 1rem 0;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-nav-list a {
    color: #d0d0d0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-nav-list a:hover {
    color: #ffffff;
}

/* Copyright */
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #222;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
}

/* Footer Responsive Breakpoints */
@media (min-width: 640px) {
    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .site-footer {
        padding: 4rem 2rem 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1.5fr 2fr;
        gap: 4rem;
    }
}

@media (min-width: 1024px) {
    .footer-nav {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

/* ============================================================ */
/* RESPONSIVE DESIGN - WEB OPTIMIZED */
/* ============================================================ */

/* Large screens (1200px+) */
@media (min-width: 1200px) {
    .container {
        padding: 0.75rem 2rem;
        box-sizing: border-box;
    }
    
    .article-container {
        padding: 0.75rem 2rem;
        box-sizing: border-box;
    }
}

/* Tablets and small laptops (768px - 1199px) */
@media (max-width: 1199px) {
    .header-content {
        padding: 0.75rem 1.5rem;
        box-sizing: border-box;
    }
    
    .container {
        max-width: 1400px;
        padding: 0.75rem 1.5rem;
        box-sizing: border-box;
    }
    
    .article-container {
        max-width: 1400px;
        padding: 0.75rem 1.5rem;
        box-sizing: border-box;
    }
}

/* Tablets and smaller (769px - 1024px) */
@media (max-width: 1024px) {
    /* Show hamburger menu on tablets and smaller */
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        margin-left: 1.5rem;
    }
    
    .mobile-nav a {
        padding: 0.75rem 1.5rem !important;
    }
}

/* Search Form Responsive Styles */
@media (max-width: 1024px) {
    .search-form h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .search-form {
        margin: 0 1rem 3rem 1rem;
        padding: 1.5rem;
    }
    
    .search-form h1 {
        font-size: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-submit {
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .results-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .article-card {
        padding: 1rem 0;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-nav {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-form {
        padding: 1rem;
    }
    
    .search-form h1 {
        font-size: 1.75rem;
    }
}

/* Mobile landscape and small tablets (481px - 767px) */
@media (max-width: 767px) {
    /* Header */
    .header-content {
        padding: 0.75rem 1rem;
        box-sizing: border-box;
    }
    
    .mobile-menu-toggle {
        margin-left: 1.5rem;
    }
    
    .mobile-nav a {
        padding: 0.75rem 1rem !important;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    /* Containers */
    .container {
        padding: 0.75rem 1rem;
        box-sizing: border-box;
    }
    
    .article-container {
        padding: 0.75rem 1rem;
        box-sizing: border-box;
    }
    
    /* Social media bar */
    .social-share {
        padding: 0.375rem 1rem;
    }
    
    /* Typography */
    .page-title {
        font-size: 1.75rem;
    }
    
    .article-title {
        font-size: 1.25rem;
    }
    
    .article-excerpt {
        font-size: 0.95rem;
    }
    
    /* Article content - responsive font sizing */
    .article-content p {
        font-size: 0.95rem;
    }
    
    /* Date Sections */
    .date-section {
        margin: 2rem 0 1.5rem;
    }
    
    .date-section::before,
    .date-section::after {
        width: 30%;
    }
    
    .date-header {
        font-size: 1.125rem;
        padding: 0 1rem;
    }
    
    /* Article cards */
    .article-card {
        padding: 1rem 0;
    }
    
    /* Keywords */
    .article-keywords {
        gap: 0.375rem;
    }
    
    .keyword-tag {
        padding: 0.3rem 0.7rem;
        font-size: 0.65rem;
    }
}

/* Small mobile and tablets (600px and below) */
@media (max-width: 600px) {
    .article-title {
        font-size: 1.125rem;
    }
    
    .article-excerpt {
        font-size: 0.9rem;
    }
    
    /* Article content - responsive font sizing */
    .article-content p {
        font-size: 0.9rem;
    }
}

/* Mobile portrait (320px - 480px) */
@media (max-width: 480px) {
    /* Header */
    .header-content {
        padding: 0.75rem 0.75rem;
        box-sizing: border-box;
    }
    
    .mobile-menu-toggle {
        margin-left: 1rem;
    }
    
    .mobile-nav a {
        padding: 0.75rem 0.75rem !important;
    }
    
    .logo {
        font-size: 1.375rem;
    }
    
    /* Hamburger menu already handled at 1024px breakpoint */
    
    /* Containers */
    .container {
        padding: 0.75rem 0.75rem;
        box-sizing: border-box;
    }
    
    .article-container {
        padding: 0.75rem 0.75rem;
        box-sizing: border-box;
    }
    
    .article-container h1 {
        font-size: 1.4rem;
        line-height: 1.1;
        margin-bottom: 0.3rem;
    }
    
    /* Social media bar */
    .social-share {
        padding: 0.375rem 0.75rem;
    }
    
    /* Typography */
    .page-title {
        font-size: 1.5rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    /* Date sections */
    .date-section {
        margin: 1.5rem 0 1rem;
    }
    
    .date-section::before,
    .date-section::after {
        width: 25%;
    }
    
    .date-header {
        font-size: 1rem;
        padding: 0 0.75rem;
    }
    
    /* Article cards */
    .article-card {
        padding: 0.75rem 0;
    }
    
    .article-excerpt {
        font-size: 0.85rem;
    }
    
    /* Article content - responsive font sizing */
    .article-content p {
        font-size: 0.85rem;
    }
    
    /* Keywords */
    .keyword-tag {
        padding: 0.25rem 0.6rem;
        font-size: 0.6rem;
    }
}

/* ============================================================ */
/* SOCIAL MEDIA SHARING BUTTONS */
/* ============================================================ */

.social-share {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.375rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-btn.twitter:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.social-btn.bluesky:hover {
    background: #00a8ff;
    color: #fff;
    border-color: #00a8ff;
}

.social-btn.facebook:hover {
    background: #4267B2;
    color: #fff;
    border-color: #4267B2;
}

.social-btn.reddit:hover {
    background: #ff4500;
    color: #fff;
    border-color: #ff4500;
}

.social-btn.email:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

.social-btn.bookmark:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.social-btn svg {
    transition: transform 0.3s ease;
}

.social-btn:hover svg {
    transform: scale(1.1);
}

/* Responsive social media buttons */
@media (max-width: 1024px) {
    .social-btn {
        height: 30px;
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 1199px) {
    .social-share {
        padding: 0.375rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .social-share {
        gap: 0.25rem;
        padding: 0.375rem 1rem;
    }
    
    .social-btn {
        height: 28px;
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .social-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .social-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .social-share {
        gap: 0.25rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .social-btn {
        height: 28px;
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .social-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .social-btn span {
        display: none;
    }
}


/* Extra small screens (320px and below) */
@media (max-width: 320px) {
    .header-content {
        padding: 0.75rem 0.5rem;
    }
    
    .mobile-menu-toggle {
        margin-left: 0.75rem;
    }
    
    .mobile-nav a {
        padding: 0.75rem 0.5rem !important;
    }
    
    .container,
    .article-container {
        padding: 0.75rem 0.5rem;
    }
    
    .article-container h1 {
        font-size: 1.2rem;
        line-height: 1.05;
        margin-bottom: 0.25rem;
    }
    
    .social-share {
        padding: 0.375rem 0.5rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .mobile-nav a {
        font-size: 0.9rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .article-title {
        font-size: 1rem;
    }
    
    .article-excerpt {
        font-size: 0.8rem;
    }
    
    /* Article content - responsive font sizing */
    .article-content p {
        font-size: 0.8rem;
    }
}

/* ============================================================ */
/* PRINT STYLES */
/* ============================================================ */

@media print {
    header {
        position: static;
        border-bottom: 2px solid #000;
    }
    
    nav,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .article-card {
        page-break-inside: avoid;
    }
}
