/* =========================================
   1. GLOBAL LAYOUT & BACKGROUNDS
   ========================================= */

/* The vendored storefront CSS (iboxed-chrome.css) is written against
   Tailwind's preflight, which sets border-box globally — that reset is not
   part of the vendored file, so without this rule every width:100% + padding
   element overflows the mobile viewport by 2rem (the horizontal "jiggle"). */
*, *::before, *::after { box-sizing: border-box; }

/* Backstop: the page must never pan sideways. On html, not body — Chrome
   does not propagate body's clip to the viewport. */
html { overflow-x: clip; }

body {
	margin: 0;
	padding: 0;
	background-color: #f1f3f7;
}

main {
	background-color: #f1f3f7;
	min-height: calc(100vh - 200px);
	padding: 2rem 0;
}

.main-content-wrapper {
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* Responsive Widths */
@media (min-width: 640px) { .main-content-wrapper { max-width: 640px; padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 768px) { .main-content-wrapper { max-width: 768px; } }
@media (min-width: 1024px) { .main-content-wrapper { max-width: 1024px; } }
@media (min-width: 1280px) { .main-content-wrapper { max-width: 1280px; } }


/* =========================================
   2. BLOG LIST / HOMEPAGE GRID
   ========================================= */
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
	margin: 0;
}

/* Responsive Columns */
@media (max-width: 1023px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .post-grid { grid-template-columns: 1fr; } }

/* Post Card Styling */
.post-card {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s, box-shadow 0.2s;
	display: flex;
	flex-direction: column;
}

.post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-card__image {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.post-card:hover .post-card__image img {
	transform: scale(1.05);
}

.post-card__content {
	padding: 20px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.post-card__category {
	color: #f97316;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 10px;
}

.post-card__title {
	margin: 0 0 12px 0;
	font-size: 20px;
	line-height: 1.3;
}

.post-card__title a {
	color: #1a202c;
	text-decoration: none;
	transition: color 0.2s;
}

.post-card__title a:hover {
	color: #f97316;
}

.post-card__excerpt {
	color: #4a5568;
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 15px;
	flex-grow: 1;
}

.post-card__meta {
	color: #718096;
	font-size: 13px;
	margin-top: auto;
}


/* =========================================
   3. SINGLE POST LAYOUT (Article)
   ========================================= */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.5rem;
}
.breadcrumbs a {
    color: #E30613; /* iBoxed Red */
    text-decoration: none;
}
.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #ccc;
}
.breadcrumbs .current {
    color: #333;
    font-weight: 500;
}

/* Header & Meta */
.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.post-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2rem;
}
.post-meta span {
    margin-right: 15px;
}
.post-meta i {
    margin-right: 5px;
}

/* Hero Image */
.post-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
}


/* =========================================
   4. SINGLE POST CONTENT TYPOGRAPHY
   ========================================= */
.post-content {
  font-size: 1rem;
  line-height: 1.7;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.post-content li {
  margin-bottom: 0.25rem;
}

.post-content blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #4b5563;
  font-style: italic;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
}


/* =========================================
   5. FEATURE: LOCATION CONTEXT BOX
   ========================================= */
.location-context-box {
    background-color: #f8f9fa;
    border-left: 5px solid #E30613;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
}
.context-icon {
    font-size: 2rem;
    color: #E30613;
}
.context-text p {
    margin: 0;
    line-height: 1.5;
    font-size: 1.1rem;
    color: #333;
}
.context-text .highlight {
    color: #E30613;
    font-weight: 700;
    background: #ffe6e6;
    padding: 0 4px;
    border-radius: 4px;
}
.btn-context {
    background: #333;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}
.btn-context:hover {
    background: #E30613;
}

/* Mobile Responsive Context Box */
@media (max-width: 600px) {
    .location-context-box {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .post-title {
        font-size: 1.8rem;
    }
}


/* =========================================
   6. FEATURE: LOCAL STATS PANEL
   ========================================= */
.local-stats-panel {
    background: #fff;
    border: 1px solid #eee;
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.local-stats-panel h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #E30613;
}
.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* =========================================
   7. WIDE HERO IMAGE UPDATES
   ========================================= */

/* Wrapper for breadcrumbs to align them with the text */
.breadcrumb-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem 0 1rem; /* Top padding moved here */
}

/* The Wide Hero Container */
.hero-wrapper {
    width: 100%;
    max-width: 1260px; /* Requested width */
    margin: 2rem auto; /* Vertical spacing */
    padding: 0 1rem;   /* Small gutter on mobile */
    box-sizing: border-box;
}

/* The Image Itself */
.post-hero-image {
    margin: 0;
    width: 100%;
    height: 540px; /* Requested height */
    overflow: hidden;
    border-radius: 8px; /* Optional: Rounded corners look nice */
}

.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills 1260x540 without stretching */
    display: block;
}

/* Adjust the main container since padding moved to breadcrumbs/hero */
.blog-container {
    padding-top: 0; 
}

/* Mobile Tweaks: Allow height to shrink on small screens */
@media (max-width: 768px) {
    .post-hero-image {
        height: auto; /* Let height adjust naturally on mobile */
        aspect-ratio: 16/9;
    }
}