/* Styles for unhinged_sorted_posts shortcode (two-column grid for posts) */
.unhinged-sorted-posts {
    display: grid;
    grid-template-columns: 0.6fr 3.4fr; /* Left column narrower, right column wider */
    gap: 15px;
    padding: 15px;
    margin: 0 auto;
    max-width: 1200px; /* Limit width for large screens */
}


.unhinged-author-sticky-posts {
    display: grid;
    grid-template-columns: 0.5fr 3.5fr; /* Left column narrower, right column wider */
    gap: 15px;
    padding: 15px;
    margin: 0 auto;
    max-width: 1200px; /* Limit width for large screens */
}

/* Ensure post rows use grid layout correctly */
.unhinged-post-row {
    display: contents; /* Allows child elements to align with parent grid */
}

/*added from custom css*/
.unhinged-category {
    color: #FF502D;
    align-content: center;
    font-style: italic;
}

.unhinged-content a {
  color:#FFFFFF;
  text-decoration: none;
}

.unhinged-content a:hover {
  text-decoration: underline;
}

.unhinged-content {
    border-left-color: #ff502d9c;
    border-left-style: solid;
    border-left-width: 2.5px;
    padding-left: 0.5em;
}

.unhinged-category {
    border-left-color: #ff502d9c;
    border-left-style: solid;
    border-left-width: 2.5px;
    padding-left: 0.5em;
} 

/* End the add here */

/* Style for category and content columns in post grid */
.unhinged-category,
.unhinged-content {
    padding: 12px;
    /*border-bottom: 1px solid #ad422e3d; /* Subtle border for separation */
    font-size: 20px;
    line-height: 1.5;
}

/* Style for numbered bullets in author sticky posts */
.unhinged-number {
    padding: 12px;
    font-size: 45px;
    font-weight: bold;
    line-height: 1;
    color: #ff502D;
    align-content: center;
    justify-self: center;
    text-align: center;
    opacity: 0.9;
}

/* Wrapper for content and category in author sticky posts */
.unhinged-content-wrapper {
    padding: 8px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #ff502d33;
    transition: all 0.3s ease;
}

/* Add subtle hover effect to entire post row */
.unhinged-author-sticky-posts .unhinged-post-row:hover .unhinged-content-wrapper {
    border-bottom-color: #ff502d70;
    background: linear-gradient(90deg, transparent 0%, #ff502d08 100%);
}

.unhinged-author-sticky-posts .unhinged-post-row:hover .unhinged-number {
    opacity: 1;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Category styling within content wrapper (no border since wrapper has it) */
.unhinged-content-wrapper .unhinged-category {
    border-bottom: none;
    border-left: none;
    padding-top: 8px;
    padding-left: 12px;
    font-size: 15px;
    opacity: 0.85;
    font-weight: normal;
}

/* Content styling within wrapper (no border since wrapper has it) */
.unhinged-content-wrapper .unhinged-content {
    border-bottom: none;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

/* Link styling for post grid */
.unhinged-category a{
    color: #ff502D;
    text-decoration: none;
    transition: color 0.2s ease;
}

.unhinged-category2 {
	font-size: smaller;
    align-content: center;
}

.unhinged-category2 a{
    color: #ff502D;
    font-style: italic;
    text-decoration: none;
    transition: color 0.2s ease;
}

.unhinged-content a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.unhinged-category a:hover {
    /* color: #005177; /* Darker shade on hover */
    text-decoration: underline;
}

.unhinged-content a:hover {
    /*color: #005177; /* Darker shade on hover */
    text-decoration: underline;
}

/* Remove inline styles from empty header divs (placeholders) */
.unhinged-header {
    display: none; /* Hide empty headers; replace with content if needed */
}

/* Styles for unhinged_category_list and unhinged_author_list shortcodes (three-column grid) */
.unhinged-category-grid,
.unhinged-author-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px; /* Consistent with post grid */
}

/* Style for individual category and author items */
.unhinged-category-item,
.unhinged-author-item {
    padding: 15px;
    border: 1px solid #ff502d; /* Subtle border */
    border-radius: 6px;
    text-align: center;
    font-size: 20px;
    line-height: 1.5;
    transition: background 0.2s ease, border-color 0.2s ease;
}

/* Link styling for category and author grids */
.unhinged-category-item a,
.unhinged-author-item a {
    color: #fff;
    text-decoration: none;
    font-weight: 600; /* Slightly bolder for emphasis */
    display: block; /* Ensure full item is clickable */
}

/* Hover effects for category and author items */
.unhinged-category-item:hover,
.unhinged-author-item:hover {
    background: #ff502d70;
    border-color: #fff;
}

.unhinged-category-item a:hover,
.unhinged-author-item a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Styles for pagination links in unhinged_category_list */
.unhinged-pagination {
    margin: 20px auto;
    text-align: center;
}

.unhinged-pagination a,
.unhinged-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #fff;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.unhinged-pagination a:hover {
    background: #ff502d70;
    color: #fff;
}

.unhinged-pagination .current {
    background: #ff502d70;
    color: #fff;
    border-color: #ff502d;
}

/* Responsive design for both shortcodes */
@media (max-width: 768px) {
    .unhinged-sorted-posts,
    .unhinged-author-sticky-posts {
        grid-template-columns: 1fr; /* Stack columns on small screens */
        gap: 10px;
    }

    .unhinged-post-row {
        display: block; /* Fallback for older browsers */
    }

    .unhinged-category,
    .unhinged-content {
        border-bottom: 1px solid #e5e5e5;
    }

    .unhinged-category-grid,
    .unhinged-author-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
        gap: 15px;
    }

    .unhinged-category-item,
    .unhinged-author-item {
        padding: 12px;
    }

    .unhinged-pagination a,
    .unhinged-pagination span {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* Accessibility improvements */
.unhinged-sorted-posts a:focus,
.unhinged-author-sticky-posts a:focus,
.unhinged-category-grid a:focus,
.unhinged-author-grid a:focus,
.unhinged-pagination a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High specificity to avoid theme conflicts */
body .unhinged-sorted-posts,
body .unhinged-author-sticky-posts,
body .unhinged-category-grid,
body .unhinged-author-grid,
body .unhinged-pagination {
    box-sizing: border-box;
}

/* Ensure consistent box-sizing for all elements */
.unhinged-sorted-posts *,
.unhinged-author-sticky-posts *,
.unhinged-category-grid *,
.unhinged-author-grid *,
.unhinged-pagination * {
    box-sizing: border-box;
}