/* ===================================================
   Waves of Wisdom - Blog Styles
   =================================================== */

/* Blog Hero */
.blog-hero {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, #0097b2 0%, #007a91 50%, #c8a2c8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 80px;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23ffffff' d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,40 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
    z-index: 1;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 0 20px;
}

.blog-hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.blog-hero-content p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Blog Layout */
.blog-section {
    padding-top: 40px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.blog-main {
    min-width: 0;
}

/* Search Bar */
.blog-search {
    margin-bottom: 30px;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.95rem;
}

.blog-search .form-control {
    padding-left: 42px;
    border-radius: 30px;
    border: 2px solid var(--accent-gray);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.blog-search .form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.1);
}

/* Active Filters */
.blog-active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f0f9fb;
    border-radius: 8px;
    font-size: 0.9rem;
}

.filter-label {
    color: #666;
}

.filter-tag {
    background: var(--primary-color);
    color: #fff;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.filter-clear {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: auto;
    padding: 3px 8px;
    transition: color 0.3s ease;
}

.filter-clear:hover {
    color: #e74c3c;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.blog-card-image {
    height: 180px;
    background: linear-gradient(135deg, #e8f4f8 0%, #f0e6f6 100%);
    overflow: hidden;
    position: relative;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-image .card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-image .card-placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.3;
}

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

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #888;
}

.blog-card-meta i {
    margin-right: 4px;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text-color);
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

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

.blog-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

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

.blog-card-author {
    font-size: 0.8rem;
    color: #888;
}

.read-more-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.read-more-link:hover {
    gap: 8px;
    color: var(--secondary-color);
}

/* Loading Spinner */
.blog-loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.blog-loading p {
    color: #888;
    font-size: 0.95rem;
}

/* No Results */
.blog-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.blog-no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--accent-gray);
}

.blog-no-results h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-gray);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

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

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: var(--text-color);
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: color 0.3s ease;
}

.category-list li a:hover {
    color: var(--primary-color);
}

.category-list li:last-child a {
    border-bottom: none;
}

.category-count {
    background: #f0f9fb;
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Recent Posts */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5f5f5;
}

.recent-posts-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-posts-list li a {
    color: var(--text-color);
    font-size: 0.9rem;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    transition: color 0.3s ease;
}

.recent-posts-list li a:hover {
    color: var(--primary-color);
}

.recent-post-date {
    display: block;
    font-size: 0.78rem;
    color: #999;
    margin-top: 3px;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 5px 14px;
    background: #f0f9fb;
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tag-link:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ===================================================
   Single Blog Post Page Styles
   =================================================== */

.blog-post-page {
    margin-top: 80px;
}

/* Post Header */
.post-header {
    background: linear-gradient(135deg, #f8fbfc 0%, #f5f0f7 100%);
    padding: 50px 0 40px;
}

.post-breadcrumb {
    margin-bottom: 20px;
}

.post-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
}

.post-breadcrumb a:hover {
    gap: 10px;
}

.post-meta-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.post-category-badge {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-date,
.post-reading-time {
    font-size: 0.85rem;
    color: #888;
}

.post-date i,
.post-reading-time i {
    margin-right: 5px;
}

.post-header h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: 15px;
}

.post-author-info {
    font-size: 0.95rem;
    color: #666;
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 30px;
}

.post-featured-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Post Layout */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.post-body-wrapper {
    padding-top: 20px;
}

/* Post Content */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content h2 {
    font-size: 1.6rem;
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.post-content h2::after {
    display: none;
}

.post-content h3 {
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 12px;
    color: var(--text-color);
}

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

.post-content ul,
.post-content ol {
    margin-bottom: 1.2rem;
    padding-left: 25px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 15px 25px;
    margin: 25px 0;
    background: #f8fbfc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-facebook { background: #1877F2; }
.share-twitter { background: #000; }
.share-linkedin { background: #0A66C2; }
.share-email { background: var(--primary-color); }
.share-copy { background: #666; }

.share-copy.copied {
    background: #27ae60;
}

/* Post Sidebar */
.post-sidebar {
    position: sticky;
    top: 100px;
}

/* ===================================================
   Responsive Styles
   =================================================== */

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .post-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar,
    .post-sidebar {
        position: static;
    }

    .blog-hero-content h1 {
        font-size: 2.2rem;
    }

    .post-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        height: 220px;
        margin-top: 70px;
    }

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

    .blog-hero-content p {
        font-size: 0.95rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-card-image {
        height: 160px;
    }

    .post-header {
        padding: 30px 0 25px;
    }

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

    .blog-post-page {
        margin-top: 70px;
    }

    .blog-active-filters {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .blog-card-body {
        padding: 15px;
    }

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

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