/* Blog Pages - Saint Globle Theme */

/* Hero Banner */
.blog-hero {
    position: relative;
    width: 100%;
    height: clamp(220px, 50vh, 420px);
    min-height: 220px;
    max-height: 420px;
    overflow: hidden;
}

.blog-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

@media (min-width: 1301px) {
    .blog-hero {
        height: clamp(420px, calc(420px + (100vw - 1300px) * 1.025), 625px);
        min-height: 420px;
        max-height: 625px;
    }
}

@media (min-width: 1501px) {
    .blog-hero {
        height: 625px;
        max-height: 625px;
    }
}

@media (max-width: 767px) {
    .blog-hero {
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        line-height: 0 !important;
    }

    .blog-hero img {
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        object-fit: contain !important;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        line-height: 0 !important;
        overflow: hidden !important;
    }

    .blog-hero img {
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        object-fit: contain !important;
        display: block !important;
    }
}

/* Section Title */
.blog-section-title {
    text-align: center;
    margin-bottom: 50px;
}

.blog-section-title h3 {
    color: #024c78;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.blog-section-title h2 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

.blog-section-title p {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

.blog-page-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(2, 76, 120, 0.15);
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

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

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

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

.blog-card-meta {
    color: #024c78;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.blog-card-title {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: #024c78;
}

.blog-card-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.blog-read-more {
    color: #024c78;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.blog-read-more:hover {
    color: #4a90e2;
}

/* Single Post */
.blog-single-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.blog-single-image {
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.blog-single-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.blog-single-content {
    background: #fff;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.blog-single-content h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

.blog-single-meta {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.blog-single-meta span {
    margin-right: 20px;
}

.blog-single-body {
    color: #444;
    font-size: 1.05rem;
    line-height: 1.8;
    overflow-x: auto;
    max-width: 100%;
}

.blog-single-body p {
    margin-bottom: 1.2em;
}

.blog-single-body h2,
.blog-single-body h3,
.blog-single-body h4 {
    color: #024c78;
    margin: 1.5em 0 0.8em;
}

.blog-single-body ul,
.blog-single-body ol {
    margin-bottom: 1.2em;
    padding-left: 1.5em;
}

.blog-single-body table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2em;
}

.blog-single-body table td,
.blog-single-body table th {
    border: 1px solid #ddd;
    padding: 8px 12px;
}

.blog-single-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 10px;
}

.blog-sidebar-widget {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.blog-sidebar-widget h3 {
    color: #024c78;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.blog-sidebar-post {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    align-items: center;
}

.blog-sidebar-post:last-child {
    margin-bottom: 0;
}

.blog-sidebar-post img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.blog-sidebar-post a {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    line-height: 1.4;
}

.blog-sidebar-post a:hover {
    color: #024c78;
}

.blog-sidebar-post .date {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 4px;
}

.blog-sidebar-cta {
    background: linear-gradient(135deg, #024c78, #4a90e2);
    color: #fff;
    text-align: center;
}

.blog-sidebar-cta h3 {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}

.blog-sidebar-cta p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 15px;
    line-height: 1.6;
}

.blog-sidebar-cta .btn-default {
    background: #fff;
    color: #024c78;
}

/* Pagination */
.blog-pagination {
    margin-top: 20px;
    text-align: center;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 4px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #024c78;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.blog-pagination a:hover,
.blog-pagination span.active {
    background: linear-gradient(135deg, #024c78, #4a90e2);
    color: #fff;
}

.blog-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 15px;
}

@media (max-width: 991px) {
    .blog-sidebar {
        position: static;
        margin-top: 40px;
    }

    .blog-single-content h1 {
        font-size: 1.8rem;
    }

    .blog-single-content {
        padding: 25px 20px;
    }

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

@media (max-width: 767px) {
    .blog-hero {
        height: 35vh;
        min-height: 180px;
        max-height: 280px;
    }

    .blog-page-section,
    .blog-single-section {
        padding: 40px 0;
    }

    .blog-section-title {
        margin-bottom: 35px;
    }

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

    .blog-section-title p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .blog-card-image {
        aspect-ratio: 16 / 10;
    }

    .blog-card-body {
        padding: 20px 18px;
    }

    .blog-card-title {
        font-size: 1.15rem;
    }

    .blog-single-content h1 {
        font-size: 1.5rem;
    }

    .blog-single-image img {
        max-height: none;
        height: auto;
    }

    .blog-single-meta span {
        display: block;
        margin-right: 0;
        margin-bottom: 6px;
    }

    .blog-single-body {
        font-size: 1rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    .blog-single-body iframe,
    .blog-single-body video,
    .blog-single-body embed {
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .blog-sidebar-widget {
        padding: 20px 18px;
    }

    .blog-sidebar-post img {
        width: 60px;
        height: 60px;
    }

    .blog-pagination a,
    .blog-pagination span {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        min-height: 150px;
        max-height: 220px;
    }

    .blog-section-title h2 {
        font-size: 1.4rem;
    }

    .blog-card-title {
        font-size: 1.05rem;
    }

    .blog-single-content {
        padding: 20px 15px;
    }

    .blog-single-content h1 {
        font-size: 1.35rem;
    }
}
