/* =========================================
   BLOGS PAGE ONLY — MODERN KNOWLEDGE HUB UI
   Header / Navbar / Footer remain main.css
========================================= */

.blogs-page {
    min-height: 100vh;
}

.blogs-main {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 7% 16%, rgba(0, 174, 239, 0.10), transparent 27%),
        radial-gradient(circle at 92% 12%, rgba(87, 184, 255, 0.10), transparent 30%),
        linear-gradient(180deg, #f8fcff 0%, #f7fbfe 54%, #ffffff 100%);
}

.blogs-main::before,
.blogs-main::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

.blogs-main::before {
    width: 300px;
    height: 300px;
    left: -185px;
    top: 70px;
    border: 1px solid rgba(0, 174, 239, 0.10);
    box-shadow: 0 0 0 46px rgba(0, 174, 239, 0.025);
}

.blogs-main::after {
    width: 360px;
    height: 360px;
    right: -245px;
    bottom: 60px;
    border: 1px solid rgba(0, 174, 239, 0.10);
    box-shadow: 0 0 0 56px rgba(0, 174, 239, 0.025);
}

/* =========================================
   HERO
========================================= */

.blog-hero {
    position: relative;
    z-index: 1;
    padding: 62px 0 30px;
    text-align: center;
}

.blog-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: 2.5%;
    top: 55px;
    width: 170px;
    height: 170px;
    opacity: 0.55;
    background-image: radial-gradient(rgba(0, 174, 239, 0.22) 1.5px, transparent 1.5px);
    background-size: 17px 17px;
    mask-image: linear-gradient(to bottom left, #000 20%, transparent 80%);
    pointer-events: none;
}

.blog-hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    padding: 7px 14px;
    border: 1px solid rgba(0, 174, 239, 0.18);
    border-radius: 999px;
    background: rgba(222, 246, 255, 0.72);
    color: #0a6f9b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blog-label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff5a2d;
    box-shadow: 0 0 0 4px rgba(255, 90, 45, 0.10);
}

.blog-hero h1 {
    margin: 0;
    color: #14213d;
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.blog-hero h1 span {
    background: linear-gradient(90deg, #00aeef 0%, #168ae5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.blog-hero p {
    max-width: 650px;
    margin: 14px auto 0;
    color: #60738b;
    line-height: 1.75;
}

/* =========================================
   SEARCH PANEL
========================================= */

.blog-search-area {
    position: relative;
    z-index: 20;
    max-width: 860px;
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(29, 82, 113, 0.08);
    border-radius: 20px;
    box-shadow:
        0 18px 45px rgba(48, 93, 122, 0.10),
        0 2px 8px rgba(48, 93, 122, 0.04);
    backdrop-filter: blur(12px);
}

.blog-search-box {
    position: relative;
    min-width: 0;
}

.blog-search-box i {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: #1f63a4;
    font-size: 20px;
}

.blog-search-box input {
    width: 100%;
    height: 54px;
    padding: 0 18px 0 54px;
    border: none;
    outline: none;
    background: transparent;
    color: #26374b;
    font-family: inherit;
    font-size: 14px;
}

.blog-search-box input::placeholder {
    color: #8b9aab;
}

/* Native select retained for current logic, hidden from visual UI */
.blog-native-filter {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.blog-category-dropdown {
    position: relative;
    min-width: 0;
}

.blog-category-dropdown-btn {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #1f2f47;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.blog-category-dropdown-btn:hover,
.blog-category-dropdown.open .blog-category-dropdown-btn {
    background: #f4faff;
}

.blog-category-dropdown-btn .category-main-icon {
    width: 29px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 29px;
    border-radius: 8px;
    background: rgba(0, 174, 239, 0.10);
    color: #079ee0;
}

.blog-category-dropdown-btn #categoryDropdownLabel {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-category-dropdown-btn .category-chevron {
    color: #40516a;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.blog-category-dropdown.open .category-chevron {
    transform: rotate(180deg);
}

.blog-category-menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 12px);
    left: 0;
    width: max(100%, 280px);
    max-height: 320px;
    overflow-y: auto;
    padding: 9px;
    border: 1px solid #e5edf3;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(37, 67, 88, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top;
    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
}

.blog-category-dropdown.open .blog-category-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.blog-category-option {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 11px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #2b3b50;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.blog-category-option:hover {
    background: #f2f9fd;
}

.blog-category-option.active {
    background: linear-gradient(90deg, rgba(0, 174, 239, 0.12), rgba(0, 174, 239, 0.05));
    color: #0677bb;
    font-weight: 700;
}

.blog-category-option-icon {
    width: 29px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 29px;
    border-radius: 8px;
    background: #f1f5f8;
    color: #627188;
}

.blog-category-option.active .blog-category-option-icon {
    background: rgba(0, 174, 239, 0.13);
    color: #00a4e4;
}

.blog-category-option-check {
    margin-left: auto;
    color: #00a2e2;
    opacity: 0;
}

.blog-category-option.active .blog-category-option-check {
    opacity: 1;
}

#blogSearchBtn {
    height: 54px;
    min-width: 148px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(135deg, #ff742a 0%, #ff4b28 100%);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 9px 20px rgba(241, 90, 41, 0.20);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

#blogSearchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(241, 90, 41, 0.28);
}

/* =========================================
   CATEGORY CHIPS
========================================= */

.blog-category-chips {
    max-width: 960px;
    margin: 18px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-category-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 8px 17px;
    border: 1px solid rgba(32, 95, 131, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #34445b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(44, 84, 108, 0.04);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.blog-category-chip i {
    font-size: 15px;
    color: #546985;
}

.blog-category-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 174, 239, 0.18);
    background: #fff;
}

.blog-category-chip.active {
    border-color: transparent;
    background: linear-gradient(135deg, #14b8f4 0%, #0a86ed 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(0, 153, 230, 0.22);
}

.blog-category-chip.active i {
    color: #fff;
}

/* =========================================
   BLOG SECTION
========================================= */

.blogs-section {
    position: relative;
    z-index: 1;
    padding: 34px 0 82px;
}

.blogs-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.blogs-heading {
    position: relative;
    margin: 0;
    text-align: left;
}

.blogs-heading h2 {
    position: relative;
    margin: 0 0 7px;
    padding-left: 60px;
    color: #15213b;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.blogs-heading h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 45px;
    height: 2px;
    transform: translateY(-50%);
    border-radius: 2px;
    background: #00aeef;
}

.blogs-heading h2 span {
    color: #079de2;
}

.blogs-heading p {
    margin: 0;
    color: #687b92;
    line-height: 1.6;
}

.blog-view-all {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: #067fd4;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: gap 0.2s ease, color 0.2s ease;
}

.blog-view-all:hover {
    gap: 11px;
    color: #f15a29;
}

#blogGrid {
    --bs-gutter-x: 24px;
    --bs-gutter-y: 24px;
}

/* =========================================
   STATUS
========================================= */

.blog-status {
    max-width: 620px;
    margin: 25px auto;
    padding: 36px 24px;
    border: 1px solid #e6eef4;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.88);
    color: #60738a;
    text-align: center;
    box-shadow: 0 10px 25px rgba(42, 79, 104, 0.05);
}

/* =========================================
   BLOG CARD
========================================= */

.blog-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(51, 90, 115, 0.09);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(37, 69, 90, 0.07);
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

.blog-card:hover {
    transform: translateY(-7px);
    border-color: rgba(0, 174, 239, 0.22);
    box-shadow: 0 20px 42px rgba(37, 69, 90, 0.13);
}

.blog-image-wrapper {
    position: relative;
    width: 100%;
    height: 238px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f8;
}

.blog-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    transition: transform 0.45s cubic-bezier(.2, .7, .2, 1);
}

.blog-card:hover .blog-image {
    transform: scale(1.035);
}

.blog-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.blog-category {
    min-width: 0;
    max-width: 64%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 174, 239, 0.16);
    border-radius: 999px;
    background: rgba(0, 174, 239, 0.08);
    color: #078ac8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-category i {
    flex: 0 0 auto;
    color: #00a2e5;
}

.blog-date {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8797a8;
    font-size: 13px;
    white-space: nowrap;
}

.blog-date i {
    color: #6d86a0;
}

.blog-card-title {
    margin: 0 0 9px;
    color: #17233d;
    line-height: 1.4;
    font-weight: 750;
    transition: color 0.22s ease;
}

.blog-card:hover .blog-card-title {
    color: #067fc4;
}

.blog-card-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 18px;
    color: #667990;
    line-height: 1.68;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.blog-read-more {
    width: fit-content;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 15px;
    border: 1px solid rgba(255, 84, 43, 0.32);
    border-radius: 10px;
    background: rgba(255, 84, 43, 0.06);
    color: #ff542b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 84, 43, 0.08);
    transition: transform 0.2s ease, gap 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-read-more:hover {
    gap: 10px;
    transform: translateY(-1px);
    border-color: #ff542b;
    background: #ff542b;
    color: #fff;
    box-shadow: 0 8px 18px rgba(255, 84, 43, 0.18);
}

.blog-read-more:active {
    transform: translateY(0);
}

/* =========================================
   PAGINATION
========================================= */

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 44px;
}

.blog-page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #dfe8ee;
    border-radius: 11px;
    background: #fff;
    color: #465a70;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(38, 68, 88, 0.04);
    transition: all 0.2s ease;
}

.blog-page-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(0, 174, 239, 0.30);
    color: #078fd5;
}

.blog-page-btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, #14b8f4, #0b85ec);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 146, 225, 0.20);
}

.blog-page-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.blog-page-dots {
    min-width: 32px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8da0b2;
    font-size: 14px;
    font-weight: 700;
}

#header #navmenu > ul > li:last-child > a {
    padding-right: 18px;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 991.98px) {
    .blog-hero {
        padding: 50px 16px 28px;
    }

    .blog-search-area {
        max-width: 760px;
        grid-template-columns: minmax(0, 1fr) 130px;
    }

    #blogSearchBtn {
        min-width: 130px;
        padding: 0 17px;
    }

    .blog-image-wrapper {
        height: 220px;
    }
}

@media (max-width: 767.98px) {
    .blog-hero {
        padding: 42px 14px 24px;
    }

    .blog-search-area {
        display: flex;
        flex-direction: column;
        gap: 9px;
        padding: 9px;
        border-radius: 17px;
    }

    .blog-search-box,
    #blogSearchBtn {
        width: 100%;
    }

    .blog-search-box {
        border: 1px solid #e5edf3;
        border-radius: 12px;
        background: #fff;
    }

    #blogSearchBtn {
        min-width: 100%;
    }

    .blog-category-chips {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 4px 8px;
        scrollbar-width: none;
    }

    .blog-category-chips::-webkit-scrollbar {
        display: none;
    }

    .blog-category-chip {
        flex: 0 0 auto;
    }

    .blogs-section {
        padding: 28px 0 58px;
    }

    .blogs-heading-row {
        align-items: flex-start;
    }

    .blogs-heading h2 {
        padding-left: 48px;
    }

    .blogs-heading h2::before {
        width: 35px;
    }

    .blog-image-wrapper {
        height: 210px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 480px) {
    .blog-hero {
        padding: 34px 12px 20px;
    }

    .blog-label {
        margin-bottom: 11px;
        padding: 6px 11px;
        font-size: 10px;
    }

    .blog-hero p {
        margin-top: 10px;
        line-height: 1.62;
    }

    .blog-search-area {
        margin-top: 22px;
    }

    .blog-search-box input,
    #blogSearchBtn {
        height: 50px;
    }

    .blog-category-chips {
        margin-top: 13px;
    }

    .blog-category-chip {
        min-height: 38px;
        padding: 7px 13px;
        font-size: 12px;
    }

    .blogs-section {
        padding: 22px 0 48px;
    }

    .blogs-heading-row {
        display: block;
        margin-bottom: 20px;
    }

    .blogs-heading h2 {
        padding-left: 0;
    }

    .blogs-heading h2::before {
        display: none;
    }

    .blogs-heading p {
        margin-top: 6px;
    }

    .blog-view-all {
        margin-top: 8px;
    }

    #blogGrid {
        --bs-gutter-y: 18px;
    }

    .blog-card {
        border-radius: 17px;
    }

    .blog-image-wrapper {
        height: 192px;
    }

    .blog-card-body {
        padding: 17px 17px 18px;
    }

    .blog-category {
        max-width: 60%;
    }

    .blog-pagination {
        margin-top: 34px;
        gap: 6px;
    }

    .blog-page-btn {
        min-width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .blog-page-dots {
        min-width: 25px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-image,
    .blog-category-chip,
    .blog-category-menu,
    .blog-category-dropdown-btn .category-chevron,
    .blog-page-btn,
    #blogSearchBtn,
    .blog-view-all,
    .blog-read-more {
        transition: none !important;
    }
}
