/* ============================================
   BLOG PAGE STYLING
   ============================================ */

/* General Text Overflow Prevention */
html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

ul, ol {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

li {
    word-wrap: break-word;
    word-break: break-word;
}

p {
    word-wrap: break-word;
    word-break: break-word;
}

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 100%);
    padding: 150px 20px 80px;
    text-align: center;
    margin-bottom: 60px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    margin-top: 60px;
}

@media (max-width: 768px) {
    .blog-header {
        padding: 100px 15px 50px;
        margin-bottom: 40px;
        margin-top: 50px;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 80px 12px 40px;
        margin-bottom: 30px;
        margin-top: 50px;
    }
}

.blog-header h1 {
    font-size: 3em;
    color: #8B5CF6;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2em;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }
}

.blog-header p {
    font-size: 1.2em;
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-header p {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .blog-header p {
        font-size: 0.85em;
    }
}

/* Blog Section */
.blog-section {
    padding: 40px 20px 80px;
    min-height: 100vh;
}

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

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
    background: rgba(30, 30, 50, 0.8);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #8B5CF6, #7C3AED);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(30, 30, 50, 1);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
    transform: translateY(-5px);
}

.blog-card:hover::before {
    transform: translateX(0);
}

/* Blog Date */
.blog-date {
    font-size: 0.9em;
    color: #8B5CF6;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Blog Card Heading */
.blog-card h3 {
    font-size: 1.4em;
    color: #ffffff;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Blog Excerpt */
.blog-excerpt {
    color: #d0d0d0;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Blog Tags */
.blog-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Blog Content (Hidden by default) */
.blog-content {
    color: #d0d0d0;
    font-size: 1em;
    line-height: 1.6;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    overflow-x: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

.blog-content p {
    margin-bottom: 15px;
    overflow-x: hidden;
}

.blog-content a {
    color: #8B5CF6;
    text-decoration: underline;
    word-break: break-word;
}

.blog-content a:hover {
    color: #a78bfa;
}

.blog-content ul li {
    margin-bottom: 8px;
    overflow-x: hidden;
    word-wrap: break-word;
}

/* HR Elements in Content */
.blog-content hr,
.blog-card hr {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* Fade In Animation */
.fade-in {
    animation: fadeInContent 0.3s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Expanded Card Styling */
.blog-card.expanded {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(30, 30, 50, 1);
}

/* Read More Button */
.read-more {
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #a78bfa;
    transform: translateX(5px);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 100%);
    padding: 60px 20px;
    margin: 60px 0;
    border-radius: 15px;
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: rgba(30, 30, 50, 0.8);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.newsletter-box h2 {
    font-size: 2em;
    color: #8B5CF6;
    margin-bottom: 10px;
}

.newsletter-box p {
    color: #b0b0b0;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1em;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.2);
}

.newsletter-form input::placeholder {
    color: #808080;
}

.newsletter-form button {
    padding: 12px 30px;
    white-space: nowrap;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .blog-header {
        padding: 100px 16px 50px;
        margin-top: 50px;
        margin-bottom: 40px;
    }

    .blog-header h1 {
        font-size: 2em;
        margin-bottom: 12px;
    }

    .blog-header p {
        font-size: 0.95em;
    }

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

    .blog-card {
        padding: 20px;
    }

    .newsletter-box {
        padding: 30px 16px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    .nav-links {
        justify-content: flex-start;
        flex: none;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 80px 12px 40px;
        margin-top: 50px;
        margin-bottom: 30px;
    }

    .blog-header h1 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    .blog-header p {
        font-size: 0.85em;
    }

    .blog-card {
        padding: 15px;
    }

    .blog-card h3 {
        font-size: 1.1em;
    }

    .blog-excerpt {
        font-size: 0.95em;
    }

    .blog-grid {
        gap: 15px;
    }

    .newsletter-box {
        padding: 25px 12px;
    }
}
