/*!
Theme Name: TaT Classic
Description: Lightweight, classic style WordPress theme.
Version: 1.1


The modular css components can be found in assets > CSS

*/



.alignleft,
.alignright {
    max-width: 50%; 
}

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin: 1rem auto;
}

.alignleft img,
.alignright img {
    width: 100%;
    height: auto;
    display: block;
}

.aligncenter img,
.alignnone img {
    max-width: 100%;
    height: auto;
    display: block;
}

.alignnone {
    float: none;
    margin: 0.5rem 0;
}

/* Clearfix for containers holding floated images */
.entry-content::after,
.post-content::after {
    content: '';
    display: table;
    clear: both;
}

@media (max-width: 640px) {
  .break-desktop br {
    display: none;
  }
}

@media (max-width: 768px) {
    .alignleft,
    .alignright {
        float: none;
        max-width: 100%;
        margin: 1rem 0;
        display: block;
    }
}

a.header-btn {text-decoration: none;}

.page-content ul {
    margin: 0  !important;
    padding: 0 1rem;
}

.page-content li, .single-layout li {
    margin-left: 2rem;
    padding: 0.3rem 0.5rem;
}

.page-content ul li {
    font-size: 1.1rem !important;
}

.sidebar-section h3 {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.sidebar-section ul {
    padding: 0;
    margin: 0 0 2rem;
    font-size: 0.9rem;
}

.sidebar-menu ul {
    padding: 0 !important;
    margin: 0 ;
}

.sidebar-menu li {
    padding: 0.4rem 0;
    margin: 0 !important;
    list-style: none;
}

.sidebar-menu li a {
    text-decoration: none;
}

.menu-count {
    font-size: 0.7rem;
    color: var(--text-color);
}

/* ==========================================================================
   SEARCH RESULTS PAGE
   Styles for search.php — result items, post type badges, and no-results state.
   These extend the existing .topic-item / .topic-container classes already
   used across archive templates.
   ========================================================================== */

/* Container — full-width, no sidebar */
.search-results-container .forum-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Highlight the search term in the h1 */
.search-term {
    color: var(--primary-color);
    font-style: italic;
}

/* ---- Individual result item ---- */
.search-result-item {
    display: block; /* override any flex on .topic-item if needed */
}

.search-result-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.search-result-link:hover,
.search-result-link:focus {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.search-result-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ---- Meta row: badge + date ---- */
.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

/* ---- Post type badge ---- */
.post-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2em 0.6em;
    border-radius: 3px;
    color: #fff;
    line-height: 1.4;
}

/* Each post type gets its own badge colour,
   derived from existing theme palette variables where possible. */
.badge--post {
    background-color: var(--primary-color, #d65c45);
}

.badge--blueprint {
    background-color: #2a7d4f; /* green — blueprints */
}

.badge--guidance {
    background-color: #4a6fa5; /* blue — guidance */
}

.badge--question {
    background-color: #7b5ea7; /* purple — questions */
}

/* ---- Date ---- */
.search-result-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- Title ---- */
.search-result-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
    color: var(--text-color);
}

.search-result-link:hover .search-result-title,
.search-result-link:focus .search-result-title {
    color: var(--primary-color);
}

/* ---- Excerpt ---- */
.search-result-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ---- No-results state ---- */
.no-results {
    padding: 2rem 1.25rem;
    text-align: center;
}

.no-results h2 {
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Inline retry search form */
.search-form--inline {
    max-width: 480px;
    margin: 0 auto;
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .search-result-link {
        transition: none;
    }
}


/* Knowledge Base Grid */
.knowledge-base-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.guidance-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
    height: fit-content;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.guidance-category:hover {
    border-color: var(--border-color-hover);
    box-shadow: 0 4px 12px var(--shadow-hover);
    transform: translateY(-2px);
}

.category-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.category-content {
    padding: var(--spacing-lg);
}

.category-title {
    margin: 0 0 var(--spacing-md);
    font-size: 1.25rem;
}

.category-title a {
    text-decoration: none;
    color: var(--text-primary);
}

.category-title a:hover {
    color: var(--accent-primary);
}

.category-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.sub-guides h3 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--spacing-xs);
}

.sub-guides ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-guides li {
    margin-bottom: var(--spacing-xs);
    padding-left: var(--spacing-md);
    position: relative;
}

.sub-guides li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.sub-guides a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.sub-guides a:hover {
    color: var(--accent-primary);
}

.more-guides a {
    color: var(--accent-primary);
    font-weight: 500;
}





/**
 * Guidance Tree Styles
 * File: css/guidance-tree.css
 */

/* Base tree structure */
.guidance-tree {
    margin: 0;
    padding: 0.2rem 0;
    list-style: none;
    line-height: 1.5;
}

.guidance-tree ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Tree items - remove default list styling */
.tree-item,
.tree-child,
.tree-grandchild {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Top-level items - no bullets, just expander buttons */
.tree-item {
    margin-bottom: 0.25rem;
}

.tree-item > .tree-link {
    display: block;
    padding: 0.5rem 0;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
}

.tree-item > .tree-link:hover {
    
}

/* Child items - indented beneath their section heads */
.tree-children {
    margin-left: 3rem;
    margin-top: 0.25rem;
}

.tree-child {
    margin-bottom: 0.125rem;
    position: relative;
}

.tree-child > .tree-link {
    display: block;
    padding: 0.25rem 0;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding-left: 2rem;
    font-size: 0.95rem;
}

/* Dash bullet for child items */
.tree-child > .tree-link::before {
    content: "–";
    position: absolute;
    left: 1rem; 
    font-weight: normal;
}

.tree-child > .tree-link:hover {
    
}

/* Grandchild items - further indented */
.tree-grandchildren {
    margin-left: 2rem;
    margin-top: 0.125rem;
}

.tree-grandchild {
    margin-bottom: 0.125rem;
}

.tree-grandchild > .tree-link {
    display: block;
    padding: 0.2rem 0;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    position: relative;
    padding-left: 3rem;
}

/* Smaller dash bullet for grandchild items */
.tree-grandchild > .tree-link::before {
    content: "‒";
    position: absolute;
    left: 2rem;
    font-weight: normal;
    font-size: 0.9em;
}

.tree-grandchild > .tree-link:hover {
    
}

/* Expand/collapse toggle buttons */
.tree-toggle {
    background: #f0f0f0;
    border: 1px solid var(--border-color);
    padding: 4px 6px;
    margin: 1px;
    margin-right: 0.2rem;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.75em;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.tree-toggle:hover {
    background: #e8e8e8;
    border-color: var(--border-color-hover);
}

.tree-toggle:active {
    background: var(--secondary-color);
}

.tree-toggle:focus {
    outline: 1px solid yellow;
    outline-offset: 1px;
}

/* Current page styling - bold with arrow (only for leaf pages) */
.tree-link.current-page {
    font-weight: 800;
   
}

.tree-link.current-page::after {
    content: " ←";
    font-weight: normal;
    margin-left: 0.5rem;
}

/* Collapsed sections */
.collapsed .tree-children,
.collapsed .tree-grandchildren {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tree-children,
    .tree-grandchildren {
        margin-left: 1.5rem;
    }
    
    .tree-item > .tree-link,
    .tree-child > .tree-link,
    .tree-grandchild > .tree-link {
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }
}