/* Blog: flat layout jak referencje, jasne tło Dachmix, bez podkładek */

/* Stopka zawsze na dole */
html {
    height: 100%;
}

body.dm-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.dm-page > .full-width-section-left {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.dm-page > footer {
    margin-top: auto;
    flex-shrink: 0;
}

body.blog-layout .full-width-section-left,
body.blog-layout .full-width-section-right {
    background: transparent !important;
    background-color: transparent !important;
}

body.blog-layout {
    background: #ffffff;
    color: #2c3e50;
}

.dm-content-wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* Węższy pas tła — styka się z menu u góry i ze stopką u dołu */
body.blog-layout--list .full-width-section-left {
    padding: 0;
    margin: 0;
}

body.blog-layout--list .dm-content-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.blog-thumbs-frame {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 2rem clamp(1rem, 3vw, 2rem) 2.5rem;
    background: #f8f6f2;
    border: none;
}

.blog-thumbs-frame .blog-list {
    max-width: none;
    margin: 0;
}

.dm-messages-wrap {
    max-width: 1180px;
    margin: 1rem auto 0;
    padding: 0 1.5rem;
}

.messages {
    list-style: none;
    margin: 0;
    padding: 0;
}

.messages li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #e8f5e9;
    color: #1b5e20;
    border-radius: 0;
}

/* —— Lista: siatka 2 kolumny, bez kart —— */
.blog-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem 2.5rem;
    background: transparent;
}

.blog-preview {
    background: transparent !important;
    padding: 0;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.blog-preview-cover {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    line-height: 0;
}

.blog-preview-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0 !important;
}

.blog-preview-cover--empty {
    aspect-ratio: 16 / 10;
    background: #e8eef3;
}

.blog-preview-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.7rem;
    line-height: 1.3;
}

.blog-preview-title a {
    color: #2c3e50 !important;
    text-decoration: none;
}

.blog-preview-title a:hover {
    color: #2563eb !important;
}

.blog-meta {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: #555555;
    line-height: 1.7;
    font-size: 1rem;
    margin: 0;
}

.blog-read-more {
    color: #2563eb !important;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 0.2rem;
    white-space: nowrap;
}

.blog-read-more:hover {
    color: #1d4ed8 !important;
}

.blog-empty {
    text-align: center;
    color: #6b7280;
    padding: 2rem 0;
    background: transparent;
}

/* —— Szczegół: okładka + tytuł, bez karty —— */
.blog-article {
    background: transparent !important;
    padding: 0 0 2rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

.blog-article-hero {
    margin: 0 0 1.75rem;
}

.blog-article-cover {
    display: block;
    width: 100%;
    max-height: none;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin: 0;
    border-radius: 0 !important;
}

.blog-article-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.85rem;
    line-height: 1.3;
}

.blog-post-content {
    color: #333333;
    line-height: 1.85;
    font-size: 1.08rem;
}

.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3 {
    color: #2c3e50;
    margin: 1.75rem 0 0.85rem;
    font-weight: 600;
}

.blog-post-content h2 {
    font-size: 1.6rem;
}

.blog-post-content h3 {
    font-size: 1.3rem;
}

.blog-post-content p {
    margin-bottom: 1.1rem;
    color: #333333;
}

.blog-post-content a {
    color: #2563eb;
}

.blog-post-content strong,
.blog-post-content b {
    color: #1a1a1a;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0 !important;
    margin: 0.75rem 0;
    display: block;
}

.blog-post-content figure {
    margin: 1.25rem 0;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 0.75rem 0 1.1rem 1.35rem;
}

.blog-author {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-style: italic;
}

.blog-back {
    margin-top: 1.5rem;
}

.blog-back a {
    color: #2c3e50;
    font-weight: 600;
    text-decoration: none;
}

.blog-back a:hover {
    color: #2563eb;
}

/* —— Album —— */
.blog-album {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.blog-album img,
.blog-album figure,
.blog-album figure img {
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.blog-album figure {
    margin: 0;
}

/* —— YouTube —— */
.blog-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5rem 0;
    background: #111;
    border-radius: 0;
    overflow: hidden;
}

.blog-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

/* CKEditor media figure fallback */
.blog-post-content figure.media,
.blog-post-content .media {
    margin: 1.5rem 0;
}

.blog-post-content figure.media iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 240px;
    border: 0;
    border-radius: 0;
}

/* —— Spis treści —— */
.blog-toc {
    background: #f4f7fa;
    border: 1px solid #d7dee7;
    border-left: 4px solid #2c3e50;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 !important;
}

.blog-toc-title {
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.blog-toc ul {
    list-style: disc;
    margin: 0 0 0 1.1rem;
    padding: 0;
}

.blog-toc li {
    margin: 0.45rem 0;
    color: #404040;
}

.blog-toc a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
}

.blog-toc a:hover {
    color: #2563eb;
}

.blog-toc ul ul {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

.blog-toc-empty {
    margin: 0;
    color: #6b7280;
}

/* —— Redakcja —— */
.redakcja-panel {
    background: #ffffff;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 0;
}

.redakcja-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.redakcja-hint {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.redakcja-actions {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: #2c3e50;
    color: #fff !important;
    text-decoration: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #c0392b;
}

.btn-danger:hover {
    background: #a93226;
}

.btn-outline {
    background: #fff;
    color: #2c3e50 !important;
    border: 1px solid #2c3e50;
}

.btn-outline:hover {
    background: #2c3e50;
    color: #fff !important;
}

.redakcja-table {
    width: 100%;
    border-collapse: collapse;
}

.redakcja-table th,
.redakcja-table td {
    text-align: left;
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid #eaeaea;
    color: #404040;
}

.redakcja-table th {
    color: #1a1a1a;
    font-weight: 600;
}

.redakcja-table a {
    color: #2c3e50;
    font-weight: 600;
    text-decoration: none;
}

.redakcja-table a:hover {
    color: #2563eb;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"] {
    width: 100%;
    max-width: 520px;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0;
    font-size: 1rem;
}

.form-error {
    color: #c0392b;
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0;
}

.status-published {
    background: #dcfce7;
    color: #166534;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.login-panel {
    max-width: 420px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .dm-content-wrap {
        padding: 1.25rem 1rem 2rem;
    }

    .blog-list {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .blog-preview-title {
        font-size: 1.2rem;
    }

    .blog-article-title {
        font-size: 1.55rem;
    }

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

    .redakcja-panel {
        padding: 1.25rem;
    }
}

/* === Photographic blog grid === */
body.blog-layout {
    background: #292a26;
    color: #eee9de;
}

body.blog-layout .full-width-section-left {
    background: #292a26 !important;
}

body.blog-layout--list .dm-content-wrap {
    max-width: 1180px;
    padding: 4rem 1.5rem 5rem;
}

body.blog-layout--list .blog-thumbs-frame {
    padding: 0;
    background: transparent;
}

body.blog-layout--list .blog-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3.75rem 2rem;
}

body.blog-layout--list .blog-preview-cover {
    margin-bottom: 1.25rem;
}

body.blog-layout--list .blog-preview-cover img,
body.blog-layout--list .blog-preview-cover--empty {
    aspect-ratio: 16 / 10;
    border-radius: 0 !important;
    background: #3a3b35;
}

body.blog-layout--list .blog-preview-title {
    margin-bottom: 1rem;
    color: #eee9de;
    font-size: 1rem;
    line-height: 1.45;
    text-align: center;
}

body.blog-layout--list .blog-preview-title a {
    color: #eee9de !important;
}

body.blog-layout--list .blog-preview-title a:hover {
    color: #d8bd80 !important;
}

body.blog-layout--list .blog-excerpt {
    color: #c5c0b7;
    font-size: 0.86rem;
    line-height: 1.85;
    text-align: center;
}

body.blog-layout--list .blog-read-more {
    color: #d8bd80 !important;
}

body.blog-layout--post .full-width-section-left {
    background: #fff !important;
}

body.blog-layout--post {
    background: #fff;
    color: #252521;
}

body.blog-layout--post .dm-content-wrap {
    max-width: 900px;
    padding: 4rem 1.5rem 5rem;
}

body.blog-layout--post .blog-article-title,
body.blog-layout--post .blog-post-content h1,
body.blog-layout--post .blog-post-content h2,
body.blog-layout--post .blog-post-content h3 {
    color: #252521;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

@media (max-width: 900px) {
    body.blog-layout--list .blog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body.blog-layout--list .dm-content-wrap {
        padding: 2.5rem 1rem 3rem;
    }

    body.blog-layout--list .blog-list {
        grid-template-columns: 1fr;
        gap: 2.75rem;
    }
}
