/* =========================================================================
   CUSTOM GRID & UTILITIES (Replacing removed MDB/Bootstrap dependency)
   ========================================================================= */

.container {
    width: 100%;
    padding-right: var(--bs-gutter-x, .75rem);
    padding-left: var(--bs-gutter-x, .75rem);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(var(--bs-gutter-y) * -1);
    margin-right: calc(var(--bs-gutter-x) / -2);
    margin-left: calc(var(--bs-gutter-x) / -2);
}

.row > * {
    box-sizing: border-box;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x) / 2);
    padding-left: calc(var(--bs-gutter-x) / 2);
    margin-top: var(--bs-gutter-y);
}

.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }

/* Columns */
@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 auto; width: 25%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }
}

@media (min-width: 992px) {
    .col-lg-4 { flex: 0 0 auto; width: 33.33333333%; }
    .col-lg-6 { flex: 0 0 auto; width: 50%; }
}

/* Utilities */
.text-center { text-align: center !important; }
.text-muted { color: #6c757d !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }
.w-100 { width: 100% !important; }

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    padding: .375rem .75rem;
    font-size: 1rem;
    border-radius: .25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.btn-primary { background-color: var(--primary-color); color: white; border: none; }
.btn-primary:hover { background-color: var(--accent-color); color: white; }


/* =========================================================================
   BLOG THEME STYLES
   ========================================================================= */

/* Blog Hero Section */
.blog-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    background: linear-gradient(135deg, rgba(40,32,86,0.95) 0%, rgba(239,48,147,0.85) 100%),
                url('https://images.unsplash.com/photo-1522337360788-8b13dee7a37e?w=1200') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,300 Q300,200 600,300 T1200,300 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat center bottom;
    background-size: cover;
    opacity: 0.3;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.blog-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.blog-hero-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Main Blog Section */
.blog-main-section {
    padding: 80px 0;
    background: white;
}

.intro-text {
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
}

.intro-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Featured Article */
.featured-article {
    background: var(--light-bg);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 80px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.featured-article .row {
    margin: 0;
}

.featured-article .col-lg-6 {
    padding: 0;
}

.featured-article .col-lg-6:last-child {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
}

.badge-featured {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    width: 150px !important;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.featured-excerpt {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.blog-meta span {
    font-size: 0.9rem;
    color: #777;
}

.blog-meta i {
    margin-right: 8px;
    color: var(--accent-color);
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(5px);
}

/* Blog Grid */
.blog-grid {
    margin-top: 60px;
}

.blog-post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.blog-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.blog-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post-card:hover .blog-image-wrapper img {
    transform: scale(1.1);
}

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-post-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-post-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-post-excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.blog-read-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.blog-read-link:hover {
    color: var(--primary-color);
    gap: 12px;
}

/* Pagination */
.blog-pagination {
    margin-top: 60px;
}

.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 2px solid #e0e0e0;
    padding: 10px 18px;
    margin: 0 5px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.pagination .page-item.active .page-link {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Newsletter CTA */
.blog-newsletter-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.newsletter-box {
    text-align: center;
    color: white;
    max-width: 700px;
    margin: 0 auto;
}

.newsletter-box h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.newsletter-box p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-email-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-newsletter-submit {
    background: white;
    color: var(--primary-color);
    padding: 15px 35px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-newsletter-submit:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 991px) {
    .featured-article .col-lg-6:last-child {
        padding: 40px 30px;
    }

    .featured-img {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .blog-hero-content h1 {
        font-size: 2.2rem;
    }

    .blog-hero-content p {
        font-size: 1rem;
    }

    .featured-title {
        font-size: 1.6rem;
    }

    .featured-article .col-lg-6:last-child {
        padding: 30px 20px;
    }

    .newsletter-box h2 {
        font-size: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-email-input {
        width: 100%;
    }

    .btn-newsletter-submit {
        width: 100%;
    }

    .blog-main-section {
        padding: 60px 0;
    }

    .blog-newsletter-cta {
        padding: 60px 0;
    }
}


/* Blog Detail Hero */
.blog-detail-hero {
    position: relative;
    height: 60vh;
    min-height: 450px;
    background: linear-gradient(135deg, rgba(40,32,86,0.85) 0%, rgba(239,48,147,0.75) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1560066984-138dadb4c035?w=1200');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
}

.blog-detail-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
    text-align: center;
    color: white;
}

.blog-category-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.blog-detail-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.blog-detail-meta {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    font-size: 1rem;
}

.blog-detail-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-detail-meta i {
    color: var(--accent-color);
}

/* Blog Content Section */
.blog-content-section {
    padding: 80px 0;
    background: white;
}

.blog-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-bottom: 50px;
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #333;
}

.blog-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 50px;
    margin-bottom: 25px;
    line-height: 1.3;
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.blog-content p {
    margin-bottom: 25px;
}

.blog-content ul, .blog-content ol {
    margin-bottom: 30px;
    padding-left: 30px;
}

.blog-content li {
    margin-bottom: 15px;
    line-height: 1.8;
}

.blog-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-content em {
    color: var(--accent-color);
    font-style: italic;
}

.highlight-box {
    background: var(--light-bg);
    border-left: 4px solid var(--accent-color);
    padding: 30px;
    margin: 40px 0;
    border-radius: 5px;
}

.highlight-box h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.highlight-box p {
    margin-bottom: 15px;
}

.highlight-box ul {
    margin-bottom: 0;
}

.tip-box {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 30px;
    margin: 40px 0;
}

.tip-box h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.tip-box p {
    margin-bottom: 0;
    line-height: 1.7;
}

.content-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin: 40px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Share Section */
.share-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.share-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.share-btn.facebook {
    background: #3b5998;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.pinterest {
    background: #bd081c;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
}

/* Author Section */
.author-section {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 15px;
    margin-top: 60px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.author-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.author-info p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Related Posts Section */
.related-posts-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.related-posts-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
}

.related-post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.related-post-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.1);
}

.related-post-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.related-post-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-post-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.related-post-excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.related-post-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-post-link:hover {
    color: var(--primary-color);
    gap: 12px;
}


/* Newsletter CTA */
.newsletter-cta-inline {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 60px 40px;
    text-align: center;
    color: white;
    margin: 60px 0;
}

.newsletter-cta-inline h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.newsletter-cta-inline p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.newsletter-inline-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-inline-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: none;
    font-size: 1rem;
}

.btn-newsletter-inline {
    background: white;
    color: var(--primary-color);
    padding: 15px 35px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-newsletter-inline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-detail-title {
        font-size: 2rem;
    }

    .blog-detail-meta {
        font-size: 0.9rem;
        gap: 15px;
    }

    .featured-image {
        height: 300px;
    }

    .blog-content h2 {
        font-size: 1.6rem;
    }

    .blog-content h3 {
        font-size: 1.3rem;
    }

    .author-section {
        flex-direction: column;
        text-align: center;
    }

    .related-posts-title {
        font-size: 2rem;
    }

    .newsletter-inline-form {
        flex-direction: column;
    }

    .newsletter-inline-input {
        width: 100%;
    }

    .btn-newsletter-inline {
        width: 100%;
    }

    .blog-content-section {
        padding: 60px 0;
    }

    .content-image {
        height: 250px;
    }
}