/*
Theme Name: Systemischesatelier Child
Theme URI: https://example.com
Description: Custom child theme for dark blog layout with sidebar
Author: Your Name
Author URI: https://example.com
Template: systemischesatelier
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: systemischesatelier-child
*/

/* ==========================================================================
   RESET PARENT THEME INTERFERENCE ON SINGLE POST
   ========================================================================== */
body.single-post .site-header,
body.single-post header,
body.single-post #masthead,
body.single-post .site-footer,
body.single-post footer,
body.single-post #colophon {
    background: #ffffff !important;
}

/* Force parent theme content containers to not interfere */
body.single-post .site-content,
body.single-post #content,
body.single-post .content-area,
body.single-post #primary,
body.single-post .site-main,
body.single-post main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

body.single-post {
    background: #1c1c1c;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.post-hero {
    position: relative;
    min-height: 500px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-bottom: 60px;
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.65) 100%);
    z-index: 1;
}

.post-breadcrumb {
    position: absolute;
    top: 16px;
    left: 40px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    z-index: 10;
    line-height: 1.4;
}

.post-breadcrumb a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
}

.post-breadcrumb a:hover { color: #ffffff; }

.post-category-badge {
    position: absolute;
    top: 48px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.category-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-style: italic;
    color: #ffffff;
    text-transform: uppercase;
    flex-shrink: 0;
}

.category-name {
    font-size: 12px;
    letter-spacing: 2.5px;
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 400;
}

.post-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 40px 60px;
    width: 100%;
    box-sizing: border-box;
}

.post-hero-title {
    font-size: 52px;
    font-weight: 400;
    color: #ffffff;
    margin: 0 auto 18px;
    line-height: 1.15;
    max-width: 860px;
}

.post-hero-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-hero-meta strong {
    color: #ffffff;
}

/* ==========================================================================
   MAIN TWO-COLUMN LAYOUT
   ========================================================================== */
.post-main-container {
    width: 80%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0 80px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 60px;
    box-sizing: border-box;
}

/* ==========================================================================
   ARTICLE CONTENT
   ========================================================================== */
.post-article-content {
    min-width: 0;
}

.post-article-content .dropcap {
    float: left;
    font-size: 78px;
    line-height: 62px;
    padding: 6px 12px 0 0;
    color: #ffffff;
}

.post-article-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #ffffff;
    margin-bottom: 24px;
}

.post-article-content h1,
.post-article-content h2,
.post-article-content h3,
.post-article-content h4,
.post-article-content h5,
.post-article-content h6 {
    color: #ffffff;
    font-weight: 500;
    margin: 36px 0 16px;
    line-height: 1.4;
}

.post-article-content h3 { font-size: 22px; }
.post-article-content h2 { font-size: 26px; }

.post-article-content ul,
.post-article-content ol {
    margin: 16px 0 24px 28px;
}

.post-article-content li {
    font-size: 16px;
    line-height: 1.8;
    color: #ffffff;
    margin-bottom: 8px;
}

.post-article-content a {
    color: #ffffff;
    text-decoration: underline;
}

.post-article-content a:hover { color: #777777; }

.post-article-content blockquote {
    border-left: 3px solid #777777;
    margin: 30px 0;
    padding: 16px 24px;
    background: #252525;
}

.post-article-content blockquote p {
    color: #ffffff;
    margin: 0;
    font-style: italic;
}

/* ==========================================================================
   SHARE BUTTONS
   ========================================================================== */
.post-share-wrap {
    margin: 48px 0;
}

.post-share-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 6px;
}

.share-count-label {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-right: 8px;
    white-space: nowrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: none;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.share-btn:hover { opacity: 0.85; color: #ffffff; }

.share-btn i { font-size: 15px; }

.share-btn.icon-only { padding: 9px 12px; }

.share-btn.facebook   { background: #3b5998; }
.share-btn.pinterest  { background: #e60023; }
.share-btn.linkedin   { background: #0077b5; }
.share-btn.vk         { background: #4c75a3; }
.share-btn.twitter    { background: #000000; }
.share-btn.stumble    { background: #eb4924; }
.share-btn.pocket     { background: #ef3f56; }
.share-btn.viber      { background: #7360f2; }
.share-btn.telegram   { background: #229ed9; }
.share-btn.line       { background: #06c755; }
.share-btn.reddit     { background: #ff4500; }
.share-btn.email      { background: #555555; }

/* ==========================================================================
   AUTHOR CARD
   ========================================================================== */
.post-author-card {
    text-align: center;
    padding: 60px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin: 20px 0 40px;
}

.author-avatar {
    width: 130px !important;
    height: 130px !important;
    min-width: 130px !important;
    min-height: 130px !important;
    max-width: 130px !important;
    max-height: 130px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 auto 20px !important;
    background: #333;
    flex-shrink: 0 !important;
    position: relative !important;
    display: block !important;
}

.author-avatar img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 130px !important;
    height: 130px !important;
    min-width: 130px !important;
    min-height: 130px !important;
    max-width: 130px !important;
    max-height: 130px !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    border-radius: 0 !important;
}

.author-info h4 {
    font-size: 26px;
    font-weight: 400;
    color: #ffffff;
    margin: 0 0 16px;
}

.author-info p {
    font-size: 15px;
    line-height: 1.7;
    color: #777777;
    margin: 0 auto 20px;
    max-width: 640px;
}

.author-social {
    display: flex;
    gap: 18px;
    justify-content: center;
}

.author-social a {
    font-size: 24px;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
}

.author-social a:hover { color: #777777; }

/* ==========================================================================
   VIEW COMMENTS BUTTON
   ========================================================================== */
.post-view-comments {
    text-align: center;
    margin: 30px 0;
}

.view-comments-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: #111111;
    border: none;
    color: #ffffff;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 40px;
    font-weight: 600;
    transition: background 0.2s;
}

.view-comments-btn:hover { background: #222222; }

.view-comments-btn i {
    font-size: 14px;
    transition: transform 0.3s;
}

.view-comments-btn.open i { transform: rotate(180deg); }

/* ==========================================================================
   COMMENTS SECTION (COLLAPSIBLE)
   ========================================================================== */
#comments {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 30px;
}

#comments.show { max-height: 10000px; }

#comments h2 {
    font-size: 22px;
    font-weight: 500;
    color: #ffffff;
    margin: 30px 0 24px;
}

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

.comment-body {
    background: #252525;
    padding: 20px;
    margin-bottom: 16px;
}

.comment-author b { color: #ffffff; }

.comment-content p { color: #ffffff; font-size: 15px; margin: 8px 0 0; }

.comment-metadata { font-size: 11px; color: #777777; margin: 4px 0 0; }

#respond { margin-top: 40px; }

#respond h3 { font-size: 20px; font-weight: 500; color: #ffffff; margin-bottom: 20px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    background: #252525;
    border: 1px solid rgba(255,255,255,0.1);
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.comment-form input[type="submit"] {
    padding: 12px 30px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: #ffffff;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-form input[type="submit"]:hover {
    background: rgba(255,255,255,0.06);
}

/* ==========================================================================
   POST NAVIGATION
   ========================================================================== */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    gap: 40px;
}

.nav-post { flex: 1; }
.nav-post.prev { text-align: left; }
.nav-post.next { text-align: right; }
.nav-post a { text-decoration: none; display: block; }

.nav-label {
    font-size: 11px;
    color: #777777;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-post.next .nav-label { justify-content: flex-end; }

.nav-title {
    font-size: 17px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.4;
    transition: color 0.2s;
}

.nav-post a:hover .nav-title { color: #777777; }

/* ==========================================================================
   RELATED POSTS (YOU MAY ALSO LIKE)
   ========================================================================== */
.post-related-section { margin-top: 60px; }

.post-related-section > h3 {
    font-size: 11px;
    letter-spacing: 2px;
    color: #777777;
    margin: 0 0 28px;
    font-weight: 500;
    text-transform: uppercase;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.related-card {
    background: #252525;
    overflow: hidden;
    transition: transform 0.25s;
    cursor: pointer;
}

.related-card:hover { transform: translateY(-4px); }
.related-card a { text-decoration: none; display: block; }

.related-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #333;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
    display: block;
}

.related-card:hover .related-image img { transform: scale(1.06); }

.related-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.related-card:hover .related-overlay { opacity: 1; }

.related-overlay .read-more-text {
    font-size: 13px;
    letter-spacing: 2px;
    color: #777777;
    font-weight: 600;
}

.related-overlay .read-time {
    font-size: 12px;
    color: #777777;
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-category {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 9px;
    background: rgba(0,0,0,0.7);
    color: #ffffff;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 2;
}

.related-content { padding: 20px; }

.related-content h4 {
    font-size: 17px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.4;
    transition: color 0.2s;
}

.related-card:hover .related-content h4 { color: #777777; }

.related-meta {
    font-size: 12px;
    color: #777777;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.related-excerpt {
    font-size: 13px;
    color: #777777;
    line-height: 1.6;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.post-sidebar { min-width: 0; }

.sidebar-widget {
    background: #252525;
    padding: 24px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 18px;
    line-height: 1.4;
}

/* Profile Widget */
.profile-widget {
    padding: 28px 24px;
    position: relative;
}

.profile-widget-inner {
    display: flex;
    flex-direction: column;
}

.profile-text h4 {
    font-size: 22px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 12px;
    line-height: 1.3;
}

.profile-text p {
    font-size: 13px;
    color: #777777;
    line-height: 1.65;
    margin: 0 0 20px;
}

.follow-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: #777777;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

.profile-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-social {
    display: flex;
    gap: 14px;
}

.profile-social a {
    font-size: 20px;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
}

.profile-social a:hover { color: #777777; }

.profile-avatar-small {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: #333;
    flex-shrink: 0 !important;
    position: relative !important;
    display: block !important;
}

.profile-avatar-small img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    border-radius: 0 !important;
}

/* Recent Posts Widget */
.recent-post-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.recent-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-item a {
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 12px;
    text-decoration: none;
    align-items: start;
}

.recent-info { min-width: 0; }

.recent-info h5 {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 6px;
    line-height: 1.4;
    transition: color 0.2s;
}

.recent-post-item:hover .recent-info h5 { color: #777777; }

.recent-info .recent-date {
    font-size: 11px;
    color: #777777;
    display: block;
}

.recent-thumb {
    width: 80px;
    height: 60px;
    overflow: hidden;
    background: #333;
    flex-shrink: 0;
}

.recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Popular Posts Widget */
.popular-post-item { margin-bottom: 24px; }
.popular-post-item:last-child { margin-bottom: 0; }
.popular-post-item a { text-decoration: none; display: block; }

.popular-thumb {
    width: 100%;
    height: 175px;
    overflow: hidden;
    background: #333;
    position: relative;
    margin-bottom: 12px;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.popular-post-item:hover .popular-thumb img { transform: scale(1.05); }

.popular-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.popular-post-item:hover .popular-overlay { opacity: 1; }

.popular-read-more {
    font-size: 12px;
    letter-spacing: 2px;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
}

.popular-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #ffffff;
}

.popular-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.popular-info h5 {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 6px;
    line-height: 1.4;
    transition: color 0.2s;
}

.popular-post-item:hover .popular-info h5 { color: #777777; }

.popular-meta {
    font-size: 11px;
    color: #777777;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
    .post-main-container { width: 92%; gap: 40px; }
}

@media (max-width: 1024px) {
    .post-main-container {
        grid-template-columns: 1fr;
        width: 90%;
    }
    .post-sidebar { display: none; }
    .post-hero-title { font-size: 40px; }
}

@media (max-width: 768px) {
    .post-main-container { width: 94%; padding: 0 0 40px; }
    .post-hero { min-height: 380px; }
    .post-hero-title { font-size: 30px; }
    .post-breadcrumb, .post-category-badge { left: 20px; }
    .post-hero-content { padding: 0 20px 40px; }
    .related-grid { grid-template-columns: 1fr; }
    .post-navigation { flex-direction: column; gap: 24px; }
    .nav-post.next { text-align: left; }
    .nav-post.next .nav-label { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .post-hero-title { font-size: 24px; }
    .post-hero-meta { font-size: 11px; }
    .share-btn { padding: 8px 10px; font-size: 11px; }
}

/* ==========================================================================
   ARCHIVE PAGE STYLES
   ========================================================================== */

body.archive,
body.blog,
body.home {
    background: #1c1c1c;
    color: #ffffff;
    overflow-x: hidden;
}

body.archive .site-header,
body.archive header,
body.archive #masthead,
body.blog .site-header,
body.blog header,
body.blog #masthead,
body.home .site-header,
body.home header,
body.home #masthead {
    background: #ffffff !important;
}

body.archive .site-footer,
body.archive footer,
body.blog .site-footer,
body.blog footer,
body.home .site-footer,
body.home footer {
    background: #ffffff !important;
}

/* Force parent wrappers full-width on archive */
body.archive .site-content,
body.archive #content,
body.archive #primary,
body.archive .site-main,
body.archive main,
body.blog .site-content,
body.blog #content,
body.blog #primary,
body.blog .site-main,
body.blog main,
body.home .site-content,
body.home #content,
body.home #primary,
body.home .site-main,
body.home main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* ---- HERO SLIDER ---- */
.archive-hero {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    background: #111;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: flex-end;
}

.hero-slide.active { opacity: 1; }

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.72) 100%);
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    padding: 0 60px 50px;
    max-width: 780px;
}

.hero-slide-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.hero-cat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-style: italic;
    color: #ffffff;
    flex-shrink: 0;
}

.hero-slide-cat span {
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
}

.hero-slide-title {
    font-size: 42px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 14px;
}

.hero-slide-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.hero-slide-title a:hover { color: rgba(255,255,255,0.8); }

.hero-slide-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hero-slide-meta strong { color: #ffffff; }

.hero-slide-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hero-slide-excerpt {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin: 0 0 20px;
}

.hero-read-more {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid rgba(255,255,255,0.5);
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1.5px;
    font-weight: 600;
    transition: all 0.2s;
    background: transparent;
}

.hero-read-more:hover {
    background: rgba(255,255,255,0.12);
    border-color: #ffffff;
    color: #ffffff;
}

/* Slider dots */
.hero-dots {
    position: absolute;
    bottom: 28px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.5);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.hero-dot.active {
    background: #ffffff;
    border-color: #ffffff;
}

/* ---- ARCHIVE CONTAINER ---- */
.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px 60px;
}

/* ---- MASONRY GRID ---- */
.masonry-grid {
    column-count: 3;
    column-gap: 22px;
}

/* ---- POST CARD ---- */
.post-card {
    break-inside: avoid;
    background: #252525;
    margin-bottom: 22px;
    display: inline-block;
    width: 100%;
    vertical-align: top;
    overflow: hidden;
    transition: transform 0.25s;
}

.post-card:hover { transform: translateY(-4px); }

/* Category bar */
.card-cat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
}

.card-cat-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-style: italic;
    color: #ffffff;
    flex-shrink: 0;
}

.card-cat-name {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s;
}

.card-cat-name:hover { color: #ffffff; }

/* Card image */
.card-image-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.card-image-wrap a { display: block; }

.card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s;
}

.post-card:hover .card-img { transform: scale(1.04); }

.card-img-placeholder {
    width: 100%;
    height: 200px;
    background: #333;
}

/* Media type icon - top right */
.card-media-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.card-media-icon i {
    font-size: 15px;
    color: #ffffff;
}

/* Hover overlay */
.card-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.post-card:hover .card-hover-overlay { opacity: 1; }

.card-hover-read {
    font-size: 12px;
    letter-spacing: 2.5px;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
}

/* Card body */
.card-body { padding: 18px 16px 20px; }

.card-title {
    font-size: 17px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.4;
}

.card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover { color: #777777; }

.card-meta {
    font-size: 12px;
    color: #777777;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.card-meta strong { color: #aaaaaa; }

.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.card-excerpt {
    font-size: 13px;
    color: #777777;
    line-height: 1.65;
    margin: 0 0 14px;
}

.card-read-more {
    display: inline-block;
    padding: 7px 18px;
    border: 1px solid rgba(255,255,255,0.18);
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 600;
    transition: all 0.2s;
}

.card-read-more:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.4);
    color: #ffffff;
}

/* ---- LOAD MORE ---- */
.load-more-wrap {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 36px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: #ffffff;
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.5);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .archive-container { max-width: 95%; }
}

@media (max-width: 900px) {
    .masonry-grid { column-count: 2; }
    .hero-slide-title { font-size: 32px; }
    .hero-slide-content { padding: 0 30px 40px; }
    .archive-hero { height: 420px; }
}

@media (max-width: 580px) {
    .masonry-grid { column-count: 1; }
    .archive-hero { height: 340px; }
    .hero-slide-title { font-size: 24px; }
    .hero-slide-content { padding: 0 20px 30px; }
    .hero-read-more { padding: 8px 18px; }
    .archive-container { padding: 30px 14px 40px; }
}

/* Extra override — force all known parent wrappers out of the way on blog/home */
body.blog .entry-content,
body.blog .post-content,
body.blog article.post,
body.blog article.type-post,
body.home .entry-content,
body.home .post-content,
body.home article.post,
body.home article.type-post {
    all: unset;
    display: block;
}

/* ==========================================================================
   CRITICAL FIXES - GRID LAYOUT + COLOR OVERRIDES
   ========================================================================== */

/* Break out of parent theme container completely */
.archive-wrap {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    background: #1c1c1c;
    padding: 50px 0 60px;
}

.archive-container {
    width: 88%;
    max-width: 1280px;
    margin: 0 auto !important;
    padding: 0 !important;
    float: none !important;
}

/* Force 3-col masonry - override everything */
.archive-container .masonry-grid {
    column-count: 3 !important;
    column-gap: 22px !important;
    width: 100% !important;
    display: block !important;
}

.archive-container .post-card {
    display: inline-block !important;
    width: 100% !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
    background: #252525 !important;
    margin-bottom: 22px !important;
    vertical-align: top !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Override ALL parent theme link/text colors inside cards */
.archive-container .post-card,
.archive-container .post-card *,
.archive-container .post-card a,
.archive-container .post-card h1,
.archive-container .post-card h2,
.archive-container .post-card h3,
.archive-container .post-card h4,
.archive-container .post-card p,
.archive-container .post-card span {
    color: inherit;
    text-decoration: none;
}

.archive-container .card-title a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    transition: color 0.2s !important;
}

.archive-container .post-card:hover .card-title a {
    color: #777777 !important;
}

.archive-container .card-cat-name {
    color: rgba(255,255,255,0.6) !important;
    text-decoration: none !important;
    font-size: 10px !important;
    letter-spacing: 2px !important;
}

.archive-container .card-cat-name:hover {
    color: #ffffff !important;
}

.archive-container .card-meta {
    color: #777777 !important;
    font-size: 12px !important;
}

.archive-container .card-meta strong {
    color: #aaaaaa !important;
}

.archive-container .card-excerpt {
    color: #777777 !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
}

.archive-container .card-read-more {
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 7px 18px !important;
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    background: transparent !important;
}

.archive-container .card-read-more:hover {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.5) !important;
}

/* Hero slider color overrides */
.archive-hero .hero-slide-title a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.archive-hero .hero-slide-title a:hover {
    color: rgba(255,255,255,0.85) !important;
}

.archive-hero .hero-slide-meta,
.archive-hero .hero-slide-meta span {
    color: rgba(255,255,255,0.75) !important;
}

.archive-hero .hero-slide-meta strong {
    color: #ffffff !important;
}

.archive-hero .hero-slide-excerpt {
    color: rgba(255,255,255,0.75) !important;
}

.archive-hero .hero-read-more {
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.5) !important;
    text-decoration: none !important;
}

/* Responsive grid */
@media (max-width: 900px) {
    .archive-container .masonry-grid { column-count: 2 !important; }
    .archive-container { width: 94%; }
}

@media (max-width: 580px) {
    .archive-container .masonry-grid { column-count: 1 !important; }
    .archive-container { width: 96%; }
}

/* ==========================================================================
   POST SHARE BUTTONS
   ========================================================================== */
.post-share-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0 50px;
}

.post-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.2s;
    line-height: 1;
    text-transform: uppercase;
}

.post-share-btn:hover {
    opacity: 0.85;
    color: #ffffff !important;
    text-decoration: none !important;
}

.post-share-btn svg {
    flex-shrink: 0;
    fill: #ffffff;
    width: 18px;
    height: 18px;
}

.post-share-btn.telegram  { background: #229ed9; }
.post-share-btn.signal    { background: #3a76f0; }
.post-share-btn.whatsapp  { background: #25d366; }
.post-share-btn.linkedin  { background: #0077b5; }
.post-share-btn.email     { background: #555555; }

@media (max-width: 600px) {
    .post-share-btn {
        padding: 10px 14px;
        font-size: 11px;
    }
}
