/* ==========================================================================
   Blog Pages Dedicated Stylesheet
   Path: /css/blog.css
   Used exclusively by /WEB-INF/thymeleaf/fragments/sale/inc/blog-head.html
   ========================================================================== */

/* Overflow & Mobile Viewport Protection */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* Base Blog Layout & Container Styles */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* Blog Headers & Titles */
.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
    word-wrap: break-word;
}

.blog-subtitle {
    font-size: 1.25rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

/* Blog Content & Typography */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333333;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Blog Media & Images */
.blog-image-wrapper {
    margin: 2rem 0;
    text-align: center;
}

.blog-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-image-caption {
    font-size: 0.9rem;
    color: #666666;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Blog Card Grids */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    width: 100%;
}

.blog-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Responsive Overrides for Blog Pages */
@media (max-width: 768px) {
    .blog-title {
        font-size: 1.8rem;
    }
    
    .blog-content {
        font-size: 1rem;
        line-height: 1.6;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
}
