/**
 * Decoded Psyche - Additional Styles
 * Loaded after style.css for extra customizations
 */

/* WordPress core alignments */
.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; text-align: center; }
.alignwide  { margin-left: -2rem; margin-right: -2rem; }
.alignfull  { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); width: 100vw; }

/* WordPress captions */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.82rem; color: var(--text-light); text-align: center; padding: 0.5rem; }

/* Sticky sidebar */
@media (min-width: 1025px) {
    .sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* Affiliate link highlight */
.post-content a[rel*="sponsored"] {
    color: var(--highlight-dark);
    font-weight: 600;
}
.post-content a[rel*="sponsored"]:hover { text-decoration: underline; }

/* Post content table */
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; border-radius: var(--radius-md); overflow: hidden; }
.post-content th { background: var(--primary-dark); color: #fff; padding: 0.85rem 1rem; font-family: var(--font-heading); font-size: 0.875rem; text-align: left; }
.post-content td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.post-content tr:nth-child(even) td { background: var(--bg-light); }

/* Code blocks */
.post-content pre { background: var(--primary-dark); color: #e2e8f0; padding: 1.5rem; border-radius: var(--radius-md); overflow-x: auto; margin: 1.5rem 0; font-size: 0.875rem; line-height: 1.7; }
.post-content code { background: var(--accent-light); color: var(--secondary); padding: 0.1rem 0.45rem; border-radius: 4px; font-size: 0.875em; }
.post-content pre code { background: none; color: inherit; padding: 0; }

/* Highlight box */
.post-content .highlight-box { background: var(--bg-purple); border: 1px solid var(--accent-light); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }

/* Gallery */
.gallery { display: grid; gap: 0.75rem; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: rgba(255,255,255,0.65); flex-wrap: wrap; margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb .sep { color: rgba(255,255,255,0.4); }

/* Admin bar offset */
.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar #masthead { top: 46px; } }

/* Print */
@media print {
    #masthead, .site-footer, .sidebar, .share-box, #back-top, .cookie-bar, #dp-loader { display: none !important; }
    .single-layout, .archive-layout { grid-template-columns: 1fr !important; }
}

/* Comments */
.comments-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .comment-body { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem; }
.comment-list .children { list-style: none; margin-left: 1.5rem; padding: 0; }
.comment-list .avatar { border-radius: 50%; margin-right: .75rem; vertical-align: middle; }
.comment-list .comment-meta { font-size: .82rem; color: var(--text-light); margin-bottom: .5rem; }
.comment-list .reply a { font-size: .82rem; font-weight: 600; color: var(--accent); }
.single-post-content { min-width: 0; }
.archive-main { min-width: 0; }

.archive-hero .breadcrumb, .legal-hero .breadcrumb { justify-content: center; }

/* Decoded Psyche v1.1.1 repair additions (no hero rules touched) */
.dp-values-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:2rem; }
.dp-editorial-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:2rem; }
@media (max-width:1024px) { .dp-values-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:768px) {
    .dp-values-grid, .dp-editorial-grid { grid-template-columns:1fr; }
    .search-overlay { width:calc(100vw - 2rem); max-width:300px; right:-0.5rem; }
    .alignwide { margin-left:0; margin-right:0; }
    .quiz-preview { padding:1.5rem; }
}
.quiz-opt.selected { background:rgba(255,255,255,0.18); border-color:rgba(255,255,255,0.35); color:#fff; }
#dp-quiz-result h3 { font-size:1.25rem; }
