/*
 * Content Layout Improvements for GWT Theme
 * This file ONLY improves content organization and layout
 * Does NOT change the GWT theme design or colors
 */

/* ========================================
   HOMEPAGE CONTENT ORGANIZATION
   ======================================== */

/* Better spacing for main content area */
.container-main {
    padding: 30px 0;
}

/* Post boxes - better spacing and organization */
.post-box {
    margin-bottom: 30px;
}

.post-box article {
    padding: 25px;
}

/* ========================================
   IMAGE AND TEXT LAYOUT
   ======================================== */

/* Featured images - better positioning */
.post-box .thumbnail {
    float: left;
    margin-right: 20px;
    margin-bottom: 15px;
    max-width: 250px;
    height: auto;
}

/* Entry wrapper - better text flow around images */
.post-box .entry-wrapper {
    overflow: hidden;
}

/* Entry title - better spacing */
.entry-title {
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Entry content - better readability */
.entry-content {
    margin-top: 15px;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 15px;
}

/* Entry meta - better positioning */
.entry-meta {
    margin-bottom: 12px;
    font-size: 14px;
}

/* ========================================
   RESPONSIVE IMAGE HANDLING
   ======================================== */

/* Make sure images don't overflow */
.entry-content img,
.entry-summary img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
}

/* Images with alignment classes */
.entry-content img.alignleft,
.entry-summary img.alignleft {
    float: left;
    margin: 5px 20px 15px 0;
}

.entry-content img.alignright,
.entry-summary img.alignright {
    float: right;
    margin: 5px 0 15px 20px;
}

.entry-content img.aligncenter,
.entry-summary img.aligncenter {
    display: block;
    margin: 15px auto;
}

/* ========================================
   SIDEBAR ORGANIZATION
   ======================================== */

/* Better widget spacing */
.widget {
    margin-bottom: 25px;
}

.widget-title {
    margin-bottom: 15px;
}

.widget ul {
    margin-left: 0;
}

.widget ul li {
    margin-bottom: 8px;
}

/* ========================================
   CONTENT READABILITY
   ======================================== */

/* Better paragraph spacing */
#content p {
    margin-bottom: 15px;
}

/* Better list spacing */
#content ul,
#content ol {
    margin-bottom: 15px;
    margin-left: 25px;
}

#content ul li,
#content ol li {
    margin-bottom: 8px;
}

/* Better heading spacing */
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
    margin-top: 25px;
    margin-bottom: 15px;
    line-height: 1.3;
}

#content h1:first-child,
#content h2:first-child,
#content h3:first-child {
    margin-top: 0;
}

/* ========================================
   PANEL CONTENT ORGANIZATION
   ======================================== */

/* Top and bottom panels - better spacing */
#panel-top,
#panel-bottom {
    padding: 30px 0;
}

#panel-top .widget,
#panel-bottom .widget {
    margin-bottom: 20px;
}

/* ========================================
   MOBILE RESPONSIVE LAYOUT
   ======================================== */

@media screen and (max-width: 768px) {
    /* Stack images on mobile */
    .post-box .thumbnail {
        float: none;
        margin: 0 auto 15px;
        display: block;
        max-width: 100%;
    }
    
    /* Full width content on mobile */
    .post-box .entry-wrapper {
        width: 100% !important;
    }
    
    /* Better mobile spacing */
    .post-box article {
        padding: 15px;
    }
    
    /* Mobile image alignment */
    .entry-content img.alignleft,
    .entry-content img.alignright {
        float: none;
        margin: 15px auto;
        display: block;
    }
}

/* ========================================
   CLEARFIX FOR FLOATED ELEMENTS
   ======================================== */

.post-box article:after,
.entry-content:after,
.entry-summary:after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   BETTER SPACING BETWEEN SECTIONS
   ======================================== */

/* Space between posts */
.post-box + .post-box {
    margin-top: 20px;
}

/* Space for pagination */
.navigation {
    margin: 30px 0;
    clear: both;
}

/* ========================================
   EXCERPT IMPROVEMENTS
   ======================================== */

.entry-summary {
    margin-top: 15px;
}

.entry-summary p:last-child {
    margin-bottom: 0;
}

/* ========================================
   FOOTER ENTRY META
   ======================================== */

footer.entry-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ========================================
   CALLOUT BOX IMPROVEMENTS
   ======================================== */

.callout.secondary {
    overflow: hidden; /* Contain floated elements */
}

/* ========================================
   BETTER CONTENT FLOW
   ======================================== */

/* Ensure content flows nicely around images */
.entry-wrapper {
    display: block;
}

/* Better spacing for entry header */
.entry-header {
    margin-bottom: 15px;
}

/* ========================================
   THUMBNAIL IMPROVEMENTS
   ======================================== */

/* Better thumbnail display */
.post-box .thumbnail {
    border: 1px solid #e0e0e0;
    padding: 5px;
    background: #fff;
}

/* ========================================
   CONTENT WIDTH ADJUSTMENTS
   ======================================== */

/* Better content width when no sidebars */
#content.large-12 {
    max-width: 100%;
}

/* Better content width with sidebars */
#content.large-9,
#content.large-8 {
    padding-right: 20px;
}

/* ========================================
   SEARCH RESULTS LAYOUT
   ======================================== */

/* Better search results display */
.search-results .post-box {
    margin-bottom: 25px;
}

.search-results .entry-summary {
    margin-top: 10px;
}

/* ========================================
   ARCHIVE PAGE LAYOUT
   ======================================== */

/* Better archive page display */
.archive .post-box,
.blog .post-box {
    margin-bottom: 30px;
}

/* ========================================
   NO RESULTS PAGE
   ======================================== */

.no-results {
    padding: 30px;
    text-align: center;
}

/* ========================================
   BREADCRUMBS SPACING
   ======================================== */

.breadcrumbs {
    margin-bottom: 20px;
}

/* ========================================
   BETTER LINK SPACING IN CONTENT
   ======================================== */

.entry-content a,
.entry-summary a {
    word-wrap: break-word;
}

/* ========================================
   TABLE IMPROVEMENTS IN CONTENT
   ======================================== */

.entry-content table,
.entry-summary table {
    margin: 20px 0;
    width: 100%;
}

.entry-content table td,
.entry-content table th {
    padding: 10px;
}

/* ========================================
   BLOCKQUOTE IMPROVEMENTS
   ======================================== */

.entry-content blockquote,
.entry-summary blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    border-left: 4px solid #ccc;
}

/* ========================================
   CODE BLOCK IMPROVEMENTS
   ======================================== */

.entry-content pre,
.entry-summary pre {
    margin: 20px 0;
    padding: 15px;
    overflow-x: auto;
}

.entry-content code {
    padding: 2px 6px;
}
