
/* =========================================================
   BLOG APPLICATION
   Main Stylesheet
   ========================================================= */


/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: #f7f9fc;
    color: #20252b;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.7;
}

img {
    max-width: 100%;
    display: block;
}

a {
    transition: all 0.25s ease;
}

button {
    transition: all 0.25s ease;
}


/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */

.blog-header {
    position: relative;
    z-index: 1000;
}

.blog-header .navbar {
    background: #0b63a5;
    min-height: 72px;
    padding: 10px 0;
}

.blog-header .navbar-brand {
    font-size: 1.45rem;
    letter-spacing: 0.2px;
    color: #ffffff;
}

.blog-header .navbar-brand:hover {
    color: #ffffff;
    opacity: 0.9;
}

.blog-header .navbar-nav {
    gap: 5px;
}

.blog-header .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 9px 15px !important;
    border-radius: 6px;
}

.blog-header .nav-link:hover,
.blog-header .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.blog-header .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 6px 9px;
}

.blog-header .navbar-toggler:focus {
    box-shadow: none;
}


/* =========================================================
   HERO SECTION
   ========================================================= */

.blog-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        #0b63a5 0%,
        #0875bd 50%,
        #0b5892 100%
    );
    color: #ffffff;
}

.blog-hero::before {
    content: "";
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    top: -250px;
    right: -120px;
}

.blog-hero::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.035);
    bottom: -200px;
    left: -100px;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
    padding-top: 75px !important;
    padding-bottom: 75px !important;
}

.blog-label {
    display: inline-block;
    padding: 6px 13px;
    margin-bottom: 17px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.blog-hero h1 {
    margin-bottom: 15px;
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    line-height: 1.15;
    font-weight: 800;
}

.blog-hero p {
    max-width: 680px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
}


/* =========================================================
   SEARCH
   ========================================================= */

.blog-search {
    position: relative;
    z-index: 5;
}

.blog-search .form-control {
    min-height: 50px;
    border: none;
    padding-left: 17px;
    padding-right: 17px;
    border-radius: 8px 0 0 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.blog-search .form-control:focus {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.16);
}

.blog-search .btn {
    min-height: 50px;
    padding-left: 19px;
    padding-right: 19px;
    border-radius: 0 8px 8px 0;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.section-heading {
    margin-bottom: 28px;
}

.section-heading span {
    display: block;
    margin-bottom: 5px;
    color: #0b63a5;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    color: #20252b;
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    line-height: 1.25;
    font-weight: 750;
}


/* =========================================================
   FEATURED POST
   ========================================================= */

.featured-post {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e7ebef;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(30, 45, 60, 0.07);
}

.featured-image {
    min-height: 420px;
    overflow: hidden;
    background: #e9f0f5;
}

.featured-image img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-post:hover .featured-image img {
    transform: scale(1.03);
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 45px;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #7a858e;
    font-size: 0.82rem;
}

.post-date i {
    color: #0b63a5;
}

.featured-content h2 {
    margin-bottom: 17px;
    color: #1d252c;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.25;
    font-weight: 750;
}

.featured-content > p {
    margin-bottom: 24px;
    color: #69747d;
    font-size: 1rem;
}

.featured-content .btn-primary {
    align-self: flex-start;
    padding: 10px 20px;
    border: none;
    border-radius: 7px;
    background: #0b63a5;
    font-weight: 600;
}

.featured-content .btn-primary:hover {
    background: #084d82;
    transform: translateY(-1px);
}


/* =========================================================
   POST REACTIONS
   ========================================================= */

.post-reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #edf0f2;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid #dfe5e9;
    border-radius: 7px;
    background: #ffffff;
    color: #56616a;
    font-size: 0.82rem;
    cursor: pointer;
}

.reaction-btn:hover {
    transform: translateY(-1px);
}

.like-btn:hover {
    border-color: #198754;
    color: #198754;
    background: #f3fbf6;
}

.dislike-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f6;
}

.like-count,
.dislike-count {
    font-weight: 700;
}

.comment-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #727c84;
    font-size: 0.82rem;
}


/* =========================================================
   ARTICLE GRID
   ========================================================= */

.articles-section {
    position: relative;
}

.blog-card {
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e7ebef;
    border-radius: 15px;
    box-shadow: 0 7px 25px rgba(30, 45, 60, 0.055);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(30, 45, 60, 0.10);
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #e9f0f5;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    display: flex;
    flex-direction: column;
    min-height: 265px;
    padding: 23px;
}

.blog-card-content .post-date {
    margin-bottom: 9px;
}

.blog-card-content h3 {
    margin-bottom: 10px;
    color: #20272e;
    font-size: 1.18rem;
    line-height: 1.4;
    font-weight: 700;
}

.blog-card-content p {
    margin-bottom: 16px;
    color: #727d85;
    font-size: 0.91rem;
    line-height: 1.65;
}


/* =========================================================
   READ MORE
   ========================================================= */

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    color: #0b63a5;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.read-more i {
    transition: transform 0.2s ease;
}

.read-more:hover {
    color: #084d82;
}

.read-more:hover i {
    transform: translateX(4px);
}


/* =========================================================
   CARD REACTIONS
   ========================================================= */

.card-reactions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    padding-top: 17px;
    border-top: 1px solid #edf0f2;
    color: #7a858e;
    font-size: 0.78rem;
}

.card-reactions span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-reactions span:first-child i {
    color: #198754;
}

.card-reactions span:nth-child(2) i {
    color: #dc3545;
}

.card-reactions span:nth-child(3) i {
    color: #0b63a5;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.blog-pagination .pagination {
    gap: 5px;
}

.blog-pagination .page-link {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe5e9;
    border-radius: 7px !important;
    color: #4f5b64;
    background: #ffffff;
    font-size: 0.88rem;
}

.blog-pagination .page-link:hover {
    border-color: #0b63a5;
    color: #0b63a5;
    background: #f3f8fc;
}

.blog-pagination .page-item.active .page-link {
    border-color: #0b63a5;
    background: #0b63a5;
    color: #ffffff;
}

.blog-pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background: #f8f9fa;
}


/* =========================================================
   SINGLE POST PAGE
   ========================================================= */

.single-post {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e7ebef;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(30, 45, 60, 0.06);
    padding: clamp(25px, 5vw, 55px);
}

.single-post > .post-date {
    margin-bottom: 10px;
}

.single-post h1 {
    margin-bottom: 25px;
    color: #1d252c;
    line-height: 1.2;
    font-weight: 800;
}

.single-post-image {
    width: 100%;
    max-height: 560px;
    margin-bottom: 30px;
    object-fit: cover;
    border-radius: 12px;
}

.post-body {
    color: #444e56;
    font-size: 1.05rem;
    line-height: 1.9;
    word-wrap: break-word;
}

.post-body p {
    margin-bottom: 20px;
}


/* =========================================================
   REACTION AREA ON SINGLE POST
   ========================================================= */

.reaction-area {
    padding: 22px;
    border: 1px solid #e8edf1;
    border-radius: 12px;
    background: #f8fafc;
}

.reaction-area strong {
    color: #29323a;
    font-size: 1rem;
}

.reaction-area .reaction-btn {
    min-height: 42px;
    padding: 7px 15px;
}

.reaction-area .like-btn {
    border-color: #b9dfc8;
    color: #198754;
}

.reaction-area .like-btn:hover {
    background: #edf9f1;
}

.reaction-area .dislike-btn {
    border-color: #f1c1c6;
    color: #dc3545;
}

.reaction-area .dislike-btn:hover {
    background: #fff0f2;
}


/* =========================================================
   COMMENTS
   ========================================================= */

#comments {
    scroll-margin-top: 90px;
}

#comments h2 {
    color: #20272e;
    font-weight: 750;
}

#comments h2 .text-muted {
    font-size: 0.8em;
    font-weight: 500;
}

.comment-form {
    padding: 23px;
    border: 1px solid #e7ebef;
    border-radius: 12px;
    background: #f8fafc;
}

.comment-form .form-label {
    color: #3f4951;
    font-size: 0.88rem;
    font-weight: 600;
}

.comment-form .form-control {
    min-height: 45px;
    border: 1px solid #dce2e7;
    border-radius: 7px;
    background: #ffffff;
    font-size: 0.92rem;
}

.comment-form textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

.comment-form .form-control:focus {
    border-color: #0b63a5;
    box-shadow: 0 0 0 3px rgba(11, 99, 165, 0.09);
}

.comment-form .btn-primary {
    min-height: 42px;
    padding: 8px 19px;
    border: none;
    border-radius: 7px;
    background: #0b63a5;
    font-weight: 600;
}

.comment-form .btn-primary:hover {
    background: #084d82;
}


/* Individual comment */

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid #e9edf0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item strong {
    color: #2b343c;
    font-size: 0.94rem;
}

.comment-item small {
    font-size: 0.76rem;
}

.comment-item .mt-2 {
    color: #5c6770;
    font-size: 0.91rem;
    line-height: 1.7;
}


/* =========================================================
   ADMIN AREA
   ========================================================= */

.admin-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e9ed;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(30, 45, 60, 0.055);
}

.admin-card .form-control,
.admin-card .form-select {
    min-height: 44px;
    border-color: #dce2e7;
    border-radius: 7px;
}

.admin-card .form-control:focus,
.admin-card .form-select:focus {
    border-color: #0b63a5;
    box-shadow: 0 0 0 3px rgba(11, 99, 165, 0.08);
}

.admin-card textarea.form-control {
    min-height: 300px;
    resize: vertical;
}

.admin-card .table {
    margin-bottom: 0;
}

.admin-card .table thead th {
    background: #f7f9fb;
    color: #49545d;
    border-bottom: 1px solid #e2e7eb;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-card .table tbody td {
    color: #4e5961;
    border-color: #edf0f2;
    font-size: 0.88rem;
}

.admin-card .table tbody tr:hover {
    background: #fafcfd;
}


/* =========================================================
   GENERAL BUTTONS
   ========================================================= */

.btn {
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.btn-primary {
    background: #0b63a5;
    border-color: #0b63a5;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #084d82;
    border-color: #084d82;
}

.btn-outline-primary {
    color: #0b63a5;
    border-color: #0b63a5;
}

.btn-outline-primary:hover {
    background: #0b63a5;
    border-color: #0b63a5;
}


/* =========================================================
   FOOTER
   ========================================================= */

.blog-footer {
    margin-top: 40px;
    padding: 45px 0;
    background: #17232d;
    color: rgba(255, 255, 255, 0.75);
}

.blog-footer h5 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
}

.blog-footer p {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.blog-footer .text-md-end {
    color: rgba(255, 255, 255, 0.65);
}


/* =========================================================
   EMPTY / ALERT STATES
   ========================================================= */

.alert {
    border-radius: 9px;
}

.alert-light {
    background: #ffffff;
    border-color: #e5e9ed;
    color: #69747d;
}


/* =========================================================
   RESPONSIVE - TABLETS
   ========================================================= */

@media (max-width: 991.98px) {

    .blog-header .navbar-nav {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .blog-header .nav-link {
        padding: 10px 12px !important;
    }

    .blog-hero .container {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 340px;
    }

    .featured-image img {
        min-height: 340px;
        height: 340px;
    }

    .featured-content {
        padding: 35px;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    body {
        font-size: 0.95rem;
    }

    .blog-header .navbar {
        min-height: 65px;
    }

    .blog-hero .container {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero p {
        font-size: 0.96rem;
    }

    .blog-search {
        margin-top: 25px;
    }

    .section-heading {
        margin-bottom: 20px;
    }

    .featured-image {
        min-height: 260px;
    }

    .featured-image img {
        min-height: 260px;
        height: 260px;
    }

    .featured-content {
        padding: 25px;
    }

    .featured-content h2 {
        font-size: 1.65rem;
    }

    .featured-content > p {
        font-size: 0.93rem;
    }

    .post-reactions {
        gap: 7px;
    }

    .reaction-btn {
        font-size: 0.78rem;
        padding: 6px 10px;
    }

    .blog-card-image {
        height: 210px;
    }

    .blog-card-content {
        min-height: auto;
    }

    .single-post {
        padding: 22px;
        border-radius: 12px;
    }

    .single-post h1 {
        font-size: 1.8rem;
    }

    .post-body {
        font-size: 0.98rem;
        line-height: 1.8;
    }

    .comment-form {
        padding: 17px;
    }

    .blog-footer {
        padding: 35px 0;
        text-align: center;
    }

    .blog-footer .text-md-end {
        margin-top: 20px;
        text-align: center !important;
    }

}


/* =========================================================
   RESPONSIVE - SMALL PHONES
   ========================================================= */

@media (max-width: 575.98px) {

    .blog-hero h1 {
        font-size: 1.8rem;
    }

    .blog-label {
        font-size: 0.65rem;
    }

    .blog-search .btn {
        padding-left: 12px;
        padding-right: 12px;
    }

    .featured-content {
        padding: 21px;
    }

    .featured-content h2 {
        font-size: 1.45rem;
    }

    .post-reactions {
        align-items: flex-start;
        flex-direction: column;
    }

    .comment-count {
        margin-top: 2px;
    }

    .card-reactions {
        gap: 12px;
    }

    .blog-pagination .page-link {
        min-width: 36px;
        min-height: 36px;
        font-size: 0.8rem;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(11, 99, 165, 0.25);
    outline-offset: 2px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}

