/* =====================================================
   Blog Pages - Stylesheet
   Used by: blog.html, blog-details.html, blog-category.html
   Load order: style.css first, then blog.css
   (colors, fonts, navbar, footer, .blog-card and buttons
    come from style.css - edit the :root variables there)

   TABLE OF CONTENTS
   1. Accessibility (skip link)
   2. Page Header & Breadcrumb
   3. Blog Toolbar (filters + search)
   4. Blog List Card (category page)
   5. Pagination
   6. Sidebar Widgets
   7. Article (blog details)
   8. Author Box & Post Navigation
   9. Comments
===================================================== */

/* 1. Accessibility */
.skip-link {
    position: absolute;
    top: -60px;
    left: 15px;
    z-index: 2000;
    padding: 10px 18px;
    border-radius: 6px;
    background: var(--color-dark);
    color: #fff;
    font-size: 14px;
}

.skip-link:focus {
    top: 10px;
    color: #fff;
}

/* 2. Page Header & Breadcrumb */
.page-header {
    padding: 70px 0 60px;
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

.page-header h1 {
    max-width: 850px;
    margin: 0 auto 14px;
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 700;
    line-height: 1.3;
}

.page-header h1 span {
    color: var(--color-gold);
}

.page-header .breadcrumb {
    justify-content: center;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.page-header .breadcrumb-item a {
    color: var(--color-dark);
    font-weight: 500;
}

.page-header .breadcrumb-item a:hover,
.page-header .breadcrumb-item.active {
    color: var(--color-gold);
}

/* 3. Blog Toolbar (filters + search) */
.blog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.blog-toolbar .portfolio-filters {
    justify-content: flex-start;
    margin-bottom: 0;
}

.blog-search {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.blog-search--full {
    max-width: 100%;
}

.blog-search input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 48px;
    padding: 0 52px 0 20px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    background: var(--color-card);
    color: var(--color-dark);
    font-family: var(--font-body);
    font-size: 13px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-search input::-webkit-search-decoration,
.blog-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.blog-search input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px var(--color-gold-soft);
}

.blog-search button {
    position: absolute;
    top: 50%;
    right: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--color-dark);
    color: #fff;
    font-size: 13px;
    transform: translateY(-50%);
    cursor: pointer;
    transition: background 0.3s ease;
}

.blog-search button:hover {
    background: var(--color-gold);
}

.blog-empty {
    padding: 40px 0 0;
    text-align: center;
}

@media (max-width: 767.98px) {
    .blog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-toolbar .portfolio-filters {
        justify-content: center;
    }

    .blog-search {
        max-width: 100%;
    }
}

/* 4. Blog List Card (category page) */
.blog-list-card {
    isolation: isolate;
    display: flex;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.blog-list-card + .blog-list-card {
    margin-top: 28px;
}

.blog-list-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.blog-list-card .blog-image {
    flex: 0 0 38%;
    height: auto;
    min-height: 240px;
}

.blog-list-card .blog-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

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

@media (max-width: 767.98px) {
    .blog-list-card {
        flex-direction: column;
    }

    .blog-list-card .blog-image {
        flex: none;
        height: 220px;
        min-height: 0;
    }
}

/* 5. Pagination (copy this block into a page when you have more posts) */
.blog-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 50px;
    list-style: none;
}

.blog-pagination a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-card);
    color: var(--color-dark);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-pagination a:hover,
.blog-pagination .active a {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: #fff;
}

/* 6. Sidebar Widgets */
.sidebar-widget {
    margin-bottom: 30px;
    padding: 28px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.widget-title {
    position: relative;
    margin-bottom: 22px;
    padding-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
}

.widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    border-radius: 3px;
    background: var(--color-gold);
}

.widget-category-list {
    list-style: none;
}

.widget-category-list li + li {
    border-top: 1px solid var(--color-border);
}

.widget-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    color: var(--color-dark);
    font-size: 14px;
    font-weight: 500;
}

.widget-category-list a:hover {
    color: var(--color-gold);
}

.widget-category-list span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-gold-soft);
    color: var(--color-gold);
    font-size: 12px;
    font-weight: 600;
}

.recent-post {
    display: flex;
    align-items: center;
    gap: 15px;
}

.recent-post + .recent-post {
    margin-top: 18px;
}

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

.recent-post h3 {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.recent-post h3 a {
    color: var(--color-dark);
}

.recent-post h3 a:hover {
    color: var(--color-gold);
}

.recent-post small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.recent-post small i {
    color: var(--color-gold);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list a {
    padding: 7px 16px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    color: var(--color-dark);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-list a:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: #fff;
}

/* 7. Article (blog details) */
.article-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.article-cover {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.article-body {
    padding: 40px;
}

.article-body h2 {
    margin: 35px 0 15px;
    font-size: 24px;
    font-weight: 700;
}

.article-body p {
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.9;
}

.article-body ul {
    margin: 0 0 20px 20px;
    font-size: 15px;
    line-height: 2;
}

.article-body ul li::marker {
    color: var(--color-gold);
}

.article-quote {
    margin: 30px 0;
    padding: 28px 30px;
    border-left: 4px solid var(--color-gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--color-gold-soft);
}

.article-quote p {
    margin: 0 0 10px;
    color: var(--color-dark);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.7;
}

.article-quote i {
    margin-right: 8px;
    color: var(--color-gold);
}

.article-quote cite {
    font-size: 13px;
    font-style: normal;
}

.article-inline-img {
    display: block;
    width: 100%;
    height: 300px;
    margin: 10px 0 25px;
    border-radius: var(--radius);
    object-fit: cover;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--color-border);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-share strong {
    color: var(--color-dark);
    font-size: 14px;
}

.article-share a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-dark);
    color: var(--color-gold);
    font-size: 14px;
    transition: all 0.3s ease;
}

.article-share a:hover {
    background: var(--color-gold);
    color: var(--color-dark);
    transform: translateY(-3px);
}

@media (max-width: 575.98px) {
    .article-cover {
        height: 250px;
    }

    .article-body {
        padding: 25px 20px;
    }

    .article-inline-img {
        height: 210px;
    }
}

/* 8. Author Box & Post Navigation */
.author-box {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
    padding: 30px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.author-box img {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-box h2 {
    margin-bottom: 6px;
    font-size: 19px;
    font-weight: 700;
}

.author-box p {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 575.98px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

.post-nav a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 22px 25px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-dark);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.post-nav a small {
    margin-bottom: 6px;
    color: var(--color-gold);
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.post-nav a:hover {
    border-color: var(--color-gold);
    box-shadow: var(--shadow-soft);
    transform: translateY(-4px);
}

.post-nav .next {
    text-align: right;
}

/* 9. Comments (form fields use .contact-form from style.css) */
.comments-title {
    margin: 45px 0 25px;
    font-size: 24px;
    font-weight: 700;
}

.comment-item {
    display: flex;
    gap: 18px;
    padding: 25px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.comment-item + .comment-item {
    margin-top: 18px;
}

.comment-item img {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-item h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
}

.comment-item h3 small {
    color: var(--color-muted);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
}

.comment-item p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.8;
}

.comment-reply {
    font-size: 13px;
    font-weight: 600;
}

.comment-form-box {
    margin-top: 40px;
    padding: 35px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.comment-form-box h2 {
    margin-bottom: 22px;
    font-size: 22px;
    font-weight: 700;
}

/* iOS Safari zooms the page when an input is smaller than 16px */
@supports (-webkit-touch-callout: none) {
    .blog-search input {
        font-size: 16px;
    }
}

@media (max-width: 575.98px) {
    .comment-form-box {
        padding: 25px 20px;
    }

    .comment-item {
        padding: 20px;
    }
}
