/* Blog Layout with Sidebar */
.blog-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-top: 2rem;
}

.blog-list-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-sidebar {
    width: 350px;
    position: sticky;
    top: 100px;
}

/* Individual Blog Card Redesign (One per row) */
.blog-card {
    display: flex;
    flex-direction: column;
    height: auto;
    cursor: pointer !important;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Side-by-Side Block Styles (Consistency with post.html) */
.side-block {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-bottom: 2.5rem;
}
.side-block.side-right {
  flex-direction: row-reverse !important;
}
.side-img {
  flex: 0 0 40%;
  max-width: 40%;
}
.side-img img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}
.side-text {
  flex: 1;
}

/* Tags Styles */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}
.tag {
  background: rgba(0, 206, 201, 0.1);
  color: var(--primary-color);
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(0, 206, 201, 0.2);
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
}
.tag:hover, .tag.active {
  background: var(--primary-color);
  color: white;
}

/* Filter Bar */
.tag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2rem;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
  .side-block {
    flex-direction: column !important;
  }
  .side-img {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.blog-img-container {
    width: 100%;
    background: rgba(255,255,255,0.05); /* Match the vibe */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-img {
    width: 100%;
    height: auto; /* Preserve aspect ratio while stretching to width */
    object-fit: contain !important; /* STRECH TO FIT WITHOUT CROPPING */
    display: block;
}

.blog-content {
    display: flex;
    flex-direction: column;
}

.blog-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.subscribe-section {
    padding: 2.5rem 2rem;
    text-align: center;
}

.subscribe-form {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap; /* Side-by-side but wraps well */
    gap: 10px;
    justify-content: center;
}

.subscribe-form input {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background: var(--glass-bg);
    color: var(--text-color);
}

@media (max-width: 992px) {
    .blog-layout {
        flex-direction: column;
    }
    .blog-sidebar {
        display: contents;
    }
    #tag-filter-container {
        order: 1;
        width: 100%;
    }
    .blog-list-side {
        order: 2;
        width: 100%;
    }
    .subscribe-section {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
}

/* Base Select Styles for Light Mode / General */
select.form-control {
    background-color: var(--glass-bg);
    color: var(--text-color);
    border: 1px solid var(--input-border);
}
select.form-control option {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Dark Mode Select Styles (Overrides) */
body.dark-mode select.form-control {
    background-color: rgba(0, 0, 0, 0.4);
}
body.dark-mode select.form-control option {
    background-color: #1e2029; /* Dark theme background for options drop down */
    color: white;
}
