/* Resize featured images on category/archive pages */
.archive .post-thumbnail img,
.category .post-thumbnail img {
    max-width: 300px; /* adjust size */
    height: auto;
}
/* Category page posts container */
.category .post {
    max-width: 300px; /* Adjust card/post width */
    margin: 20px; /* space between posts */
    display: inline-block; /* align posts side by side */
    vertical-align: top;
    box-sizing: border-box;
}

/* Featured image smaller */
.category .post .post-thumbnail img {
    width: 100%; /* make it fit the post container */
    height: auto;
    max-height: 150px; /* control height */
    object-fit: cover; /* crop without stretching */
    border-radius: 8px; /* optional rounded corners */
}

/* Excerpt smaller text */
.category .post .entry-summary {
    font-size: 0.9rem; /* smaller font */
    line-height: 1.4;
}

/* Optional: adjust title size */
.category .post .entry-title {
    font-size: 1rem;
    margin: 10px 0;
}
/* Container for all category posts */
.category .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* responsive grid */
    gap: 20px; /* space between posts */
    margin: 0;
    padding: 0;
}

/* Each post card */
.category .posts-grid .post {
    background: #fff; /* optional background */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* Featured image smaller */
.category .posts-grid .post .post-thumbnail img {
    width: 100%;
    height: 140px; /* small fixed height */
    object-fit: cover;
    display: block;
}

/* Post title */
.category .posts-grid .post .entry-title {
    font-size: 1rem;
    margin: 10px;
    line-height: 1.2;
}

/* Excerpt text */
.category .posts-grid .post .entry-summary {
    font-size: 0.85rem;
    margin: 0 10px 10px 10px;
    line-height: 1.4;
    color: #555;
}

/* Optional: read more link */
.category .posts-grid .post .read-more {
    margin: 0 10px 10px 10px;
    font-size: 0.8rem;
    color: #1a73e8;
    text-decoration: none;
}

/* Make sure category pages use this grid */
.category .post-listing {
    display: contents; /* if your theme wraps posts in a container */
}
/* Hide the long content on category pages */
.category .post .entry-content {
    display: none; /* hides the full paragraph */
}

/* Only show the excerpt */
.category .post .entry-summary {
    display: block; /* make sure excerpt is visible */
    font-size: 0.85rem; /* smaller text */
    color: #555;
    margin: 10px;
    line-height: 1.3;
}

/* Featured image above excerpt */
.category .post .post-thumbnail {
    margin-bottom: 10px;
}

/* Small card layout */
.category .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category .posts-grid .post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* Featured image smaller */
.category .posts-grid .post .post-thumbnail img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

/* Post title */
.category .posts-grid .post .entry-title {
    font-size: 1rem;
    margin: 10px;
    line-height: 1.2;
}
/* Category posts as vertical list */
.category .posts-grid {
    display: block; /* stack posts vertically */
    gap: 0; /* remove grid gap */
    margin: 0;
    padding: 0;
}

/* Each post as a list item */
.category .posts-grid .post {
    display: flex; /* align image + text */
    flex-direction: row; /* image on left, text on right */
    align-items: flex-start;
    margin-bottom: 20px; /* space between posts */
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 10px;
}

/* Featured image small on the left */
.category .posts-grid .post .post-thumbnail {
    flex-shrink: 0;
    width: 120px; /* small width */
    height: 80px; /* small height */
    margin-right: 15px;
}

.category .posts-grid .post .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Post title + excerpt on the right */
.category .posts-grid .post .entry-title {
    font-size: 1rem;
    margin: 0 0 5px 0;
}

.category .posts-grid .post .entry-summary {
    display: block; /* show only excerpt */
    font-size: 0.85rem;
    line-height: 1.4;
    color: #555;
    margin: 0;
}

/* Hide full content if your theme outputs it */
.category .posts-grid .post .entry-content {
    display: none;
}
/* Force vertical list for category pages */
.category .posts-grid {
    display: block !important; /* stack posts vertically */
    margin: 0;
    padding: 0;
}

/* Each post as vertical block */
.category .posts-grid .post {
    display: flex;
    flex-direction: column; /* image on top, title + excerpt below */
    margin-bottom: 20px;
    background: transparent;
    padding: 0;
}

/* Small featured image above title */
.category .posts-grid .post .post-thumbnail {
    width: 100px; /* small width */
    height: 60px; /* small height */
    margin-bottom: 5px;
}

.category .posts-grid .post .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post title */
.category .posts-grid .post .entry-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 5px 0;
}

/* Excerpt styling: one sentence look */
.category .posts-grid .post .entry-summary {
    display: block;
    font-size: 0.85rem;
    line-height: 1.3;
    color: #555;
    margin: 0;
    max-height: 1.3em; /* show only one line */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hide full content */
.category .posts-grid .post .entry-content {
    display: none !important;
}
/* CATEGORY POST LIST — vertical, no grid */
body.category .site-main > article {
    display: flex;
    flex-direction: column; /* stack image → title → excerpt */
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

/* Small featured image */
body.category .site-main > article .post-thumbnail {
    width: 100px; 
    height: 60px; 
    margin-bottom: 8px;
}

body.category .site-main > article .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post title styling */
body.category .site-main > article .entry-header {
    margin: 0;
    font-size: 1rem;
}

/* Short one‑line excerpt style */
body.category .site-main > article .entry-summary {
    font-size: 0.85rem;
    color: #555;
    max-height: 1.3em;        /* limit to ~one line */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 5px 0 0 0;
}

/* Hide full content on category pages */
body.category .site-main > article .entry-content {
    display: none;
}
body.category .site-main > article .entry-summary {
    font-size: 0.85rem;
    color: #555;
    max-height: 1.3em;          /* roughly one line */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;      /* limit to 1 line */
    -webkit-box-orient: vertical;
    white-space: normal;         /* allow wrapping */
    margin: 5px 0 0 0;
}
// Auto excerpt: first sentence only
function first_sentence_excerpt($text) {
    global $post;

    if ('' == $text) {
        $content = strip_tags($post->post_content); // remove HTML
        // Split content into sentences
        $sentences = preg_split('/([.?!])\s+/', $content, 2, PREG_SPLIT_DELIM_CAPTURE);
        if(count($sentences) >= 2){
            $text = $sentences[0] . $sentences[1]; // first sentence + punctuation
        } else {
            $text = $content; // fallback if no punctuation
        }
    }
    return trim($text);
}
add_filter('get_the_excerpt', 'first_sentence_excerpt');
}
/* CATEGORY POSTS – vertical list */
body.category .site-main > article {
    display: flex;
    flex-direction: column; /* stack image above title */
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* Small featured image above title */
body.category .site-main > article .post-thumbnail {
    width: 100px; /* small width */
    height: 60px; /* small height */
    margin-bottom: 8px;
}

body.category .site-main > article .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post title styling */
body.category .site-main > article .entry-header {
    margin: 0;
    font-size: 1rem;
}

/* Hide excerpt and full content */
body.category .site-main > article .entry-summary,
body.category .site-main > article .entry-content {
    display: none !important;
}
/* Hide comment links on category pages */
body.category .site-main > article .comments-link {
    display: none !important;
}
.single-post .post-thumbnail img {
    width: 60%;
    max-width: 600px;
    margin: 0 auto;
    display: block;
}
.single-post .post-thumbnail img {
    max-height: 400px;
    object-fit: cover;
}
.single-post .post-thumbnail {
    margin-bottom: 20px;
}

.single-post .post-thumbnail img {
    width: 65%;
    margin: 0 auto;
    display: block;
}
/* Remove "Leave a Reply" section (comment form) */
#respond,
.comments-area {
    display: none;
}

/* Remove post date (entry meta) */
.entry-meta {
    display: none;
}

/* Remove date in single posts header if still visible */
.entry-header .entry-meta {
    display: none;
}
/* Remove Jetpack sharing buttons */
.sharedaddy,
.sd-sharing,
.sd-block,
.sd-content {
    display: none !important;
}

/* Remove "Like this" section */
.sd-like,
.sd-like-enabled,
.post-likes-widget,
.jetpack-likes-widget-wrapper {
    display: none !important;
}
/* Force white background on posts */
.single-post,
.single-post .site,
.single-post .site-content,
.single-post article {
    background-color: #ffffff !important;
}

/* Ensure page background stays white */
body {
    background-color: #ffffff !important;
}

/* Remove dark overlay/header if present */
.single-post .site-header {
    background-color: #ffffff !important;
}
/* Top menu styling */
.main-navigation {
  background-color: #2f2f2f;
  text-align: center;
}

/* Menu items */
.main-navigation ul li a {
  color: #fff;
  font-weight: 600;
  padding: 14px 18px;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

/* Hover effect */
.main-navigation ul li a:hover {
  background-color: #4a4a4a;
  color: #fff;
}

/* Active category */
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  background-color: #c59d5f; /* gold-ish highlight */
  color: #fff;
}

/* Space out menu items */
.main-navigation ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* Remove default borders */
.main-navigation ul li {
  border: none;
}
.main-navigation ul li a {
  border-radius: 4px;
  margin: 5px;
}
