/* Blog magazine layout */
.blog-mag {
    padding: 1rem 0 3rem;
    background: #fafaf9;
}

.blog-mag__inner {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .blog-mag__inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .blog-mag__inner {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.blog-mag-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 340px;
    margin: 0.75rem 0 1.75rem;
    border-radius: 1rem;
    overflow: hidden;
    background: #1c1917;
}

@media (min-width: 768px) {
    .blog-mag-hero {
        min-height: 420px;
    }
}

.blog-mag-hero__media {
    position: absolute;
    inset: 0;
}

.blog-mag-hero__image,
.blog-mag-hero__placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-mag-hero__placeholder {
    background: linear-gradient(135deg, #0f766e 0%, #1c1917 100%);
}

.blog-mag-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.15) 100%);
}

.blog-mag-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 1.5rem 1.25rem 1.75rem;
    color: #fff;
}

@media (min-width: 768px) {
    .blog-mag-hero__content {
        max-width: 42rem;
        padding: 2.5rem 2rem 2.75rem;
    }
}

.blog-mag-hero__badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: rgba(234, 88, 12, 0.9);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.blog-mag-hero__category {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-mag-hero__category:hover {
    color: #fdba74;
}

.blog-mag-hero__title {
    margin: 0.75rem 0 0;
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .blog-mag-hero__title {
        font-size: 2.25rem;
    }
}

.blog-mag-hero__title a {
    color: inherit;
    text-decoration: none;
}

.blog-mag-hero__title a:hover {
    color: #fed7aa;
}

.blog-mag-hero__excerpt {
    margin: 0.75rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-mag-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.65);
}

.blog-mag-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1.125rem;
    padding: 0.625rem 1.125rem;
    border-radius: 9999px;
    background: #fff;
    color: #c2410c;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.blog-mag-hero__cta:hover {
    background: #fff7ed;
    transform: translateY(-1px);
}

.blog-mag-intro {
    margin: 0.75rem 0 1.25rem;
}

.blog-mag-intro--compact {
    margin-bottom: 1rem;
}

.blog-mag-intro__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ea580c;
}

.blog-mag-intro__title {
    margin: 0.375rem 0 0;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #1c1917;
}

@media (min-width: 768px) {
    .blog-mag-intro__title {
        font-size: 2rem;
    }
}

.blog-mag-intro__desc {
    margin: 0.5rem 0 0;
    max-width: 40rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #57534e;
}

.blog-mag-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.blog-mag-nav::-webkit-scrollbar {
    display: none;
}

.blog-mag-nav__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    border: 1px solid #e7e5e4;
    background: #fff;
    color: #44403c;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.blog-mag-nav__pill:hover,
.blog-mag-nav__pill.is-active {
    border-color: #fdba74;
    background: #fff7ed;
    color: #c2410c;
}

.blog-mag-nav__count {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #a8a29e;
}

.blog-mag-nav__pill.is-active .blog-mag-nav__count {
    color: #ea580c;
}

.blog-mag-layout {
    display: grid;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .blog-mag-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

.blog-mag-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .blog-mag-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.blog-mag-card {
    height: 100%;
}

.blog-mag-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 0.875rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7e5e4;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.blog-mag-card__link:hover {
    border-color: #fdba74;
    box-shadow: 0 12px 32px rgba(234, 88, 12, 0.1);
    transform: translateY(-2px);
}

.blog-mag-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f4;
}

.blog-mag-card__image,
.blog-mag-card__placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-mag-card__placeholder {
    background: linear-gradient(145deg, #ffedd5 0%, #fdba74 50%, #ea580c 100%);
}

.blog-mag-card__link:hover .blog-mag-card__image {
    transform: scale(1.05);
}

.blog-mag-card__category {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #c2410c;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-mag-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.125rem 1.25rem;
}

.blog-mag-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.75rem;
    font-size: 0.75rem;
    color: #a8a29e;
}

.blog-mag-card__title {
    margin: 0.5rem 0 0;
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.35;
    color: #1c1917;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-mag-card__excerpt {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #57534e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-mag-card__more {
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #ea580c;
}

.blog-mag-empty {
    padding: 3rem 1.5rem;
    border-radius: 0.875rem;
    border: 1px dashed #d6d3d1;
    background: #fff;
    text-align: center;
    color: #78716c;
}

.blog-mag-pagination {
    margin-top: 2rem;
}

.blog-mag-aside__sticky {
    position: sticky;
    top: 5.5rem;
}

.blog-mag-aside__widget {
    padding: 1.25rem;
    border-radius: 0.875rem;
    background: #fff;
    border: 1px solid #e7e5e4;
}

.blog-mag-aside__widget + .blog-mag-aside__widget,
.blog-mag-aside__rss {
    margin-top: 0.875rem;
}

.blog-mag-aside__widget--search {
    background: #1c1917;
    border-color: #1c1917;
}

.blog-mag-aside__title {
    margin: 0 0 0.875rem;
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1c1917;
}

.blog-mag-aside__widget--search .blog-mag-aside__title {
    color: #fff;
}

.blog-mag-aside__search {
    display: flex;
    gap: 0.5rem;
}

.blog-mag-aside__search-input {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.875rem;
    border: 1px solid #44403c;
    border-radius: 0.5rem;
    background: #292524;
    color: #fff;
    font-size: 0.875rem;
}

.blog-mag-aside__search-input::placeholder {
    color: #a8a29e;
}

.blog-mag-aside__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    flex-shrink: 0;
    border: none;
    border-radius: 0.5rem;
    background: #ea580c;
    color: #fff;
    cursor: pointer;
}

.blog-mag-aside__recent {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-mag-aside__recent-link {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid #f5f5f4;
    text-decoration: none;
}

.blog-mag-aside__recent-link:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-mag-aside__recent-thumb {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    object-fit: cover;
    background: #f5f5f4;
}

.blog-mag-aside__recent-thumb--empty {
    background: linear-gradient(135deg, #ffedd5, #fdba74);
}

.blog-mag-aside__recent-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #292524;
}

.blog-mag-aside__recent-link:hover .blog-mag-aside__recent-title {
    color: #ea580c;
}

.blog-mag-aside__recent-link time {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.6875rem;
    color: #a8a29e;
}

.blog-mag-aside__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.blog-mag-aside__tag {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    color: #57534e;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.blog-mag-aside__tag:hover {
    border-color: #fdba74;
    background: #fff7ed;
    color: #c2410c;
}

.blog-mag-aside__rss {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.875rem;
    border: 1px solid #e7e5e4;
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #ea580c;
    text-decoration: none;
}

.blog-mag-aside__rss:hover {
    background: #fff7ed;
    border-color: #fdba74;
}

.blog-post-card__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ea580c;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.blog-post-card__category:hover {
    color: #c2410c;
}

/* Single post (article page) */
.blog-mag-layout--single {
    margin-top: 0.75rem;
}

.blog-single {
    padding: 1.25rem;
    border-radius: 0.875rem;
    background: #fff;
    border: 1px solid #e7e5e4;
}

@media (min-width: 768px) {
    .blog-single {
        padding: 2rem;
    }
}

.blog-single__featured {
    margin-bottom: 1.5rem;
    width: 100%;
    border-radius: 0.875rem;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.blog-single__header {
    margin-bottom: 1.5rem;
}

.blog-single__title {
    margin-top: 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: #1c1917;
}

.blog-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #78716c;
}

.blog-single__author {
    font-weight: 700;
    color: #44403c;
}

.blog-single__excerpt {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid #ea580c;
    background: #fff7ed;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #57534e;
}

.blog-prose {
    color: #292524;
    line-height: 1.75;
    font-size: 1.0625rem;
}

.blog-prose h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1c1917;
}

.blog-prose h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1c1917;
}

.blog-prose p {
    margin: 0 0 1rem;
}

.blog-prose ul,
.blog-prose ol {
    margin: 0 0 1rem 1.25rem;
}

.blog-prose li {
    margin-bottom: 0.375rem;
}

.blog-prose a {
    color: #ea580c;
    font-weight: 600;
    text-decoration: underline;
}

.blog-prose blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid #d6d3d1;
    background: #fafaf9;
    color: #57534e;
}

.blog-prose table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.blog-prose th,
.blog-prose td {
    border: 1px solid #e7e5e4;
    padding: 0.625rem 0.75rem;
    text-align: left;
}

.blog-prose th {
    background: #fafaf9;
    font-weight: 700;
}

.blog-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1rem 0;
}

.blog-single__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e7e5e4;
}

.blog-single__tags-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #44403c;
}

.blog-single__nav {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .blog-single__nav {
        grid-template-columns: 1fr 1fr;
    }
}

.blog-single__nav-link {
    display: block;
    padding: 1rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.75rem;
    text-decoration: none;
    background: #fafaf9;
}

.blog-single__nav-link span {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #a8a29e;
}

.blog-single__nav-link strong {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #1c1917;
}

.blog-single__nav-link:hover {
    border-color: #fdba74;
    background: #fff7ed;
}

.blog-single__nav-link--next {
    text-align: right;
}

.blog-related {
    margin-top: 2rem;
    padding-top: 0.25rem;
}

.blog-related__title {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1c1917;
}
