/*
Theme Name: Hugo Blogus
Description: A Hugo port of the Blogus WordPress theme
*/

:root {
    --primary-color: #3858f9;
    --secondary-color: #f8f9fa;
    --head-color: #000;
    --stext-color: #444;
    --text-color: #545454;
    --wtext-color: #fff;
    --bg-color: #f5f5f5;
    --box-color: #fff;
    --border-color: #e5e5e5;
    --wrap-color: #f5f5f5;
    --bxsh: 0 1px 3px rgb(0 0 0 / 15%);
    --bxshover: 0 4px 60px 0 rgba(0, 0, 0, 0.2);
    --headFont: 'Josefin Sans', sans-serif;
    --bodyFont: 'Rubik', sans-serif;
}

/* Dark Mode */
body.dark {
    --head-color: #fff;
    --stext-color: #fff;
    --text-color: #fff;
    --wtext-color: #000;
    --bg-color: #000;
    --box-color: #222;
    --border-color: #333;
    --wrap-color: #000;
    --bxsh: 0 1px 3px rgba(185, 185, 185, 0.15);
    --bxshover: 0 4px 60px 0 rgba(185, 185, 185, 0.2);
}

/*---------------------------------------
    Body & Global    
-----------------------------------------*/
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    padding: 0;
    margin: 0;
    font-family: var(--bodyFont);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.78;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.wrapper {
    background-color: var(--wrap-color);
}

a {
    text-decoration: inherit;
    transition: all .3s ease-out;
    color: var(--primary-color);
}

a:hover {
    color: var(--head-color);
}

a:focus {
    outline: 1px solid;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--headFont);
    color: var(--head-color);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/*---------------------------------------
    Header
-----------------------------------------*/
.bs-default .bs-header-main {
    padding: 20px 0;
    background-color: var(--box-color);
    border-bottom: 1px solid var(--border-color);
}

.bs-default .bs-header-main .inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.site-logo img.custom-logo {
    max-height: 80px;
    width: auto;
}

.site-logo .logo-text {
    text-align: left;
}

.site-logo .logo-title {
    display: block;
    font-family: var(--headFont);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.site-logo .logo-tagline {
    display: block;
    font-size: 0.9rem;
    color: #e74c3c;
}

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

.site-branding-text .site-title {
    font-family: var(--headFont);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.site-branding-text .site-title a {
    color: var(--head-color);
    text-decoration: none;
}

.site-branding-text .site-title a:hover {
    color: var(--primary-color);
}

.site-branding-text p.site-description {
    color: var(--stext-color);
    font-size: 0.95rem;
    margin: 0;
}

/* Header Buttons */
.info-right {
    gap: 10px;
}

.info-right .msearch,
.info-right .subscribe-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    transition: all 0.3s ease;
}

.info-right .msearch:hover,
.info-right .subscribe-btn:hover {
    background: var(--head-color);
    color: #fff;
}

/* Dark Mode Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 40px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch .slider::before {
    content: "\f186";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #fff;
    font-size: 14px;
}

.switch input:checked + .slider::before {
    content: "\f185";
}

/*---------------------------------------
    Navigation
-----------------------------------------*/
.bs-menu-full {
    background: var(--box-color);
    border-bottom: 1px solid var(--border-color);
}

.navbar-wp {
    padding: 0;
}

.navbar-wp .nav {
    background: var(--secondary-color);
    border-radius: 4px;
    padding: 5px 15px;
}

.navbar-wp .nav-item {
    margin: 0;
}

.navbar-wp .nav-link {
    padding: 10px 20px;
    color: var(--head-color);
    font-family: var(--headFont);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.navbar-wp .nav-link:hover,
.navbar-wp .nav-item.active .nav-link {
    color: var(--primary-color);
}

/* Mobile Header */
.m-header {
    display: none;
    padding: 15px 0;
}

.navbar-toggler {
    border: none;
    padding: 10px;
    background: transparent;
}

.navbar-toggler .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--head-color);
    margin: 4px 0;
    transition: all 0.3s ease;
}

@media (max-width: 991px) {
    .m-header {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    
    .navbar-wp .nav {
        flex-direction: column;
        padding: 15px;
        margin-top: 15px;
    }
    
    .m-header .site-logo img.custom-logo {
        max-height: 50px;
    }
}

/*---------------------------------------
    Card Box / Widgets
-----------------------------------------*/
.bs-card-box {
    background: var(--box-color);
    box-shadow: var(--bxsh);
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 30px;
}

.bs-card-box:hover {
    box-shadow: var(--bxshover);
}

/*---------------------------------------
    Blog Posts
-----------------------------------------*/
.bs-blog-post {
    position: relative;
    background: var(--box-color);
    transition: all 0.3s ease;
}

.bs-blog-post:hover {
    box-shadow: var(--bxshover);
}

.bs-blog-post .bs-blog-thumb {
    margin-bottom: 20px;
}

.bs-blog-post .bs-blog-thumb img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.bs-blog-post .title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.bs-blog-post .title a {
    color: var(--head-color);
    text-decoration: none;
}

.bs-blog-post .title a:hover {
    color: var(--primary-color);
}

.bs-blog-post.single .title {
    font-size: 2rem;
}

/* Categories Badge */
.bs-blog-category {
    margin-bottom: 10px;
}

.blogus-categories {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: #fff;
    background: var(--primary-color);
    border-radius: 3px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.blogus-categories:hover {
    color: #fff;
    opacity: 0.9;
}

/* Post Meta */
.bs-blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--stext-color);
    margin-bottom: 15px;
}

.bs-blog-meta a {
    color: var(--stext-color);
}

.bs-blog-meta a:hover {
    color: var(--primary-color);
}

.bs-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.bs-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Content */
.bs-content {
    color: var(--text-color);
    line-height: 1.8;
}

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

/* Single Post */
.bs-blog-post.single .bs-header {
    margin-bottom: 20px;
}

.bs-blog-post.single article {
    color: var(--text-color);
    line-height: 1.9;
}

.bs-blog-post.single article p {
    margin-bottom: 1.5rem;
}

.bs-blog-post.single article h2,
.bs-blog-post.single article h3,
.bs-blog-post.single article h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Related Posts */
.bs-blog-post.three.md {
    position: relative;
    min-height: 200px;
    border-radius: 4px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: var(--secondary-color);
}

.bs-blog-post.three.md .link-div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bs-blog-post.three.md .inner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    z-index: 2;
}

.bs-blog-post.three.md .title {
    color: #fff;
    font-size: 1rem;
}

.bs-blog-post.three.md .title a {
    color: #fff;
}

.bs-blog-post.three.md .bs-blog-meta {
    color: rgba(255,255,255,0.8);
}

/* Post Navigation */
.post-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-navigation .nav-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--head-color);
    font-weight: 500;
}

.post-navigation .nav-links a:hover {
    color: var(--primary-color);
}

/* Author Box */
.bs-info-author-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/*---------------------------------------
    Sidebar
-----------------------------------------*/
.bs-sidebar .bs-widget {
    background: var(--box-color);
    box-shadow: var(--bxsh);
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 30px;
}

.bs-sidebar .bs-widget-title {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.bs-sidebar .bs-widget-title .title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--head-color);
}

.bs-sidebar .bs-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bs-sidebar .bs-widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.bs-sidebar .bs-widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bs-sidebar .bs-widget ul li a {
    color: var(--text-color);
    font-size: 15px;
    display: block;
    transition: all 0.3s ease;
}

.bs-sidebar .bs-widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/*---------------------------------------
    Footer
-----------------------------------------*/
.footer {
    background: var(--head-color);
    color: var(--wtext-color);
    margin-top: 50px;
}

.bs-footer-copyright {
    background: rgba(0,0,0,0.2);
}

.bs-footer-copyright p {
    color: rgba(255,255,255,0.7);
}

.bs-footer-copyright a {
    color: #fff;
}

/* Scroll to Top */
.bs-scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    font-size: 18px;
    z-index: 999;
    transition: all 0.3s ease;
}

.bs-scroll-to-top:hover {
    background: var(--head-color);
    color: #fff;
}

.bs-scroll-to-top.show {
    display: flex;
}

/*---------------------------------------
    Pagination
-----------------------------------------*/
.pagination {
    margin-top: 30px;
}

.pagination .page-item .page-link {
    color: var(--head-color);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: 4px;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .page-item .page-link:hover {
    background: var(--secondary-color);
}

/*---------------------------------------
    Modal
-----------------------------------------*/
.modal-content {
    background: var(--box-color);
    border: none;
    border-radius: 8px;
}

.modal-header {
    border-bottom-color: var(--border-color);
}

.modal-title {
    color: var(--head-color);
}

.btn-close {
    filter: var(--head-color);
}

/*---------------------------------------
    Responsive
-----------------------------------------*/
@media (max-width: 991px) {
    .content-right {
        margin-bottom: 30px;
    }
    
    .sidebar-right {
        order: 2;
    }
}

@media (max-width: 767px) {
    .bs-blog-post .title {
        font-size: 1.25rem;
    }
    
    .bs-blog-post.single .title {
        font-size: 1.5rem;
    }
    
    .bs-card-box {
        padding: 20px;
    }
    
    .bs-single-related .col-md-4 {
        margin-bottom: 20px;
    }
}

/*---------------------------------------
    Skip Link
-----------------------------------------*/
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/*---------------------------------------
    Typography in Content
-----------------------------------------*/
article.single img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

article.single blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--stext-color);
}

article.single pre {
    background: var(--secondary-color);
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
}

article.single code {
    background: var(--secondary-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

article.single ul,
article.single ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

article.single li {
    margin-bottom: 0.5rem;
}
