html,
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sometype Mono', monospace;
    background-color: #ffffff;
    color: #2d3748;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

html {
    letter-spacing: -0.01em;
}

/* Apply text justification sitewide */
p,
li {
    text-align: justify;
}

.site-container {
    max-width: 1050px;
    margin: 0 auto;
    box-sizing: border-box;
}

.header-container {
    background-color: #0F1419;
    color: white;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 16px;
    padding-right: 16px;
}

.brand-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #00D8A6;
}

.nav-link {
    font-weight: bold;
    color: white;
    transition: color 0.3s ease;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 16px;
    margin-left: 10px;
    margin-right: 10px;
    line-height: 1;
}

.nav-link:hover,
.nav-link:focus {
    color: #00D8A6;
}

.nav-link.active {
    color: #00D8A6;
}

.nav-list {
    margin-bottom: 0px;
    padding-left: 0px;
}

.mobile-menu {
    background-color: #0F1419;
    color: white;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.mobile-menu-btn {
    padding: 0px;
    width: 30px;
    height: 30px;
}

.main-container {
    margin-top: 0;
    padding: 5px 0;
}

/* Header ad wrapper and container */
.header-ad-wrapper {
    margin-top: 40px;
    margin-bottom: 5px;
    /* Exactly 5px gap at bottom */
    padding-top: 5px;
    /* Exactly 5px gap at top */
    padding-bottom: 0;
    /* Remove bottom padding */
}

.header-ad-container {
    text-align: center;
    background-color: hsla(0, 0%, 100%, 0);
    border: 1px dashed #ffffff44;
    border-radius: 4px;
}

.col-lg-8,
.col-lg-4 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Main content area */
.main-content-area {
    padding: 10px;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
}

.main-content-title {
    font-size: 26px;
    font-weight: 700;
    margin-top: 0px;
    margin-bottom: 14px;
}

.main-content-text {
    font-size: 17px;
    line-height: 28px;
    margin-bottom: 20px;
    text-align: justify;
}

.sidebar-wrapper {
    display: flex;
    justify-content: flex-end;
}

.sidebar {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
    width: 320px;
    margin-top: 0;
    margin-bottom: 15px;
    padding: 10px;
    box-sizing: border-box;
}

.sidebar-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 4px 0;
    font-size: 18px;
    margin-bottom: 4px;
    font-weight: bold;
    position: relative;
}

.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link.active {
    color: #00D8A6;
    text-decoration: none;
}

.sidebar-category {
    margin-bottom: 15px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding-left: 5px;
    margin-left: 0;
}

.sidebar-icon {
    margin-right: 8px;
    color: #00D8A6;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.category-heading {
    font-weight: bold;
    font-size: 24px;
    margin-top: 0px;
    margin-bottom: 15px;
    padding-bottom: 0px;
    padding-left: 5px;
}

.sidebar-tools-list {
    list-style: none;
    padding-left: 5px;
    margin-top: 5px;
    margin-bottom: 0;
}

.sidebar-tool-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    padding-left: 0;
    justify-content: flex-start;
    /* Ensure left alignment */
    text-align: left;
    /* Ensure text is left-aligned */
}

.sidebar-tool-icon {
    font-size: 8px;
    color: #00D8A6;
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.sidebar-tool-link {
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.sidebar-tool-link:hover,
.sidebar-tool-link.active {
    color: #00D8A6;
    text-decoration: none;
}

.ad-placeholder {
    width: 300px;
    height: 250px;
    background-color: #f1f1f1;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    text-align: center;
}

.ad-icon {
    font-size: 32px;
    color: #999;
    margin-bottom: 10px;
}

.ad-text {
    font-size: 14px;
    color: #666;
    padding: 0 10px;
}

.footer-container {
    background-color: #0F1419;
    color: white;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    padding-top: 6px;
    padding-bottom: 6px;
    padding-left: 16px;
    padding-right: 16px;
    height: 36px;
    display: flex;
    align-items: center;
}

.footer-text {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1;
}

/* Additional styles for the CMS */
.content-section-title {
    font-size: 22px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 14px;
}

/* Article Content Section Styles (renamed from seo-content) */
.article-content p {
    text-align: justify;
}

.article-content .benefits-list li,
.article-content ol li {
    text-align: justify;
}

.feature-item p {
    text-align: justify;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-item {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
}

.feature-icon {
    font-size: 32px;
    color: #00D8A6;
    margin-bottom: 10px;
}

.how-it-works-list {
    margin-left: 20px;
    padding-left: 20px;
}

.how-it-works-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Ad containers */
.ad-container {
    text-align: center;
    margin: 1.5rem 0;
    padding: 0.5rem;
    background: #f0f0f0;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .main-content-area {
        margin-bottom: 30px;
    }

    .d-flex.flex-wrap {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .ad-placeholder {
        margin-left: 0;
    }

    .header-ad-wrapper {
        margin-top: 36px;
        /* Adjusted for smaller mobile header */
    }
}

@media (max-width: 575.98px) {
    .main-container {
        padding: 5px;
    }

    .main-content-title {
        font-size: 28px;
    }

    .main-content-text {
        font-size: 16px;
        line-height: 24px;
    }

    .header-ad-wrapper {
        margin-top: 36px;
    }
}