/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  /* Blog Container and Layout */
  .blog-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: var(--container);
    margin: 2rem auto;
    padding: 0 1rem;
    /* Account for fixed header height */
    padding-top: clamp(9rem, 15vw, 10rem);
  }
  #cs-navigation {
    background-color: #08101A;
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  .tag-page {
    padding: var(--sectionPadding);
    position: relative;
    z-index: 1;
  }
  #banner-1519 .cs-background {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
  }
  #banner-1519 .cs-background:before {
    /* gradient overlay */
    content: '';
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    opacity: 0.8;
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    z-index: 1;
  }
  #banner-1519 .cs-background img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    /* Makes img tag act as a background image */
    object-fit: cover;
  }
  #banner-1519 h1,
  #banner-1519 p {
    color: white;
  }
  /* Scoped to blog-specific sections to avoid leaking into footer/header */
  #banner-1519 .cs-container {
    text-align: center;
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* 8px - 12px */
    gap: clamp(0.5rem, 1vw, 0.75rem);
  }
  .blog-index .cs-container,
  .tag-page .cs-container {
    text-align: center;
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    /* 8px - 12px */
    gap: clamp(0.5rem, 1vw, 0.75rem);
  }
  /* Blog Post Styling */
  .blog-post {
    /* max-width: (800/16rem); */
    width: 100%;
    margin: auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  .blog-header {
    margin-bottom: 2rem;
    text-align: center;
  }
  .blog-header h1 {
    /* font-size: clamp(2rem, 4vw, 2.5rem); */
    margin-bottom: 1rem;
    color: var(--headerColor);
  }
  .blog-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
  }
  .blog-meta .author:before {
    content: "•";
    margin-right: 1rem;
  }
  .featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
  }
  div.blog-content {
    padding: 1rem;
  }
  .blog-content {
    line-height: 1.6;
  }
  .blog-content h4 {
    /* font-size: 1.75rem; */
    margin: 2rem 0 1rem;
    color: var(--headerColor);
  }
  .blog-content h5 {
    /* font-size: 1.5rem; */
    margin: 0;
    color: var(--headerColor);
  }
  .blog-content p {
    margin-bottom: 1.5rem;
  }
  .blog-content ul,
  .blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
  }
  .blog-content ul li,
  .blog-content ol li {
    margin-bottom: 0.5rem;
  }
  .blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
  }
  .blog-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary);
    background: #f5f5f5;
    font-style: italic;
  }
  .blog-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
  }
  /* Blog Tags */
  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .tag {
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 0.8rem;
    transition: background-color 0.3s;
  }
  .tag:hover {
    background: var(--primary);
    color: #fff;
  }
  .blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
  }
  /* Blog Navigation */
  .blog-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
  }
  .blog-nav-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .prev-post,
  .next-post {
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  .prev-post:hover,
  .next-post:hover {
    background: #f5f5f5;
    border-color: var(--primary);
  }
  .next-post {
    text-align: right;
  }
  .nav-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
  }
  .post-title {
    font-weight: 600;
  }
  .blog-nav-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .back-to-blog {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
  }
  .post-tags {
    display: flex;
    gap: 0.5rem;
  }
  /* Blog Sidebar */
  .blog-sidebar {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 3rem;
  }
  .sidebar-section {
    margin-bottom: 2rem;
  }
  .sidebar-section:last-child {
    margin-bottom: 0;
  }
  .sidebar-section h3 {
    margin-bottom: 1rem;
    /* font-size: 1.25rem; */
    color: var(--headerColor);
  }
  .recent-posts ul,
  .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .recent-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
  }
  .recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
  .recent-posts a {
    display: block;
    text-decoration: none;
    color: var(--headerColor);
    font-weight: 500;
    margin-bottom: 0.25rem;
  }
  .recent-posts time {
    font-size: 0.8rem;
    color: #666;
  }
  .category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
  }
  .category-list li:last-child {
    border-bottom: none;
  }
  .category-list a {
    text-decoration: none;
    color: var(--headerColor);
  }
  .category-list a.active {
    color: var(--primary);
    font-weight: bold;
  }
  .post-count {
    background: #eee;
    color: #333;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
  }
  .rss-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
  }
  .rss-link img {
    width: 20px;
    height: 20px;
  }
  .sidebar-section.cta {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .sidebar-section.cta p {
    margin-bottom: 1rem;
  }
  /* Blog Index Page */
  #banner-1519 {
    padding: var(--sectionPadding);
    /* Account for fixed header height */
    padding-top: clamp(12.5rem, 20vw, 14rem);
    position: relative;
    z-index: 1;
  }
  .blog-index {
    padding: var(--sectionPadding);
    padding-top: 0;
    position: relative;
    z-index: 1;
  }
  .blog-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
  }
  .featured-article {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
  }
  .featured-content {
    padding: 1.5rem;
  }
  .featured-label {
    background: var(--primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
  }
  .post-grid {
    display: grid;
    gap: 2rem;
  }
  .post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
  }
  .post-card:hover {
    transform: translateY(-4px);
  }
  .post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  .post-content {
    padding: 1.5rem;
  }
  .post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
  }
  .tag-navigation {
    margin-top: 2rem;
    text-align: center;
  }
  /* CTA Box in Blog Posts */
  .cta-box {
    background: #f5f5f5;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
    display: flex;
    align-items: center;
    flex-direction: column;
  }
  .cta-box h3 {
    margin-bottom: 1rem;
  }
  .cta-box p {
    margin: 1.5rem 0;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  .blog-container {
    grid-template-columns: 2fr 1fr;
    padding: clamp(9rem, 15vw, 10rem) 2rem 3rem;
  }
  .blog-post {
    margin: 0;
  }
  .blog-nav-links {
    grid-template-columns: 1fr 1fr;
  }
  .blog-grid {
    grid-template-columns: 2fr 1fr;
  }
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  div.blog-content {
    padding: 2rem;
  }
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tag-page .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
