/* TurboPress Templates CSS */

/* Base Styles */
:root {
    --primary-color: #c44c34;
    --text-color: #374151;
    --bg-color: #ffffff;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #111827;
}

.font-serif {
    font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

/* Utilities */
.text-primary { color: var(--primary-color); }
.bg-primary { background-color: var(--primary-color); }
.border-primary { border-color: var(--primary-color); }

/* Reading Progress Bar */
#readingProgress {
    transition: width 0.1s ease;
}

/* Breadcrumbs */
.tp-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tp-breadcrumb-list li {
    display: flex;
    align-items: center;
}

.tp-breadcrumb-list a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s;
}

.tp-breadcrumb-list a:hover {
    color: var(--primary-color);
}

.tp-breadcrumb-current {
    color: #9ca3af;
    font-weight: 500;
}

/* Table of Contents */
.tp-toc-container,
.turbopress-toc {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .tp-toc-container,
    .turbopress-toc {
        padding: 1rem !important; /* p-4 equivalent */
        width: 100% !important;
    }
}

.tp-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    cursor: pointer;
}

.tp-toc-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.tp-toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #6b7280;
    transition: transform 0.2s;
}

.tp-toc-toggle.active {
    transform: rotate(180deg);
}

.tp-toc-content {
    display: block;
}

.tp-toc-content.collapsed {
    display: none;
}

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

.tp-toc-item {
    margin-bottom: 0.5rem;
}

.tp-toc-item a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: block;
    padding: 0.25rem 0;
}

.tp-toc-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.tp-toc-sublist {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    border-left: 2px solid #e5e7eb;
}

/* FAQ Schema */
.tp-faq-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
}

.tp-faq-header {
    padding: 1.5rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tp-faq-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.tp-faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.tp-faq-item:last-child {
    border-bottom: none;
}

.tp-faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1f2937;
    transition: background-color 0.2s;
}

.tp-faq-question:hover {
    background-color: #f9fafb;
}

.tp-faq-question.active {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.tp-faq-icon {
    transition: transform 0.2s;
}

.tp-faq-question.active .tp-faq-icon {
    transform: rotate(180deg);
}

.tp-faq-answer {
    display: none;
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #4b5563;
    line-height: 1.6;
}

.tp-faq-answer.active {
    display: block;
}

/* Social Share Buttons */
.tp-share-buttons {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tp-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: white;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}
.tp-share-btn:hover {
    opacity: 0.9;
}

/* Menu Reset - Stronger */
ul.menu, .menu ul, .nav ul, .navigation ul, .widget_nav_menu ul,
.tp-menu ul, ul.tp-menu, #tp-sidebar-menu ul, #tp-sidebar-menu li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style-type: none !important;
}

summary {
    list-style: none !important;
    display: flex; /* Helps remove marker in some browsers */
    align-items: center;
    cursor: pointer;
}
summary::-webkit-details-marker {
    display: none !important;
}
details > summary {
    list-style: none !important;
}
details > summary::marker {
    display: none !important;
}

/* Submenu Handling */
.menu-item-has-children {
    position: relative;
}
.menu-item-has-children > ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
}
.menu-item-has-children:hover > ul.sub-menu {
    display: block;
}
/* Mobile/Sidebar Submenu */
#tp-sidebar-menu .menu-item-has-children > ul.sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none; /* JS handles toggle or hover? User said hover on desktop, but click on mobile usually. */
}
/* User requested hover for submenus generally, let's assume sidebar might be click-based or hover */
#tp-sidebar-menu .menu-item-has-children:hover > ul.sub-menu {
    display: block;
}

/* Sidebar Group Hover Support (Manual Loop) */
.group:hover .group-hover\:block {
    display: block !important;
}
.group:hover .group-hover\:rotate-180 {
    transform: rotate(180deg);
}

/* Pagination Fixes */
/* Target the container UL if it has page-numbers class */
ul.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    gap: 0.5rem;
}
/* Target items inside the list or direct items if not a list */
.page-numbers li, .page-numbers > a, .page-numbers > span {
    display: inline-flex;
    margin: 0;
    padding: 0;
}
/* Target the actual links/spans */
.page-numbers a, .page-numbers span:not(.dots) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    background-color: white;
}
.page-numbers a:hover, .page-numbers span.current {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}
.page-numbers .dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
}

/* Text Black Class (Blue Title Fix) */
.text-black { color: #000000; }
