/* ==========================================================================
   ILTS Blog Page Styles
   Extends variables and patterns defined in css/style.css — do not
   redeclare :root here, just build on top of it.
   ========================================================================== */

#navbarNav .nav-link {
    color: #546e7a !important;
    font-weight: 400 !important;
    margin: 0 0.5rem !important;
    font-size: 1rem !important;
    padding: 0.5rem 0.5rem !important;
}
#navbarNav .nav-link.btn-primary {
    color: #ffffff !important;
}
.post-hero-section {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(rgba(36, 120, 175, 0.25), rgba(36, 120, 175, 0.35)),
        url('../storage/image/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* ---- Blog Hero ---- */
.blog-hero-section {
    background: linear-gradient(135deg, rgba(36, 120, 175, 0.06) 0%, rgba(79, 195, 247, 0.06) 100%);
    padding: 90px 0 60px;
    position: relative;
    overflow: hidden;
}

.blog-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(36,120,175,0.06)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(36, 120, 175, 0.2);
}

.blog-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 1.5rem 0 1rem;
    letter-spacing: -1px;
}

.blog-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.blog-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.blog-hero-stats .stat-item {
    text-align: center;
}

.blog-hero-stats .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.blog-hero-stats .stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 0.4rem;
}

/* Hero now sits on a photo background — override stat colors so they
   stay readable against the image instead of blending into it. */
.blog-hero-section .blog-hero-stats .stat-number {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.blog-hero-section .blog-hero-stats .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* ---- Featured Post ---- */
.featured-post-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(36, 120, 175, 0.12);
    border: 1px solid rgba(36, 120, 175, 0.1);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.featured-post-card:hover {
    box-shadow: 0 15px 50px rgba(36, 120, 175, 0.18);
}

.featured-post-image {
    flex: 0 0 48%;
    min-height: 340px;
    position: relative;
    overflow: hidden;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 340px;
}

.featured-post-tag {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-post-body {
    flex: 1;
    min-width: 300px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.featured-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.featured-post-meta i {
    color: var(--primary-color);
}

.featured-post-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-post-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.featured-post-body .read-more-link {
    align-self: flex-start;
}

/* ---- Category Filter ---- */
.blog-filter-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 3rem 0 2.5rem;
}

.filter-pill {
    background: white;
    border: 1px solid rgba(36, 120, 175, 0.15);
    color: var(--text-dark);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(36, 120, 175, 0.25);
}

/* ---- Blog Cards ---- */
.blog-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(36, 120, 175, 0.08);
    border: 1px solid rgba(36, 120, 175, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(36, 120, 175, 0.18);
}

.blog-card-image {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 1.2rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.85rem;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-card-meta i {
    color: var(--secondary-color);
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.read-more-link:hover {
    gap: 0.85rem;
    color: var(--secondary-color);
}

/* ---- Sidebar ---- */
.blog-sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 6px 25px rgba(36, 120, 175, 0.08);
    border: 1px solid rgba(36, 120, 175, 0.08);
    margin-bottom: 1.5rem;
}

.blog-sidebar-card h5 {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-blue);
}

.sidebar-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-category-list li {
    border-bottom: 1px solid rgba(36, 120, 175, 0.08);
}

.sidebar-category-list li:last-child {
    border-bottom: none;
}

.sidebar-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.sidebar-category-list a:hover {
    color: var(--primary-color);
}

.sidebar-category-list .count {
    background: var(--light-blue);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
}

.sidebar-post-item {
    display: flex;
    gap: 0.9rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(36, 120, 175, 0.08);
}

.sidebar-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-post-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.sidebar-post-info h6 a {
    color: var(--text-dark);
    text-decoration: none;
}

.sidebar-post-info h6 a:hover {
    color: var(--primary-color);
}

.sidebar-post-info small {
    color: var(--text-light);
    font-size: 0.75rem;
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar-tags a {
    background: var(--light-blue);
    color: var(--primary-color);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-tags a:hover {
    background: var(--primary-color);
    color: white;
}

.sidebar-newsletter-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 16px;
    padding: 1.75rem;
    color: white;
    text-align: center;
}

.sidebar-newsletter-card i {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.sidebar-newsletter-card h5 {
    color: white;
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
}

.sidebar-newsletter-card p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 1.25rem;
}

.sidebar-newsletter-card .form-control {
    border-radius: 25px;
    border: none;
    padding: 0.65rem 1.1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.sidebar-newsletter-card .btn {
    width: 100%;
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    border-radius: 25px;
    padding: 0.6rem;
    border: none;
    transition: all 0.3s ease;
}

.sidebar-newsletter-card .btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ---- Pagination ---- */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text-dark);
    background: white;
    border: 1px solid rgba(36, 120, 175, 0.15);
    transition: all 0.3s ease;
}

.blog-pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.blog-pagination .active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
}

/* ==========================================================================
   Single Blog Post Page
   ========================================================================== */

/* .post-hero-section {
    background: linear-gradient(135deg, rgba(36, 120, 175, 0.06) 0%, rgba(79, 195, 247, 0.06) 100%);
    padding: 80px 0 50px;
} */

.post-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    transition: gap 0.3s ease;
}

.post-back-link:hover {
    gap: 0.85rem;
    color: var(--secondary-color);
}

.post-hero-category {
    display: inline-block;
    position: static;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 1.25rem;
}

.post-hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0.5rem 0 1.5rem;
    line-height: 1.3;
}

.post-hero-info {
    display: flex;
    gap: 1.75rem;
    justify-content: center;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-hero-info i {
    color: var(--primary-color);
    margin-right: 0.4rem;
}

.post-featured-image {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(36, 120, 175, 0.15);
}

.post-featured-image img {
    width: 100%;
    display: block;
    /* max-height: 420px; */
    max-height: 500px;
    object-fit: cover;
}

.post-body {
    color: var(--text-dark);
    font-size: 1.05rem;
}

.post-body p {
    margin-bottom: 1.4rem;
    color: var(--text-light);
    line-height: 1.85;
}

.post-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.post-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 1.5rem 0 0.85rem;
}

.post-body blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--light-blue);
    padding: 1.25rem 1.5rem;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-dark);
    margin: 1.75rem 0;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.4rem;
    padding-left: 1.4rem;
    color: var(--text-light);
    line-height: 1.8;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-author-box {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 6px 25px rgba(36, 120, 175, 0.08);
    border: 1px solid rgba(36, 120, 175, 0.08);
}

.post-author-box .author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.post-author-box h6 {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.post-author-box p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tags a {
    background: var(--light-blue);
    color: var(--primary-color);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 767.98px) {
    .post-hero-section {
        padding: 60px 0 35px;
    }

    .post-hero-title {
        font-size: 1.6rem;
    }

    .post-hero-info {
        gap: 1rem;
        font-size: 0.82rem;
    }

    .post-featured-image img {
        max-height: 260px;
    }

    .post-author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .featured-post-image {
        flex: 0 0 100%;
        min-height: 260px;
    }

    .featured-post-image img {
        min-height: 260px;
    }

    .featured-post-body {
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    .blog-hero-section {
        padding: 70px 0 40px;
    }

    .blog-hero-title {
        font-size: 2rem;
    }

    .blog-hero-subtitle {
        font-size: 1rem;
    }

    .blog-hero-stats {
        gap: 1.75rem;
    }

    .featured-post-title {
        font-size: 1.35rem;
    }

    .featured-post-body {
        padding: 1.5rem;
    }

    .blog-filter-bar {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        margin: 2rem 0 1.5rem;
    }

    .filter-pill {
        flex-shrink: 0;
    }

    .blog-card-image {
        height: 190px;
    }
}

@media (max-width: 575.98px) {
    .blog-hero-title {
        font-size: 1.7rem;
    }

    .blog-hero-stats {
        gap: 1.25rem;
    }

    .blog-hero-stats .stat-number {
        font-size: 1.5rem;
    }
}