/* ==========================================================================
   MICKEY GURU - AGENT BLOG CORE ENGINE STYLES (agent-blog.css)
   ========================================================================== */

/* Text Formatting & Rich Content Support (CKEditor) */
.blog-bio-text-area { 
    overflow-wrap: break-word; 
    word-wrap: break-word; 
    font-size: 1.1rem;
    line-height: 1.7; 
    color: #333;
}

.blog-bio-text-area p {
    margin-bottom: 1.5rem; 
}

.blog-bio-text-area h1,
.blog-bio-text-area h2,
.blog-bio-text-area h3,
.blog-bio-text-area h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #222;
    font-weight: 700;
    line-height: 1.3;
}

.blog-bio-text-area ul,
.blog-bio-text-area ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.blog-bio-text-area li {
    margin-bottom: 0.5rem;
}

.blog-bio-text-area a {
    color: #5bbed2;
    text-decoration: underline;
}

.blog-bio-text-area blockquote {
    border-left: 4px solid #5bbed2;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

/* Photo Gallery Grid & Captions */
.blog-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Enforce strictly 3 wide */
    gap: 1.5rem;
}

/* Mobile responsiveness for the 3-wide grid */
@media (max-width: 900px) {
    .blog-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.blog-gallery-item {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.blog-gallery-grid img {
    width: 100%;
    height: auto; /* Display in original aspect ratio */
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.blog-gallery-grid img:hover {
    transform: scale(1.02);
}

.blog-photo-caption {
    margin-top: 0.5rem;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Pagination Component Framework */
.blog-sidebar-pagination-row { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px; 
    margin-top: 2.5rem; 
    width: 100%; 
}

.blog-page-nav-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    min-width: 36px; 
    height: 36px; 
    padding: 0 6px; 
    font-size: 0.95rem; 
    font-weight: 700; 
    text-decoration: none; 
    color: #333; 
    border: 1px solid #eaeaea; 
    border-radius: 6px; 
    background: #ffffff; 
    transition: all 0.2s ease; 
}

.blog-page-nav-btn:hover { 
    border-color: #5bbed2; 
    color: #5bbed2; 
}

.blog-page-nav-btn.is-active-page { 
    background-color: #5bbed2; 
    color: #ffffff; 
    border-color: #5bbed2; 
    pointer-events: none; 
}

/* Blog History Grid */
.blog-history-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.blog-history-grid .memory-card {
    flex: 1 1 300px;
    max-width: 400px; 
    width: 100%;
}

/* ==========================================================================
   THREE-COLUMN STRUCTURAL FLEXBOX HEADER SYSTEM
   ========================================================================== */
.mg-blog-header-section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.mg-blog-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.mg-blog-avatar-box {
    flex: 0 0 150px;
    text-align: left;
}

.mg-blog-avatar-box img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.mg-blog-title-center-box {
    flex: 1;
    text-align: center;
}

.mg-blog-title-center-box h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.mg-blog-title-center-box .mg-profile-title {
    margin-bottom: 0;
    font-size: 1.1rem;
    color: #555;
}

.mg-blog-logo-box {
    flex: 0 0 150px;
    text-align: right;
}

.mg-blog-logo-box img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: block;
    margin-left: auto;
}

/* Screen Scaling Adjustment for Compact Interfaces */
@media (max-width: 768px) {
    .mg-blog-header-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .mg-blog-avatar-box, .mg-blog-logo-box {
        flex: unset;
        text-align: center;
    }
    .mg-blog-logo-box img {
        margin: 0 auto;
    }
    .mg-blog-title-center-box h1 {
        font-size: 2.5rem;
    }
}