/* Custom Blog Grid Layout */
.custom-blog-area {
    margin: 40px auto;
}

.custom-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.custom-page-header .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Category Filters */
.custom-blog-filters {
    margin: 40px 0;
    text-align: center;
}

.category-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 20px;
}

.category-filter-list li {
    margin: 0;
}

.category-filter-list li a {
    color: #333333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: inline-block;
    background: transparent;
    border: 1px solid transparent;
}

.category-filter-list li a:hover,
.category-filter-list li a.active {
    color: #cca471;
    background: rgba(204, 164, 113, 0.05);
    border-color: rgba(204, 164, 113, 0.2);
}

/* Grid Layout */
.custom-blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 40px 0;
}

@media (min-width: 768px) {
    .custom-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .custom-blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Card General Styling */
.custom-blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.custom-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.custom-blog-card .card-image {
    overflow: hidden;
    height: 180px; /* Fixed height for image area to keep grid uniform */
}

.custom-blog-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.custom-blog-card:hover .card-image img {
    transform: scale(1.05);
}

.custom-blog-card .card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.card-category {
    margin-bottom: 12px;
    display: block;
}

.card-category a {
    color: #cca471;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}

.custom-blog-card .card-content > * {
    width: 100%;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

.custom-blog-card .entry-title {
    font-size: 1.25rem;
    margin: 0 0 10px !important;
    line-height: 1.35;
    font-weight: 700;
    word-wrap: break-word;
}

.custom-blog-card .entry-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.custom-blog-card .entry-title a:hover {
    color: #cca471;
}

.custom-blog-card .entry-summary {
    color: #666666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.custom-blog-card .entry-footer {
    margin-top: auto;
}

.custom-blog-card .read-more-link {
    color: #1a1a1a;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    display: inline-block;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.custom-blog-card .read-more-link:hover {
    color: #cca471;
    border-color: #cca471;
}

/* Styling for cards WITHOUT featured image */
.custom-blog-card.no-image {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    position: relative;
}

.custom-blog-card.no-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(204, 164, 113, 0.15), transparent 60%);
    pointer-events: none;
}

.custom-blog-card.no-image .card-content {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    width: 100%;
    box-sizing: border-box;
}

.custom-blog-card.no-image .entry-title {
    font-size: 1.4rem;
    word-wrap: break-word;
}

.custom-blog-card.no-image .entry-title a {
    color: #ffffff;
}

.custom-blog-card.no-image .entry-summary {
    color: rgba(255,255,255,0.7);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.custom-blog-card.no-image .read-more-link {
    color: #cca471;
}

.custom-blog-card.no-image .read-more-link:hover {
    border-color: #cca471;
}

.custom-blog-card.no-image .card-category a {
    color: rgba(255,255,255,0.6);
}

.custom-blog-card.no-image .card-category a:hover {
    color: #ffffff;
}

/* Pagination */
.custom-blog-pagination {
    margin-top: 50px;
    text-align: center;
}

.custom-blog-pagination .nav-links {
    display: inline-flex;
    gap: 10px;
    background: #f9f9f9;
    padding: 10px 20px;
    border-radius: 40px;
}

.custom-blog-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: #333333;
    font-weight: 600;
    transition: all 0.2s ease;
}

.custom-blog-pagination .page-numbers:hover,
.custom-blog-pagination .page-numbers.current {
    background: #cca471;
    color: #ffffff;
}

/* Shortcode Specific Styles */
.custom-blog-shortcode-wrap {
    margin: 40px 0;
}

.custom-blog-shortcode-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: #1a1a1a;
}

/* Single Post Layout Reset */
.single-post #primary {
    width: 100% !important;
    float: none !important;
}

/* Single Post Hero Section */
.single-post-hero {
    position: relative;
    padding: 150px 20px 100px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    color: #ffffff;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
}

.single-post-hero.no-image {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

.single-post-hero.no-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(204, 164, 113, 0.15), transparent 60%);
    pointer-events: none;
}

.single-post-hero.has-image .hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1;
}

.single-post-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.single-post-hero .hero-category {
    margin-bottom: 20px;
}

.single-post-hero .hero-category a {
    color: #cca471;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 700;
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
}

.single-post-hero .hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.single-post-hero .hero-meta {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.single-post-content-wrap {
    max-width: 800px !important;
    margin: 0 auto 80px;
}

.custom-entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333333;
}

.custom-entry-content h2,
.custom-entry-content h3 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: #1a1a1a;
}

.custom-entry-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
}

.post-tags strong {
    color: #1a1a1a;
    margin-right: 10px;
}

.post-tags a {
    background: #f4f4f4;
    color: #555555;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: #cca471;
    color: #ffffff;
}
