/* Modern Blog Styles - Inspired by Travel-Affiliate-Blog */

/* Color Variables */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --secondary-color: #06b6d4;
    --accent-orange: #f97316;
    --accent-green: #10b981;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Page Background */
.blog-page {
    min-height: 100vh;
}

/* Container */
.blog-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Category Filter Tabs (Pill Style) */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-tab {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-300);
    background-color: white;
    color: var(--gray-600);
}

.category-tab:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
    text-decoration: none;
}

.category-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.blog-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Square Aspect Ratio Thumbnail */
.blog-card-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: var(--gray-100);
}

.blog-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Text Thumbnail */
.blog-card-thumbnail-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.thumbnail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.thumbnail-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Card Body */
.blog-card-body {
    padding: 1rem;
}

.blog-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--gray-900);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card:hover .blog-card-title {
    color: var(--primary-color);
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Blog Detail Page */
.blog-detail {
    background-color: white;
    min-height: 100vh;
}

.blog-detail-header {
    background-color: white;
    padding: 3rem 1rem;
}

.blog-detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.blog-detail-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .blog-detail-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .blog-detail-title {
        font-size: 4rem;
    }
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.blog-detail-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .blog-detail-featured-image {
        height: 500px;
    }
}

.blog-detail-excerpt {
    font-size: 1.25rem;
    line-height: 1.75;
    color: var(--gray-700);
    font-style: italic;
    font-weight: 300;
    text-align: center;
}

@media (min-width: 768px) {
    .blog-detail-excerpt {
        font-size: 1.5rem;
    }
}

/* Blog Content */
.blog-content-wrapper {
    background-color: var(--gray-50);
    padding: 3rem 1rem;
}

.blog-content-container {
    max-width: 900px;
    margin: 0 auto;
}

.blog-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-800);
}

/* Content Sections as Cards */
.blog-content > h1,
.blog-content > h2,
.blog-content > h3 {
    background: white;
    padding: 1.5rem 2rem;
    margin: 2rem 0 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.blog-content > p,
.blog-content > ul,
.blog-content > ol {
    background: white;
    padding: 1.5rem 2rem;
    margin: 1rem 0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.blog-content > blockquote {
    background: white;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.blog-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 2rem 0 1.5rem;
    text-align: center;
    color: var(--gray-900);
}

.blog-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 1.75rem 0 1.25rem;
    text-align: center;
    color: var(--gray-900);
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--gray-900);
}

.blog-content p {
    margin-bottom: 1.5rem;
    text-align: center;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    display: block;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 0.5rem;
}

/* Image Container Card */
.blog-content figure {
    background: white;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.blog-content figure img {
    margin: 0;
    padding: 0;
    box-shadow: none;
}

.blog-content figcaption {
    margin-top: 1rem;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-style: italic;
}

.blog-content ul,
.blog-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

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

.blog-content blockquote {
    border-left: 4px solid var(--primary-color);
    background-color: var(--gray-50);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
    font-style: italic;
}

.blog-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.blog-content a:hover {
    color: var(--primary-hover);
}

.blog-content code {
    background-color: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.blog-content pre {
    background-color: var(--gray-800);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Share Buttons */
.blog-share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    color: white;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: white;
    text-decoration: none;
}

.share-button.facebook {
    background-color: #1877f2;
}

.share-button.twitter {
    background-color: #1da1f2;
}

.share-button.whatsapp {
    background-color: #25d366;
}

.share-button.copy {
    background-color: var(--gray-600);
}

/* Comment Section */
.blog-comments {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem;
    background-color: var(--gray-50);
    border-radius: 0.5rem;
}

.comment-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.comment-author {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-left: 0.5rem;
}

.comment-content {
    color: var(--gray-700);
    line-height: 1.6;
}

/* Badges */
.blog-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
}

.blog-badge.primary {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.blog-badge.secondary {
    background-color: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.blog-badge:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Loading State */
.blog-loading {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

/* Empty State */
.blog-empty {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.blog-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

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

.blog-pagination .page-link {
    border-radius: 0.5rem;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.blog-pagination .page-link:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.blog-pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive Utilities */
@media (max-width: 639px) {
    .blog-detail-title {
        font-size: 2rem;
    }

    .blog-content {
        font-size: 1rem;
    }

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