/* Blogs Grid Page */
.blog-header {
    background: #f8fafc;
    padding: 4rem 5% 6rem;
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: -4rem auto 0;
    padding: 0 5% 4rem;
    position: relative;
    z-index: 10;
}

.blog-card {
    background: white;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
}

.blog-img {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-img img {
    transform: scale(1.05);
}

.blog-cat-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: white;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.blog-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    margin-top: auto;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Blog Detail Page */
/* Blog Detail New Layout */
.blog-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5%;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
}

.blog-main {
    min-width: 0;
}

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cat-list a {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.2s;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.cat-list a:hover {
    color: var(--primary-color);
    background: #eff6ff;
}

.sidebar-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    text-decoration: none;
    color: var(--text-primary);
    align-items: center;
}

.sidebar-post img {
    width: 70px;
    height: 70px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-post h5 {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Prev Next Nav */
.prev-next-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 3rem;
}

.nav-link {
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
    background: white;
}

.nav-link:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        margin-top: -2rem;
    }
}

@media (min-width: 600px) and (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.blog-detail-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-detail-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.blog-detail-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 1.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--card-shadow);
}

.blog-content {
    font-size: clamp(1rem, 4vw, 1.15rem);
    line-height: 1.8;
    color: #334155;
    margin-bottom: 4rem;
}

.blog-content h2, .blog-content h3 {
    margin: 2rem 0 1rem;
    color: var(--text-primary);
    font-size: clamp(1.2rem, 5vw, 1.8rem);
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2rem 0;
}

.share-btns {
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.prev-next-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 3rem;
}

@media (max-width: 768px) {
    .blog-detail-img { max-height: 300px; }
    .blog-header { padding: 3rem 5% 4rem; }
}

/* FAQ Section */
.faq-section { margin: 3rem 0; }
.faq-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 2rem; color: #1e293b; }

.faq-item { border-bottom: 1px solid #e2e8f0; }

.faq-question {
    padding: 1.5rem 0;
    font-size: 1.15rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b; /* Slate 500 */
    transition: all 0.3s ease;
}

.faq-question:hover { color: var(--primary-color); }

.faq-item.active .faq-question {
    color: var(--primary-color); /* Teal/Primary */
    font-weight: 600;
}

/* Icon Design */
.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s;
    margin-left: 1rem;
    font-weight: 300;
}

.faq-item.active .faq-question::after {
    content: '−'; /* Minus sign */
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(180deg);
}

/* Smoother Accordion using Grid */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease-out, padding 0.3s ease;
    padding: 0 0;
    overflow: hidden;
    color: #475569;
    line-height: 1.8;
    white-space: pre-line;
    padding-right: 3rem;
    font-size: 1rem;
}

.faq-answer > div {
    overflow: hidden;
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
    padding-bottom: 1.5rem;
}
