/* Additional styling for NewsPress theme */

/* Header styles */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .main-navigation {
        margin-top: 1rem;
    }
}

/* Primary navigation menu */
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
    margin-right: 1.5rem;
}

.main-navigation li:last-child {
    margin-right: 0;
}

.main-navigation a {
    color: #333;
    display: block;
    padding: 0.5rem 0;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-navigation a:hover {
    color: #0073aa;
}

/* Submenu styling */
.main-navigation ul ul {
    background-color: #fff;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 100%;
    left: -999em;
    z-index: 99999;
    min-width: 200px;
    display: block;
}

.main-navigation ul ul a {
    padding: 0.5rem 1rem;
}

.main-navigation ul ul li {
    margin-right: 0;
    border-bottom: 1px solid #f1f1f1;
}

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

.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
    left: 0;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        background-color: #0073aa;
        border: none;
        border-radius: 3px;
        color: #fff;
        font-size: 1rem;
        padding: 0.5rem 1rem;
        cursor: pointer;
    }
    
    .main-navigation ul {
        display: none;
    }
    
    .main-navigation.toggled ul {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        width: 100%;
    }
    
    .main-navigation li {
        margin-right: 0;
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        background-color: #f8f8f8;
    }
}

/* Custom logo */
.custom-logo-link {
    display: inline-block;
    margin-right: 1rem;
}

.custom-logo {
    max-height: 120px;
    width: auto;
}

/* Search form */
.search-form {
    display: flex;
}

.search-field {
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
    font-size: 0.9375rem;
    padding: 0.5rem;
    flex-grow: 1;
}

.search-submit {
    background-color: #0073aa;
    border: none;
    border-radius: 0 3px 3px 0;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

/* Front page sections refinements */
.front-page-section {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Post meta styling */
.entry-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.posted-on,
.byline,
.cat-links,
.comments-link {
    margin-right: 1rem;
}

.posted-on a,
.byline a,
.cat-links a,
.comments-link a {
    color: #0073aa;
}

/* Category labels */
.category-label {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-label:hover {
    background-color: #005177;
    color: #fff;
    text-decoration: none;
}

/* Post navigation */
.post-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-links {
    display: flex;
    justify-content: space-between;
}

.nav-previous,
.nav-next {
    flex: 0 0 48%;
}

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

.nav-previous a,
.nav-next a {
    color: #333;
    font-weight: 500;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: #0073aa;
}

/* Comments */
.comments-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comments-title {
    margin-bottom: 1.5rem;
}

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

.comment {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment-meta {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.comment-author {
    font-weight: 500;
}

.comment-content {
    margin-bottom: 0.5rem;
}

.reply {
    font-size: 0.875rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.comment-form input[type="submit"] {
    background-color: #0073aa;
    border: none;
    border-radius: 3px;
    color: #fff;
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
}

.comment-form input[type="submit"]:hover {
    background-color: #005177;
}

/* Widget styles */
.widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Recent posts widget with thumbnails */
.widget_recent_entries_with_thumbnails li {
    display: flex;
    align-items: center;
}

.recent-post-thumbnail {
    flex: 0 0 80px;
    margin-right: 1rem;
}

.recent-post-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.recent-post-title {
    font-weight: 500;
}

.recent-post-date {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Popular posts widget */
.widget_popular_posts li {
    position: relative;
    padding-left: 2rem;
}

.popular-post-number {
    position: absolute;
    top: 0;
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
    background-color: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Category widget */
.widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget_categories .cat-count {
    background-color: #f1f1f1;
    border-radius: 10px;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    color: #666;
}

/* Tag cloud widget */
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
}

.widget_tag_cloud .tag-cloud-link {
    display: inline-block;
    background-color: #f1f1f1;
    padding: 0.25rem 0.5rem;
    margin: 0 0.5rem 0.5rem 0;
    font-size: 0.75rem !important;
    border-radius: 3px;
    color: #666;
}

.widget_tag_cloud .tag-cloud-link:hover {
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
}

/* Footer styling */
.site-footer {
    background-color: #222;
    color: #fff;
    padding: 3rem 0 1.5rem;
}

.footer-widget-title {
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #0073aa;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
    color: #fff;
    text-decoration: none;
}

.site-footer .widget li {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    color: #666;
}

.breadcrumbs a {
    color: #0073aa;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

/* Pagination */
.pagination,
.posts-navigation {
    margin: 2rem 0;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    margin-right: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
}

.page-numbers.current {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.page-numbers:hover {
    background-color: #f1f1f1;
    text-decoration: none;
}

.page-numbers.current:hover {
    background-color: #0073aa;
}

.page-numbers.dots {
    border: none;
}

.page-numbers.next,
.page-numbers.prev {
    font-weight: 500;
}

/* Responsive videos */
.wp-video,
.wp-audio-shortcode,
.video-container {
    margin-bottom: 1.5rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Message styles for notices, alerts etc. */
.message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 3px;
}

.message-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #0c5192;
}

.message-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #1e4620;
}

.message-warning {
    background-color: #fff8e1;
    border-left: 4px solid #ffb74d;
    color: #945600;
}

.message-error {
    background-color: #ffebee;
    border-left: 4px solid #ef5350;
    color: #981111;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 115, 170, 0.8);
    color: #fff;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

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

.back-to-top:hover {
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
}

/* Dark mode support */
:root {
  --body-bg: #ffffff;
  --body-color: #333333;
  --heading-color: #23282d;
  --link-color: #0073aa;
  --link-hover-color: #005177;
  --border-color: #e5e5e5;
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --input-border: #dddddd;
  --button-bg: #0073aa;
  --button-color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --body-bg: #1a1a1a;
    --body-color: #f0f0f0;
    --heading-color: #ffffff;
    --link-color: #4cace6;
    --link-hover-color: #71c2f5;
    --border-color: #444444;
    --card-bg: #2a2a2a;
    --input-bg: #333333;
    --input-border: #555555;
    --button-bg: #0073aa;
    --button-color: #ffffff;
  }
  
  body {
    background-color: var(--body-bg);
    color: var(--body-color);
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
  }
  
  a {
    color: var(--link-color);
  }
  
  a:hover {
    color: var(--link-hover-color);
  }
  
  .site-header,
  .site-footer,
  .widget,
  .comment-body,
  .author-box {
    background-color: var(--card-bg);
    border-color: var(--border-color);
  }
  
  input, textarea, select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--body-color);
  }
  
  button, 
  .button, 
  .more-link, 
  input[type="submit"] {
    background-color: var(--button-bg);
    color: var(--button-color);
  }
}

/* Improve reading experience */
.entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.entry-content p {
  margin-bottom: 1.5em;
}

blockquote {
  border-left: 4px solid var(--link-color);
  padding-left: 1.5rem;
  font-style: italic;
  margin-left: 0;
  color: #666;
}

/* Comment improvements */
.comment-list {
  list-style: none;
  padding: 0;
}

.comment {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment-metadata {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1rem;
}

.comment-content {
  font-size: 1rem;
  line-height: 1.6;
}

/* Fix sidebar styling */
.widget {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.widget-title {
  border-bottom: 2px solid var(--link-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Reading progress indicator */
.progress-container {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 4px;
}

.progress-bar {
  height: 4px;
  background: var(--link-color);
  width: 0%;
}
