/* Custom styles to adapt Chota CSS to match Django site design */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Open+Sans:wght@400;700&display=swap');

/* Reset box-sizing */
* {
    box-sizing: border-box;
}

/* Base styles */
body {
    font-family: 'Neutral 2', 'Open Sans', sans-serif;
    color: #000;
    background-color: #fff;
    font-size: 20px;
    line-height: 1.8;
}

/* Global heading styles */
h1 {
    font-size: 2.1em;
}

h2 {
    font-size: 30px;
}

/* Header/Navigation */
.nav-header {
    background-color: #242b32;
    margin-bottom: 0;
    border-bottom: 32px solid #6dc732;
}

.nav-header .nav {
    min-height: 50px;
    padding: 20px 0;
}

.nav-header .nav-left,
.nav-header .nav-right {
    display: flex;
    align-items: center;
}

.nav-header .nav-right {
    gap: 20px;
}

.nav-header .brand {
    color: #f5f5f5;
    font-size: 2.1em;
    font-weight: 300;
    text-decoration: none;
    font-family: 'Neutral 2','Montserrat','Open Sans',sans-serif;
    letter-spacing: 0.5px;
}

.nav-header .brand:hover {
    color: #6dc732;
    text-decoration: none;
}

.nav-header .nav-item {
    color: #e4e4e4;
    text-decoration: none;
    font-size: 18px;
}

.nav-header .nav-item:hover {
    color: #6dc732;
}

/* Main container */
main.container {
    padding-top: 30px;
    max-width: 980px;
}

/* Override Chota's container max-width */
.container {
    max-width: 980px !important;
}

/* Custom grid system that doesn't conflict with Chota */
.main-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.main-content,
.main-sidebar {
    padding-right: 15px;
    padding-left: 15px;
}

/* Mobile first - stack vertically */
.main-content {
    width: 100%;
}

.main-sidebar {
    width: 100%;
}

/* Desktop - side by side */
@media (min-width: 768px) {
    .main-row {
        display: flex;
        flex-direction: row;
    }
    
    .main-content {
        flex: 0 0 66.66667%;
        max-width: 66.66667%;
        width: 66.66667%;
    }
    
    .main-sidebar {
        flex: 0 0 33.33333%;
        max-width: 33.33333%;
        width: 33.33333%;
    }
}

/* Grid for post rows */
.post-row {
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 0;
    line-height: 1.5;
    align-items: baseline;
}

.col-3-md,
.col-9-md {
    padding: 0;
}

.col-3-md {
    flex: 0 0 140px;
    max-width: 140px;
    width: 140px;
    text-align: left;
}

.col-9-md {
    flex: 1;
    padding-left: 20px;
}

@media (max-width: 767px) {
    .post-row {
        flex-wrap: wrap;
    }
    
    .col-3-md,
    .col-9-md {
        width: 100%;
        max-width: 100%;
    }
    
    .col-9-md {
        padding-left: 0;
    }
}

/* Sidebar */
.sidebar-module {
    padding: 15px;
    margin-bottom: 30px;
    line-height: 1.1em;
    color: #333;
}

.sidebar-selfie {
    width: 100%;
    max-width: 250px;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

.sidebar-module h4 {
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 2px;
    font-weight: normal;
    color: #333;
}

.sidebar-module p {
    margin-bottom: 5px;
    font-size: 20px;
    line-height: 1.1em;
    color: #333;
}

.sidebar-module a {
    font-size: 20px;
}

/* Homepage styles */
.homepage-content {
    font-size: 20px;
    line-height: 1.8em;
}

.homepage-content p {
    margin-bottom: 20px;
}

.homepage-content h1 {
    font-size: 2.1em;
    margin-bottom: 20px;
    font-weight: normal;
    line-height: 1.1;
}

.homepage-content h2 {
    font-size: 30px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: normal;
    line-height: 1.1;
}

.homepage-content ul {
    margin-bottom: 10px;
}

.homepage-content ul li {
    margin-bottom: 5px;
}

.homepage-content a {
    color: #337ab7;
    text-decoration: none;
}

.homepage-content a:hover {
    color: #23527c;
    text-decoration: underline;
}

.latest-posts {
    margin-top: 10px;
}

.latest-posts .post-row {
    padding: 0;
    margin-bottom: 0;
    line-height: 1.5;
}

.latest-posts .post-row .col-3-md {
    text-align: left;
    padding-right: 25px;
    color: #999;
}

.latest-posts .post-date {
    color: gray;
    font-size: 1.1em;
    font-style: normal;
}

.post-date {
    color: #727272;
    font-size: 1.2em;
    text-transform: uppercase;
    display: block;
}

.latest-posts .post-title {
    color: #337ab7;
    text-decoration: none;
    font-size: 1.1em;
}

.latest-posts .post-title:hover {
    color: #23527c;
    text-decoration: underline;
}

/* Blog listing specific styles */
.blog-listing h1 {
    font-size: 2.1em;
    margin-bottom: 20px;
    font-weight: normal;
}

.blog-listing {
    font-size: 20px;
    line-height: 1.8em;
}

/* General link styles */
a {
    color: #337ab7;
    text-decoration: none;
}

a:hover {
    color: #23527c;
    text-decoration: underline;
}

/* Blog post styles */
.blog-post header {
    margin-bottom: 30px;
}

.blog-post h1 {
    font-size: 2.1em;
    margin-bottom: 10px;
}

.post-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.post-categories, .post-tags {
    font-size: 14px;
    margin-bottom: 5px;
}

.post-content {
    line-height: 1.8em;
    font-size: 18px;
}

.post-content h2 {
    font-size: 30px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.post-content h3 {
    font-size: 24px;
    margin-top: 25px;
    margin-bottom: 15px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 90%;
}

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

/* Blog listing */
.blog-listing h1 {
    font-size: 36px;
    margin-bottom: 30px;
}

.post-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.post-item h2 {
    font-size: 24px;
    margin: 0 0 10px 0;
}

.post-summary {
    color: #666;
    line-height: 1.6;
}

/* Footer */
.blog-footer {
    background-color: #f9f9f9;
    border-top: 1px solid #e5e5e5;
    margin-top: 60px;
    padding: 40px 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    display: inline;
    margin-right: 15px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
}

.footer-links a:hover {
    color: #333;
}

.text-grey {
    color: #999;
    font-size: 14px;
}

/* Footer layout */
.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-left,
.footer-right {
    width: 100%;
}

@media (min-width: 768px) {
    .footer-left {
        width: 50%;
    }
    
    .footer-right {
        width: 50%;
        text-align: right;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-header .nav {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-header .nav-right {
        margin-top: 10px;
    }
    
    .post-row .col-3-md {
        margin-bottom: 5px;
    }
    
    .sidebar-module {
        margin-top: 40px;
        text-align: center;
    }
}

/* Pagination */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #337ab7;
    padding: 14px 45px;
    text-decoration: none;
    display: inline-block;
    font-size: 18px;
    border-radius: 4px;
    line-height: 1.42857143;
}

.pagination a:hover {
    background-color: #e6e6e6;
    border-color: #adadad;
    color: #23527c;
    text-decoration: none;
}

/* Full width content (no sidebar) */
.full-width-content {
    width: 100%;
    max-width: 740px;
    margin: 0 auto;
}

/* Utility classes */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}
