/* ======================================
   BLOG PAGE - UNIQUE CSS
   All classes prefixed with blog-
   ====================================== */

/* ===== CSS VARIABLES ===== */
:root {
    --blog-navy: #003E7E;
    --blog-red: #E31E24;
    --blog-magenta: #A5195D;
    --blog-white: #FFFFFF;
    --blog-light-bg: #F8F9FA;
    --blog-text-dark: #2C3E50;
    --blog-text-light: #6C757D;
    --blog-border: #E0E0E0;
}

/* ===== PAGE HEADER ===== */
.blog-page-header {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
    margin-top: 0;
}

.blog-page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.blog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,62,126,0.9), rgba(165,25,93,0.8));
    z-index: 2;
}

.blog-header-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.blog-page-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--blog-white);
    margin-bottom: 1rem;
    animation: blogFadeInDown 0.8s ease;
}

.blog-breadcrumb {
    background: transparent;
    justify-content: center;
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
}

.blog-breadcrumb-item {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

.blog-breadcrumb-item a {
    color: var(--blog-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-breadcrumb-item a:hover {
    color: var(--blog-red);
}

.blog-breadcrumb-item.active {
    color: var(--blog-red);
}

.blog-breadcrumb-item + .blog-breadcrumb-item::before {
    content: "→";
    color: rgba(255,255,255,0.6);
    padding: 0 10px;
}

/* ===== INTRO SECTION ===== */
.blog-intro-section {
    padding: 80px 0 40px;
}

.blog-badge {
    display: inline-block;
    background: rgba(227,30,36,0.1);
    color: var(--blog-red);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.blog-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--blog-navy);
    margin-bottom: 1rem;
    line-height: 1.3;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.blog-main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--blog-red);
    border-radius: 2px;
}

.blog-intro-text {
    font-size: 1.1rem;
    color: var(--blog-text-dark);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* ===== BLOG GRID SECTION ===== */
.blog-grid-section {
    padding: 40px 0 80px;
}

/* CRITICAL FIX: Section-specific flexbox rule */
.blog-grid-section .row.g-4 > [class*='col-'] {
    display: flex;
}

.blog-card {
    background: var(--blog-white);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid var(--blog-border);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.blog-card:hover {
    border-color: var(--blog-navy);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.blog-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
    flex-shrink: 0;
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.1);
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--blog-red);
    color: var(--blog-white);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
}

.blog-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--blog-text-light);
}

.blog-date,
.blog-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-date i,
.blog-author i {
    flex-shrink: 0;
}

.blog-title {
    margin-bottom: 12px;
}

.blog-title a {
    color: var(--blog-navy);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: block;
}

.blog-title a:hover {
    color: var(--blog-red);
}

.blog-excerpt {
    color: var(--blog-text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.blog-read-more {
    color: var(--blog-red);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.blog-read-more:hover {
    color: var(--blog-navy);
    gap: 12px;
}

.blog-read-more i {
    transition: transform 0.3s ease;
}

.blog-read-more:hover i {
    transform: translateX(4px);
}

/* ===== PAGINATION ===== */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.blog-page-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    background: var(--blog-white);
    color: var(--blog-navy);
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-page-link:hover,
.blog-page-link.active {
    background: var(--blog-navy);
    color: var(--blog-white);
    border-color: var(--blog-navy);
    transform: translateY(-2px);
}

/* ===== SIDEBAR ===== */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

.blog-widget {
    background: var(--blog-white);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--blog-border);
}

.blog-widget-title {
    color: var(--blog-navy);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.blog-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--blog-red);
    border-radius: 2px;
}

/* Search Widget */
.blog-search-form {
    position: relative;
}

.blog-search-input {
    width: 100%;
    padding: 12px 50px 12px 18px;
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.blog-search-input:focus {
    outline: none;
    border-color: var(--blog-navy);
    box-shadow: 0 0 0 3px rgba(0,62,126,0.1);
}

.blog-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--blog-red);
    color: var(--blog-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-search-btn:hover {
    background: var(--blog-navy);
}

/* Categories Widget */
.blog-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-category-list li {
    border-bottom: 1px solid var(--blog-border);
}

.blog-category-list li:last-child {
    border-bottom: none;
}

.blog-category-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--blog-text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-category-list a:hover {
    color: var(--blog-red);
    padding-left: 10px;
}

.blog-category-list span {
    color: var(--blog-text-light);
    font-size: 0.9rem;
}

/* Recent Posts Widget */
.blog-recent-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--blog-border);
}

.blog-recent-item:first-child {
    padding-top: 0;
}

.blog-recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-recent-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.blog-recent-content {
    flex: 1;
}

.blog-recent-content h5 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.blog-recent-content h5 a {
    color: var(--blog-navy);
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-recent-content h5 a:hover {
    color: var(--blog-red);
}

.blog-recent-date {
    color: var(--blog-text-light);
    font-size: 0.85rem;
}

/* Tags Widget */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--blog-light-bg);
    color: var(--blog-text-dark);
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-tag:hover {
    background: var(--blog-navy);
    color: var(--blog-white);
    transform: translateY(-2px);
}

/* Newsletter Widget */
.blog-newsletter {
    background: linear-gradient(135deg, var(--blog-magenta), #d41868);
    color: var(--blog-white);
}

.blog-newsletter .blog-widget-title {
    color: var(--blog-white);
}

.blog-newsletter .blog-widget-title::after {
    background: var(--blog-white);
}

.blog-newsletter p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.blog-newsletter-input {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.1);
    color: var(--blog-white);
}

.blog-newsletter-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.blog-newsletter-input:focus {
    outline: none;
    border-color: var(--blog-white);
    background: rgba(255,255,255,0.2);
}

.blog-newsletter-btn {
    width: 100%;
    padding: 12px;
    background: var(--blog-white);
    color: var(--blog-magenta);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-newsletter-btn:hover {
    background: var(--blog-navy);
    color: var(--blog-white);
    transform: translateY(-2px);
}

/* ===== ANIMATIONS ===== */
@keyframes blogFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (992px and below) */
@media (max-width: 992px) {
    .blog-main-title {
        font-size: 2rem;
    }

    .blog-page-title {
        font-size: 2.5rem;
    }

    .blog-intro-section,
    .blog-grid-section {
        padding: 60px 0;
    }

    .blog-sidebar {
        position: static;
        margin-top: 40px;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .blog-page-header {
        padding: 100px 0 60px;
    }

    .blog-page-title {
        font-size: 2rem;
    }

    .blog-main-title {
        font-size: 1.8rem;
    }

    .blog-image-wrapper {
        height: 220px;
    }

    .blog-content {
        padding: 20px;
    }

    .blog-title a {
        font-size: 1.1rem;
    }

    .blog-widget {
        padding: 25px 20px;
    }

    .blog-pagination {
        flex-wrap: wrap;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    .blog-page-header {
        padding: 80px 0 50px;
    }

    .blog-page-title {
        font-size: 1.75rem;
    }

    .blog-main-title {
        font-size: 1.6rem;
    }

    .blog-badge {
        font-size: 0.8rem;
        padding: 6px 16px;
    }

    .blog-image-wrapper {
        height: 200px;
    }

    .blog-meta {
        flex-direction: column;
        gap: 8px;
    }

    .blog-recent-image {
        width: 70px;
        height: 70px;
    }

    .blog-page-link {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .blog-intro-text {
        font-size: 1rem;
    }
}
