/* =========================================
   1. HERO SECTION
   ========================================= */
.hero-section {
    height: 400px;
    background-size: cover;
    background-position: 50% 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    padding-top: 100px;
    min-height: auto;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-section-content {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 1600px;
}

.hero-section h1 {
    color: #fff;
    font-size: 40px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    margin: 0;
    white-space: nowrap;
}

.divider-line {
    width: 100%;
    height: 1px;
    background: rgb(255 255 255 /50%);
}

.relative-z {
    position: relative;
    z-index: 2;
}

@media (max-width: 1024px) {
    .hero-section {
        height: 345px;
    }
}

/* =========================================
   2. BLOG PAGE LAYOUT
   ========================================= */
.blog-page {
    font-family: "Lato", sans-serif;
    color: #000;
    background-color: #fff;
}

.blog-content-section {
    padding: 60px 0;
}

.blog-content-section .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

.blog-layout-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

/* =========================================
   3. SIDEBAR (Left Column - 30%)
   ========================================= */
.blog-sidebar {
    width: 30%;
    flex: 0 0 30%;
}

.sidebar-widget h2 {
    font-family: "Lato", sans-serif;
    font-size: 30px;
    font-weight: 600;
    color: #000;
    margin-bottom: 25px;
    text-align: right;
}

/* RECENT POSTS LIST (Legacy support if needed) */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.recent-posts-list li {
    padding-bottom: 12px;
    margin-top: 12px;
    border-bottom: 1px solid #ddd;
}

.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-posts-list li a {
    text-decoration: none;
    color: #000;
    font-family: "Lato", sans-serif;
    font-size: 17px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.recent-posts-list li a:hover {
    color: #555;
}

/* =========================================
   4. MAIN GRID (Right Column - 66-70%)
   ========================================= */
.blog-grid-container {
    width: 66%;
    flex: 1;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Post Card Styling */
.blog-post-card {
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.post-media {
    position: relative;
    overflow: hidden;
}

.post-media .thumbnail-wrapper {
    padding-bottom: 66%;
    position: relative;
    overflow: hidden;
}

.post-media a {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 66.66%;
    /* 3:2 Aspect Ratio */
    overflow: hidden;
}

.post-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Hover Effects */
.post-media:hover img {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-overlay i {
    color: #fff;
    font-size: 24px;
}

.post-media:hover .media-overlay {
    opacity: 1;
}

/* Content */
.post-content-wrapper {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-title {
    margin: 0 0 15px 0;
}

.post-category {
    font-size: 14px;
}

.post-title a {
    font-family: "Lato", sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    /* 2 lines * 1.3 line-height */
}

.post-title a:hover {
    color: #000;
}

.post-excerpt {
    font-family: "Lato", sans-serif;
    font-size: 14px;
    color: #000;
    line-height: 1.6;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* autoprefixer: off */
    -webkit-box-orient: vertical;
    /* autoprefixer: on */
    overflow: hidden;
}

.post-excerpt p {
    margin: 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #000;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.post-meta i {
    margin-right: 5px;
    color: #929292;
}

/* Pagination Styling */
.blog-pagination {
    margin-top: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.blog-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 2px;
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
    background: #333;
    color: #fff;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.post-date i {
    font-size: 10px;
}

.footer-cta {
    display: none;
}

/* =========================================
   5. NEW ACCORDION SIDEBAR STYLES
   ========================================= */

.archive-accordion {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-year-item {
    border-bottom: 1px solid #eee;
}

.archive-year-toggle {
    width: 100%;
    background: none;
    border: none;
    text-align: right;
    /* Match theme sidebar align */
    padding: 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: flex-end;
    /* Match theme sidebar align */
    gap: 10px;
    align-items: center;
    transition: color 0.3s;
    flex-direction: row-reverse;
    /* Put Icon on left if text is right aligned, or vice versa */
}

/* Adjusting for Right Alignment preference in theme */
.archive-year-toggle {
    flex-direction: row;
    /* Text Left, Icon Right? Or Text Right, Icon Left? */
    /* original theme had text-align: right for sidebar headers */
    /* Let's keep text right aligned but icon on left? */
    justify-content: space-between;
    text-align: left;
    /* Actually, accordion usually looks best left aligned. */
}

/* OVERRIDE sidebar alignment for Accordion to look good */
.sidebar-widget .archive-accordion .archive-year-toggle {
    text-align: left;
    justify-content: space-between;
}

.archive-year-toggle:hover,
.archive-year-toggle.active {
    color: #cda274;
}

.archive-year-toggle::after {
    content: '+';
    font-weight: 300;
    font-size: 20px;
}

.archive-year-toggle.active::after {
    content: '-';
}

.archive-month-list {
    list-style: none;
    padding: 0 0 15px 15px;
    margin: 0;
    display: none;
}

.archive-month-list.open {
    display: block;
}

.archive-month-list li {
    margin-bottom: 8px;
    text-align: left;
    /* Ensure list items are left aligned */
}

.archive-month-list a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: color 0.2s;
    display: flex;
    justify-content: space-between;
}

.archive-month-list a:hover,
.archive-month-list a.active-month {
    color: #cda274;
}

.all-posts-link {
    display: block;
    padding: 15px 0;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    border-bottom: 2px solid #eee;
    margin-bottom: 10px;
    text-align: left;
    /* Ensure consistent with accordion */
}

.all-posts-link:hover {
    color: #cda274;
}


/* =========================================
   6. RESPONSIVE
   ========================================= */
/* @media (max-width: 1024px) {} Removed empty rules */

@media (max-width: 767px) {
    .blog-layout-wrapper {
        flex-direction: column;
    }

    .blog-sidebar {
        width: 100%;
        flex: 0 0 100%;
        order: 2;
        margin-top: 40px;
    }

    .blog-grid-container {
        width: 100%;
    }

    .sidebar-widget h2,
    .recent-posts-list {
        text-align: left;
    }

    /* Hero */
    .hero-section {
        height: 175px;
        padding-top: 40px;
    }

    .hero-section h1 {
        font-size: 18px;
    }

    /* Grid */
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
}