/*
Theme Name: Peacemaker
Theme URI: https://karthikeyankc.com
Author: Karthikeyan KC
Author URI: https://karthikeyankc.com
Description: A modern, clean, peaceful, and responsive WordPress theme.
Version: 1.0.0
License: Copyright (c) 2025 Karthikeyan KC. All rights reserved.
Text Domain: peacemaker
Tags: modern, clean, responsive, bulma, accessible
*/

/* Import Bulma 1.0.4 and Inter font */
@import url("assets/css/bulma.min.css");
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Peacemaker custom styles */
:root {
  --primary-color: var(--bulma-primary);
  --background: var(--bulma-scheme-main);
  --text: var(--bulma-text);
  --nav-bg: var(--bulma-white-bis);
  --nav-border: var(--bulma-border);
  --menu-hover: var(--bulma-white-ter);
  --line-height: var(--bulma-line-height);
}

html.is-dark {
  --bulma-scheme-main: #0a0a0a;
  --bulma-scheme-main-bis: #121212;
  --bulma-scheme-main-ter: #242424;
  --bulma-scheme-invert: #fff;
  --bulma-text: #dbdbdb;
  --bulma-text-light: #b5b5b5;
  --bulma-text-strong: #fff;
  --bulma-background: #121212;
  --bulma-border: #363636;
  --bulma-border-hover: #4a4a4a;
  --bulma-border-light: #2f2f2f;
  --bulma-border-light-hover: #3d3d3d;
  --bulma-white-bis: #121212;
  --bulma-white-ter: #242424;
  --bulma-black-bis: #eee;
  --bulma-black-ter: #ddd;
  --nav-bg: var(--bulma-scheme-main-bis);
  --nav-border: var(--bulma-border);
  --menu-hover: var(--bulma-scheme-main-ter);
}

/* Dark mode overrides */
html.is-dark .has-background-light {
  background-color: var(--bulma-scheme-main-bis) !important;
}

html.is-dark .widget.has-background-light {
  background-color: var(--bulma-scheme-main-bis) !important;
  color: var(--bulma-text);
}

html.is-dark .title,
html.is-dark .subtitle,
html.is-dark .navbar-item,
html.is-dark .content h1,
html.is-dark .content h2,
html.is-dark .content h3,
html.is-dark .content h4,
html.is-dark .content h5,
html.is-dark .content h6 {
  color: var(--bulma-text-strong);
}

html.is-dark .button:not(.is-primary):not(.is-link):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger) {
  background-color: var(--bulma-scheme-main);
  border-color: var(--bulma-border);
  color: var(--bulma-text);
}

/* Base input field styles */
input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]),
textarea,
select,
.input,
.textarea,
.select select {
  border-color: var(--nav-border);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):hover,
textarea:hover,
select:hover,
.input:hover,
.textarea:hover,
.select select:hover {
  border-color: var(--bulma-border-hover);
}

input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):focus,
textarea:focus,
select:focus,
.input:focus,
.textarea:focus,
.select select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.125em rgba(var(--primary-color), 0.25);
}

/* Dark mode input field styles */
html.is-dark input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]),
html.is-dark textarea,
html.is-dark select,
html.is-dark .input,
html.is-dark .textarea,
html.is-dark .select select {
  background-color: var(--bulma-scheme-main);
  border-color: var(--bulma-border);
  color: var(--bulma-text);
}

html.is-dark input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):hover,
html.is-dark textarea:hover,
html.is-dark select:hover,
html.is-dark .input:hover,
html.is-dark .textarea:hover,
html.is-dark .select select:hover {
  border-color: var(--bulma-border-hover);
}

html.is-dark input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):focus,
html.is-dark textarea:focus,
html.is-dark select:focus,
html.is-dark .input:focus,
html.is-dark .textarea:focus,
html.is-dark .select select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.125em rgba(var(--primary-color), 0.25);
}

html.is-dark .box,
html.is-dark .card {
  background-color: var(--bulma-scheme-main-bis);
  color: var(--bulma-text);
}

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background-color: var(--background);
  color: var(--text);
  line-height: var(--line-height);
}

.content {
  line-height: var(--line-height);
}

/* Main layout */
.peacemaker-layout {
    min-height: 100vh;
    display: flex;
}

/* Left sidebar */
.peacemaker-sidebar {
    width: 250px;
    flex: none;
    background-color: var(--nav-bg);
    border-right: 1px solid var(--nav-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    height: 100%;
    overflow: hidden;
}

/* Main content area */
.peacemaker-main-wrapper {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
}

.peacemaker-main {
    min-height: 100vh;
    background-color: var(--background);
    color: var(--text);
}

/* Menu styles */
.peacemaker-nav .menu,
.peacemaker-sidebar .menu {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.menu-list a,
.menu-list .menu-item {
    background-color: transparent;
    color: var(--text);
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 0;
    padding: 0.5rem 1rem;
}

.menu-list a:hover,
.menu-list .menu-item:hover {
    background-color: var(--menu-hover);
    color: var(--text);
}

.menu-list .current-menu-item {
    background-color: var(--menu-hover);
    border-right: 3px solid var(--primary-color);
}

.menu-list .current-menu-item a {
    background-color: transparent;
    color: var(--text);
}

/* Dark mode menu overrides */
html.is-dark .menu-list a,
html.is-dark .menu-list .menu-item {
    background-color: transparent;
    color: var(--bulma-text);
}

html.is-dark .menu-list a:hover,
html.is-dark .menu-list .menu-item:hover {
    background-color: var(--menu-hover);
    color: var(--bulma-text);
}

html.is-dark .menu-list .current-menu-item {
    background-color: var(--menu-hover);
}

html.is-dark .menu-list .current-menu-item a {
    background-color: transparent;
    color: var(--bulma-text);
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .peacemaker-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        height: 100%;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .peacemaker-sidebar.is-active {
        transform: translateX(0);
    }

    .peacemaker-main-wrapper {
        margin-left: 0;
    }

    .peacemaker-nav__overlay {
        z-index: 35;
    }
}

/* Profile content should not inherit main content constraints */
.peacemaker-profile-hero .profile-info .content {
  max-width: none;
}

/* Only center profile content when no cover */
.peacemaker-profile-hero.no-cover .profile-info .content {
  margin: auto;
  text-align: center;
}

/* Ensure images stay within their containers */
.peacemaker-main img,
.peacemaker-main figure,
.peacemaker-main .wp-block-image {
  max-width: 100%;
  height: auto;
}

.peacemaker-main figure.alignwide,
.peacemaker-main figure.alignfull {
  max-width: 100vw;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.peacemaker-main figure.alignwide img,
.peacemaker-main figure.alignfull img {
  width: 100%;
}

@media (max-width: 768px) {
  .peacemaker-layout {
    grid-template-columns: 1fr;
    width: 100vw;
  }
  .peacemaker-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background-color: var(--nav-bg);
    border-right: 1px solid var(--nav-border);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    transform: translateX(-100%);
    display: flex;
    z-index: 201;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    grid-row: auto;
    grid-column: auto;
  }
  .peacemaker-nav.is-active {
    transform: translateX(0);
  }
  .peacemaker-main {
    grid-column: 1;
    min-width: 0;
    overflow-x: auto;
    padding: 1rem;
  }
  
  .peacemaker-main figure.alignwide,
  .peacemaker-main figure.alignfull {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    max-width: calc(100% + 2rem);
  }
}

/* Menu styles */
.peacemaker-nav .menu-list .menu-item:hover {
  background-color: var(--menu-hover);
}

.peacemaker-nav .menu-list .menu-item, .peacemaker-nav .menu-list a, .peacemaker-nav .menu-list button {
  background: none;
  border-radius: 0;
  padding: 0.5rem 1rem;
  color: var(--text);
  transition: background-color 0.2s ease;
}

.peacemaker-nav .menu-list .current-menu-item {
  background-color: var(--menu-hover);
  border-right: 3px solid var(--primary-color);
  border-radius: 0;
}

/* Bottom navigation area */
.peacemaker-nav-bottom {
  padding: 1rem;
  border-top: 1px solid var(--nav-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}

/* Copyright text */
.peacemaker-copyright {
  font-size: 0.75rem;
  color: var(--bulma-text-light);
  text-align: left;
  padding: 0 1rem;
}

/* Bottom menu */
.peacemaker-bottom-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
}

.peacemaker-bottom-menu a {
  font-size: 0.75rem;
  color: var(--bulma-text-light);
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
}

.peacemaker-bottom-menu a:hover {
  color: var(--primary-color);
}

/* Remove the dots between menu items */
.peacemaker-bottom-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 768px) {
  .peacemaker-nav-bottom {
    padding: 0.75rem;
  }
}

/* Dark mode toggle */
#darkModeToggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: transparent;
  transition: transform 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

#darkModeToggle:hover {
  background-color: var(--menu-hover);
  transform: scale(1.1);
}

#darkModeToggle:active {
  transform: scale(0.95);
}

#darkModeToggle .icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  will-change: transform, opacity;
}

#darkModeToggle.is-transitioning .icon {
  transform: rotate(180deg) scale(0.5);
  opacity: 0;
}

html.is-dark #darkModeToggle .icon {
  transform: rotate(360deg);
}

/* Smooth transitions for dark mode */
html {
  transition: color 0.3s ease, background-color 0.3s ease;
  will-change: color, background-color;
}

html.is-dark {
  transition: color 0.3s ease, background-color 0.3s ease;
}

/* Single post content font family */
.peacemaker-single-post .peacemaker-feed-content {
  font-family: var(--content-font-family, 'Inter', system-ui, sans-serif);
}

/* Accessibility focus */
:focus {
  outline: none;
}

/* Show focus styles only for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Remove focus-visible outline for buttons and inputs that already have visual feedback */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-color);
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure links still have a visible focus state */
a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Sticky top navbar for mobile */
.peacemaker-topbar {
  display: none;
  z-index: 30;
}

@media (max-width: 768px) {
  .peacemaker-topbar {
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: 0 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  }
  .peacemaker-topbar .peacemaker-hamburger {
    background: none;
    border: none;
    font-size: 1.75rem;
    margin-right: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--primary-color);
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .peacemaker-topbar .peacemaker-logo-text {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-strong);
    flex: 1;
    text-align: center;
    padding-right: 3rem;
  }
  .peacemaker-topbar .custom-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
  }
  .peacemaker-topbar .custom-logo {
    max-height: 30px;
    width: auto;
    height: auto;
  }
}

/* Nav overlay for mobile */
.peacemaker-nav__overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.peacemaker-nav.is-active ~ .peacemaker-nav__overlay,
.peacemaker-sidebar.is-active ~ .peacemaker-nav__overlay {
  display: block;
  opacity: 1;
}

/* Fix: Only apply transform/display for .peacemaker-nav in mobile, not desktop */
@media (min-width: 769px) {
  .peacemaker-nav {
    transform: none !important;
    display: flex !important;
    position: sticky;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    box-shadow: none;
  }
  .peacemaker-nav__overlay {
    display: none !important;
  }
  .peacemaker-main {
    padding-top: 0 !important;
  }
}

/* Featured Image Styles */
.featured-image-container {
  position: relative;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.featured-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0;
  border-radius: 0.5rem;
}

.featured-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0) 100%);
  padding: 4rem 2rem 2rem;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

.overlay-content {
  max-width: 900px;
  margin: 0 auto;
}

.overlay-content .title {
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin-bottom: 1rem !important;
}

.overlay-content .peacemaker-feed-byline {
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.overlay-content .tag {
  text-shadow: none;
}

@media (max-width: 768px) {
  .featured-image-container {
    max-height: none;
    border-radius: 0;
  }
  
  .featured-image {
    border-radius: 0;
  }
  
  .featured-image-overlay {
    padding: 3rem 1rem 1.5rem;
    border-radius: 0;
  }
  
  .overlay-content .title {
    font-size: 1.75rem !important;
  }
  
  .overlay-content .peacemaker-feed-byline {
    font-size: 0.875rem !important;
  }
}

/* Content Styles - Standardized for posts and pages */
.peacemaker-feed-content,
.content {
    line-height: 1.8;
}

.peacemaker-feed-content p,
.content p {
    margin-bottom: 1.5rem;
}

.peacemaker-feed-content h1,
.content h1 {
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.peacemaker-feed-content h2,
.content h2 {
    margin-bottom: 1.25rem;
    line-height: 1.35;
}

.peacemaker-feed-content h3,
.content h3 {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.peacemaker-feed-content h4,
.content h4 {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.peacemaker-feed-content ul,
.peacemaker-feed-content ol,
.content ul,
.content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.peacemaker-feed-content li,
.content li {
    margin-bottom: 0.5rem;
}

.peacemaker-feed-content img,
.content img {
    margin: 2rem 0;
    border-radius: 0.5rem;
}

.peacemaker-feed-content blockquote,
.content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 0 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--bulma-text-light);
}

.peacemaker-feed-content pre,
.content pre {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--menu-hover);
    overflow-x: auto;
}

.peacemaker-feed-content code,
.content code {
    background-color: var(--menu-hover);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

/* Mobile Responsive Adjustments */
@media screen and (max-width: 768px) {
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .columns {
        margin-left: -1rem !important;
        margin-right: -1rem !important;
    }

    .column {
        padding: 1rem !important;
    }

    /* Adjust content width on mobile */
    .peacemaker-main article,
    .peacemaker-feed-content,
    .content {
        max-width: 100%;
    }

    /* Ensure images fit within viewport on mobile */
    .peacemaker-feed-content img,
    .content img,
    .wp-block-image img {
        width: calc(100% + 2rem);
        height: auto;
        max-width: calc(100% + 2rem);
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }

    /* Container for images to maintain proper spacing */
    .wp-block-image,
    figure {
        margin-left: 0;
        margin-right: 0;
        max-width: calc(100% + 2rem);
    }

    /* Reset negative margins for figure captions */
    .wp-block-image figcaption,
    figure figcaption {
        margin-left: 0;
        margin-right: 0;
        padding: 0.5rem 1rem;
    }

    /* Adjust spacing on mobile */
    .peacemaker-feed-content p,
    .content p {
        margin-bottom: 1.25rem;
    }

    .peacemaker-feed-content blockquote,
    .content blockquote {
        margin: 1.5rem 0;
        padding: 0.75rem 0 0.75rem 1.25rem;
    }

    .peacemaker-feed-content pre,
    .content pre {
        margin: 1.5rem -1rem;
        padding: 1.25rem;
        border-radius: 0;
        width: calc(100% + 2rem);
    }

    /* Improve list readability on mobile */
    .peacemaker-feed-content ul,
    .peacemaker-feed-content ol,
    .content ul,
    .content ol {
        padding-left: 1.25rem;
        margin-bottom: 1.25rem;
    }
}

/* Feed post styles */
.peacemaker-feed-post {
  border-bottom-color: var(--nav-border);
}

.peacemaker-feed-post .title a {
  transition: color 0.2s ease;
}

.peacemaker-feed-post .title a:hover {
  color: var(--primary-color) !important;
}

.peacemaker-feed-byline {
  gap: 0.25rem;
}

.peacemaker-feed-byline .tag {
  margin: 0;
}

.peacemaker-feed-byline .tag a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.peacemaker-feed-byline .tag a:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .peacemaker-feed-byline {
    row-gap: 0.25rem;
  }
  
  .peacemaker-feed-byline .mx-1 {
    display: none;
  }
  
  .peacemaker-feed-byline > * {
    width: 100%;
  }
  
  .peacemaker-feed-byline .tag {
    width: auto;
    margin-top: 0.25rem;
  }
}

/* Screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Forum Integration */
.peacemaker-forum-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

@media (max-width: 768px) {
  .peacemaker-forum-container {
    padding: 1rem;
  }
}

/* Forum Content */
.forum-content {
  background: var(--background);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 2rem;
}

@media (max-width: 768px) {
  .forum-content {
    padding: 1rem;
  }
}

/* Search Form Styles */
.search-form {
  width: 100%;
}

.search-form .field {
  margin-bottom: 0;
}

.search-form .input {
  box-shadow: none;
  border-color: var(--nav-border);
  background-color: var(--background);
  color: var(--text);
  transition: all 0.3s ease;
}

.search-form .input:focus-visible {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color);
  outline: none;
}

.search-form-container {
  transition: all 0.3s ease;
}

.search-form-container:focus-within {
  transform: scale(1.02);
}

/* Mobile-optimized header styles */
.peacemaker-main-header {
  border-bottom: 1px solid var(--nav-border);
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 10;
}

.search-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: transparent;
  transition: transform 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.search-toggle:hover {
  background-color: var(--menu-hover);
  transform: scale(1.1);
}

.search-toggle:active {
  transform: scale(0.95);
}

.search-toggle .icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  will-change: transform;
}

.search-toggle[aria-expanded="true"] .icon {
  transform: rotate(-90deg) scale(0.95);
}

/* Search form wrapper animation */
.search-form-wrapper {
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(-10px);
  display: none;
}

.search-form-wrapper.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Adjust header for mobile */
@media screen and (max-width: 768px) {
  .peacemaker-main-header {
    padding: 0.75rem 1rem !important;
  }
  
  .search-form-wrapper {
    margin-top: 0.5rem !important;
  }
  
  .title.is-4 {
    font-size: 1.25rem !important;
  }
}

/* Comments Styles */
.comments-area {
    margin-top: 3rem;
    border-top: 1px solid var(--nav-border);
    padding-top: 2rem;
}

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

.comment-list ol {
    list-style: none;
    padding-left: 2rem;
}

.comment-body {
    padding: 1rem 0;
    border-bottom: 1px solid var(--menu-hover);
}

.comment-body:last-child {
    border-bottom: none;
}

/* Comment text and metadata */
.comment-text.content {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text);
}

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

.comment-author a {
    color: var(--text);
    text-decoration: none;
}

.comment-author a:hover {
    color: var(--primary-color);
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--bulma-text-light);
}

.comment-metadata a {
    color: inherit;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: var(--primary-color);
}

/* Comment reply link */
.reply {
    margin-top: 0.5rem;
}

.reply a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.reply a:hover {
    color: var(--primary-color);
}

/* Avatar sizes */
.media-left img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 290486px !important; /* Bulma's is-rounded value */
}

.children .media-left img {
    width: 40px;
    height: 40px;
}

/* Nested Comments */
.comment-list .children {
    margin-top: 1rem;
    margin-left: 2rem;
    border-left: 2px solid var(--menu-hover);
    padding-left: 1rem;
}

.comment-list .children .comment-body {
    padding: 1rem 0;
}

/* Pingbacks */
.pingback .notification {
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.pingback a {
    color: var(--primary-color);
    text-decoration: none;
}

.pingback a:hover {
    text-decoration: underline;
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
    background-color: var(--menu-hover);
    padding: 1.5rem;
    border-radius: 8px;
}

/* Logged in user info styling */
.comment-respond p:first-of-type {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-respond p:first-of-type a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.comment-respond p:first-of-type a:hover {
    text-decoration: underline;
}

.comment-reply-title {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
    color: var(--text-strong);
}

.comment-notes {
    font-size: 0.875rem;
    color: var(--bulma-text-light);
    margin-bottom: 1.5rem;
}

.comment-form .field {
    margin-bottom: 1rem;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--nav-border);
    border-radius: 4px;
    padding: 0.75rem;
    font-size: 0.875rem;
    background-color: var(--background);
    color: var(--text);
    transition: all 0.2s ease;
}

.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.comment-form .submit {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

/* Post Card Styles */
.post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Only apply equal height in grid layout */
.columns.is-multiline .post-card {
  height: 100%;
}

.columns.is-multiline .post-card-inner {
  height: 100%;
}

/* Regular single column layout */
.post-card:not(.columns.is-multiline .post-card) {
  height: auto;
  margin-bottom: 2rem;
}

.post-card-inner {
  background: var(--background);
  border: 1px solid var(--nav-border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.post-card-inner:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  outline: none;
}

.post-card-inner:focus-within .post-content {
  outline: none;
}

.post-card .title a {
  color: var(--text-strong);
  transition: color 0.2s ease;
}

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

.post-card a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.post-card a:focus:not(:focus-visible) {
  outline: none;
}

.post-card a:hover {
  outline: none;
}

.post-image-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.post-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  padding: 1.5rem;
  background-color: var(--background);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* Only apply flex-grow in grid layout */
.columns.is-multiline .post-content {
  flex: 1;
}

.post-excerpt {
  color: var(--bulma-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Only apply flex-grow to excerpt in grid layout */
.columns.is-multiline .post-excerpt {
  flex: 1;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 500;
}

.read-more .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

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

/* Pagination Fixes */
.pagination-wrapper {
  width: 100%;
  clear: both;
  margin-top: 2rem;
}

@media screen and (max-width: 768px) {
  .post-content {
    padding: 1.25rem;
  }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .comment-respond {
        padding: 1rem;
    }
    
    .comment-form .columns {
        margin-left: 0;
        margin-right: 0;
    }
    
    .comment-form .column {
        padding-left: 0;
        padding-right: 0;
    }
    
    .comment-list .children {
        margin-left: 1rem;
        padding-left: 0.75rem;
    }
    
    .media-left img {
        width: 40px;
        height: 40px;
    }
    
    .children .media-left img {
        width: 32px;
        height: 32px;
    }
    
    .comment-text.content {
        font-size: 0.875rem;
    }
}

/* Profile Hero Section (Twitter-style) */
.peacemaker-profile-hero {
    position: relative;
    background-color: var(--background);
    margin-bottom: 2rem;
}

.peacemaker-profile-hero .hero-cover-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 33.3333%; /* 3:1 aspect ratio */
    background-color: var(--nav-border);
}

.peacemaker-profile-hero .hero-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.peacemaker-profile-hero .hero-cover-placeholder {
    background-color: var(--nav-border);
}

.peacemaker-profile-hero .profile-content {
    position: relative;
    padding: 0 1rem;
}

.peacemaker-profile-hero .profile-header {
    margin-top: -48px; /* Half of profile image height */
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.peacemaker-profile-hero .profile-image-wrapper {
    width: 96px;
    height: 96px;
    border: 4px solid var(--background);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.peacemaker-profile-hero .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.peacemaker-profile-hero .profile-info {
    padding: 0.5rem;
}

.profile-info .content {
    margin: auto;
}

/* No cover image layout */
.peacemaker-profile-hero.no-cover {
    padding: 2rem 0;
}

.peacemaker-profile-hero.no-cover .profile-header {
    margin-top: 0;
}

.peacemaker-profile-hero.no-cover .profile-image-wrapper {
    margin: 0 auto 1.5rem;
}

.peacemaker-profile-hero.no-cover .profile-info {
    text-align: center;
}

/* No profile image layout */
.peacemaker-profile-hero.no-profile .profile-info {
    padding-top: 2rem;
}

/* No profile image but has cover */
.peacemaker-profile-hero:not(.no-cover) .profile-info.no-profile-image {
    padding-top: 1rem;
}

.peacemaker-profile-hero .title {
    color: var(--text-strong);
    font-weight: 700;
    margin-bottom: 0.25rem !important;
}

.peacemaker-profile-hero .profile-bio {
    margin-bottom: 0.75rem !important;
}

.peacemaker-profile-hero .profile-bio p {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.peacemaker-profile-hero .profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    justify-content: flex-start;
}

.peacemaker-profile-hero.no-cover .profile-links {
    justify-content: center;
}

.peacemaker-profile-hero .profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bulma-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    background-color: var(--menu-hover);
}

.peacemaker-profile-hero .profile-link:hover {
    color: var(--primary-color);
    background-color: var(--nav-border);
}

.peacemaker-profile-hero .profile-link .icon {
    width: 16px;
    height: 16px;
    color: inherit;
}

@media screen and (max-width: 768px) {
    .peacemaker-profile-hero .hero-cover-wrapper {
        padding-bottom: 50%; /* Taller aspect ratio on mobile */
    }
    
    .peacemaker-profile-hero .profile-header {
        margin-top: -36px; /* Adjust for smaller profile image */
    }
    
    .peacemaker-profile-hero .profile-image-wrapper {
        width: 72px;
        height: 72px;
    }
    
    .peacemaker-profile-hero .title.is-3 {
        font-size: 1.25rem;
    }
    
    .peacemaker-profile-hero .profile-bio p {
        font-size: 0.875rem;
    }
    
    .peacemaker-profile-hero .profile-links {
        gap: 0.75rem;
        flex-direction: column;
    }

    .peacemaker-profile-hero .profile-link {
        width: 100%;
        justify-content: center;
    }

    .peacemaker-profile-hero.no-cover {
        padding: 1.5rem 0;
        margin: -2rem -1rem 2rem;
        border-radius: 0;
    }
}

/* Pagination Styles */
.pagination-wrapper {
  width: 100%;
  clear: both;
  margin-top: 2rem;
}

.pagination {
  justify-content: center;
}

.pagination-previous,
.pagination-next,
.pagination-link {
  min-width: 100px;
  justify-content: center;
  align-items: center;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--nav-border);
  background-color: var(--background);
  color: var(--text);
  transition: all 0.2s ease;
}

.pagination-previous:hover,
.pagination-next:hover,
.pagination-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.pagination-link.is-current {
  background-color: var(--primary-color);
  color: white;
}

.pagination-link.is-current:hover {
  background-color: var(--primary-color);
}

.pagination-previous .icon,
.pagination-next .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.pagination-ellipsis {
  color: var(--bulma-text-light);
}

@media screen and (max-width: 768px) {
  .pagination-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .pagination-previous,
  .pagination-next,
  .pagination-link {
    min-width: 80px;
    padding: 0.5rem 1rem;
    flex: 1 1 auto;
    max-width: 100%;
  }

  .pagination-previous .icon,
  .pagination-next .icon {
    width: 12px;
    height: 12px;
  }
}

/* Gallery and Image Caption Styles */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0, rgba(0, 0, 0, 0.3) 70%, transparent);
    bottom: 0;
    color: #fff;
    font-size: 0.875rem;
    left: 0;
    margin-bottom: 0;
    max-height: 60%;
    overflow: auto;
    padding: 0.75rem 1rem;
    position: absolute;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    width: calc(50% - 1rem);
    margin: 0.5rem;
}

.wp-block-gallery.has-nested-images figure.wp-block-image {
    position: relative;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
}

.wp-block-gallery.has-nested-images figure.wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    margin: 0;
}

/* Ensure gallery layout is proper */
.wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    list-style-type: none;
    padding: 0;
    gap: 1rem;
    margin-left: 0;
    margin-right: 0;
}

.wp-block-gallery.has-nested-images {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

@media screen and (max-width: 768px) {
    .wp-block-gallery.has-nested-images {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        gap: 0;
    }

    .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
        width: 100%;
        margin: 0 0 1rem 0;
        border-radius: 0;
    }

    .wp-block-gallery.has-nested-images figure.wp-block-image {
        border-radius: 0;
    }

    .wp-block-gallery.has-nested-images figure.wp-block-image img {
        border-radius: 0;
    }

    .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
        padding: 0.75rem;
        font-size: 0.875rem;
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0, rgba(0, 0, 0, 0.4) 70%, transparent);
    }

    /* Last gallery item shouldn't have bottom margin */
    .wp-block-gallery.has-nested-images figure.wp-block-image:last-child {
        margin-bottom: 0;
  }
}