body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.light-mode {
    background-color: #ffffff;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}

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

.navbar {
    width: 100%;
    padding: 10px 0px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}
.airgap{
    height: 140px;
}
.navbar img {
    max-height: 40px;
    max-width: 120px;
}

.logo-link {
    padding: 5px;
}

.logo-wrapper {
    flex: 0 0 auto;
}

.published-date-wrapper {
    text-align: right;
}

.published-date {
    font-size: 0.65em;
    white-space: normal;
    display: inline-block;
    max-width: 100%;
    line-height: 1.1;
}

/* Hide featured image in preview mode */
.article-preview .featured-image {
    display: none;
}

/* Article preview styles */
.article-preview {
    position: relative;
    max-height: 200px;
    overflow: hidden;
}

.article-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
}

.article-full {
    max-height: none;
    overflow: visible;
}

.article-full::after {
    display: none;
}

/* Dark mode gradient for preview */
.dark-mode .article-preview::after {
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0) 0%, rgba(18, 18, 18, 1) 100%);
}

/* Responsive adjustments for the preview height */
@media (max-width: 768px) {
    .article-preview {
        max-height: 150px;
    }
}

h1 {
    font-size: 1.5em;
    margin: 15px 0;
}

.article-excerpt {
    font-size: 1em;
    margin: 10px 0;
}

.featured-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.author-card {
    background: #f9f9f9;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

.author-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 0.25rem;
}

#readMoreButton {
    display: block;
    margin: 40px auto 0;

    width: fit-content;
}

.btn-secondary {
    background-color: #4f6980;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 0.25rem;
}

footer {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
    font-size: 0.8rem;
    background-color: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
}

.site-footer {
    padding: 20px;
    text-align: center;
}

.footer-links {
    margin: 15px 0;
}
.native-ad-block {
    margin: 2rem 0;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.native-ad-block h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
    text-align: center;
}
.ad-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .ad-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.ad-item {
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.ad-item.hidden {
    display: none;
}
.ad-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.ad-item a {
    text-decoration: none;
}
.ad-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}
.ad-item h3 {
    font-size: 1rem;
    margin: 0;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.4;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #0d6efd;
    padding: 0.5rem;
    text-align: center;
}
.ad-item span.subtext {
    font-size: .75rem;
    font-style: italic;
}
.ad-item h3.green {
    background: #00a33b  !important;
}

@media (max-width: 768px) {
    .navbar .container {
        padding: 5px 10px;
    }

    .container {
        padding: 10px 10px;
    }

    .logo-wrapper img {
        max-width: 100px;
    }

    main.container {
        flex: 1 0 auto;
    }

    h1 {
        font-size: 1.2em;
    }

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

    .published-date {
        font-size: 0.65rem;
        margin-top: 5px;
    }

    .published-date-wrapper {
        max-width: 50%;
    }

    body {
        font-size: 14px;
    }

    .site-footer {
        flex-direction: column;
        text-align: center;
    }

}

.dark-mode {
    body, main, p ,h2 {
        background-color: #121212 !important;
        color: #bdbdbd !important;
    }

    .navbar, footer {
        background-color: #1f1f1f !important;
        border-color: #333 !important;
        color: #b0b0b0 !important;

    }

    .author-card {
        background-color: #1f1f1f !important;
        border-color: #333 !important;
    }

    .btn-primary {
        background-color: #0d6efd;
    }

    a {
        color: #8ab4f8;
    }

    a:hover {
        color: #adc8ff;
    }
    
    .published-date {
        color: #b0b0b0;
    }

    .native-ad-block {
        background-color: #121212;
    }
    
    .ad-item h3 {
        color: #e0e0e0;
        background-color: #0d6efd;
    }
}