/*** BLOG STYLES (AWD - same structure as BSID blog.css, Aggieland palette) **/

.blogContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 20px;
    margin-bottom: 20px;
    clear:both;
}

.blogContainer table {
    width: 100%;
    flex: 0 0 100%;
}

a:link.readmore,
a:visited.readmore {
    color: var(--coral);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover.readmore {
    color: var(--maroon);
    text-decoration: none;
}

a:active.readmore {
    color: var(--maroon);
}

.blogItem {
    flex: 1 1 calc(32.333% - 1.34rem);
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 0;
    color: var(--ink);
}

.blogItem:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.blogItem img {
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    object-position: top center;
    display: block;
    margin: 0;
    border-radius: 0;
    flex-shrink: 0;
}

/* posts without a photo get a solid block so the card layout holds */
.blogItem .noImg {
    width: 100%;
    height: 240px;
    background: var(--maroon-deep);
    flex-shrink: 0;
}

.blogContainer h2,
.blogItem h2 {
    text-align: center;
    background: var(--maroon);
    color:#fff;
    min-height:100px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    padding:10px;
}

.blogItem p {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.25;
    padding: 0 1.25rem;
}

p.blogListingDate {
    color: var(--gray);
    font-size: 0.85rem;
    text-align: left;
    padding: 0 1.25rem;
    margin-bottom: 0.85rem;
}

p.author {
    color: var(--gray);
    text-align: center;
    font-size: 0.85rem;
    padding: 0 1.25rem;
    margin-bottom: 1rem;
}

/* Read More Link */
.blogItem .readmore {
    margin-top: auto;
    display: inline-block;
    padding-left:2px;
    font-weight:bold;
}

.blogItem p:not(.blogListingDate):not(.author) {
    position: relative;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    margin-bottom: 1rem;
}

.blogItem p:not(.blogListingDate):not(.author)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2em;
    background: linear-gradient(
        to bottom,
        rgba(246,246,246,0),
        rgba(246,246,246,1)
    );
    pointer-events: none;
}

/* Tablet Layout */
@media (max-width: 1000px) {
    .blogItem {
        flex: 1 1 calc(50% - 1rem);
    }
}

/* Mobile Layout */
@media (max-width: 600px) {
    .blogItem {
        flex: 1 1 100%;
    }

    .blogItem img {
        height: 240px !important;
    }
}
/*** BLOG DETAILS ADDITIONAL IMAGES STYLES**/

#blogGallery {
  display: block;
  margin: auto;
  width: 100%;
  text-align: center;
}

.blogGalleryContainer {
  display: inline-block;
  margin: 0 7px 15px; /* Balanced spacing between containers */
  padding: 4px;
  text-align: center;
  border-radius: 2px;
  vertical-align: top;
	word-wrap: break-word;
	max-width:300px;
	font-size:14px;
}

.blogGalleryContainer img {
  display: block; /* Changed to block for better control within container */
  width:100%;
  max-width: 300px;
  height: 250px; /* Fixed height to ensure all images are the same size */
  object-fit: cover; /* Crops the image to fit the fixed dimensions without distortion */
  border: 1px solid #ccc;
  padding: 5px;
  background: #f2f2f2;
  -webkit-box-shadow: 0 28px 16px -26px rgba(0, 0, 0, 0.5);
  -moz-box-shadow: 0 28px 16px -26px rgba(0, 0, 0, 0.5);
  box-shadow: 0 28px 16px -26px rgba(0, 0, 0, 0.5);
}


.blog-post { max-width: 1200px; margin: 0 auto; padding: 40px 20px 40px; }
.blog-breadcrumb { font-size: 0.9rem; color: var(--gray); margin-bottom: 1rem; }
.blog-breadcrumb a { color: var(--coral); text-decoration: none; }
.blog-post h1 { font-size: 2rem; line-height: 1.15; color: var(--ink); margin: 0 0 0.6rem; }
.blog-byline { color: var(--gray); font-size: 0.95rem; margin: 0 0 1.2rem; }
.blog-byline time { white-space: nowrap; }
.blog-share { margin: 0 0 1.5rem; }
.blog-hero-img { margin: 0 0 1.5rem; }
.blog-hero-img img { width: 100%; max-width:600px; height: auto; border-radius: 8px; display: block; margin:auto; text-align:center}
.blog-content { line-height: 1.7; color: var(--ink); font-size: 1.08rem; margin: 1.5rem 0; }
.blog-content p { margin: 0 0 1.2rem; }
.blog-content img { max-width: 100%; height: auto; }
.blog-gallery { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 1.5rem 0; }
.blog-gallery img { max-width: 280px; height: auto; border-radius: 6px; }
.blog-backlink { margin-top: 2rem; text-align: center; }

/* Paging bar (listing page) */
.blogPaging { text-align: center; margin: 10px 0 6px; clear: both; }
.blogPaging .paging {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--coral);
    text-decoration: none !important;
    font-family: var(--font-head);
    transition: all .2s ease;
}
.blogPaging a.paging:hover { border-color: var(--coral); background: var(--cream); }
.blogPaging .paging.current { background: var(--maroon); color: #fff; border-color: var(--maroon); }
