/* Learn Section Styles */

/* ===== BREADCRUMBS ===== */
.learn-breadcrumbs {
    margin-bottom: 1.5rem;
}

.learn-breadcrumbs .breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.learn-breadcrumbs .breadcrumb-item {
    font-size: 0.9rem;
    color: #6c757d;
}

.learn-breadcrumbs .breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.learn-breadcrumbs .breadcrumb-link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.learn-breadcrumbs .breadcrumb-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.learn-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
    margin: 0 0.5rem;
}



/* ===== TOPIC HEADER ===== */
.learn-topic-header,
.learn-subtopic-header {
    margin-bottom: 2rem;
}

.learn-topic-header h1,
.learn-subtopic-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

/* ===== TOPIC CONTENT ===== */
.learn-topic-content,
.learn-subtopic-content {
    margin-bottom: 2rem;
}

/* ===== MARKDOWN CONTENT ===== */
.learn-markdown-content {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
}

.learn-markdown-content h1,
.learn-markdown-content h2,
.learn-markdown-content h3,
.learn-markdown-content h4,
.learn-markdown-content h5,
.learn-markdown-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #333;
}

.learn-markdown-content h1 {
    font-size: 1.8rem;
}

.learn-markdown-content h2 {
    font-size: 1.5rem;
}

.learn-markdown-content h3 {
    font-size: 1.2rem;
}

.learn-markdown-content p {
    margin-bottom: 1rem;
}

.learn-markdown-content ul,
.learn-markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.learn-markdown-content li {
    margin-bottom: 0.25rem;
}

.learn-markdown-content blockquote {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
    font-style: italic;
}

.learn-markdown-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.learn-markdown-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

.learn-markdown-content pre code {
    background-color: transparent;
    padding: 0;
}

.learn-markdown-content strong {
    font-weight: 600;
    color: #333;
}

.learn-markdown-content em {
    font-style: italic;
}

.learn-markdown-content a {
    color: #007bff;
    text-decoration: none;
}

.learn-markdown-content a:hover {
    text-decoration: underline;
}





/* ===== TOPIC TEMPLATE (Generic) ===== */
.topic-header {
    margin-bottom: 2rem;
}

.topic-icon {
    margin-bottom: 1rem;
}

.topic-symbol {
    width: 30px;
    height: 30px;
}

.topic-dates {
    font-size: 1.1rem;
    font-weight: 500;
    color: #495057;
}

.topic-content {
    margin-top: 2rem;
}

.topic-name {
    font-size: 1.4rem;
}

.topic-symbol-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 8px;
}

.topic-description {
    line-height: 1.7;
    color: #495057;
}

.topic-description p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}



.topic-attributes-grid {
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
    background-color: #fff;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    border-radius: 8px;
    overflow: hidden;
}

/* 2x2 grid variant for topics with 4 attributes (like houses) */
.topic-attributes-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

/* 3x1 grid variant for topics with 3 attributes (like planets) */
.topic-attributes-grid-3x1 {
    grid-template-columns: repeat(3, 1fr);
}

/* 2x1 grid variant for topics with 2 attributes (like aspects) */
.topic-attributes-grid-2x1 {
    grid-template-columns: repeat(2, 1fr);
}

.topic-attribute {
    padding: 1rem;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Remove right border from last column (3-column grid) */
.topic-attribute:nth-child(3n) {
    border-right: none;
}

/* Remove bottom border from last row (items 4-6) for 3-column grid */
.topic-attribute:nth-child(n+4) {
    border-bottom: none;
}

/* 2x2 grid specific border rules */
.topic-attributes-grid-2x2 .topic-attribute:nth-child(2n) {
    border-right: none;
}

.topic-attributes-grid-2x2 .topic-attribute:nth-child(n+3) {
    border-bottom: none;
}

/* Ensure border between 3rd and 4th items in 2x2 grid */
.topic-attributes-grid-2x2 .topic-attribute:nth-child(3) {
    border-right: 1px solid #dee2e6;
}

/* 3x1 grid specific border rules */
.topic-attributes-grid-3x1 .topic-attribute:nth-child(3n) {
    border-right: none;
}

.topic-attributes-grid-3x1 .topic-attribute:nth-child(n+4) {
    border-bottom: none;
}

/* 2x1 grid specific border rules */
.topic-attributes-grid-2x1 .topic-attribute:nth-child(2n) {
    border-right: none;
}

.topic-attributes-grid-2x1 .topic-attribute:nth-child(n+3) {
    border-bottom: none;
}

.attribute-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.attribute-icon {
    margin-bottom: 0.5rem;
}

.attribute-symbol {
    width: 50px;
    height: 50px;
    background: white;
}

.attribute-symbol-small {
    width: 50px;
    height: 50px;
    background: white;
    padding: 5px;
}



.compatibility-title {
    font-size: 1.0rem;
}



/* Attribute symbol circle styling */
.attribute-symbol-circle {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
}

.attribute-icon-inner {
    font-size: 24px;
    color: #6c757d;
}

.attribute-icon-crown {
    color: #ffc107;
}

.attribute-icon-times {
    color: #dc3545;
}

/* Keyword icon styling */
.keyword-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #999999;
}

/* Current item styling - bold text only */
.list-group-item-action.current,
.subtopic-item.current {
    font-weight: bold;
}

/* Category headers in sidebar */
.list-group-item-secondary {
    background-color: #f8f9fa;
    color: #495057;
}


/* Navigation icons */
.nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 1rem;
}

/* Sidebar topic title with responsive font sizing */
.sidebar-topic-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: visible;
    word-wrap: break-word;
    word-break: break-word;
    max-width: calc(100% - 20px); /* Ensure minimum 20px space from edge */
    margin-left: 8px; /* Add minimum 8px margin from back arrow */
}

/* Responsive font sizing for different screen sizes */
@media (max-width: 1200px) {
    .sidebar-topic-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .sidebar-topic-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .sidebar-topic-title {
        font-size: 0.9rem;
    }
}

/* Ensure proper spacing in sidebar header */
.card-header .d-flex {
    min-height: 40px;
    padding: 8px; /* Add padding to the container */
    align-items: flex-start; /* Align items to top for multi-line titles */
}

.card-header .me-3 {
    flex-shrink: 0;
    min-width: 24px; /* Ensure back arrow has minimum width */
    margin-top: 2px; /* Slight adjustment to align with first line of text */
}

/* Ensure title link has proper spacing */
.card-header .flex-grow-1 {
    min-width: 0; /* Allow text to shrink */
    padding-right: 8px; /* Add right padding to prevent text from touching edge */
} 