/* ==========================================================================
   PerfectMatch - Modern Responsive Blog & FAQ Styling
   ========================================================================== */

/* Variables */
:root {
    --blog-primary: #1e3c72;
    --blog-secondary: #2a5298;
    --blog-accent: #e63946;
    --blog-accent-light: #fff0f3;
    --blog-dark: #0f172a;
    --blog-gray-bg: #f8fafc;
    --blog-card-border: rgba(226, 232, 240, 0.85);
    --blog-shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
    --blog-shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
    --blog-shadow-hover: 0 20px 35px rgba(30, 60, 114, 0.15);
    --blog-radius: 16px;
}

/* Base Body & Container Adjustments */
.blog-page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #133161 0%, #1e3c72 50%, #2a5298 100%);
    color: #ffffff;
    padding: clamp(35px, 6vw, 65px) 15px clamp(30px, 5vw, 55px);
    border-radius: 0 0 clamp(16px, 3vw, 32px) clamp(16px, 3vw, 32px);
    position: relative;
    overflow: hidden;
    margin-top: -1.5rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.75rem);
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: min(500px, 90vw);
    height: min(500px, 90vw);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
    margin-bottom: 0.85rem;
}

.blog-hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.blog-hero-subtitle {
    font-size: clamp(0.92rem, 2.2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 650px;
    margin: 0 auto 1.5rem;
    line-height: 1.55;
    padding: 0 10px;
}

/* Search Box Responsive */
.blog-search-box {
    max-width: 580px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-search-box input {
    border: none;
    outline: none;
    padding: 9px 16px;
    flex: 1;
    font-size: 0.92rem;
    border-radius: 50px;
    min-width: 0;
}

.blog-search-box .btn-search {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 9px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.blog-search-box .btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.35);
}

/* Category Filter Chips */
.blog-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 1.25rem;
    padding: 0 5px;
}

.blog-cat-pill {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.blog-cat-pill:hover,
.blog-cat-pill.active {
    background: #ffffff;
    color: #1e3c72;
    font-weight: 700;
    transform: translateY(-2px);
}

/* Featured Blog Post Spotlight */
.featured-blog-card {
    background: #ffffff;
    border-radius: var(--blog-radius);
    border: 1px solid var(--blog-card-border);
    box-shadow: var(--blog-shadow-md);
    overflow: hidden;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--blog-shadow-hover);
}

.featured-blog-image {
    width: 100%;
    height: 100%;
    min-height: 240px;
    max-height: 380px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.featured-blog-card:hover .featured-blog-image {
    transform: scale(1.02);
}

.featured-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, #e63946 0%, #d63384 100%);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.35);
    z-index: 2;
}

/* Standard Blog Card Grid */
.blog-card {
    background: #ffffff;
    border-radius: var(--blog-radius);
    border: 1px solid var(--blog-card-border);
    box-shadow: var(--blog-shadow-sm);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--blog-shadow-hover);
    border-color: rgba(30, 60, 114, 0.25);
}

.blog-card-thumb-wrap {
    position: relative;
    overflow: hidden;
    height: clamp(170px, 25vw, 210px);
    background: #eef2f7;
}

.blog-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-thumb {
    transform: scale(1.05);
}

.blog-card-category {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(30, 60, 114, 0.88);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.blog-card-body {
    padding: clamp(1rem, 2.5vw, 1.35rem);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0.6rem;
}

.blog-card-title {
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    font-weight: 700;
    line-height: 1.38;
    color: #0f172a;
    margin-bottom: 0.6rem;
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-word;
}

.blog-card-title:hover {
    color: #1e3c72;
}

.blog-card-excerpt {
    font-size: 0.86rem;
    color: #475569;
    line-height: 1.58;
    margin-bottom: 0.85rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
    color: #64748b;
}

.blog-author-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 0.82rem;
}

.blog-read-more-btn {
    color: #1e3c72;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    transition: gap 0.2s ease;
}

.blog-read-more-btn:hover {
    gap: 8px;
    color: #e63946;
}

/* Sidebar Widgets */
.blog-widget {
    background: #ffffff;
    border-radius: var(--blog-radius);
    border: 1px solid var(--blog-card-border);
    box-shadow: var(--blog-shadow-sm);
    padding: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 1.5rem;
}

.blog-widget-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 1.15rem;
}

.blog-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 38px;
    height: 3px;
    background: linear-gradient(90deg, #1e3c72, #e63946);
    border-radius: 2px;
}

.blog-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.88rem;
}

.blog-category-item:last-child {
    border-bottom: none;
}

.blog-category-item a {
    color: #334155;
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-word;
}

.blog-category-item a:hover {
    color: #1e3c72;
    font-weight: 600;
}

.blog-category-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.recent-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1e293b;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    word-break: break-word;
}

.recent-post-title:hover {
    color: #1e3c72;
}

.recent-post-date {
    font-size: 0.74rem;
    color: #94a3b8;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-cloud-item {
    background: #f1f5f9;
    color: #475569;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.2s ease;
    word-break: break-word;
}

.tag-cloud-item:hover {
    background: #1e3c72;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Matchmaking CTA Card */
.blog-cta-widget {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    border-radius: var(--blog-radius);
    padding: clamp(1.4rem, 3vw, 1.8rem) clamp(1.2rem, 3vw, 1.5rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-cta-widget h5 {
    font-weight: 800;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    margin-bottom: 0.5rem;
}

.blog-cta-widget p {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.blog-cta-btn {
    background: #ffffff;
    color: #1e3c72;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    font-size: 0.88rem;
}

.blog-cta-btn:hover {
    background: #e63946;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Blog Details Page Styling
   ========================================================================== */

.article-header {
    margin-bottom: 1.75rem;
}

.article-breadcrumbs {
    font-size: 0.82rem;
    margin-bottom: 1rem;
    color: #64748b;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
}

.article-breadcrumbs a {
    color: #1e3c72;
    text-decoration: none;
}

.article-title {
    font-size: clamp(1.6rem, 4vw, 2.45rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.28;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
}

.article-featured-image-wrap {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
    border-radius: clamp(12px, 2vw, 18px);
    overflow: hidden;
    box-shadow: var(--blog-shadow-md);
    background: #eef2f7;
}

.article-featured-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Article Body Typography */
.article-content {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.82;
    color: #334155;
    margin-bottom: 2.5rem;
    word-break: break-word;
}

.article-content h2 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
}

.article-content h3 {
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 700;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.65rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.35rem;
    padding-left: 1.35rem;
}

.article-content li {
    margin-bottom: 0.45rem;
}

.article-content blockquote {
    border-left: 4px solid #1e3c72;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #1e293b;
    margin: 1.5rem 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.25rem 0;
    box-shadow: var(--blog-shadow-sm);
}

/* Social Share Bar */
.social-share-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2.25rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-share {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.2s ease;
    font-size: 1rem;
    touch-action: manipulation;
}

.btn-share:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-share.whatsapp { background: #25d366; }
.btn-share.facebook { background: #1877f2; }
.btn-share.twitter { background: #000000; }
.btn-share.linkedin { background: #0a66c2; }
.btn-share.copy { background: #64748b; }

/* ==========================================================================
   Interactive FAQ Section Styling (Fully Responsive)
   ========================================================================== */

.faq-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: clamp(14px, 2.5vw, 20px);
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
    margin-bottom: 2.5rem;
    box-shadow: var(--blog-shadow-sm);
}

.faq-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.35rem;
}

.faq-icon-badge {
    width: clamp(38px, 5vw, 44px);
    height: clamp(38px, 5vw, 44px);
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    flex-shrink: 0;
}

.faq-header-text h3 {
    font-size: clamp(1.2rem, 3vw, 1.45rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.faq-header-text p {
    margin: 0;
    font-size: 0.84rem;
    color: #64748b;
}

.faq-accordion .accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px !important;
    margin-bottom: 10px;
    overflow: hidden;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.faq-accordion .accordion-item:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.faq-accordion .accordion-button {
    background: transparent;
    font-size: clamp(0.92rem, 2vw, 1.02rem);
    font-weight: 700;
    color: #1e293b;
    padding: 1rem 1.15rem;
    box-shadow: none;
    text-align: left;
    gap: 8px;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: #f1f5f9;
    color: #1e3c72;
    border-bottom: 1px solid #e2e8f0;
}

.faq-accordion .accordion-body {
    padding: 1.15rem;
    font-size: 0.94rem;
    line-height: 1.72;
    color: #475569;
    background: #ffffff;
    word-break: break-word;
}

/* ==========================================================================
   Media Queries for Granular Responsive Tuning
   ========================================================================== */

/* Small Devices (Phones under 576px) */
@media (max-width: 575.98px) {
    .blog-search-box {
        padding: 4px;
    }

    .blog-search-box input {
        padding: 8px 12px;
        font-size: 0.88rem;
    }

    .blog-search-box .btn-search {
        padding: 8px 15px;
        font-size: 0.84rem;
    }

    .featured-blog-image {
        min-height: 200px;
    }

    .blog-card-thumb-wrap {
        height: 170px;
    }

    .social-share-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Medium Devices (Tablets under 992px) */
@media (max-width: 991.98px) {
    .featured-blog-card .row {
        flex-direction: column;
    }

    .featured-blog-image {
        height: 260px;
    }
}
