/**
 * Aim Education Consultancy - Modern Blog & Single Post Styling
 */

/* ==========================================================
   Blog Header: Sticky at the top; Turns Stuck Color on Scroll
   ========================================================== */
.blog-site-header {
    background-color: #0b1329;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    -webkit-transition: background-color 200ms linear, box-shadow 200ms linear;
    transition: background-color 200ms linear, box-shadow 200ms linear;
}

.blog-site-header .menu {
    position: relative;
    margin-top: 0;
    margin-bottom: 0;
    background: transparent;
    display: block;
}

.blog-site-header .logo {
    margin-top: 14px;
    margin-bottom: 12px;
}

.blog-site-header .logo img {
    max-height: 44px;
    width: auto;
}

.blog-site-header .navbar-nav {
    margin: 0;
}

.blog-site-header .navbar.navbar-inverse.navbar-static-top {
    margin: 0;
    background: transparent;
    border: none;
}

.blog-site-header .navbar.navbar-inverse.navbar-static-top a {
    color: #e2e8f0;
    padding: 24px 13px;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.blog-site-header .navbar.navbar-inverse.navbar-static-top a:hover {
    color: #f5d76e;
    background: transparent;
    border-bottom: 2px solid #f5d76e;
}

.blog-site-header #menu-blog a {
    color: #f5d76e;
    border-bottom: 2px solid #f5d76e;
}

.blog-site-header .navbar-inverse .navbar-toggle .icon-bar {
    background-color: #ffffff;
}

.blog-site-header .navbar-toggle {
    border-color: rgba(255, 255, 255, 0.2);
    margin-top: 15px;
    margin-bottom: 15px;
}

/* ==========================================================
   STUCK MENU STATE (Exact Match with main site index.php)
   When scrolling down: Gold Yellow #f5d76e with Black text & Black active/hover pill
   ========================================================== */
.blog-site-header.isStuck {
    background-color: #f5d76e !important;
    background: #f5d76e !important;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2) !important;
}

.blog-site-header.isStuck .navbar.navbar-inverse.navbar-static-top a {
    color: #000000 !important;
    padding: 22px 13px;
    border-bottom: none !important;
}

.blog-site-header.isStuck .navbar.navbar-inverse.navbar-static-top a:hover {
    color: #ffffff !important;
    background-color: #000000 !important;
    border: none !important;
    border-radius: 4px;
}

.blog-site-header.isStuck #menu-blog a {
    color: #ffffff !important;
    background-color: #000000 !important;
    border: none !important;
    border-radius: 4px;
}

.blog-site-header.isStuck .navbar-inverse .navbar-toggle .icon-bar {
    background-color: #000000 !important;
}

.blog-site-header.isStuck .navbar-toggle {
    border-color: rgba(0, 0, 0, 0.3) !important;
}

.blog-site-header.isStuck .navbar-toggle:hover,
.blog-site-header.isStuck .navbar-toggle:focus {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================
   Hero Banner & Breadcrumb (Comes just below the header)
   ========================================================== */
.blog-hero {
    background: linear-gradient(135deg, #0c2444 0%, #174276 50%, #0099cc 100%);
    color: #ffffff;
    padding: 48px 0 42px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../images/blue-pattern.jpg') repeat;
    opacity: 0.08;
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
}

.blog-breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.blog-breadcrumb li + li::before {
    content: "/";
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.5);
}

.blog-breadcrumb a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-breadcrumb a:hover {
    color: #f5d76e;
}

.blog-hero-title-text {
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
}

@media (max-width: 767px) {
    .blog-hero-title-text {
        font-size: 22px;
    }
}

.blog-hero p.lead {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 800px;
    line-height: 1.6;
}

/* ==========================================================
   Blog Listing Layout & Grid
   ========================================================== */
.blog-section {
    padding: 60px 0 80px;
    background-color: #f8fafc;
}

/* Category Filter Bar */
.blog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
    align-items: center;
}

.blog-filter-chip {
    display: inline-block;
    padding: 8px 18px;
    background: #ffffff;
    color: #475569;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}

.blog-filter-chip:hover {
    background: #0099cc;
    color: #ffffff !important;
    border-color: #0099cc;
    transform: translateY(-1px);
}

.blog-filter-chip.active {
    background: #0099cc;
    color: #ffffff !important;
    border-color: #0099cc;
    box-shadow: 0 4px 12px rgba(0, 153, 204, 0.25);
}

/* Blog Cards */
.blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    height: calc(100% - 30px);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.blog-card-media {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.blog-card-media a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.blog-card-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Full image fits box without cutting/cropping text or edges */
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-media img {
    transform: scale(1.03);
}

.blog-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #0099cc;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 12px;
}

.blog-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-card-meta i {
    color: #0099cc;
}

.blog-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: #1e293b;
    font-family: 'Montserrat', sans-serif;
}

.blog-card-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: #0099cc;
}

.blog-card-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.blog-read-more {
    font-size: 13.5px;
    font-weight: 700;
    color: #0099cc;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.blog-read-more:hover {
    color: #0a6b8f;
    gap: 10px;
}

.blog-read-time {
    font-size: 12px;
    color: #94a3b8;
}

/* Pagination */
.blog-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-pagination a:hover {
    background: #0099cc;
    color: #ffffff;
    border-color: #0099cc;
}

.blog-pagination .current {
    background: #0099cc;
    color: #ffffff;
    border-color: #0099cc;
}

/* ==========================================================
   Single Blog Post Detail Page
   ========================================================== */
.blog-detail-article {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    margin-bottom: 40px;
}

@media (max-width: 767px) {
    .blog-detail-article {
        padding: 24px 18px;
    }
}

.blog-detail-header {
    margin-bottom: 28px;
}

.blog-detail-category {
    display: inline-block;
    background: rgba(0, 153, 204, 0.1);
    color: #0099cc;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.blog-detail-title {
    font-size: 34px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 18px 0;
    font-family: 'Montserrat', sans-serif;
}

@media (max-width: 767px) {
    .blog-detail-title {
        font-size: 24px;
    }
}

.blog-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13.5px;
    color: #64748b;
}

.blog-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.blog-detail-meta i {
    color: #0099cc;
}

.blog-detail-featured-img {
    margin: 25px 0 35px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.blog-detail-featured-img img {
    max-width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain; /* Full banner displayed properly without cutting any text/graphics */
    display: block;
    border-radius: 6px;
    margin: 0 auto;
}

/* Rich Content Body & Typography */
.blog-content-body {
    font-size: 16px;
    line-height: 1.85;
    color: #334155;
}

.blog-content-body p {
    margin-bottom: 22px;
}

.blog-content-body h1,
.blog-content-body h2,
.blog-content-body h3,
.blog-content-body h4 {
    color: #0f172a;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-top: 35px;
    margin-bottom: 16px;
    line-height: 1.35;
}

.blog-content-body h2 {
    font-size: 26px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.blog-content-body h3 {
    font-size: 21px;
    color: #0099cc;
}

.blog-content-body h4 {
    font-size: 18px;
}

.blog-content-body a {
    color: #0099cc;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s;
}

.blog-content-body a:hover {
    color: #0c4a6e;
}

/* Pointers / Lists */
.blog-content-body ul,
.blog-content-body ol {
    margin: 0 0 25px 20px;
    padding: 0;
}

.blog-content-body ul {
    list-style-type: none;
    margin-left: 0;
}

.blog-content-body ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    line-height: 1.7;
}

.blog-content-body ul li::before {
    content: "\f00c"; /* FontAwesome check or pointer */
    font-family: "FontAwesome";
    position: absolute;
    left: 0;
    top: 2px;
    color: #0099cc;
    font-size: 13px;
}

.blog-content-body ol {
    list-style-type: decimal;
    padding-left: 20px;
}

.blog-content-body ol li {
    margin-bottom: 10px;
    padding-left: 6px;
}

.blog-content-body blockquote {
    border-left: 4px solid #0099cc;
    background: #f0f9ff;
    padding: 20px 24px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #0369a1;
    font-size: 16.5px;
}

.blog-content-body blockquote p:last-child {
    margin-bottom: 0;
}

.blog-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.blog-content-body table {
    width: 100%;
    margin: 25px 0;
    border-collapse: collapse;
}

.blog-content-body table th,
.blog-content-body table td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    font-size: 14.5px;
}

.blog-content-body table th {
    background-color: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
}

.blog-content-body table tr:nth-child(even) {
    background-color: #f8fafc;
}

/* Social Share Bar */
.blog-share-bar {
    margin: 40px 0 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid #e2e8f0;
}

.blog-share-label {
    font-weight: 700;
    color: #334155;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.share-btn.whatsapp { background-color: #25d366; }
.share-btn.facebook { background-color: #1877f2; }
.share-btn.twitter { background-color: #000000; }
.share-btn.linkedin { background-color: #0a66c2; }
.share-btn.copy { background-color: #475569; cursor: pointer; border: none; }

/* Author Box */
.blog-author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    margin: 35px 0;
}

.blog-author-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #0099cc;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.blog-author-info h4 {
    margin: 0 0 5px 0;
    font-size: 17px;
    color: #0f172a;
    font-weight: 700;
}

.blog-author-info p {
    margin: 0;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
}

/* Post Navigation (Prev/Next) */
.blog-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.blog-nav-item {
    flex: 1;
    text-decoration: none !important;
    padding: 16px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.blog-nav-item:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.blog-nav-item.next {
    text-align: right;
}

.blog-nav-label {
    font-size: 11.5px;
    text-transform: uppercase;
    font-weight: 700;
    color: #0099cc;
    display: block;
    margin-bottom: 4px;
}

.blog-nav-title {
    font-size: 14.5px;
    font-weight: 600;
    color: #1e293b;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================
   Sidebar Widgets
   ========================================================== */
.blog-sidebar {
    position: sticky;
    top: 90px;
}

.blog-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 26px;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.blog-widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 18px 0;
    position: relative;
    padding-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.blog-widget-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #0099cc;
    border-radius: 2px;
}

/* Search widget */
.blog-search-form {
    position: relative;
}

.blog-search-form input {
    width: 100%;
    padding: 12px 42px 12px 16px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.blog-search-form input:focus {
    border-color: #0099cc;
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.15);
}

.blog-search-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 36px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
}

.blog-search-form button:hover {
    color: #0099cc;
}

/* Categories widget */
.blog-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-category-list li {
    border-bottom: 1px solid #f1f5f9;
}

.blog-category-list li:last-child {
    border-bottom: none;
}

.blog-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s, padding-left 0.2s;
}

.blog-category-list a:hover {
    color: #0099cc;
    padding-left: 5px;
}

.blog-category-count {
    background: #f1f5f9;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Recent posts widget */
.blog-recent-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    align-items: center;
}

.blog-recent-item:last-child {
    margin-bottom: 0;
}

.blog-recent-thumb {
    width: 72px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.blog-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-recent-details h5 {
    margin: 0 0 5px 0;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-recent-details h5 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-recent-details h5 a:hover {
    color: #0099cc;
}

.blog-recent-date {
    font-size: 11.5px;
    color: #94a3b8;
}

/* CTA Widget */
.blog-widget-cta {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
}

.blog-widget-cta .blog-widget-title {
    color: #ffffff;
}

.blog-widget-cta .blog-widget-title::after {
    background: #f5d76e;
}

.blog-widget-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.blog-widget-cta .btn-cta {
    display: inline-block;
    width: 100%;
    background: #f5d76e;
    color: #0f172a;
    font-weight: 700;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: transform 0.2s, background-color 0.2s;
}

.blog-widget-cta .btn-cta:hover {
    background: #f3ce48;
    transform: translateY(-2px);
}

