/* Blog Newspaper Style */

.blog-section {
    padding-top: 120px;
    background-color: #1e1e1e;
}

.blog-container {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Align title and button to the bottom */
    padding-bottom: 24px;
    border-bottom: 1px solid var(--GREY);
    margin-bottom: 40px;
}

.blog-page-title {
    font-size: 3rem;
    font-weight: 500;
    line-height: 1;
    margin: 0;
    background: radial-gradient(50% 50% at 50% 50%, #FFF 0%, #E4E4E4 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Blog Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.blog-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.blog-item-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #282828;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.blog-item-media img,
.blog-item-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-item-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.blog-title {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

.blog-title a {
    text-decoration: none;
    color: var(--WHITE);
    font-size: inherit !important;
    transition: color 0.2s;
}

.blog-title a:hover {
    color: var(--MAIN-RED);
}

.blog-description {
    font-size: 1rem;
    color: var(--SEC-COLOR);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media screen and (max-width: 1100px) {
    .blog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .blog-page-title {
        font-size: 2.5rem;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media screen and (max-width: 750px) {
    .blog-header {
        align-items: center;
        text-align: center;
    }

    .blog-page-title {
        font-size: 2rem;
    }

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

/* Blog Detail Page */
.blog-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    color: var(--WHITE);
}

.blog-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 40px;
    background: #111;
    overflow: hidden;
}

.blog-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.6;
}

.blog-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-hero-content h1 {
    font-size: 2.5rem;
    margin: 0;
    line-height: 1.25;
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--SEC-COLOR);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-author {
    color: var(--WHITE);
    font-weight: 500;
}

.blog-meta-sep {
    color: var(--MAIN-RED);
}

.blog-breadcrumbs {
    font-size: 0.75rem;
    color: var(--SEC-COLOR);
    opacity: 0.7;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.blog-breadcrumbs a {
    color: var(--SEC-COLOR);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-breadcrumbs a:hover {
    color: var(--MAIN-RED);
}

.blog-breadcrumbs span {
    color: var(--WHITE);
}

.blog-cover {
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
}

.blog-cover img,
.blog-cover video {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    line-height: 1.7;
    font-size: 1.05rem;
    color: #e4e4e4;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.article-body h2 {
    font-size: 1.8rem;
    margin-top: 48px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--WHITE);
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--WHITE);
    line-height: 1.4;
}

.article-body h4 {
    font-size: 1.2rem;
    margin-top: 32px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--WHITE);
}

.article-body p {
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.article-body blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.04);
    border-left: 4px solid var(--MAIN-RED);
    font-style: italic;
    font-size: 1.2rem;
    color: #f0f0f0;
    line-height: 1.6;
    border-radius: 0 8px 8px 0;
}

.article-body ul,
.article-body ol {
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body a {
    color: var(--MAIN-RED);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.2s, color 0.2s;
}

.article-body a:hover {
    border-bottom-color: var(--MAIN-RED);
}

/* Blog Form & Editor Styles */
.inline-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    resize: none;
}

.inline-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.meta-inputs {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 20px;
}

.meta-inputs label {
    display: block;
    margin-bottom: 5px;
    color: var(--GREY);
    font-size: 0.9rem;
}

.meta-inputs input,
.meta-inputs textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Editor.js Overrides */
.ce-block__content,
.ce-toolbar__content {
    max-width: 800px;
}

.ce-toolbar__plus,
.ce-toolbar__settings-btn {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
}

.ce-toolbar__plus:hover,
.ce-toolbar__settings-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.ce-popover {
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
    color: #eee !important;
}

.ce-popover__item:hover {
    background-color: #333 !important;
}

.ce-popover__item-icon {
    background-color: #1a1a1a !important;
    color: #fff !important;
    box-shadow: 0 0 0 1px #333 !important;
}

.ce-inline-toolbar,
.ce-conversion-toolbar,
.ce-settings {
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
}

.ce-inline-tool,
.ce-conversion-tool {
    color: #ccc !important;
}

.ce-inline-tool:hover,
.ce-conversion-tool:hover,
.ce-settings__button:hover {
    background-color: #444 !important;
}

.ce-settings__button {
    background-color: #1a1a1a !important;
    color: #fff !important;
}

/* Dropzone Styles */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 15px;
    cursor: pointer;
    overflow: hidden;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.dropzone .dropzone-text {
    color: var(--SEC-COLOR);
    pointer-events: none;
    position: relative;
    z-index: 5;
}

.dropzone .dropzone-icon {
    font-size: 2em;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    position: relative;
    z-index: 5;
}

.dropzone .dropzone-file-name {
    display: block;
    margin-top: 10px;
    color: #fff;
    font-weight: bold;
    pointer-events: none;
    position: relative;
    z-index: 5;
}

/* Submit Button */
.submit-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.submit-btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* Hero Editor Layout Helpers */
.hero-dropzone {
    cursor: pointer;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-dropzone-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 8px;
    pointer-events: none;
    text-align: center;
}

.hero-dropzone-indicator .dropzone-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.hero-dropzone-indicator .dropzone-text {
    font-size: 0.85rem;
    margin: 0;
    color: #fff;
}

.hero-dropzone-indicator .dropzone-file-name {
    font-size: 0.75rem;
    color: var(--MAIN-RED);
}

.hero-dropzone-input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 1;
}

.hero-editor-content {
    z-index: 10;
    pointer-events: none;
    padding-top: 100px;
}

.pointer-auto {
    pointer-events: auto;
}

.hero-title-textarea {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    width: 100%;
    resize: none;
    overflow: hidden;
    display: block;
    background: transparent;
    word-break: break-word;
}

.hero-title-errors {
    font-size: 0.4em;
    color: var(--MAIN-RED);
}

.editor-blog-meta {
    margin-top: 15px;
    margin-bottom: 0;
    pointer-events: auto;
}

.editor-author-input {
    width: auto;
    max-width: 150px;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    background: transparent;
}

.editorjs-container {
    min-height: 300px;
}

.post-edit-action {
    margin-bottom: 20px;
}

.post-edit-action a {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
}

.blog-meta-tight {
    margin-top: 15px;
    margin-bottom: 0;
}

@media screen and (max-width: 750px) {
    .submit-container {
        bottom: 80px;
        right: 20px;
        left: 20px;
        width: calc(100% - 40px);
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
        text-align: center;
        padding: 15px;
    }

    .blog-hero-content h1 textarea,
    .blog-hero-content h1 {
        font-size: 2rem !important;
    }
}