/* ============================================================
   VBlink HR Consultants
   BLOG MAIN CSS
   File: css/blog-main.css

   Compatible with:
   blog.php
   index-header.php
   index-footer.php

   Header/Footer styles are intentionally NOT included here.
============================================================ */


/* ============================================================
   ROOT VARIABLES
============================================================ */

:root {

    --blog-primary: #2f54eb;
    --blog-primary-dark: #1d43d8;
    --blog-primary-light: #5b8cff;

    --blog-text: #0f172a;
    --blog-text-secondary: #475569;
    --blog-text-muted: #64748b;

    --blog-border: rgba(15, 23, 42, 0.09);

    --blog-background: #f6f8fc;
    --blog-card-background: #ffffff;

    --blog-radius-sm: 10px;
    --blog-radius-md: 16px;
    --blog-radius-lg: 22px;
    --blog-radius-xl: 28px;

    --blog-shadow-sm:
        0 6px 18px rgba(15, 23, 42, 0.05);

    --blog-shadow-md:
        0 14px 35px rgba(15, 23, 42, 0.08);

    --blog-shadow-lg:
        0 24px 60px rgba(15, 23, 42, 0.12);

}


/* ============================================================
   BASIC RESET FOR BLOG CONTENT
============================================================ */

.blog-container *,
.blog-hero * {

    box-sizing: border-box;

}


.blog-container a {

    text-decoration: none;

}


.blog-container img {

    display: block;
    max-width: 100%;

}


.blog-container button,
.blog-container input {

    font-family: inherit;

}


/* ============================================================
   BLOG HERO
============================================================ */

.blog-hero {

    position: relative;

    min-height: 330px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #0f3fa8 0%,
            #2f54eb 45%,
            #5b8cff 100%
        );

}


/* ============================================================
   HERO DECORATIVE BACKGROUND
============================================================ */

.blog-hero::before {

    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    top: -210px;
    left: -120px;

    background:
        rgba(255, 255, 255, 0.10);

}


.blog-hero::after {

    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    border-radius: 50%;

    right: -180px;
    bottom: -280px;

    background:
        rgba(255, 255, 255, 0.08);

}


/* ============================================================
   HERO OVERLAY
============================================================ */

.blog-hero-overlay {

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(5, 25, 80, 0.18),
            rgba(47, 84, 235, 0.05)
        );

    pointer-events: none;

}


/* ============================================================
   HERO CONTENT
============================================================ */

.blog-hero-content {

    position: relative;

    z-index: 2;

    width: min(1100px, 92%);

    margin: 0 auto;

    text-align: center;

    color: #ffffff;

    padding: 65px 20px;

}


.blog-hero-label {

    display: inline-block;

    padding: 8px 18px;

    margin-bottom: 18px;

    border-radius: 50px;

    background:
        rgba(255, 255, 255, 0.15);

    border:
        1px solid rgba(255, 255, 255, 0.25);

    backdrop-filter: blur(10px);

    -webkit-backdrop-filter: blur(10px);

    font-size: 0.82rem;

    font-weight: 700;

    letter-spacing: 0.12em;

    text-transform: uppercase;

}


.blog-hero-content h1 {

    margin: 0 0 15px;

    font-size:
        clamp(2.4rem, 5vw, 4rem);

    line-height: 1.1;

    font-weight: 700;

    color: #ffffff;

}


.blog-hero-content p {

    max-width: 720px;

    margin: 0 auto;

    color:
        rgba(255, 255, 255, 0.90);

    font-size:
        clamp(1rem, 2vw, 1.15rem);

    line-height: 1.75;

}


/* ============================================================
   BLOG MAIN CONTAINER
============================================================ */

.blog-container {

    width: min(1200px, 92%);

    margin: 0 auto;

    padding:
        55px 0 75px;

}


/* ============================================================
   BLOG TOP BAR
============================================================ */

.blog-topbar {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 30px;

    margin-bottom: 30px;

}


/* ============================================================
   BLOG INTRO
============================================================ */

.blog-intro {

    flex: 1;

}


.blog-intro h2 {

    margin: 0 0 8px;

    color: var(--blog-text);

    font-size:
        clamp(1.8rem, 3vw, 2.5rem);

    line-height: 1.2;

    font-weight: 700;

}


.blog-intro p {

    margin: 0;

    color: var(--blog-text-muted);

    font-size: 1rem;

    line-height: 1.7;

}


/* ============================================================
   SEARCH FORM
============================================================ */

.blog-search-form {

    width: min(380px, 100%);

}


.search-box {

    position: relative;

    display: flex;

    align-items: center;

}


.search-box input {

    width: 100%;

    height: 48px;

    padding:
        0 55px 0 18px;

    border:
        1px solid var(--blog-border);

    border-radius: 50px;

    background: #ffffff;

    color: var(--blog-text);

    font-size: 0.95rem;

    outline: none;

    box-shadow: var(--blog-shadow-sm);

    transition:
        border-color .25s ease,
        box-shadow .25s ease;

}


.search-box input::placeholder {

    color: #94a3b8;

}


.search-box input:focus {

    border-color:
        rgba(47, 84, 235, 0.55);

    box-shadow:
        0 0 0 4px rgba(47, 84, 235, 0.10),
        var(--blog-shadow-sm);

}


.search-box button {

    position: absolute;

    right: 5px;
    top: 5px;

    width: 38px;
    height: 38px;

    border: 0;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            var(--blog-primary),
            var(--blog-primary-light)
        );

    color: #ffffff;

    font-size: 1rem;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;

    transition:
        transform .25s ease,
        box-shadow .25s ease;

}


.search-box button:hover {

    transform: scale(1.06);

    box-shadow:
        0 7px 18px rgba(47, 84, 235, 0.30);

}


/* ============================================================
   CATEGORY FILTERS
============================================================ */

.blog-categories {

    display: flex;

    align-items: center;

    gap: 10px;

    flex-wrap: wrap;

    margin-bottom: 25px;

    padding-bottom: 5px;

}


/* ============================================================
   CATEGORY FILTER BUTTON
============================================================ */

.category-filter {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding:
        7px 16px;

    border:
        1px solid rgba(47, 84, 235, 0.15);

    border-radius: 50px;

    background: #ffffff;

    color:
        var(--blog-text-secondary);

    font-size: 0.88rem;

    font-weight: 600;

    white-space: nowrap;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.04);

    transition:
        all .25s ease;

}


.category-filter:hover {

    color: #ffffff;

    border-color:
        var(--blog-primary);

    background:
        linear-gradient(
            135deg,
            var(--blog-primary),
            var(--blog-primary-light)
        );

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(47, 84, 235, 0.20);

}


.category-filter.active {

    color: #ffffff;

    border-color:
        var(--blog-primary);

    background:
        linear-gradient(
            135deg,
            var(--blog-primary),
            var(--blog-primary-light)
        );

    box-shadow:
        0 8px 20px rgba(47, 84, 235, 0.22);

}


/* ============================================================
   SEARCH / CATEGORY RESULT INFORMATION
============================================================ */

.blog-result-info {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 12px 22px;

    margin-bottom: 30px;

    padding:
        14px 18px;

    border:
        1px solid rgba(47, 84, 235, 0.10);

    border-left:
        4px solid var(--blog-primary);

    border-radius:
        var(--blog-radius-sm);

    background:
        rgba(47, 84, 235, 0.04);

    color:
        var(--blog-text-secondary);

    font-size: 0.92rem;

}


.blog-result-info strong {

    color:
        var(--blog-primary-dark);

}


.clear-filter {

    margin-left: auto;

    color:
        var(--blog-primary);

    font-weight: 600;

    transition:
        color .2s ease;

}


.clear-filter:hover {

    color:
        var(--blog-primary-dark);

    text-decoration: underline;

}


/* ============================================================
   BLOG GRID
============================================================ */

.blog-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 28px;

}


/* ============================================================
   BLOG CARD
============================================================ */

.blog-card {

    display: flex;

    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background:
        var(--blog-card-background);

    border:
        1px solid var(--blog-border);

    border-radius:
        var(--blog-radius-lg);

    box-shadow:
        var(--blog-shadow-md);

    transition:
        transform .30s ease,
        box-shadow .30s ease,
        border-color .30s ease;

}


.blog-card:hover {

    transform:
        translateY(-7px);

    border-color:
        rgba(47, 84, 235, 0.18);

    box-shadow:
        var(--blog-shadow-lg);

}


/* ============================================================
   BLOG CARD IMAGE
============================================================ */

.blog-card-image {

    position: relative;

    height: 220px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #dbe7ff,
            #eef3ff
        );

}


/* ============================================================
   CARD IMAGE LINK
============================================================ */

.blog-card-image > a:first-child {

    display: block;

    width: 100%;
    height: 100%;

}


.blog-card-image img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .55s ease;

}


.blog-card:hover .blog-card-image img {

    transform:
        scale(1.06);

}


/* ============================================================
   IMAGE PLACEHOLDER
============================================================ */

.blog-image-placeholder {

    display: flex !important;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    width: 100%;
    height: 100%;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #2f54eb,
            #5b8cff
        );

    text-align: center;

}


.blog-image-placeholder span {

    font-size: 1.7rem;

    font-weight: 700;

}


.blog-image-placeholder small {

    font-size: 0.82rem;

    opacity: 0.9;

}


/* ============================================================
   CARD CATEGORY
============================================================ */

.blog-card-category {

    position: absolute;

    left: 16px;
    bottom: 16px;

    display: inline-flex;

    align-items: center;

    padding:
        6px 12px;

    border-radius: 50px;

    background:
        rgba(255, 255, 255, 0.95);

    color:
        var(--blog-primary-dark);

    font-size: 0.76rem;

    font-weight: 700;

    box-shadow:
        0 5px 15px rgba(15, 23, 42, 0.12);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    transition:
        all .25s ease;

}


.blog-card-category:hover {

    color: #ffffff;

    background:
        var(--blog-primary);

}


/* ============================================================
   CARD CONTENT
============================================================ */

.blog-card-content {

    display: flex;

    flex-direction: column;

    flex: 1;

    padding:
        22px 22px 24px;

}


/* ============================================================
   CARD META
============================================================ */

.blog-card-meta {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 11px;

    color:
        var(--blog-text-muted);

    font-size: 0.80rem;

    line-height: 1.5;

}


.blog-card-meta span {

    display: inline-flex;

    align-items: center;

}


/* ============================================================
   CARD TITLE
============================================================ */

.blog-card-content h2 {

    margin:
        0 0 12px;

    font-size:
        clamp(1.15rem, 2vw, 1.35rem);

    line-height: 1.4;

    font-weight: 700;

}


.blog-card-content h2 a {

    color:
        var(--blog-text);

    transition:
        color .25s ease;

}


.blog-card-content h2 a:hover {

    color:
        var(--blog-primary);

}


/* ============================================================
   CARD EXCERPT
============================================================ */

.blog-card-content > p {

    margin:
        0 0 20px;

    color:
        var(--blog-text-secondary);

    font-size:
        0.92rem;

    line-height: 1.75;

    display:
        -webkit-box;

    -webkit-line-clamp: 4;

    -webkit-box-orient: vertical;

    overflow: hidden;

}


/* ============================================================
   READ MORE
============================================================ */

.read-more {

    display: inline-flex;

    align-items: center;

    align-self: flex-start;

    gap: 8px;

    margin-top: auto;

    padding:
        9px 17px;

    border-radius: 50px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--blog-primary),
            var(--blog-primary-light)
        );

    border:
        1px solid rgba(47, 84, 235, 0.15);

    font-size:
        0.86rem;

    font-weight: 600;

    box-shadow:
        0 7px 18px rgba(47, 84, 235, 0.18);

    transition:
        all .28s ease;

}


.read-more span {

    font-size: 1rem;

    line-height: 1;

    transition:
        transform .25s ease;

}


.read-more:hover {

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--blog-primary-dark),
            #4a79ff
        );

    transform:
        translateY(-2px);

    box-shadow:
        0 12px 25px rgba(47, 84, 235, 0.28);

}


.read-more:hover span {

    transform:
        translateX(4px);

}


/* ============================================================
   NO POSTS SECTION
============================================================ */

.no-blog-posts {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 320px;

    padding: 50px 25px;

    text-align: center;

    background:
        #ffffff;

    border:
        1px solid var(--blog-border);

    border-radius:
        var(--blog-radius-lg);

    box-shadow:
        var(--blog-shadow-md);

}


/* ============================================================
   NO POSTS ICON
============================================================ */

.no-posts-icon {

    width: 75px;
    height: 75px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 50%;

    background:
        rgba(47, 84, 235, 0.08);

    font-size: 2rem;

}


/* ============================================================
   NO POSTS HEADING
============================================================ */

.no-blog-posts h2 {

    margin:
        0 0 10px;

    color:
        var(--blog-text);

    font-size:
        1.6rem;

}


.no-blog-posts p {

    max-width: 600px;

    margin:
        0 0 22px;

    color:
        var(--blog-text-muted);

    line-height: 1.7;

}


/* ============================================================
   NO POSTS BUTTON
============================================================ */

.no-posts-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding:
        11px 20px;

    border-radius: 50px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--blog-primary),
            var(--blog-primary-light)
        );

    font-size: 0.9rem;

    font-weight: 600;

    box-shadow:
        0 8px 20px rgba(47, 84, 235, 0.20);

    transition:
        all .25s ease;

}


.no-posts-button:hover {

    color: #ffffff;

    transform:
        translateY(-2px);

    box-shadow:
        0 12px 26px rgba(47, 84, 235, 0.30);

}


/* ============================================================
   PAGINATION
============================================================ */

.blog-pagination {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    margin-top: 50px;

}


/* ============================================================
   PAGINATION NUMBERS
============================================================ */

.pagination-numbers {

    display: flex;

    align-items: center;

    gap: 7px;

}


/* ============================================================
   PAGINATION COMMON BUTTON
============================================================ */

.pagination-button,
.pagination-number {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 40px;
    height: 40px;

    padding:
        0 13px;

    border:
        1px solid rgba(47, 84, 235, 0.14);

    border-radius:
        10px;

    background:
        #ffffff;

    color:
        var(--blog-text-secondary);

    font-size:
        0.88rem;

    font-weight: 600;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.04);

    transition:
        all .25s ease;

}


.pagination-button:hover,
.pagination-number:hover {

    color: #ffffff;

    border-color:
        var(--blog-primary);

    background:
        linear-gradient(
            135deg,
            var(--blog-primary),
            var(--blog-primary-light)
        );

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 18px rgba(47, 84, 235, 0.20);

}


/* ============================================================
   ACTIVE PAGE
============================================================ */

.pagination-number.active {

    color: #ffffff;

    border-color:
        var(--blog-primary);

    background:
        linear-gradient(
            135deg,
            var(--blog-primary),
            var(--blog-primary-light)
        );

    box-shadow:
        0 8px 18px rgba(47, 84, 235, 0.22);

}


/* ============================================================
   PAGINATION DOTS
============================================================ */

.pagination-dots {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 30px;

    height: 40px;

    color:
        var(--blog-text-muted);

    font-weight: 600;

}


/* ============================================================
   ACCESSIBILITY
============================================================ */

.category-filter:focus-visible,
.clear-filter:focus-visible,
.read-more:focus-visible,
.no-posts-button:focus-visible,
.pagination-button:focus-visible,
.pagination-number:focus-visible,
.blog-card-content h2 a:focus-visible,
.blog-card-category:focus-visible {

    outline:
        3px solid rgba(47, 84, 235, 0.25);

    outline-offset:
        3px;

}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1050px) {

    .blog-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

}


/* ============================================================
   TABLET / SMALL LAPTOP
============================================================ */

@media (max-width: 800px) {

    .blog-container {

        width: min(94%, 700px);

        padding:
            45px 0 60px;

    }


    .blog-topbar {

        align-items: stretch;

        flex-direction: column;

        gap: 20px;

    }


    .blog-search-form {

        width: 100%;

    }


    .blog-hero {

        min-height: 290px;

    }


    .blog-hero-content {

        padding:
            55px 15px;

    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 620px) {

    .blog-container {

        width: 92%;

        padding:
            35px 0 50px;

    }


    .blog-hero {

        min-height: 270px;

    }


    .blog-hero-content {

        padding:
            45px 10px;

    }


    .blog-hero-label {

        font-size: 0.72rem;

        padding:
            7px 13px;

    }


    .blog-hero-content h1 {

        font-size:
            2.25rem;

    }


    .blog-hero-content p {

        font-size:
            0.94rem;

        line-height: 1.65;

    }


    .blog-grid {

        grid-template-columns:
            1fr;

        gap: 22px;

    }


    .blog-card-image {

        height: 210px;

    }


    .blog-card-content {

        padding:
            20px;

    }


    .blog-card-content h2 {

        font-size:
            1.2rem;

    }


    .blog-card-content > p {

        -webkit-line-clamp: 5;

    }


    .blog-result-info {

        align-items: flex-start;

        flex-direction: column;

        gap: 8px;

    }


    .clear-filter {

        margin-left: 0;

    }


    .blog-pagination {

        flex-wrap: wrap;

        gap: 7px;

        margin-top: 35px;

    }


    .pagination-button {

        min-width: 0;

        padding:
            0 11px;

    }


    .pagination-number {

        min-width: 36px;

        height: 36px;

    }


    .pagination-dots {

        min-width: 22px;

    }

}


/* ============================================================
   VERY SMALL MOBILE
============================================================ */

@media (max-width: 400px) {

    .blog-hero-content h1 {

        font-size:
            2rem;

    }


    .blog-hero-content p {

        font-size:
            0.88rem;

    }


    .blog-card-image {

        height: 190px;

    }


    .blog-card-content {

        padding:
            18px;

    }


    .category-filter {

        font-size:
            0.82rem;

        padding:
            6px 12px;

    }


    .pagination-button {

        font-size:
            0.80rem;

    }

}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {

    .blog-card,
    .blog-card-image img,
    .read-more,
    .read-more span,
    .category-filter,
    .pagination-button,
    .pagination-number,
    .search-box button {

        transition: none;

    }

}


/* ============================================================
   GO TO TOP BUTTON
   Kept because blog.js may use this component.
============================================================ */

.go-top-btn {

    position: fixed;

    right: 1.4rem;
    bottom: 1.4rem;

    width: 40px;
    height: 40px;

    border: 0;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #7c3aed
        );

    color: #ffffff;

    font-size: 1.15rem;

    font-weight: 700;

    box-shadow:
        0 12px 30px rgba(37, 99, 235, 0.35);

    cursor: pointer;

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 800;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        opacity .2s ease;

}


.go-top-btn.show {

    display: flex;

    opacity: 1;

}


.go-top-btn:hover {

    transform:
        translateY(-3px);

    box-shadow:
        0 16px 40px rgba(37, 99, 235, 0.45);

}


/* ============================================================
   END OF BLOG MAIN CSS
============================================================ */