/* ===========================
   USA Mining News - Main Styles
   Responsive design with sidebar layout
   =========================== */

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

:root {
    --color-primary: #1a1a1a;
    --color-secondary: #d4af37;
    --color-gold: #d4af37;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg: #ffffff;
    --color-bg-light: #f5f5f5;
    --color-border: #ddd;
    --max-width: 1400px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-gold);
}

/* Commodity Price Ticker */
.price-ticker-container {
    background-color: #000;
    color: #fff;
    overflow: hidden;
    width: 100%;
    border-bottom: 2px solid var(--color-gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 0;
}

.price-ticker {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 32px;
    line-height: 32px;
    padding: 0 0 2px 0;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: scroll-ticker 60s linear infinite;
}

.ticker-content:hover {
    animation-play-state: paused;
}

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

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-right: 1px solid rgba(212, 175, 55, 0.3);
}

.ticker-item:last-child {
    border-right: none;
}

.ticker-item a {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ticker-item a:hover {
    color: var(--color-gold);
}

.ticker-name {
    font-weight: 600;
    color: var(--color-gold);
}

.ticker-price {
    font-family: 'Courier New', monospace;
}

.ticker-change {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 0.25rem;
}

.ticker-change.positive {
    color: #00ff00;
    background-color: rgba(0, 255, 0, 0.1);
}

.ticker-change.negative {
    color: #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
}

.ticker-loading {
    padding: 0 2rem;
    font-size: 0.85rem;
    color: var(--color-gold);
}

/* Navigation Bar */
.navbar {
    background-color: var(--color-primary);
    color: white;
    position: sticky;
    top: 34px;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo-usa {
    color: var(--color-gold);
}

.logo-mining {
    color: white;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(212, 175, 55, 0.2);
    color: var(--color-gold);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop, shown in mobile media query */
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.mobile-menu-toggle:hover {
    color: var(--color-gold);
}

/* Banner Ad */
.banner-ad-container {
    max-width: var(--max-width);
    margin: 1rem auto;
    text-align: center;
    padding: 0 1rem;
}

.banner-ad-container img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.ad-placeholder {
    background-color: var(--color-bg-light);
    border: 2px dashed var(--color-border);
    padding: 2rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-align: center;
}

/* Main Layout - Three Column */
.main-container {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 2rem;
}

/* Sidebars */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-ad {
    background-color: white;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sidebar-ad img {
    width: 200px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Main Content Area */
.content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 500px;
}

/* Typography */
.page-title {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-gold);
    padding-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin: 2rem 0 1rem 0;
    border-left: 4px solid var(--color-gold);
    padding-left: 1rem;
}

/* Featured Article */
.featured-section {
    margin-bottom: 3rem;
}

.featured-article {
    background-color: var(--color-bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

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

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-date {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.article-summary {
    color: var(--color-text);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.read-more {
    color: var(--color-gold);
    font-weight: 600;
    display: inline-block;
    transition: transform 0.3s ease;
}

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

/* Articles List Page */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-list-item {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.article-list-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.article-list-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
}

.article-list-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.article-list-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Article Detail Page */
.article-detail {
    max-width: 800px;
}

.article-full {
    margin-bottom: 3rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title-full {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

.article-image-full {
    margin: 2rem 0;
}

.article-image-full img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.article-summary-full {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--color-bg-light);
    border-left: 4px solid var(--color-gold);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.article-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.article-body ul, .article-body ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.mid-article-ad {
    margin: 3rem 0;
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.mid-article-ad img {
    max-width: 100%;
    height: auto;
}

/* Related Articles */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
}

.related-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-content {
    padding: 1rem;
}

.related-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Advertise Page */
.advertise-page {
    max-width: 900px;
}

.page-intro {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.ad-options {
    margin-bottom: 3rem;
}

.ad-option {
    background-color: var(--color-bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--color-gold);
}

.ad-option h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.ad-option p {
    margin-bottom: 1rem;
}

.ad-option ul {
    list-style: none;
    padding-left: 0;
}

.ad-option li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.ad-option li:last-child {
    border-bottom: none;
}

/* Pricing Table */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pricing-table thead {
    background-color: var(--color-primary);
    color: white;
}

.pricing-table th,
.pricing-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.pricing-table tbody tr:hover {
    background-color: var(--color-bg-light);
}

/* Audience Stats */
.audience-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-item {
    background-color: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-gold);
}

.stat-item h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--color-text-light);
}

/* Contact Section */
.contact-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-button {
    display: inline-block;
    background-color: var(--color-gold);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.contact-button:hover {
    background-color: #b8941f;
    color: white;
}

.contact-note {
    margin-top: 1rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background-color: var(--color-primary);
    color: white;
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
}

.footer-content p {
    margin: 0.5rem 0;
}

.footer a {
    color: var(--color-gold);
}

.footer a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 250px 1fr 250px;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    /* Stack sidebars below main content on tablet */
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .sidebar-content {
        flex-direction: row;
        overflow-x: auto;
        gap: 1rem;
    }
    
    .sidebar-ad {
        flex: 0 0 auto;
        max-width: 300px;
    }
    
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .audience-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Hide sidebar ads on mobile */
    .sidebar {
        display: none;
    }
    
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        position: relative;
    }
    
    /* Show burger menu on mobile */
    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    /* Override: hide nav links on mobile by default */
    .nav-links {
        display: none;
    }
    
    /* Position dropdown when active */
    .nav-links.mobile-active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-primary);
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        text-align: left;
        width: 100%;
        display: block;
        border-radius: 0;
    }
    
    .nav-links li:last-child .nav-link {
        border-bottom: none;
    }
    
    /* Resize banner ads on mobile */
    .banner-ad-container {
        padding: 0.5rem;
    }
    
    .banner-ad-container img {
        max-height: 100px;
        width: auto;
    }
    
    /* Resize sidebar ads on mobile */
    .sidebar-ad img {
        width: 120px;
        max-width: 100%;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-list-layout {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-table {
        font-size: 0.9rem;
    }
    
    .pricing-table th,
    .pricing-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.2rem;
    }
    
    /* Banner ads even smaller on very small screens */
    .banner-ad-container img {
        max-height: 60px;
    }
    
    /* Sidebar ads smaller */
    .sidebar-ad img {
        width: 80px;
    }
    
    /* Price ticker smaller text */
    .ticker-item {
        font-size: 0.75rem;
        padding: 0 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .article-title-full {
        font-size: 1.8rem;
    }
}

/* No Articles Message */
.no-articles {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
    font-size: 1.1rem;
}
