/* Blog Modern Styles - Following Development Rules */
/* CSS Loading Test - If you see red background, CSS is working */
body.blog-page { background-color: red !important; }

/* Uses theme colors defined in style.css: #A91467 (primary), #0663fc (secondary) */

:root {
    --blog-primary: #A91467;    /* Main theme color */
    --blog-secondary: #0663fc;  /* Secondary theme color */
    --blog-hover-shadow: rgba(169, 20, 103, 0.15);
    --blog-text-primary: #2c3e50;
    --blog-text-secondary: #6c757d;
    --blog-background: #f8f9fa;
    --blog-white: #ffffff;
    --blog-border: #e9ecef;
    --blog-shadow: rgba(0,0,0,0.1);
}

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, rgba(169, 20, 103, 0.9), rgba(6, 99, 252, 0.9));
    background-size: cover;
    background-position: center;
    padding: 120px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

/* Filters Section */
.blog-filters {
    background: var(--blog-background);
    padding: 2rem 0;
    border-bottom: 1px solid var(--blog-border);
}

.search-bar {
    position: relative;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--blog-border);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--blog-shadow);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--blog-primary);
    box-shadow: 0 4px 20px var(--blog-hover-shadow);
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blog-text-secondary);
    font-size: 1.1rem;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-filter {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--blog-border);
    border-radius: 50px;
    background: var(--blog-white);
    color: var(--blog-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-filter:hover,
.category-filter.active {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--blog-hover-shadow);
}

/* Blog Grid */
.blog-grid {
    padding: 4rem 0;
    background: var(--blog-background);
}

.blog-card {
    background: var(--blog-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--blog-shadow);
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    border: 1px solid var(--blog-border);
}

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

.card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(169, 20, 103, 0.8), rgba(6, 99, 252, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card:hover .card-overlay {
    opacity: 1;
}

.read-more-overlay {
    background: var(--blog-white);
    color: var(--blog-primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.blog-card:hover .read-more-overlay {
    transform: translateY(0);
}

/* Card Badges */
.card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.featured-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(238, 90, 82, 0.3);
}

.video-badge {
    background: linear-gradient(45deg, var(--blog-primary), var(--blog-secondary));
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px var(--blog-hover-shadow);
}

/* Card Content */
.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 250px);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--blog-text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--blog-text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

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

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

.card-description {
    color: var(--blog-text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    line-height: 1.6;
}

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

.category-tag {
    background: linear-gradient(45deg, var(--blog-primary), var(--blog-secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.category-tag:hover {
    transform: scale(1.05);
    color: white;
    text-decoration: none;
}

.reading-time {
    color: var(--blog-text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination */
.pagination-wrapper {
    padding: 3rem 0;
    background: var(--blog-white);
}

.pagination .page-link {
    border: 2px solid var(--blog-border);
    color: var(--blog-text-secondary);
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--blog-hover-shadow);
}

/* Utility Classes */
.posts-count {
    text-align: center;
    color: var(--blog-text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.no-posts {
    text-align: center;
    padding: 4rem 0;
    color: var(--blog-text-secondary);
}

.no-posts i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--blog-border);
}

/* Blog Post Hero */
.blog-post-hero {
    background: linear-gradient(135deg, rgba(169, 20, 103, 0.8), rgba(6, 99, 252, 0.8));
    background-size: cover;
    background-position: center;
    padding: 120px 0 80px;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

.post-header {
    position: relative;
    z-index: 2;
}

.post-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.post-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Main Content */
.post-content {
    background: var(--blog-background);
    padding: 4rem 0;
}

.main-content {
    background: var(--blog-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px var(--blog-shadow);
    margin-bottom: 2rem;
    position: relative;
}

.content-video {
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

.content-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--blog-text-primary);
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    color: var(--blog-text-primary);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-body p {
    margin-bottom: 1.5rem;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--blog-shadow);
    margin: 2rem 0;
}

.content-body blockquote {
    border-left: 4px solid var(--blog-primary);
    background: var(--blog-background);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 15px 15px 0;
    font-style: italic;
    position: relative;
}

/* Share Section */
.share-section {
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    padding: 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    text-align: center;
    color: white;
}

.share-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.share-btn:hover {
    background: var(--blog-white);
    color: var(--blog-primary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

/* Sidebar */
.sidebar {
    background: var(--blog-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px var(--blog-shadow);
    position: sticky;
    top: 2rem;
}

.sidebar-section {
    margin-bottom: 3rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--blog-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--blog-primary);
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--blog-secondary);
}

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

.latest-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.latest-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.latest-post-thumb {
    width: 80px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.latest-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-post-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.latest-post-content h4 a {
    color: var(--blog-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.latest-post-date {
    font-size: 0.8rem;
    color: var(--blog-text-secondary);
}

/* Categories */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.75rem;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--blog-background);
    border-radius: 10px;
    color: var(--blog-text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.category-link:hover {
    background: var(--blog-primary);
    color: white;
    text-decoration: none;
    border-left-color: var(--blog-secondary);
    transform: translateX(5px);
}

.category-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Breadcrumb */
.breadcrumb-modern {
    background: rgba(255,255,255,0.1);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    display: inline-block;
}

.breadcrumb-modern .breadcrumb {
    margin: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-modern .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.7);
}

/* Back to Blog Button */
.back-to-blog {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(45deg, var(--blog-primary), var(--blog-secondary));
    color: white;
    padding: 1rem;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 20px var(--blog-hover-shadow);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.back-to-blog:hover {
    transform: scale(1.1);
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 25px rgba(169, 20, 103, 0.4);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .category-filter {
        flex-shrink: 0;
    }

    .search-bar {
        margin-bottom: 1rem;
    }

    .card-content {
        padding: 1.5rem;
    }

    .blog-grid {
        padding: 2rem 0;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .main-content {
        padding: 2rem 1.5rem;
    }

    .sidebar {
        margin-top: 2rem;
    }

    .share-buttons {
        gap: 0.5rem;
    }

    .share-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .back-to-blog {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}
