/* Gruvindustrin i Sverige - Main Stylesheet */

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

:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --accent: #d69e2e;
    --accent-hover: #b7791f;
    --dark: #1a202c;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-600: #718096;
    --gray-800: #2d3748;
    --green: #52ad4b;
    --gold: #d4a012;
    --linkedin: #0A66C2;
}

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

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

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

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

/* ===== NAVIGATION ===== */
.site-nav {
    background: var(--primary);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo svg {
    height: 36px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text .main {
    color: white;
    font-size: 1rem;
    font-weight: 700;
}

.logo-text .sub {
    color: var(--green);
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    display: block;
    color: rgba(255,255,255,0.9);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    list-style: none;
    padding: 0.5rem 0;
}

.nav-links > li:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--gray-800);
    font-size: 0.85rem;
}

.nav-dropdown a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

/* ===== MAIN LAYOUT ===== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
}

.main-container.full-width {
    grid-template-columns: 1fr;
}

.main-content {
    min-width: 0;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px 8px 0 0;
}

.section-header.alt {
    background: var(--dark);
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-body {
    padding: 1.25rem;
}

/* ===== ARTICLE CARDS ===== */
.article-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--gray-200);
}

.article-featured .article-image {
    min-height: 280px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.article-featured .article-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-list {
    list-style: none;
}

.article-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    transition: background 0.2s;
}

.article-item:hover {
    background: var(--gray-100);
}

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

.article-thumb {
    background: var(--gray-200);
    border-radius: 4px;
    height: 90px;
    overflow: hidden;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-thumb .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-400);
}

.article-category {
    display: inline-block;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0.25rem 0;
}

.article-title a {
    color: var(--gray-800);
}

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

.article-excerpt {
    color: var(--gray-600);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Featured article specific */
.article-featured .article-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-featured .article-excerpt {
    font-size: 0.95rem;
    -webkit-line-clamp: 4;
    margin-bottom: 1rem;
}

/* ===== SHARE BUTTON ===== */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    background: var(--linkedin);
    color: white;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #004182;
    color: white;
}

.share-btn svg {
    width: 12px;
    height: 12px;
    fill: white;
}

/* ===== SIDEBAR ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.widget-header {
    background: var(--dark);
    color: white;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-content {
    padding: 1rem;
}

/* Stats Widget */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-box {
    background: var(--gray-100);
    padding: 0.75rem;
    border-radius: 4px;
    text-align: center;
}

.stat-box .number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-box .label {
    font-size: 0.7rem;
    color: var(--gray-600);
    line-height: 1.2;
}

/* Commodity Widget */
.commodity-list {
    list-style: none;
}

.commodity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
}

.commodity-item:last-child {
    border-bottom: none;
}

.commodity-name {
    font-weight: 500;
}

.commodity-price {
    color: var(--gray-600);
}

.commodity-change {
    font-weight: 600;
    font-size: 0.8rem;
}

.price-up { color: #38a169; }
.price-down { color: #e53e3e; }

/* Links Widget */
.widget-links {
    list-style: none;
}

.widget-links li {
    border-bottom: 1px solid var(--gray-200);
}

.widget-links li:last-child {
    border-bottom: none;
}

.widget-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    color: var(--gray-800);
    font-size: 0.85rem;
}

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

.widget-links .icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

/* LinkedIn Widget */
.linkedin-widget {
    text-align: center;
}

.linkedin-widget p {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.btn-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--linkedin);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-linkedin:hover {
    background: #004182;
    color: white;
}

.btn-linkedin svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Newsletter Widget */
.newsletter-form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.newsletter-form button {
    width: 100%;
    padding: 0.6rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.category-card {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.category-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.category-card h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.category-card p {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* ===== SINGLE ARTICLE ===== */
.article-single {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.article-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.article-header .article-category {
    margin-bottom: 0.5rem;
}

.article-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.article-header .article-meta {
    font-size: 0.9rem;
}

.article-hero {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

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

.article-body h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.article-body h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--gray-800);
}

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

.article-body ul, .article-body ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

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

.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--gray-600);
}

.article-body img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 4px;
    font-size: 0.8rem;
}

.tag:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.breadcrumb a {
    color: var(--gray-600);
}

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

.breadcrumb .separator {
    color: var(--gray-400);
    margin: 0 0.25rem;
}

.breadcrumb .current {
    color: var(--gray-800);
}

/* Article Summary Box */
.article-summary {
    background: var(--gray-100);
    border-left: 4px solid var(--primary);
    padding: 1.25rem 1.5rem;
    margin: 0 2rem;
    font-size: 1rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* Article Sources */
.article-sources {
    background: var(--gray-100);
    padding: 1.25rem 2rem;
    margin-top: 1rem;
}

.article-sources h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.article-sources ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-sources li {
    font-size: 0.85rem;
    color: var(--gray-600);
    padding: 0.25rem 0;
}

.article-sources li a {
    color: var(--primary);
}

/* Tags Label */
.tags-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-right: 0.5rem;
}

/* Author Box */
.author-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-avatar svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
}

.author-role {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Article Navigation */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
}

.article-nav a {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 6px;
    transition: background 0.2s;
}

.article-nav a:hover {
    background: var(--gray-200);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.nav-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    line-height: 1.3;
}

.article-nav .disabled {
    visibility: hidden;
}

/* Hero Image Caption */
.article-hero-container {
    margin: 0;
}

.article-hero-container figcaption {
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    color: var(--gray-600);
    font-style: italic;
    background: var(--gray-100);
}

/* ===== LIST PAGE ===== */
.page-header {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--gray-600);
    font-size: 1.1rem;
}

.page-header .breadcrumb {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.page-header .breadcrumb a {
    color: var(--gray-600);
}

.page-header .breadcrumb a:hover {
    color: var(--primary);
}

/* ===== COMPANY CARD ===== */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.company-card {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 1.25rem;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.company-card:hover {
    border-color: var(--accent);
}

.company-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.company-card .company-type {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.company-card p {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: white;
    margin-top: 2rem;
    padding: 2rem 1.5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--gray-200);
    font-size: 0.85rem;
}

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

.footer-copy {
    color: var(--gray-600);
    font-size: 0.8rem;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pagination a:hover {
    background: var(--gray-200);
}

.pagination .active {
    background: var(--primary);
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .article-featured {
        grid-template-columns: 1fr;
    }

    .article-featured .article-image {
        min-height: 180px;
    }

    .article-item {
        grid-template-columns: 100px 1fr;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .article-header {
        padding: 1.5rem;
    }

    .article-body {
        padding: 1.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
