/* ============================================
   BLOG STYLES
   Premium Blog Design System
   ============================================ */

/* === BLOG HERO === */
.blog-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #FF6F61 100%);
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.search-hero {
    padding: 4rem 0 3rem;
}

.blog-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-hero-subtitle strong {
    color: var(--accent-gold);
}

/* === BLOG SEARCH FORM === */
.blog-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius-full);
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    box-shadow: var(--shadow-xl);
}

.search-input-wrapper i {
    color: var(--gray-400);
    font-size: 1.25rem;
    margin-right: 1rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.75rem 0;
    background: transparent;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-input-wrapper .btn {
    border-radius: var(--radius-full);
    padding: 0.875rem 2rem;
}

/* === CATEGORY FILTER === */
.blog-categories {
    padding: 2rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.category-pills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-pill:hover {
    background: var(--gray-200);
    color: var(--secondary);
}

.category-pill.active {
    background: var(--gradient-primary);
    color: var(--white);
}

.category-pill .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

.category-pill.active .count {
    background: rgba(255, 255, 255, 0.25);
}

/* === BLOG GRID === */
.blog-listing {
    padding: 3rem 0 4rem;
}

.results-count {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* === BLOG CARD === */
.blog-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--gray-100);
}

.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-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 3rem;
}

.blog-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    color: var(--gray-600);
    font-size: 0.925rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.blog-card-meta i {
    color: var(--primary);
    margin-right: 0.25rem;
}

/* === HOME BLOG SECTION === */
.home-blog-section {
    padding: 4rem 0;
    background: var(--gray-50);
}

.home-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.home-blog-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.home-blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.home-blog-card .blog-card-image {
    height: 180px;
}

.home-blog-card .blog-card-content {
    padding: 1.25rem;
}

.home-blog-card .blog-card-title {
    font-size: 1.1rem;
}

/* === BLOG PAGINATION === */
.blog-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    background: var(--white);
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-link.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* === BREADCRUMB === */
.breadcrumb-nav {
    background: var(--gray-50);
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--gray-400);
}

.breadcrumb a {
    color: var(--gray-600);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb li:last-child {
    color: var(--gray-500);
    font-weight: 500;
}

/* === ARTICLE PAGE === */
.blog-article {
    padding: 2rem 0 4rem;
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
}

/* Article Main */
.article-main {
    max-width: 100%;
    overflow-wrap: break-word;
}

.article-header {
    margin-bottom: 2rem;
}

.article-category {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.article-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--secondary);
}

.publish-date {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.meta-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.stat-item i {
    color: var(--primary);
}

/* Featured Image */
.article-featured-image {
    margin: 0 0 2rem;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 2rem 0 0.75rem;
}

.article-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 1.5rem 0 0.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--gray-50);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    font-style: italic;
    color: var(--gray-700);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--primary-dark);
}

/* Tags */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray-600);
    font-weight: 500;
}

.tags-label i {
    color: var(--primary);
}

.tag-link {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-link:hover {
    background: var(--primary);
    color: var(--white);
}

/* Share Buttons */
.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
}

.share-label {
    font-weight: 500;
    color: var(--secondary);
}

.share-buttons {
    display: flex;
    gap: 0.625rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--white);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.copy {
    background: var(--gray-600);
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
}

.author-bio-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
}

.author-bio-content h4 {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.author-bio-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem !important;
}

.author-bio-desc {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 !important;
}

/* === SIDEBAR === */
.article-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

/* Related Posts Widget */
.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-post-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-post-item:hover {
    opacity: 0.85;
}

.related-post-image {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
}

.related-post-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.related-post-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* CTA Widget */
.cta-widget {
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
}

.cta-widget-content i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cta-widget-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.cta-widget-content p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1.25rem;
}

.cta-widget .btn {
    background: var(--white);
    color: var(--primary);
    font-weight: 600;
    width: 100%;
}

.cta-widget .btn:hover {
    background: var(--gray-100);
}

/* Contact Widget */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.contact-item:hover {
    background: var(--primary);
    color: var(--white);
}

.contact-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Copy Toast */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(1rem);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-1rem);
    }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .sidebar-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 4rem 0 3rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .home-blog-grid {
        grid-template-columns: 1fr;
    }

    .search-input-wrapper {
        flex-direction: column;
        padding: 1rem;
        border-radius: var(--radius-xl);
    }

    .search-input-wrapper i {
        display: none;
    }

    .search-input {
        text-align: center;
        margin-bottom: 0.75rem;
    }

    .search-input-wrapper .btn {
        width: 100%;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-share {
        flex-direction: column;
        text-align: center;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .category-pills {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }

    .category-pill {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .blog-card-image {
        height: 180px;
    }

    .home-blog-card .blog-card-image {
        height: 160px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .share-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Category Pills - better contrast */
.category-pill {
    color: var(--gray-800);
}

.category-pill.active {
    background: var(--primary-dark);
    color: #ffffff;
    font-weight: 600;
}

.category-pill:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Empty State - better contrast */
.empty-state p {
    color: var(--gray-600);
}

/* Blog Card Meta - better contrast */
.blog-card-meta {
    color: var(--gray-600);
}

/* Search input accessibility */
.search-input:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

/* Button focus states */
.blog-search-form .btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Pagination focus */
.pagination-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Blog Hero text - ensure readable */
.blog-hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
}

/* Tags better contrast */
.tag-link {
    color: var(--gray-800);
}

/* ============================================
   CTA SECTION - Blog Call To Action
   ============================================ */
.cta-section {
    padding: 4rem 0;
    margin-bottom: 4rem;
    /* Space from footer */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.cta-card {
    background: linear-gradient(135deg, #FF6F61 0%, #E85A4F 100%);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow:
        0 20px 40px rgba(255, 111, 97, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cta-card::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.cta-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.cta-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 500px;
}

.cta-action {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.cta-action .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-action .btn-primary {
    background: white;
    color: #FF6F61;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cta-action .btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cta-action .btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.0625rem;
}

/* CTA Responsive */
@media (max-width: 768px) {
    .cta-section {
        padding: 3rem 0;
        margin-bottom: 3rem;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 2.5rem 1.5rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 0.9375rem;
    }

    .cta-action .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cta-card {
        padding: 2rem 1.25rem;
        border-radius: 16px;
    }

    .cta-content h2 {
        font-size: 1.25rem;
    }
}