/* Djebel Theme - Bold & Editorial Style */

/* Force scrollbar track on all pages to prevent layout shift */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable both-edges;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: #1a1a2e;
    background: #f7f7f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

.content-area {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.dj-app-header {
    text-align: center;
    margin-bottom: 0;
    padding: 20px 30px 10px;
    background: #ffffff;
    border: none;
    border-bottom: 1px solid #e8e8e8;
}

.dj-app-site-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 44px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px 0;
    letter-spacing: -1px;
    line-height: 1.1;
}

.dj-app-site-description {
    font-size: 17px;
    color: #6b6b6b;
    margin: 0;
    letter-spacing: 0.2px;
}

.construction-badge {
    display: inline-block;
    background: #1a1a2e;
    color: white;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Navigation */
.dj-app-menu-container {
    padding: 0;
    margin: 0;
}

.dj-app-integrated-menu {
    margin-bottom: 0;
    padding: 10px 0;
    background: #ffffff;
    border-bottom: 2px solid #e8e8e8;
}

.dj-app-menu-nav {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dj-app-menu-item {
    position: relative;
    margin: 0;
}

.dj-app-menu-link,
.dj-app-menu-text {
    display: block;
    padding: 8px 18px 6px;
    text-decoration: none;
    color: #6b6b6b;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.dj-app-menu-link:hover {
    color: #1a1a2e;
    border-bottom-color: #1a1a2e;
}

.dj-app-menu-link:focus-visible,
.dj-app-menu-text:focus-visible {
    outline: 2px solid #1a1a2e;
    outline-offset: 2px;
    border-bottom-color: #1a1a2e;
}

.dj-app-menu-item-current .dj-app-menu-text {
    color: #1a1a2e;
    border-bottom-color: #1a1a2e;
}

/* Submenus - dropdown on hover */
.dj-app-content .dj-app-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 100;
}

.dj-app-menu-item:hover > .dj-app-submenu {
    display: block;
}

.dj-app-menu-item:focus-within > .dj-app-submenu {
    display: block;
}

.dj-app-submenu > .dj-app-menu-item {
    display: block;
    margin: 0;
}

.dj-app-submenu > .dj-app-menu-item > .dj-app-menu-link,
.dj-app-submenu > .dj-app-menu-item > .dj-app-menu-text {
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    color: #333;
    border: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.dj-app-submenu > .dj-app-menu-item > .dj-app-menu-link:hover,
.dj-app-submenu > .dj-app-menu-item > .dj-app-menu-text:hover {
    background: #eaeaea;
    color: #1a1a2e;
}

/* Content */
.dj-app-content {
    background: #ffffff;
    padding: 20px 40px 40px;
    margin: 24px 0;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border-radius: 2px;
    flex: 1;
}

.dj-app-page-content {
    padding-top: 24px;
    width: 100%;
    overflow-wrap: break-word;
}

.dj-app-page-content > :first-child {
    margin-top: 8px;
}

.dj-app-page-content > h1:first-child,
.dj-app-page-content > h2:first-child,
.dj-app-page-content > :first-child > h1:first-child,
.dj-app-page-content > :first-child > h2:first-child {
    margin-top: 8px;
}

.dj-app-content h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 40px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 8px 0 16px 0;
    letter-spacing: -1px;
    line-height: 1.15;
}

.dj-app-content h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 32px 0 16px 0;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.dj-app-content h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 28px 0 12px 0;
    line-height: 1.3;
}

.dj-app-content p {
    margin: 0 0 20px 0;
    color: #333;
    line-height: 1.8;
}

.dj-app-content ul,
.dj-app-content ol {
    padding-left: 1.35em;
}

.dj-app-content li {
    margin-bottom: 0.5em;
}

.dj-app-content pre {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 20px 24px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin: 20px 0;
}

.dj-app-content code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.dj-app-content p code,
.dj-app-content li code {
    background: #f0f0f0;
    color: #1a1a2e;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

.dj-app-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 1em;
    color: inherit;
}

.dj-app-content a {
    color: #1a1a2e;
    text-decoration: underline;
    text-decoration-color: rgba(26, 26, 46, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
}

.dj-app-content a:hover {
    text-decoration-color: #1a1a2e;
}

.dj-app-content a:focus-visible {
    outline: 2px solid #1a1a2e;
    outline-offset: 2px;
    text-decoration-color: #1a1a2e;
}

.dj-app-content .dj-app-menu-link,
.dj-app-content .dj-app-menu-text {
    text-decoration: none;
}

.dj-app-content article {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ============================================
   Blog Listing (djebel-static-content plugin)
   ============================================ */

.djebel-plugin-static-content-container {
    padding: 0;
}

.dj-app-content .djebel-plugin-static-content-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 8px 0 20px 0;
    letter-spacing: -0.3px;
}

/* Blog post card */
.djebel-plugin-static-content-post {
    padding: 18px 0;
    border-bottom: 1px solid #e8e8e8;
}

.djebel-plugin-static-content-post:first-of-type {
    padding-top: 0;
}

.djebel-plugin-static-content-post:last-of-type {
    border-bottom: none;
}

/* Post title */
.djebel-plugin-static-content-post-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.djebel-plugin-static-content-post-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.djebel-plugin-static-content-post-title a:hover {
    color: #555;
}

/* Post meta (date, author, category) */
.djebel-plugin-static-content-post-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Post summary */
.djebel-plugin-static-content-post-summary {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-top: 8px;
}

/* Post tags (listing) */
.djebel-plugin-static-content-post-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Tag pill */
.djebel-plugin-static-content-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #6b6b6b;
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: lowercase;
}

/* Pagination */
.djebel-plugin-static-content-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 32px 0 8px;
    margin-top: 16px;
    border-top: 1px solid #e8e8e8;
    font-size: 14px;
}

.djebel-plugin-static-content-pagination a {
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.djebel-plugin-static-content-pagination a:hover {
    color: #555;
}

.djebel-plugin-static-content-pagination-info {
    color: #777;
    font-size: 13px;
}

/* ============================================
   Single Post (djebel-static-content plugin)
   ============================================ */

.djebel-plugin-static-content-post-single {
    padding: 0;
}

/* Single post title */
.djebel-plugin-static-content-post-single-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 40px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.15;
    letter-spacing: -1px;
    margin: 8px 0 16px 0;
}

/* Single post meta */
.djebel-plugin-static-content-post-single-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Single post tags */
.djebel-plugin-static-content-post-single-tags {
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Single post content - long-form reading */
.djebel-plugin-static-content-post-single-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.djebel-plugin-static-content-post-single-content p {
    margin: 0 0 24px 0;
}

.djebel-plugin-static-content-post-single-content h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 48px 0 16px 0;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.djebel-plugin-static-content-post-single-content h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 36px 0 12px 0;
    line-height: 1.3;
}

.djebel-plugin-static-content-post-single-content blockquote {
    margin: 28px 0;
    padding: 2px 0 2px 24px;
    border-left: 3px solid #1a1a2e;
    color: #555;
    font-style: italic;
    font-size: 19px;
    line-height: 1.7;
}

.djebel-plugin-static-content-post-single-content blockquote p {
    margin: 0;
}

.djebel-plugin-static-content-post-single-content pre {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 20px 24px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin: 24px 0;
}

.djebel-plugin-static-content-post-single-content code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.djebel-plugin-static-content-post-single-content p code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

.djebel-plugin-static-content-post-single-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 1em;
}

.djebel-plugin-static-content-post-single-content ul,
.djebel-plugin-static-content-post-single-content ol {
    margin: 0 0 24px 0;
    padding-left: 28px;
}

.djebel-plugin-static-content-post-single-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.djebel-plugin-static-content-post-single-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    margin: 24px 0;
}

.djebel-plugin-static-content-post-single-content a {
    color: #1a1a2e;
    text-decoration: underline;
    text-decoration-color: rgba(26, 26, 46, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
}

.djebel-plugin-static-content-post-single-content a:hover {
    text-decoration-color: #1a1a2e;
}

.djebel-plugin-static-content-post-single-content hr {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 40px 0;
}

/* Grid Layout */
.dj-grid {
    display: grid;
    gap: 20px;
    margin: 24px 0;
}

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

.dj-grid-item {
    padding: 20px 24px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
}

.dj-grid-item h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.dj-grid-item p {
    margin: 0;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .dj-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.dj-app-footer {
    text-align: center;
    margin-top: auto;
    padding: 24px 20px;
    background: transparent;
    border: none;
    border-top: 1px solid #e8e8e8;
}

.dj-app-footer p {
    margin: 0;
    color: #777;
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* Newsletter */
.djebel-simple-newsletter-form {
    background: #ffffff;
    padding: 36px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border-radius: 2px;
    margin: 36px auto;
    max-width: 480px;
}

.djebel-simple-newsletter-msg {
    margin-bottom: 20px;
}

.newsletter-input-group {
    margin-bottom: 16px;
}

.newsletter-email-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    font-size: 15px;
    background: #ffffff;
    color: #1a1a2e;
    display: block;
    margin-bottom: 10px;
    border-radius: 2px;
    transition: border-color 0.2s ease;
}

.newsletter-email-input:focus {
    outline: none;
    border-color: #1a1a2e;
}

.newsletter-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: #1a1a2e;
    color: white;
    border: none;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2px;
    transition: background 0.2s ease;
}

.newsletter-submit-btn:hover {
    background: #2d2d4e;
}

.newsletter-submit-btn:focus-visible {
    outline: 2px solid #1a1a2e;
    outline-offset: 2px;
}

.newsletter-agree-section {
    margin-top: 16px;
}

.newsletter-checkbox-label {
    font-size: 13px;
    color: #666;
}

.newsletter-checkbox {
    margin-right: 10px;
}

/* Pre-formatted text */
.text-pre-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 20px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .content-area {
        padding: 10px 0;
        max-width: calc(100% - 32px);
    }

    .dj-app-header {
        padding: 32px 20px 28px;
    }

    .dj-app-site-title {
        font-size: 32px;
    }

    .dj-app-menu-item {
        display: block;
        margin: 0;
    }

    .dj-app-menu-nav {
        text-align: left;
    }

    .dj-app-menu-link,
    .dj-app-menu-text {
        display: block;
        width: 100%;
        padding: 12px 16px;
        font-size: 12px;
        line-height: 1.4;
    }

    .dj-app-submenu {
        position: static;
        display: block;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        padding: 0;
        margin: 0;
        overflow: visible;
    }

    .dj-app-submenu .dj-app-menu-link,
    .dj-app-submenu .dj-app-menu-text {
        padding: 10px 16px 10px 28px;
        font-size: 13px;
        color: #333;
    }

    .dj-app-submenu .dj-app-menu-item:hover {
        background: #eaeaea;
    }

    .dj-app-content {
        padding: 28px 20px;
        margin: 16px 0;
    }

    .dj-app-content h1 {
        font-size: 28px;
    }

    .dj-app-content h2 {
        font-size: 24px;
    }

    /* Blog listing mobile */
    .djebel-plugin-static-content-post {
        padding: 24px 0;
    }

    .djebel-plugin-static-content-post-title {
        font-size: 20px;
    }

    /* Single post mobile */
    .djebel-plugin-static-content-post-single-title {
        font-size: 30px;
        letter-spacing: -0.5px;
    }

    .djebel-plugin-static-content-post-single-content {
        font-size: 16px;
    }

    .djebel-plugin-static-content-post-single-content blockquote {
        font-size: 17px;
        margin: 20px 0;
        padding-left: 16px;
    }

    .djebel-plugin-static-content-post-single-content pre {
        padding: 16px;
        font-size: 13px;
    }

    /* Pagination mobile */
    .djebel-plugin-static-content-pagination {
        flex-wrap: wrap;
        gap: 16px;
        padding: 24px 0 8px;
    }
}

@media (max-width: 480px) {
    .dj-app-site-title {
        font-size: 26px;
    }

    .dj-app-content {
        padding: 24px 16px;
    }

    .djebel-plugin-static-content-post-single-title {
        font-size: 26px;
    }

    .djebel-simple-newsletter-form {
        padding: 20px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dj-app-menu-link,
    .dj-app-menu-text,
    .dj-app-content a,
    .djebel-plugin-static-content-post-title a,
    .djebel-plugin-static-content-pagination a,
    .newsletter-email-input,
    .newsletter-submit-btn {
        transition: none;
    }
}
