/* ============================================
   Amvin Digital Blog - Frontend Styles
   ============================================ */

/* Blog Breadcrumb (inside page-hero) */
.page-hero .breadcrumb {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.page-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.page-hero .breadcrumb a:hover {
    color: #C8102E;
}

/* Blog Layout */
.blog-section {
    padding: 4rem 0;
    background: #F5F7FA;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Post Card */
.post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(30, 42, 74, 0.12);
}

.post-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.post-card-image-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #1E2A4A, #C8102E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 3rem;
}

.post-card-body {
    padding: 1.5rem;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #718096;
}

.post-card-meta .category {
    background: #FEE2E2;
    color: #C8102E;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1E2A4A;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.post-card-title a:hover {
    color: #C8102E;
}

.post-card-excerpt {
    color: #4A5568;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4A5568;
}

.post-card-author .author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1E2A4A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.post-card-readmore {
    color: #C8102E;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.post-card-readmore:hover {
    color: #a60d25;
}

/* ============================================
   Post Hero — Dark Gradient (Single Post)
   ============================================ */
.post-hero {
    padding: 7rem 0 3.5rem;
    background: linear-gradient(135deg, #1E2A4A 0%, #151d33 50%, #1a1f3a 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative glow */
.post-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(200, 16, 46, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.post-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(30, 42, 74, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

/* Breadcrumb */
.post-hero-breadcrumb {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2rem;
}

.post-hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s;
}

.post-hero-breadcrumb a:hover {
    color: #fff;
}

.post-hero-sep {
    margin: 0 0.5rem;
    font-size: 0.6rem;
    vertical-align: middle;
    color: rgba(255, 255, 255, 0.25);
}

/* Grid */
.post-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.post-hero-grid--full {
    grid-template-columns: 1fr;
    max-width: 720px;
}

/* Category badge */
.post-hero-category {
    display: inline-block;
    background: rgba(200, 16, 46, 0.15);
    color: #ff7a8a;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-decoration: none;
    border: 1px solid rgba(200, 16, 46, 0.25);
    margin-bottom: 1.25rem;
    transition: all 0.2s;
}

.post-hero-category:hover {
    background: rgba(200, 16, 46, 0.25);
    color: #ff9eaa;
}

/* Title */
.post-hero-info h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* Meta items */
.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.post-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.post-hero-meta-item i {
    font-size: 0.7rem;
    color: rgba(200, 16, 46, 0.8);
}

/* Image card */
.post-hero-image {
    position: relative;
}

.post-hero-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Single Post Content */
.single-post-section {
    padding: 3rem 0 4rem;
    background: #fff;
}

.single-post-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Post Content */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2D3748;
}

.post-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E2A4A;
    margin: 2rem 0 1rem;
}

.post-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1E2A4A;
    margin: 1.5rem 0 0.75rem;
}

.post-content h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1E2A4A;
    margin: 1.25rem 0 0.5rem;
}

.post-content a {
    color: #C8102E;
    text-decoration: none;
    font-weight: 600;
}

.post-content a:hover {
    color: #1E2A4A;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #C8102E;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #F5F7FA;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4A5568;
}

.post-content blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-weight: 600;
    color: #1E2A4A;
    font-size: 0.9rem;
}

.post-content pre {
    background: #1E2A4A;
    color: #E2E8F0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.post-content code {
    font-family: 'Courier New', monospace;
}

.post-content .blog-image {
    margin: 1.5rem 0;
    text-align: center;
}

.post-content .blog-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-content .blog-image figcaption {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.5rem;
    font-style: italic;
}

.post-content .blog-embed {
    margin: 1.5rem 0;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.post-content .blog-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.post-content .table-responsive {
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
}

.post-content table th,
.post-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid #E2E8F0;
    text-align: left;
}

.post-content table th {
    background: #F5F7FA;
    font-weight: 600;
    color: #1E2A4A;
}

.post-content hr {
    border: none;
    border-top: 2px solid #E2E8F0;
    margin: 2rem 0;
}

/* Social Share Buttons */
.post-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
}

.post-share-label {
    font-weight: 600;
    color: #1E2A4A;
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    color: #fff;
}

.share-x { background: #000; }
.share-x:hover { background: #333; }
.share-linkedin { background: #0A66C2; }
.share-linkedin:hover { background: #004182; }
.share-facebook { background: #1877F2; }
.share-facebook:hover { background: #0d65d9; }
.share-whatsapp { background: #25D366; }
.share-whatsapp:hover { background: #1da851; }
.share-copy { background: #4A5568; }
.share-copy:hover { background: #1E2A4A; }

/* Table of Contents */
.post-toc {
    background: #F5F7FA;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid #C8102E;
}

.post-toc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1E2A4A;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.post-toc-title i.fa-chevron-down {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.post-toc.collapsed .post-toc-title i.fa-chevron-down {
    transform: rotate(-90deg);
}

.post-toc.collapsed .post-toc-list {
    display: none;
}

.post-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-toc-list li {
    margin-bottom: 0.4rem;
}

.post-toc-list li a {
    color: #4A5568;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: inline-block;
    line-height: 1.4;
}

.post-toc-list li a:hover {
    color: #C8102E;
}

.post-toc-list li.toc-h3 {
    padding-left: 1rem;
}

.post-toc-list li.toc-h4 {
    padding-left: 2rem;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
}

.post-tags a {
    display: inline-block;
    background: #F5F7FA;
    color: #4A5568;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #E2E8F0;
}

.post-tags a:hover {
    background: #1E2A4A;
    color: #fff;
    border-color: #1E2A4A;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: #F5F7FA;
    border-radius: 12px;
    margin-top: 2.5rem;
}

.author-bio .author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1E2A4A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

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

.author-bio .author-info h4 {
    font-family: 'Poppins', sans-serif;
    color: #1E2A4A;
    margin-bottom: 0.25rem;
}

.author-bio .author-info p {
    color: #4A5568;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Related Posts */
.related-posts {
    padding: 4rem 0;
    background: #F5F7FA;
}

.related-posts h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E2A4A;
    text-align: center;
    margin-bottom: 2rem;
}

/* Pagination */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.blog-pagination a {
    background: #fff;
    color: #4A5568;
    border: 1px solid #E2E8F0;
}

.blog-pagination a:hover {
    background: #1E2A4A;
    color: #fff;
    border-color: #1E2A4A;
}

.blog-pagination span.current {
    background: #C8102E;
    color: #fff;
}

/* Empty State */
.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.blog-empty i {
    font-size: 3rem;
    color: #CBD5E0;
    margin-bottom: 1rem;
}

.blog-empty h3 {
    font-family: 'Poppins', sans-serif;
    color: #1E2A4A;
    margin-bottom: 0.5rem;
}

.blog-empty p {
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-card-image,
    .post-card-image-placeholder {
        height: 180px;
    }

    .post-hero {
        padding: 5.5rem 0 2.5rem;
    }

    .post-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .post-hero-info h1 {
        font-size: 1.5rem;
    }

    .post-hero-image img {
        max-height: 250px;
    }

    .post-hero-meta {
        gap: 0.5rem;
    }

    .post-hero-meta-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .post-share {
        flex-wrap: wrap;
    }

    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .post-toc {
        padding: 1rem 1.25rem;
    }
}

/* ============================================
   Author Archive Page
   ============================================ */
.author-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
}

.author-hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.author-hero-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #C8102E;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
}

.author-hero-info h1 {
    margin-bottom: 0.25rem;
    text-align: left;
}

.author-hero-info p {
    text-align: left;
    margin-bottom: 0.5rem;
}

.author-hero-count {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Blog Search */
.search-form {
    max-width: 600px;
    margin: 0 auto 2rem;
    display: flex;
    gap: 0.5rem;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: #1E2A4A;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background: #C8102E;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: #a50d25;
}

.search-results-info {
    text-align: center;
    margin-bottom: 2rem;
    color: #4A5568;
    font-size: 1rem;
}

.search-results-info strong {
    color: #1E2A4A;
}

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

    .author-hero-info h1,
    .author-hero-info p {
        text-align: center;
    }

    .search-form {
        flex-direction: column;
    }
}
