/* ==============================
   Blog Archive Page CSS
   ============================== */

/* Hero section fullwidth */
.post-type-archive-blogs .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}

.post-type-archive-blogs .blog-archive-hero {
    width: 100%;
    margin-top: 120px;
    background: #f5f5f5;
    padding: 50px 19px;
    margin-bottom: 30px;
}

/* Heading fullwidth underline */
.post-type-archive-blogs .blog-archive-title {
    font-size: 52px;
    font-weight: bold;
    /* margin: 20px 0 15px 0; */
    padding: 17px 0 0;
    margin: 20px 116px 15px 124px;
    border-bottom: 1px solid #000;  /* underline */
    font-family: Helvetica;
}

/* Subtitle */
.post-type-archive-blogs .blog-archive-subtitle {
    font-size: 16px;
    color: #555;
    margin: 2px 116px 15px 124px;
    text-align: justify;
    font-family: Helvetica;
}

/* ==============================
   Blog Archive Filter Form
   ============================== */
.blog-filter-wrapper {
    margin-bottom: 40px;
    text-align: left;
}

.blog-filter-wrapper .blog-filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Dropdown Row */
.blog-filter-wrapper .dropdown-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 60%;
    max-width: 720px;
    min-width: 300px;
    justify-content: flex-start;
    margin-top: 10px;
}

.blog-filter-wrapper .dropdown-row select,
.blog-filter-wrapper .dropdown-row button {
    padding: 8px 12px;
    font-size: 14px;
}

.blog-filter-wrapper .dropdown-row select {
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 200px;
}

.blog-filter-wrapper .dropdown-row button.filter-btn {
    background: #007A09;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 4px;
}

.blog-filter-wrapper .dropdown-row button.filter-btn:hover {
    background-color: #005f08;
}

/* Reset Link */
.blog-filter-wrapper .reset-group {
    margin-top: -12px;
    width: 53%;
    max-width: 694px;
    min-width: 300px;
    text-align: left;
}


.blog-filter-wrapper .reset-link {
    color: #007A09;
    text-decoration: underline;
    font-size: 14px;
}

/* ==============================
   Blog Grid
   ============================== */
.blog-grid-wrapper {
    padding: 4px 2px;
    margin: 0px 116px 15px 124px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns as requested */
    gap: 30px;
}

.blog-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

/* Feature Image */
.blog-card .blog-thumb {
    position: relative;
}

.blog-card .blog-thumb img {
    width: 100%;
    height: 220px; /* Make the image slightly taller since there is no border */
    object-fit: cover;
    display: block;
    border-radius: 8px; /* Round only the image */
}

/* Title and Button */
.blog-card .blog-title {
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 18px;
    padding: 0;
    font-weight: bold;
    font-family: Helvetica, Arial, sans-serif;
}

.blog-card .blog-title a {
    color: #000;
    text-decoration: none;
}

.blog-card .blog-title a:hover {
    color: #0A7D4F;
}

.blog-card .read-more-btn {
    display: none; /* Hide read more button if it exists, to match reference */
}

/* Meta (date icon) */
.blog-card .blog-meta {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #555;
    font-family: Helvetica, Arial, sans-serif;
}

.blog-card .blog-meta i {
    margin-right: 5px;
}

/* ==============================
   Blog Archive Search Button Alignment
   ============================== */
.blog-filter-wrapper .search-group {
    display: flex !important;
    align-items: stretch !important;
    border: 2px solid #007A09 !important;
    border-radius: 30px !important;
    overflow: hidden !important;
    background: #fff !important;
    width: 60%;
    max-width: 720px;
    min-width: 300px;
    margin: 0 auto;
}

.blog-filter-wrapper .search-group input[type="text"] {
    flex: 1 !important;
    border: none !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    outline: none !important;
    background: transparent !important;
}

.blog-filter-wrapper .search-group button {
    background: #007A09 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin: 0 !important;
    border-radius: 0 30px 30px 0 !important;
    font-family: Helvetica, Arial, sans-serif !important;
}

.blog-filter-wrapper .search-group button:hover {
    background: #005f08 !important;
}

/* Pagination */
.blog-pagination {
    margin-top: 30px;
    text-align: center;
}

/* No Blogs */
.no-blogs {
    text-align: center;
    padding: 50px 0;
}

/* ==============================
   Responsive Adjustments
   ============================== */

/* Tablet */
@media(max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-type-archive-blogs .blog-archive-title,
    .post-type-archive-blogs .blog-archive-subtitle,
    .blog-grid-wrapper {
        margin-left: 5%;
        margin-right: 5%;
    }
}

/* Mobile */
@media(max-width: 768px) {

    /* Heading & Subtitle center align */
    .post-type-archive-blogs .blog-archive-title {
        font-size: 28px;
        text-align: center;
        margin: 10px auto;
        border-bottom: none;
    }

    .post-type-archive-blogs .blog-archive-subtitle {
        font-size: 16px;
        text-align: center;
        margin: 5px auto 20px;
    }

    /* Dropdown full width */
    .blog-filter-wrapper .dropdown-row {
        flex-direction: column;
        width: 90%;
        gap: 10px;
    }

    .blog-filter-wrapper .dropdown-row select,
    .blog-filter-wrapper .dropdown-row button {
        width: 100%;
        min-width: auto;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-card .blog-thumb img {
        height: 180px;
    }
}


/* ==============================
   Shortcode Blog Grid Support
   ============================== */

.shortcode-grid.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 30px;
    padding: 4px 2px;
    margin: 0 5% 15px;
}

.shortcode-grid .blog-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shortcode-grid .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.shortcode-grid .blog-thumb {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.shortcode-grid .blog-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease;
}

.shortcode-grid .blog-thumb:hover img {
    transform: scale(1.1);
}

.shortcode-grid .blog-thumb::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)); /* halka black overlay */
    pointer-events: none; /* image hover r click effect er upor effect korbe na */
}

.shortcode-grid .blog-title {
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 18px;
    padding: 0;
    font-weight: bold;
    font-family: Helvetica, Arial, sans-serif;
}

.shortcode-grid .blog-title a {
    color: #000;
    text-decoration: none;
}

.shortcode-grid .blog-title a:hover {
    color: #0A7D4F;
}

.shortcode-grid .blog-meta {
    margin: 5px 0 15px 0;
    font-size: 14px;
    color: #555;
    display: block;
    font-family: Helvetica, Arial, sans-serif;
}

/* ==============================
   Responsive for Shortcode Grid
   ============================== */
@media(max-width: 992px) {
    .shortcode-grid.blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 768px) {
    .shortcode-grid.blog-grid {
        grid-template-columns: 1fr;
    }
}