/* ==========================================================================
   Main Body Block Layout (main.css)
   ========================================================================== */

/* Container constraints for readable text length */
.main-content-wrapper {
    width: 100%;
    background-color: #fcfcfc;
    padding: 40px 20px;
    box-sizing: border-box;
}

.single-post-container {
    max-width: 850px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* ==========================================
   Post Header
   ========================================== */
.post-header {
    padding: 40px 40px 25px 40px;
}

.post-title {
    font-size: 32px;
    font-weight: 700;
    color: #111111;
    line-height: 1.3;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    color: #777777;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================
   Main Featured Photo
   ========================================== */
.post-featured-media {
    width: 100%;
    margin: 0;
}

.post-featured-media img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    display: block;
}

.post-featured-media figcaption {
    padding: 12px 40px;
    font-size: 13px;
    color: #666666;
    font-style: italic;
    background-color: #fafafa;
    border-bottom: 1px solid #eeeeee;
}

/* ==========================================
   News Content (Typography)
   ========================================== */
.post-content {
    padding: 35px 40px;
    font-size: 17px;
    line-height: 1.7;
    color: #333333;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 4px solid #fbbb22; /* Matches the brand yellow from previous designs */
    background-color: #f9f9f9;
    font-style: italic;
    font-size: 19px;
    color: #222222;
}

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

/* ==========================================
   Photo Gallery Grid
   ========================================== */
.post-gallery-section {
    padding: 0 40px 50px 40px;
}

.gallery-title {
    font-size: 22px;
    color: #111111;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #df3644; /* Brand Red */
    display: inline-block;
}

.gallery-grid {
    display: grid;
    /* Auto-filling grid: minimum width 200px per photo, expanding to fill space */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.gallery-item {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* ==========================================
   Lightbox Modal
   ========================================== */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #df3644;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
/* ==========================================
   Mobile Adjustments
   ========================================== */
@media (max-width: 768px) {
    .main-content-wrapper {
        padding: 20px 10px;
    }
    
    .post-header, .post-content, .post-gallery-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .post-header {
        padding-top: 25px;
    }
    
    .post-featured-media figcaption {
        padding: 10px 20px;
    }

    .post-title {
        font-size: 26px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}