/**
 * Blog Post Styles
 * Simplified and attractive styling for blog posts
 * Ex Revolution Technology
 */

/* Blog Post Hero Section */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.blog-hero {
    position: relative;
    background-color: #0066cc; /* Base blue color */
    padding: 80px 0;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

/* Animated gradient background */
.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0066cc, #004c99, #0077e6, #003d80);
    background-size: 400% 400%;
    opacity: 0.8;
    z-index: 1;
    animation: gradientMove 15s ease infinite;
}

/* Subtle diagonal stripes */
.blog-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 60px,
        rgba(255, 255, 255, 0.02) 60px,
        rgba(255, 255, 255, 0.02) 120px
    );
    z-index: 2;
}

.blog-hero .container {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.blog-hero h1 {
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: #fff !important;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
}

.blog-hero h1::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.7);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

.blog-hero .meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.blog-hero .meta-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.blog-hero .meta-item i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Blog Post Content */
.blog-content {
    padding: 60px 0;
    background-color: var(--bg-primary);
}

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

.blog-post {
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.blog-post-body {
    padding: 40px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.blog-post-body p {
    margin-bottom: 20px;
}

.blog-post-body h2 {
    margin: 40px 0 20px;
    color: var(--text-primary);
    font-size: 1.8rem;
    position: relative;
    padding-left: 15px;
    border-left: 4px solid var(--primary);
}

.blog-post-body h3 {
    margin: 30px 0 15px;
    color: var(--text-primary);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.blog-post-body h3 i {
    margin-right: 10px;
    color: var(--primary);
}

.blog-post-body ul, .blog-post-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.blog-post-body li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
}

.blog-post-body li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.blog-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

/* Feature Box */
.feature-box {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    border-left: 4px solid var(--primary);
    position: relative;
}

.feature-box .icon {
    position: absolute;
    top: -15px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.feature-box h3 {
    margin-top: 0;
    color: var(--primary);
    border-left: none !important;
    padding-left: 0 !important;
}

.feature-box p:last-child {
    margin-bottom: 0;
}

/* Quote Box */
.quote-box {
    background-color: rgba(0, 102, 204, 0.1);
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    position: relative;
}

.quote-box::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.2;
    line-height: 1;
}

.quote-box p {
    font-style: italic;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.quote-box .author {
    font-weight: 600;
    color: var(--primary);
    text-align: right;
    margin-top: 10px;
}

/* Stats Box */
.stats-box {
    background: var(--gradient-primary);
    color: white !important;
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.stats-box h3 {
    color: white !important;
}

.stats-box h3 i {
    color: white !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    padding: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
}

.stat-number i {
    margin-right: 10px;
    font-size: 1.8rem;
    color: white !important;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white !important;
}

/* Author Box */
.author-box {
    display: flex;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 25px;
    margin: 40px 0;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.author-info {
    flex: 1;
}

.author-name {
    margin: 0 0 5px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.author-bio {
    margin: 0 0 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.author-social {
    display: flex;
    gap: 10px;
}

.author-social a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s ease;
}

.author-social a:hover {
    transform: translateY(-3px);
}

/* Share Box */
.share-box {
    margin: 30px 0;
    text-align: center;
}

.share-box h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s ease;
}

.share-button.facebook { background-color: #3b5998; }
.share-button.twitter { background-color: #1da1f2; }
.share-button.linkedin { background-color: #0077b5; }
.share-button.whatsapp { background-color: #25d366; }

.share-button:hover {
    transform: translateY(-3px);
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
}

.related-posts h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    position: relative;
}

.related-posts h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary);
    margin: 15px auto 0;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
}

.related-post-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-post-content {
    padding: 15px;
}

.related-post-title {
    margin: 0 0 10px;
    font-size: 1rem;
    line-height: 1.4;
}

.related-post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-post-title a:hover {
    color: var(--primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-post-body {
        padding: 25px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

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

    .author-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .author-social {
        justify-content: center;
    }
}
