/* Custom styles for PyClubs */

.university-logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    background-color: #ffffff;
}

/* For logo containers */
.university-logo-container {
    width: 40px;
    height: 40px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    background-color: #ffffff;
}

/* --- Blog Post Content Styling --- */

.post-content {
    line-height: 1.7;
    font-size: 1.1rem;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h2 {
    font-size: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.75rem;
}

.post-content h4 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content a {
    color: var(--bs-primary);
    text-decoration: none;
    border-bottom: 1px dotted var(--bs-primary);
}

.post-content a:hover {
    color: var(--bs-primary-dark);
    border-bottom-style: solid;
}

.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--bs-primary);
    background-color: #f8f9fa;
    font-style: italic;
    color: #6c757d;
}

.post-content blockquote p {
    margin-bottom: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.post-content pre {
    background-color: #282c34;
    color: #abb2bf;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.post-content code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #e9ecef;
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
    margin: 0;
    font-size: inherit;
    color: inherit;
}

/* --- Code Block Language Label --- */

.code-block-wrapper {
    position: relative;
    /* Adjust padding to make space for the label */
    padding-top: 2.5rem;
}

.post-content .code-block-wrapper pre {
    /* Reset margin and padding that might be inherited */
    margin: 0 !important;
    padding: 1.5rem !important;
    /* Ensure it starts from the new top */
    top: 0;
}

.code-lang-label {
    position: absolute;
    top: 0;
    right: 1rem;
    background-color: #4a5568; /* A darker, more subtle gray */
    color: #e2e8f0;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 0 0 6px 6px;
    text-transform: uppercase;
    font-weight: bold;
    font-family: sans-serif;
    user-select: none;
    z-index: 10;
}

/* --- Lesson Content Code Blocks (Atom One Dark Theme) --- */

/* Apply Atom One Dark theme colors directly to lesson code blocks */
.lesson-content pre,
.lesson-detail pre,
article pre,
.content pre {
    background-color: #282c34 !important;
    color: #abb2bf !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 0.99rem !important;
    line-height: 1.6 !important;
    margin: 1.5rem 0 !important;
}

.lesson-content pre code,
.lesson-detail pre code,
article pre code,
.content pre code {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    font-size: inherit !important;
}

/* Atom One Dark syntax highlighting colors (matching practice exercises) */
/* Keywords: def, class, import, for, if, return, etc. */
.lesson-content pre code .hljs-keyword,
.lesson-content pre .hljs-keyword {
    color: #c678dd !important; /* Purple */
}

/* Built-in functions: print, len, range, etc. */
.lesson-content pre code .hljs-built_in,
.lesson-content pre .hljs-built_in {
    color: #e06c75 !important; /* Pink/Red */
}

/* Strings */
.lesson-content pre code .hljs-string,
.lesson-content pre .hljs-string {
    color: #98c379 !important; /* Green */
}

/* Numbers */
.lesson-content pre code .hljs-number,
.lesson-content pre .hljs-number {
    color: #d19a66 !important; /* Orange */
}

/* Comments */
.lesson-content pre code .hljs-comment,
.lesson-content pre .hljs-comment {
    color: #5c6370 !important; /* Gray */
    font-style: italic !important;
}

/* Function names */
.lesson-content pre code .hljs-function,
.lesson-content pre .hljs-function,
.lesson-content pre code .hljs-title,
.lesson-content pre .hljs-title {
    color: #61afef !important; /* Blue */
}

/* Variables and parameters */
.lesson-content pre code .hljs-params,
.lesson-content pre .hljs-params,
.lesson-content pre code .hljs-attr,
.lesson-content pre .hljs-attr {
    color: #d19a66 !important; /* Orange */
}

/* Inline code styling (lighter background for contrast) */
.lesson-content code:not(pre code),
.lesson-detail code:not(pre code),
article code:not(pre code),
.content code:not(pre code) {
    background-color: #2d2d2d !important;
    color: #e06c75 !important;
    padding: 0.2em 0.4em !important;
    border-radius: 3px !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 0.9em !important;
}
