/* ==========================================================
   BLOG LISTING PAGE
========================================================== */

.blog-listing-page {
    background: #ffffff;
}


/* ==========================================================
   CONTAINER
========================================================== */

.blog-listing-page .container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}


/* ==========================================================
   BLOG HERO
========================================================== */

.blog-listing-hero {
    position: relative;

    min-height: 275px;

    padding: 45px 0 75px;

    background:
        linear-gradient(
            90deg,
            rgba(2, 39, 78, 0.98) 0%,
            rgba(2, 39, 78, 0.94) 45%,
            rgba(2, 39, 78, 0.78) 100%
        );

    overflow: hidden;
}


/*
|--------------------------------------------------------------------------
| Optional background image
|--------------------------------------------------------------------------
|
| If you have a blog hero image, you can add it here.
|
| Example:
|
| background-image:
|     linear-gradient(...),
|     url('../../images/blog-hero.jpg');
|
*/

.blog-listing-hero .container {
    position: relative;
    z-index: 2;
}


/* Eyebrow */

.blog-listing-eyebrow {
    display: block;

    margin-bottom: 8px;

    color: #e0a51a;

    font-size: 20px;
    font-weight: 700;

    letter-spacing: 0.5px;
}


/* Main heading */

.blog-listing-title {
    max-width: 600px;

    margin: 0;

    color: #ffffff;

    font-size: 44px;
    line-height: 1.15;

    font-weight: 750;
}


/* Yellow line */

.blog-listing-title-line {
    width: 38px;
    height: 3px;

    margin-top: 18px;

    background: #e0a51a;
}


/* Description */

.blog-listing-description {
    max-width: 570px;

    margin: 16px 0 0;

    color: rgba(255, 255, 255, 0.9);

    font-size: 16px;
    line-height: 1.65;
}


/* ==========================================================
   BLOG LISTING SECTION
========================================================== */

.blog-listing-section {
    padding: 0 0 65px;
}


/* ==========================================================
   SEARCH BAR
========================================================== */

.blog-search-form {
    position: relative;
    z-index: 5;

    display: flex;
    align-items: center;

    gap: 12px;

    width: 100%;

    margin-top: -30px;
    margin-bottom: 32px;

    padding: 17px;

    background: #ffffff;

    border: 1px solid #e9e9e9;

    border-radius: 12px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}


/* Search input wrapper */

.blog-search-input-wrapper {
    position: relative;

    flex: 1;

    display: flex;
    align-items: center;
}


/* Search icon */

.blog-search-icon {
    position: absolute;
    left: 16px;

    color: #536273;

    width: 16px;

    pointer-events: none;
}


/* Search input */

.blog-search-input {
    width: 100%;

    height: 48px;

    padding: 0 18px 0 45px;

    border: 1px solid #e2e5e8;

    border-radius: 7px;

    background: #ffffff;

    color: var(--primary);

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.blog-search-input::placeholder {
    color: #89919b;
}

.blog-search-input:focus {
    border-color: var(--secondary);

    box-shadow: 0 0 0 3px rgba(224, 165, 26, 0.10);
}


/* Search button */

.blog-search-button {
    height: 48px;

    min-width: 115px;

    padding: 0 25px;

    border: none;

    border-radius: 7px;

    background: var(--secondary);

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.blog-search-button:hover {
    background: #c99112;

    transform: translateY(-1px);
}


/* ==========================================================
   BLOG GRID
========================================================== */

.blog-posts-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;
}


/* ==========================================================
   BLOG CARD
========================================================== */

.blog-card {
    display: flex;

    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5e5e5;

    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-4px);

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
}


/* ==========================================================
   CARD IMAGE
========================================================== */

.blog-card-image {
    display: block;

    width: 100%;

    height: 190px;

    overflow: hidden;

    background: #eef2f5;
}

.blog-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.04);
}


/* Placeholder */

.blog-card-image-placeholder {
    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            135deg,
            #e8edf1,
            #cfd8df
        );
}


/* ==========================================================
   CARD CONTENT
========================================================== */

.blog-card-content {
    display: flex;

    flex-direction: column;

    flex: 1;

    padding: 18px 17px 20px;
}


/* ==========================================================
   DATE
========================================================== */
.blog-card-date-and-views{
    display: flex;
    justify-content: space-between;
    color: #727b86;
    font-size: 14px;
    margin-bottom: 20px;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 7px;
}

.blog-card-views {
    display: flex;
    align-items: center;
    gap: 7px;
}

.blog-card-date-icon {
    width: 15px;
}

.blog-card-views-icon {
    width: 15px;
}

/* ==========================================================
   TITLE
========================================================== */

.blog-card-title {
    margin: 0 0 16px;
    color: var(--primary);
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 1px;
    font-weight: 750;
}

.blog-card-title a {
    color: inherit;

    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--secondary);
}


/* ==========================================================
   EXCERPT
========================================================== */

.blog-card-excerpt {
    margin: 0;

    color: #4e5863;

    font-size: 14px;
    line-height: 1.65;
}


/* ==========================================================
   READ MORE
========================================================== */

.blog-card-read-more {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    width: fit-content;

    margin-top: auto;
    padding-top: 18px;

    color: #398b35;

    font-size: 16px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color 0.2s ease,
        gap 0.2s ease;
}

.blog-card-read-more span {
    font-size: 17px;

    line-height: 1;
}

.blog-card-read-more:hover {
    color: var(--primary);

    gap: 9px;
}


/* ==========================================================
   PAGINATION
========================================================== */

.blog-pagination {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-top: 38px;
}


/* Page number container */

.blog-pagination-pages {
    display: flex;

    align-items: center;

    gap: 8px;
}


/* Previous / Next */

.blog-pagination-button {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e0e4e8;

    border-radius: 6px;

    background: #ffffff;

    color: var(--primary);

    font-size: 16px;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.blog-pagination-button:hover {
    border-color: var(--primary);

    background: var(--primary);

    color: #ffffff;
}


/* Page numbers */

.blog-pagination-page {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e0e4e8;

    border-radius: 6px;

    background: #ffffff;

    color: var(--primary);

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.blog-pagination-page:hover {
    border-color: var(--primary);

    background: #f4f7fa;
}


/* Active page */

.blog-pagination-page.active {
    border-color: var(--primary);

    background: var(--primary);

    color: #ffffff;
}


/* Dots */

.blog-pagination-dots {
    width: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #65717d;

    font-size: 14px;
}


/* Disabled arrows */

.blog-pagination-button.disabled {
    opacity: 0.45;

    cursor: default;

    pointer-events: none;
}


/* ==========================================================
   NO RESULTS
========================================================== */

.blog-no-results {
    padding: 70px 20px;

    text-align: center;

    border: 1px solid #e5e5e5;

    border-radius: 12px;

    background: #ffffff;
}

.blog-no-results h2 {
    margin: 0 0 10px;

    color: var(--primary);

    font-size: 28px;
}

.blog-no-results p {
    margin: 0;

    color: #68727d;

    font-size: 15px;
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 991px) {

    .blog-listing-title {
        font-size: 42px;
    }

    .blog-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-card-image {
        height: 200px;
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {

    .blog-listing-page .container {
        width: min(100% - 30px, 600px);
    }


    /* Hero */

    .blog-listing-hero {
        min-height: auto;

        padding: 40px 0 60px;
    }

    .blog-listing-title {
        font-size: 34px;
    }

    .blog-listing-description {
        font-size: 15px;
    }


    /* Search */

    .blog-search-form {
        flex-direction: column;

        align-items: stretch;

        margin-top: -25px;

        padding: 12px;
    }

    .blog-search-input-wrapper {
        width: 100%;
    }

    .blog-search-button {
        width: 100%;
    }


    /* Grid */

    .blog-posts-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .blog-card-image {
        height: 210px;
    }


    /* Card */

    .blog-card-title {
        font-size: 19px;
    }


    /* Pagination */

    .blog-pagination {
        gap: 6px;

        margin-top: 30px;
    }

    .blog-pagination-pages {
        gap: 5px;
    }

    .blog-pagination-button,
    .blog-pagination-page {
        width: 34px;
        height: 34px;
    }

}