/* ==========================================================================
   Pollster Education - Premium Blogs Layout (Grid & List Switcher)
   ========================================================================== */

/* ==========================================================================
   1. Immersive Hero Section (Matching Exams / Countries / Universities)
   ========================================================================== */
.pe-blog-hero {
    position: relative;
    min-height: 440px;
    background-color: var(--pe-primary, #0b1a30);
    overflow: hidden;
    padding-top: 2rem;
    padding-bottom: 4rem;
    color: #ffffff;
}

.pe-blog-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.03);
    transition: transform 6s ease;
    filter: brightness(0.62) contrast(1.05);
    z-index: 1;
}

.pe-blog-hero:hover .pe-blog-hero-bg {
    transform: scale(1.06);
}

.pe-blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(11, 26, 48, 0.40) 0%,
        rgba(11, 26, 48, 0.75) 60%,
        rgba(11, 26, 48, 0.88) 100%
    );
    z-index: 2;
}

.pe-blog-hero-container {
    position: relative;
    z-index: 3;
}

/* Breadcrumb Styling (Pill Badge) */
.pe-blog-breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.pe-blog-breadcrumb a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pe-blog-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.pe-blog-breadcrumb-sep {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
}

.pe-blog-breadcrumb-current {
    color: #ffffff;
    font-weight: 600;
}

/* Hero Badge */
.pe-blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    background: rgba(215, 95, 7, 0.22);
    border: 1px solid rgba(253, 186, 116, 0.4);
    color: #ffedd5;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.pe-blog-hero-badge i {
    color: #fb923c;
}

/* Hero Title & Lead */
.pe-blog-hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

@media (min-width: 992px) {
    .pe-blog-hero-title {
        font-size: 2.95rem;
    }
}

.pe-blog-hero-lead {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.90);
    max-width: 760px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Hero Key Metric Chips */
.pe-blog-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1040px;
    width: 100%;
}

.pe-blog-stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 0.85rem 1.15rem;
    min-width: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pe-blog-stat-card:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.28);
}

.pe-blog-stat-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pe-blog-stat-value {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    min-width: 0;
}

.pe-blog-stat-value i {
    color: #fb923c;
    font-size: 1.25rem;
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .pe-blog-stats-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 620px;
    }
}

@media (max-width: 575px) {
    .pe-blog-stats-bar {
        grid-template-columns: minmax(0, 1fr);
        max-width: 100%;
    }
}

/* View Switcher */
.pe-view-switcher-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.pe-view-switcher {
    background: #f1f5f9;
    padding: 4px;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
}

/* Hide Layout Switcher on Mobile View (< 768px) */
@media (max-width: 767.98px) {
    .pe-view-switcher-wrap,
    .pe-view-switcher {
        display: none !important;
    }
}
.pe-view-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.95rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.pe-view-btn.active {
    background: #f58634 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(245, 134, 52, 0.32);
}
.pe-view-btn:hover:not(.active) {
    color: #0f172a;
    background: #e2e8f0;
}

/* Blog Card Base */
.pe-blog-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.pe-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

/* Image Wrap */
.pe-blog-img-wrap {
    position: relative;
    overflow: hidden;
    background: #f8fafc;
    display: block;
}
.pe-blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.pe-blog-card:hover .pe-blog-img {
    transform: scale(1.06);
}
.pe-blog-date-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

/* Content Area */
.pe-blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.pe-blog-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #f58634;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
}
.pe-blog-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.4;
    color: #0f172a;
    margin-bottom: 0.75rem;
    letter-spacing: -0.2px;
}
.pe-blog-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}
.pe-blog-card:hover .pe-blog-title a {
    color: #f58634;
}
.pe-blog-desc {
    font-size: 0.92rem;
    line-height: 1.68;
    color: #64748b;
    margin-bottom: 1.25rem;
}
.pe-blog-footer {
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.pe-blog-read-more {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f58634;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease, color 0.2s ease;
}
.pe-blog-card:hover .pe-blog-read-more {
    color: #e07324;
    gap: 10px;
}

/* -------------------------------------------------------------------------
   GRID VIEW SPECIFICS
   ------------------------------------------------------------------------- */
#blogs-container.is-grid-view .pe-blog-col {
    flex: 0 0 auto;
    width: 50%;
}
@media (max-width: 991.98px) {
    #blogs-container.is-grid-view .pe-blog-col {
        width: 100%;
    }
}
#blogs-container.is-grid-view .pe-blog-img-wrap {
    height: 220px;
    border-radius: 16px 16px 0 0;
}
#blogs-container.is-grid-view .pe-blog-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2rem;
}
#blogs-container.is-grid-view .pe-blog-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* -------------------------------------------------------------------------
   LIST VIEW SPECIFICS (Horizontal card on desktop)
   ------------------------------------------------------------------------- */
#blogs-container.is-list-view .pe-blog-col {
    width: 100%;
}
#blogs-container.is-list-view .pe-blog-card {
    flex-direction: row;
    min-height: 240px;
}
#blogs-container.is-list-view .pe-blog-img-wrap {
    width: 320px;
    min-width: 320px;
    height: auto;
    border-radius: 16px 0 0 16px;
}
#blogs-container.is-list-view .pe-blog-card-body {
    padding: 1.75rem 2rem;
}
#blogs-container.is-list-view .pe-blog-title {
    font-size: 1.25rem;
}

@media (max-width: 767.98px) {
    #blogs-container.is-list-view .pe-blog-card {
        flex-direction: column;
    }
    #blogs-container.is-list-view .pe-blog-img-wrap {
        width: 100%;
        min-width: 100%;
        height: 200px;
        border-radius: 16px 16px 0 0;
    }
    #blogs-container.is-list-view .pe-blog-card-body {
        padding: 1.25rem;
    }
}

/* Sidebar Styling */
.pe-blog-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.5rem;
}
.pe-blog-sidebar-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}
.pe-blog-sidebar-desc {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    line-height: 1.55;
}
.pe-sidebar-topic-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 3px;
}
.pe-sidebar-topic-chip:hover {
    background: #f58634;
    border-color: #f58634;
    color: #ffffff;
}

/* ==========================================================================
   Blog Details Redesign (.pe-article-*)
   ========================================================================== */

/* Breadcrumb in Article */
.pe-article-breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: #f8fafc;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}
.pe-article-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.pe-article-breadcrumb a:hover {
    color: #f58634;
}
.pe-article-breadcrumb-sep {
    color: #cbd5e1;
    font-size: 0.75rem;
}
.pe-article-breadcrumb-current {
    color: #0f172a;
    font-weight: 600;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Article Header */
.pe-article-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    background: rgba(245, 134, 52, 0.12);
    border: 1px solid rgba(245, 134, 52, 0.3);
    color: #d75f07;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
.pe-article-title {
    font-size: clamp(1.85rem, 3.5vw, 2.65rem);
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 1.25rem;
}

/* Article Meta Bar */
.pe-article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 2rem;
}
.pe-article-author-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pe-article-author-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fed7aa;
}
.pe-article-author-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.pe-article-author-role {
    font-size: 0.78rem;
    color: #64748b;
}

.pe-article-meta-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.88rem;
    color: #64748b;
}
.pe-article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.pe-article-meta-item i {
    color: #f58634;
    font-size: 1.1rem;
}

/* Featured Image */
.pe-article-featured-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}
.pe-article-featured-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Article Body Typography */
.pe-article-body {
    font-size: 1.06rem;
    line-height: 1.8;
    color: #334155;
    word-break: break-word;
}
.pe-article-body h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}
.pe-article-body h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #f58634;
}
.pe-article-body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
}
.pe-article-body p {
    margin-bottom: 1.35rem;
    text-align: justify;
}
.pe-article-body ul, 
.pe-article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.pe-article-body li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}
.pe-article-body strong {
    color: #0f172a;
    font-weight: 700;
}
.pe-article-body a {
    color: #f58634;
    text-decoration: underline;
    font-weight: 600;
}
.pe-article-body a:hover {
    color: #b84e02;
}
.pe-article-body hr {
    border-color: #e2e8f0;
    margin: 2rem 0;
    opacity: 0.6;
}
.pe-article-body blockquote {
    border-left: 4px solid #f58634;
    background: #fff8f1;
    padding: 1.25rem 1.5rem;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #1e293b;
    margin: 1.75rem 0;
}

/* Article Share & Tags Section */
.pe-article-share-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}
.pe-share-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pe-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    text-decoration: none;
}
.pe-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}
.pe-share-btn.pe-share-wa:hover {
    background: #25d366;
    border-color: #25d366;
    color: #ffffff;
}
.pe-share-btn.pe-share-li:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: #ffffff;
}
.pe-share-btn.pe-share-fb:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: #ffffff;
}
.pe-share-btn.pe-share-copy:hover {
    background: #f58634;
    border-color: #f58634;
    color: #ffffff;
}

/* Author Trust Box */
.pe-article-author-card {
    background: linear-gradient(135deg, #0b1a30 0%, #172a4d 100%);
    color: #ffffff;
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 3rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}
.pe-article-author-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(245, 134, 52, 0.6);
    flex-shrink: 0;
}
.pe-article-author-card-content {
    flex: 1 1 260px;
}
.pe-article-author-card-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.25rem;
}
.pe-article-author-card-role {
    font-size: 0.85rem;
    color: #fed7aa;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.pe-article-author-card-desc {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.55;
    margin-bottom: 0;
}

/* Recent Posts Widget in Sidebar */
.pe-recent-blog-item {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.pe-recent-blog-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.pe-recent-blog-item:hover {
    transform: translateX(3px);
}
.pe-recent-blog-thumb {
    width: 72px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}
.pe-recent-blog-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.pe-recent-blog-item:hover .pe-recent-blog-title {
    color: #f58634;
}
.pe-recent-blog-date {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}
