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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: url('/media/faktenexpress_BG.jpg') center center fixed;
    background-size: cover;
    background-color: var(--bg-alt);
}

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

/* Header */
.site-header {
    margin-bottom: 0.5rem;
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: var(--bg-color);
    box-shadow: var(--shadow);
}

.site-logo {
    display: block;
}

.site-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.header-nav {
    max-width: 1200px;
    margin: 0 auto;
    background: #1a1a1a;
    box-shadow: var(--shadow);
}

.header-nav .container {
    padding: 0 20px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 1rem 0;
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-transform: capitalize;
}

.nav-menu a:hover {
    color: white;
}

.header-search {
    display: flex;
    gap: 0.5rem;
}

.search-input-header {
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    border-radius: 4px;
    background: #2a2a2a;
    color: #ccc;
    font-size: 0.9rem;
    width: 200px;
}

.search-input-header:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: #333;
}

.search-input-header::placeholder {
    color: #666;
}

.search-button-header {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.search-button-header:hover {
    background: var(--primary-color);
}

/* Main Content */
.site-main {
    padding: 0.5rem 0;
    min-height: calc(100vh - 300px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.main-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s;
    overflow: hidden;
}

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

.post-card-inner {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    padding: 1rem;
}

.post-card-thumbnail {
    flex-shrink: 0;
    width: 180px;
    height: 135px;
    overflow: hidden;
    border-radius: 4px;
}

.post-card-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s;
    display: block;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.05);
}

.post-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.post-meta time {
    font-weight: 500;
}

.author-badge {
    padding: 0.2rem 0.6rem;
    background: #e8f4f8;
    color: var(--primary-color);
    border-radius: 3px;
    font-weight: 500;
    font-size: 0.85rem;
}

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

.author-badge a:hover {
    color: var(--secondary-color);
}

.post-meta .author a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-meta .author a:hover {
    color: var(--secondary-color);
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.category-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.75rem;
    transition: background 0.3s;
}

.category-tag:hover {
    background: var(--primary-color);
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

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

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

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--accent-color);
}

/* Single Post */
.single-post {
    background: var(--bg-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.post-featured-image {
    width: 100%;
    margin: 0;
    line-height: 0;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.single-post .post-header {
    margin: 2rem 2rem 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

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

.single-post .post-meta {
    font-size: 0.95rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    padding: 0 2rem;
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.post-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.post-content a {
    color: var(--secondary-color);
    text-decoration: underline;
}

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

.post-footer {
    margin-top: 3rem;
    margin-left: 2rem;
    margin-right: 2rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.post-disclaimer {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.post-navigation a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    flex: 1;
    max-width: 48%;
}

.post-navigation a:hover {
    background: var(--bg-color);
    border-color: var(--secondary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.nav-previous {
    justify-content: flex-start;
}

.nav-next {
    justify-content: flex-end;
    text-align: right;
}

.nav-arrow {
    font-size: 1.5rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.nav-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-direction {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.4;
}

/* Responsive navigation */
@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-navigation a {
        max-width: 100%;
    }

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

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

.sidebar-widget {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.category-list a:hover,
.category-list a.active {
    color: var(--secondary-color);
}

.category-list .count {
    color: var(--text-light);
    font-size: 0.9rem;
}

.category-dropdown {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.3s;
}

.category-dropdown:hover {
    border-color: var(--secondary-color);
}

.category-dropdown:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-color);
    background: var(--bg-alt);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

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

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.category-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-hover);
}

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

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

.category-count {
    color: var(--text-light);
}

/* Author Cards with Logos */
.author-card .author-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border-radius: 50%;
    padding: 1rem;
    transition: all 0.3s;
}

.author-card:hover .author-logo {
    background: var(--bg-color);
    transform: scale(1.1);
}

.author-card .author-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Search */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.search-button {
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: var(--primary-color);
}

.search-results h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.pagination-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

.pagination-btn.pagination-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--text-light);
    color: var(--text-light);
}

.pagination-btn.pagination-disabled:hover {
    background: var(--bg-color);
    color: var(--text-light);
    transform: none;
}

.pagination-info {
    color: var(--text-light);
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
}

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

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* Info Page */
.info-page {
    max-width: 800px;
    margin: 0 auto;
}

.info-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.info-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.info-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.info-section:last-of-type {
    border-bottom: none;
}

.info-section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.info-section.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    border-radius: 6px;
}

.info-section.warning h2 {
    color: #856404;
}

.back-to-home {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* Error Page */
.error-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.error-content {
    background: var(--bg-color);
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.error-title {
    font-size: 8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

.error-subtitle {
    font-size: 2rem;
    color: var(--text-color);
    margin: 1rem 0 2rem;
}

.error-message {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: 6px;
    text-align: left;
}

.error-message p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.error-message p:last-child {
    margin-bottom: 0;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.button-primary,
.button-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.button-primary {
    background: var(--secondary-color);
    color: white;
}

.button-primary:hover {
    background: var(--primary-color);
}

.button-secondary {
    background: var(--bg-alt);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.button-secondary:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.error-suggestions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    text-align: left;
}

.error-suggestions h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.recent-posts {
    list-style: none;
    padding: 0;
}

.recent-posts li {
    margin-bottom: 0.75rem;
}

.recent-posts a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

.error-technical {
    margin-top: 2rem;
    text-align: left;
}

.error-technical details {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.error-technical summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--primary-color);
    user-select: none;
}

.error-technical summary:hover {
    color: var(--secondary-color);
}

.error-technical p {
    margin: 1rem 0;
    line-height: 1.6;
}

.error-technical ul {
    margin-left: 1.5rem;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .site-logo img {
        height: 60px;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .nav-menu a {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }

    .header-search {
        width: 100%;
    }

    .search-input-header {
        flex: 1;
    }

    .single-post {
        padding: 1.5rem;
    }

    .single-post .post-title {
        font-size: 1.8rem;
    }

    .main-content {
        padding: 1.5rem;
    }

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

    .error-title {
        font-size: 5rem;
    }

    .error-subtitle {
        font-size: 1.5rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    /* Optimize post card thumbnails for tablets */
    .post-card-inner {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .post-card-thumbnail {
        width: 120px;
        height: 90px;
    }

    .post-meta {
        font-size: 0.8rem;
        gap: 0.4rem;
    }

    .post-excerpt {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

@media (max-width: 600px) {
    .post-card-inner {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .post-card-thumbnail {
        width: 100px;
        height: 75px;
    }

    .post-title {
        font-size: 1.1rem;
    }

    .post-meta {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .post-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }

    .author-badge {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }

    .category-tag {
        font-size: 0.7rem;
        padding: 0.1rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 1.2rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
    }

    /* Switch to vertical layout for mobile */
    .post-card-inner {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .post-card-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        max-height: 250px;
    }

    .post-card-thumbnail img {
        object-fit: cover;
    }

    .post-meta {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .post-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .read-more {
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .post-card-thumbnail {
        max-height: 200px;
    }

    .post-title {
        font-size: 1rem;
    }

    .post-meta {
        font-size: 0.7rem;
    }

    .post-excerpt {
        font-size: 0.85rem;
    }

    .main-content {
        padding: 1rem;
    }
}
