/*
Theme Name: Oiva
Description: A modern WordPress theme with clean design and excellent performance
Version: 1.0.0
Author: Your Name
Author URI: https://yoursite.com
Text Domain: oiva
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Roboto, sans-serif;
    line-height: 1.6;
    color: var(--oiva-body-text-color, #333);
    background-color: var(--oiva-page-bg-color, #fff);
}

/* Ensure all headings use the heading color */
h1, h2, h3, h4, h5, h6 {
    color: var(--oiva-heading-color, #333);
}

/* Ensure all links use the highlight color */
a {
    color: var(--oiva-highlight-color, #007cba);
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    color: var(--oiva-highlight-hover-color, #005a87);
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.site-header.has-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 2rem 0;
    display: flex;
    align-items: flex-end;
}

.site-header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.site-header.has-banner.scrolled {
    padding: 1rem 0;
    align-items: flex-end;
}

/* Sticky Navigation */
.main-navigation-container.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--oiva-menu-bg-color, #ccc);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 124, 186, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.site-header.has-banner.sticky {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    align-items: center;
    display: block;
}

/* Remove body padding - let sticky navigation overlay content */
body.has-sticky-navigation {
    padding-top: 0;
}

/* Banner Overlay */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.site-header .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.site-header.has-banner .container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100%;
}

/* Header Banner (old styles - keeping for reference but not used) */
.header-banner {
    position: relative;
    width: 100%;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.banner-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
}

.site-title a {
    font-size: 2rem;
    font-weight: bold;
    color: var(--oiva-title-color, #333);
    text-decoration: none;
}

.site-header.has-banner .site-title a {
    color: #fff;
}

.site-title a:hover {
    text-decoration: underline;
}

.site-header.has-banner .site-description {
    color: #fff;
}

.site-description {
    color: var(--oiva-meta-color, #999);
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Navigation */
.main-navigation-container {
    color: #fff;
    background-color: var(--oiva-menu-bg-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    padding: 0;
    margin: 0;
}

.main-navigation {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 20px;
    color: #222;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #222;
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Ensure navigation text is readable on custom backgrounds */
.main-navigation-container {
    color: var(--oiva-body-text-color, #333);
}

.main-navigation a {
    color: var(--oiva-body-text-color, #333);
}

.main-navigation a:hover {
    color: var(--oiva-highlight-hover-color, #007cba);
    text-decoration: underline;
}

/* Main content */
.site-main {
    padding: 2rem 0;
}

/* Posts */
.post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--oiva-meta-color, #999);
}

.post-content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.post-thumbnail-wrapper {
    flex-shrink: 0;
    width: 200px;
}

.post-thumbnail-link {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-thumbnail-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.post-thumbnail-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.post-text-content {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 0;
    color: var(--oiva-heading-color, #333);
}

.post-title a {
    color: var(--oiva-heading-color, #333);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--oiva-highlight-hover-color, #007cba);
    text-decoration: underline;
}

.post-meta {
    color: var(--oiva-meta-color, #999);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.post-content {
    margin-bottom: 1rem;
    color: var(--oiva-body-text-color, #333);
}

.post-footer {
    margin-top: 0.5rem;
}

.post-tags {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.post-tags a {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: var(--oiva-highlight-color, #007cba);
    color: #fff;
}

/* Single post specific styles */
.single-post .post-title {
    font-size: 2.5rem;
    color: var(--oiva-heading-color, #333);
}

.single-post .post-meta {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.single-post .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--oiva-body-text-color, #333);
}

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

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    margin: 2rem 0 1rem 0;
    color: var(--oiva-heading-color, #333);
}

/* Post navigation */
.post-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--oiva-meta-color, #999);
    display: flex;
    justify-content: space-between;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.post-navigation a {
    color: var(--oiva-highlight-color, #007cba);
    text-decoration: none;
    font-weight: 500;
}

.post-navigation a:hover {
    color: var(--oiva-highlight-hover-color, #005a87);
    text-decoration: underline;
}

/* Pages */
.page {
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--oiva-heading-color, #333);
}

.page-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--oiva-body-text-color, #333);
}

.page-content p {
    margin-bottom: 1.5rem;
}

/* Content-sidebar layout */
.content-sidebar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.main-content-area {
    flex: 2;
    min-width: 0;
}

.widget-area.sidebar {
    flex: 1;
    min-width: 300px;
}

/* Sidebar */
.sidebar {
    margin-top: 0;
    border-radius: 8px;
}

.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--oiva-menu-bg-color, #f9f9f9);
    border-radius: 8px;
}

.widget-title {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--oiva-heading-color, #007cba);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--oiva-highlight-color, #007cba);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--oiva-highlight-hover-color, #005a87);
    text-decoration: underline;
}

/* Post contents */
.wp-block-image figcaption {
    font-size: 0.8rem;
    color: var(--oiva-meta-color, #999);
    text-align: center;
    margin-top: 0.5rem;
}

.wp-block-quote {
    border-left: 4px solid var(--oiva-highlight-color, #007cba);
    padding-left: 1rem;
    margin-left: 0;    
}

.wp-block-quote p {
    padding-top: 10px;
    padding-bottom: 10px;
}

.wp-block-list {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

/* Site Owner Bio Widget */
.oiva-bio-widget {
    text-align: center;
}

.oiva-bio-widget .bio-image-wrapper {
    margin-bottom: 15px;
}

.oiva-bio-widget .bio-image {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--oiva-highlight-color, #007cba);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.oiva-bio-widget .bio-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: var(--oiva-heading-color);
}

.oiva-bio-widget .bio-text {
    font-size: 1rem;
    color: var(--oiva-body-text-color);
    margin: 0;
}

.oiva-bio-widget .monthly-bio-text {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--oiva-meta-color, #999);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--oiva-meta-color, #999);
}

/* Footer */
.site-footer {
    background-color: var(--oiva-footer-bg-color, #222);
    color: var(--oiva-footer-text-color, #fff);
    padding: 0.25rem 0;
    margin-top: 0.5rem;
}

.site-footer .container {
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-widgets {
    display: flex;
    justify-content: center;
}

.footer-widget-area {
    max-width: 400px;
}

.footer-widget-area .widget {
    background: transparent;
    color: var(--oiva-footer-text-color);
    text-align: center;
}

.footer-widget-area .widget-title {
    color: var(--oiva-footer-text-color);
    margin-bottom: 1rem;
}

.footer-widget-area .widget a {
    color: var(--oiva-footer-text-color);
    opacity: 0.8;
}

.footer-widget-area .widget a:hover {
    color: var(--oiva-footer-text-color);
    opacity: 1;
}

.footer-menu-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.footer-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin: 0;
}

.footer-menu a {
    color: var(--oiva-footer-text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.footer-menu a:hover {
    color: var(--oiva-footer-text-color);
    text-decoration: underline;
    opacity: 1;
}

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

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: var(--oiva-footer-text-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--oiva-footer-text-color);
    text-decoration: underline;
}

/* 404 page */
.error-404 {
    text-align: center;
    padding: 3rem 0;
}

.error-404 .page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #666;
}

.error-404 .page-content {
    margin-bottom: 2rem;
}

.error-404 .widget-area {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

/* Search form */
.search-form {
    display: flex;
    margin-bottom: 2rem;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background: var(--oiva-highlight-color, #007cba);
    color: var(--oiva-button-text-color, #fff);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: var(--oiva-highlight-hover-color, #005a87);
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--oiva-highlight-color, #007cba);
    color: #fff;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--oiva-highlight-color, #007cba);
    color: var(--oiva-button-text-color, #fff);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--oiva-highlight-hover-color, #005a87);
    transform: translateY(-2px);
}

/* Read more link */
.read-more {
    display: inline-block;
    background: var(--oiva-highlight-color, #007cba);
    color: var(--oiva-button-text-color, #fff);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: var(--oiva-highlight-hover-color, #005a87);
    color: var(--oiva-button-text-color, #fff);
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--oiva-heading-color, #333);
}

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

.comment-list .children {
    margin-top: 1rem;
    margin-left: 1rem;
    list-style: none;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--oiva-highlight-color, #007cba);
}

.comment-author {
    font-weight: bold;
    padding-top: 0.2rem;
    margin-bottom: 0.2rem;
    color: var(--oiva-heading-color, #333);
}

.comment-meta {
    color: var(--oiva-meta-color, #999);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.comment-metadata a {
    color: var(--oiva-meta-color, #999);
    text-decoration: none;
}

.comment-content {
    line-height: 1.6;
    color: var(--oiva-body-text-color, #333);
}

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

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.comment-reply-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--oiva-heading-color, #333);
}

.comment-notes {
    color: var(--oiva-meta-color, #999);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid var(--oiva-highlight-color, #007cba);
}

.comment-form {
    display: grid;
    gap: 1.5rem;
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin: 0;
}

.comment-form-author,
.comment-form-email {
    grid-column: span 1;
}

.comment-form-url {
    grid-column: span 2;
}

.comment-form-comment {
    grid-column: span 2;
    margin: 0;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--oiva-heading-color, #333);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--oiva-link-color, #007cba);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form .required {
    color: #e74c3c;
}

.comment-form .submit {
    grid-column: span 2;
    background: var(--oiva-highlight-color, #007cba);
    color: var(--oiva-button-text-color, #fff);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    justify-self: start;
}

.comment-form .submit:hover {
    background: var(--oiva-highlight-hover-color, #005a87);
}

/* Comment Navigation */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.comment-navigation .nav-previous,
.comment-navigation .nav-next {
    flex: 1;
}

.comment-navigation .nav-next {
    text-align: right;
}

.comment-navigation a {
    color: var(--oiva-highlight-color, #007cba);
    text-decoration: none;
    font-weight: 500;
}

.comment-navigation a:hover {
    color: var(--oiva-highlight-hover-color, #005a87);
    text-decoration: underline;
}

#cancel-comment-reply-link {
    padding-left: 1rem;
}

/* No Comments */
.no-comments {
    text-align: center;
    color: var(--oiva-meta-color, #999);
    font-style: italic;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Comment Avatar */
.comment .avatar {
    float: left;
    margin-right: 1rem;
    border-radius: 50%;
}

/* Responsive Comment Form */
@media (max-width: 768px) {
    .comment-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comment-form-author,
    .comment-form-email,
    .comment-form-url,
    .comment-form-comment,
    .comment-form .submit {
        grid-column: span 1;
    }
    
    .comment-respond {
        padding: 1.5rem;
    }
    
    .comment {
        padding: 1rem;
    }
    
    .comment-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .comment-navigation .nav-next {
        text-align: left;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .content-sidebar-wrap {
        flex-direction: column;
    }

    .main-content-area,
    .widget-area.sidebar {
        flex: 1 1 100%;
        width: 100%;
    }

    .sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .site-header.has-banner {
        padding: 1.5rem 0;
        align-items: flex-end;
    }
    
    .site-header.has-banner .container {
        min-height: auto;
    }
    
    .main-navigation-container.sticky {
        padding: 0.25rem 0;
    }
    
    .site-header.sticky {
        padding: 0.25rem 0;
    }
    
    .site-header.has-banner.sticky {
        padding: 0.25rem 0;
    }
    
    body.has-sticky-navigation {
        padding-top: 0;
    }
    
    /* Post thumbnail layout for mobile */
    .post-content-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-thumbnail-wrapper {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .post-thumbnail-image {
        height: 200px;
    }
    
    .header-banner {
        margin: 0.5rem 0;
        border-radius: 4px;
    }
    
    .post-title,
    .single-post .post-title,
    .page-title {
        font-size: 1.8rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }
    
    .post-title,
    .single-post .post-title,
    .page-title {
        font-size: 1.5rem;
    }
    
    .error-404 .page-title {
        font-size: 2rem;
    }
} 