/**
 * Blog Page Template Styles
 * Light brown theme for Shiv Tattva Yoga blog page
 */

/* Main blog page container */
.styblog-blog-page {
  max-width: 1200px;
  margin: 0 auto;
  /*padding: 20px;*/
  background: linear-gradient(135deg, #f5f1eb 0%, #ede4d3 100%);
  min-height: 100vh;
}

/* Filters section */
.styblog-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(210, 180, 140, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.styblog-search form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.styblog-search input[type="search"] {
  padding: 12px 16px;
  border: 2px solid var(--styblog-light-brown);
  border-radius: 25px;
  background: white;
  color: #333;
  font-size: 14px;
  width: 250px;
  transition: all 0.3s ease;
}

.styblog-search input[type="search"]:focus {
  outline: none;
  border-color: #b8860b;
  box-shadow: 0 0 0 3px rgba(210, 180, 140, 0.2);
}

.styblog-search button {
  padding: 12px 16px;
  background: var(--styblog-light-brown);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.styblog-search button:hover {
  background: #b8860b;
  transform: translateY(-2px);
}

/* Fixed category select padding and appearance to prevent text cropping */
.styblog-category-filter select,
.styblog-category-select {
  padding: 12px 16px !important;
  border: 2px solid var(--styblog-light-brown);
  border-radius: 8px;
  background: white;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  min-width: 200px;
  height: 44px;
  line-height: 20px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 44px !important;
  box-sizing: border-box;
  vertical-align: middle;
}

.styblog-category-filter select:focus,
.styblog-category-select:focus {
  outline: none;
  border-color: #b8860b;
  box-shadow: 0 0 0 3px rgba(210, 180, 140, 0.2);
}

/* Content wrapper */
.styblog-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* Section titles */
.styblog-section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--styblog-light-brown);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.styblog-section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--styblog-light-brown);
  border-radius: 2px;
}

/* Featured posts section */
.styblog-featured-section {
  margin-bottom: 60px;
}

.styblog-featured-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.styblog-featured-post {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(210, 180, 140, 0.15);
  transition: all 0.3s ease;
  position: relative;
}

.styblog-featured-post:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(210, 180, 140, 0.25);
}

.styblog-post-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.styblog-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.styblog-featured-post:hover .styblog-thumbnail {
  transform: scale(1.05);
}

.styblog-placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--styblog-light-brown), #daa520);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.styblog-post-content {
  padding: 25px;
}

.styblog-post-meta {
  margin-bottom: 15px;
}

.styblog-category {
  background: var(--styblog-light-brown);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.styblog-post-title {
  margin: 15px 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.styblog-post-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.styblog-post-title a:hover {
  color: var(--styblog-light-brown);
}

.styblog-post-excerpt {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Aligned metadata (like/share) in single line with proper spacing */
.styblog-metadata {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.styblog-metadata > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
}

.styblog-metadata .styblog-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.styblog-metadata .styblog-text {
  font-weight: 500;
}

/* Added CSS-based icons to replace emojis for better visibility */
.styblog-date-icon::before {
  content: "📅";
  font-size: 14px;
}

.styblog-author-icon::before {
  content: "👤";
  font-size: 14px;
}

.styblog-eye-icon::before {
  content: "👁️";
  font-size: 14px;
}

.styblog-share-icon::before {
  content: "🔗";
  font-size: 14px;
}

/* Alternative CSS-only icons for better browser compatibility */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .styblog-date-icon::before {
    content: "📅";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .styblog-author-icon::before {
    content: "👤";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .styblog-eye-icon::before {
    content: "👁️";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .styblog-share-icon::before {
    content: "🔗";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
}

/* Enhanced metadata visibility on both listing and single pages */
.styblog-metadata-listing,
.styblog-metadata-single {
  display: flex !important;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
  visibility: visible !important;
}

.styblog-metadata-listing .styblog-meta-item,
.styblog-metadata-single .styblog-meta-item {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
  visibility: visible !important;
}

/* Force metadata icons to be visible on blog listing page */
.styblog-featured-post .styblog-metadata,
.styblog-post-card .styblog-metadata,
.styblog-recent-posts .styblog-metadata {
  display: flex !important;
  visibility: visible !important;
}

.styblog-featured-post .styblog-icon,
.styblog-post-card .styblog-icon,
.styblog-recent-posts .styblog-icon {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Added inline share buttons styling for proper alignment */
.styblog-share-buttons-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.styblog-share-btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  background: rgba(210, 180, 140, 0.1);
  border: 1px solid rgba(210, 180, 140, 0.3);
  overflow: hidden;
}

.styblog-share-btn-inline img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 50%;
}

.styblog-share-btn-inline:hover {
  background: var(--styblog-light-brown);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(210, 180, 140, 0.3);
}

.styblog-share-btn-inline:hover img {
  filter: brightness(1.2);
}

.styblog-shares {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Recent posts grid */
.styblog-recent-posts {
  display: grid;
  gap: 30px;
  margin-bottom: 40px;
}

.styblog-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.styblog-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.styblog-post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(210, 180, 140, 0.1);
  transition: all 0.3s ease;
}

.styblog-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(210, 180, 140, 0.2);
}

.styblog-card-image {
  position: relative;
  overflow: hidden;
  height: 180px;
}

.styblog-card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.styblog-post-card:hover .styblog-card-thumbnail {
  transform: scale(1.05);
}

.styblog-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--styblog-light-brown), #daa520);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.styblog-card-content {
  padding: 20px;
}

.styblog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
}

.styblog-card-category {
  background: var(--styblog-light-brown);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.styblog-card-date {
  color: #888;
}

.styblog-card-title {
  margin: 12px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.styblog-card-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.styblog-card-title a:hover {
  color: var(--styblog-light-brown);
}

.styblog-card-excerpt {
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
  font-size: 14px;
}

/* Fixed sidebar positioning and visibility */
.styblog-sidebar {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--styblog-light-brown) transparent;
}

.styblog-sidebar::-webkit-scrollbar {
  width: 6px;
}

.styblog-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.styblog-sidebar::-webkit-scrollbar-thumb {
  background: var(--styblog-light-brown);
  border-radius: 3px;
}

.styblog-sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.styblog-widget {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(210, 180, 140, 0.1);
  flex-shrink: 0;
}

.styblog-widget-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--styblog-light-brown);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* Popular posts widget */
.styblog-popular-post {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.styblog-popular-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.styblog-popular-thumbnail {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
}

.styblog-popular-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.styblog-popular-content h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 5px;
}

.styblog-popular-content a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.styblog-popular-content a:hover {
  color: var(--styblog-light-brown);
}

.styblog-popular-views {
  font-size: 12px;
  color: #888;
}

/* Categories widget */
.styblog-categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.styblog-categories-list li {
  margin-bottom: 8px;
}

.styblog-categories-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.styblog-categories-list a:hover {
  background: rgba(210, 180, 140, 0.1);
  color: var(--styblog-light-brown);
}

.styblog-categories-list span {
  font-size: 12px;
  color: #888;
}

/* Enhanced newsletter widget visibility */
.styblog-newsletter-widget {
  background: linear-gradient(135deg, rgba(210, 180, 140, 0.05), rgba(210, 180, 140, 0.1));
  border: 2px solid rgba(210, 180, 140, 0.2);
}

.styblog-newsletter p {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.styblog-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.styblog-newsletter-form input {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.styblog-newsletter-form input:focus {
  outline: none;
  border-color: var(--styblog-light-brown);
}

.styblog-newsletter-form button {
  padding: 12px;
  background: var(--styblog-light-brown);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.styblog-newsletter-form button:hover {
  background: #b8860b;
}

/* Pagination */
.styblog-pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.styblog-pagination a,
.styblog-pagination span {
  padding: 10px 15px;
  background: white;
  color: var(--styblog-light-brown);
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid var(--styblog-light-brown);
  transition: all 0.3s ease;
}

.styblog-pagination a:hover,
.styblog-pagination .current {
  background: var(--styblog-light-brown);
  color: white;
}

/* Enhanced mobile responsiveness */
@media (max-width: 1024px) {
  .styblog-content-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .styblog-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .styblog-sidebar-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .styblog-columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .styblog-blog-page {
    padding: 15px;
  }

  .styblog-filters {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .styblog-search input[type="search"] {
    width: 100%;
    max-width: 300px;
  }

  .styblog-category-select {
    width: 100%;
    max-width: 300px;
  }

  .styblog-featured-posts,
  .styblog-columns-2,
  .styblog-columns-3 {
    grid-template-columns: 1fr;
  }

  .styblog-section-title {
    font-size: 24px;
  }

  .styblog-metadata {
    gap: 15px;
    font-size: 13px;
  }

  .styblog-sidebar-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .styblog-blog-page {
    padding: 10px;
  }

  .styblog-search input[type="search"] {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .styblog-post-content,
  .styblog-card-content {
    padding: 15px;
  }

  .styblog-widget {
    padding: 20px;
  }

  .styblog-metadata {
    gap: 12px;
    font-size: 12px;
  }

  .styblog-filters {
    padding: 15px;
  }
}

/* WordPress blog page override styles */
body.styblog-active .site-main,
body.styblog-active #main,
body.styblog-active .content-area,
body.styblog-active #primary {
  background: linear-gradient(135deg, #f5f1eb 0%, #ede4d3 100%) !important;
  min-height: 100vh !important;
  padding: 20px !important;
}

body.styblog-active .entry-content,
body.styblog-active .post,
body.styblog-active article:not(.styblog-featured-post):not(.styblog-post-card) {
  background: white !important;
  border-radius: 12px !important;
  margin-bottom: 30px !important;
  box-shadow: 0 4px 15px rgba(210, 180, 140, 0.1) !important;
  padding: 25px !important;
}

body.styblog-active .entry-title,
body.styblog-active .post-title,
body.styblog-active h1.entry-title {
  color: var(--styblog-light-brown) !important;
  margin-bottom: 20px !important;
}

/* Hide WordPress default post meta elements that appear as highlighted blue text */
body.styblog-active .entry-meta,
body.styblog-active .post-meta,
body.styblog-active .entry-footer,
body.styblog-active .post-footer,
body.styblog-active .cat-links,
body.styblog-active .tags-links,
body.styblog-active .comments-link,
body.styblog-active .edit-link,
body.styblog-active .posted-on,
body.styblog-active .byline,
body.styblog-active .entry-categories,
body.styblog-active .entry-tags,
.styblog-blog-page .entry-meta,
.styblog-blog-page .post-meta,
.styblog-blog-page .entry-footer,
.styblog-blog-page .post-footer,
.styblog-blog-page .cat-links,
.styblog-blog-page .tags-links,
.styblog-blog-page .comments-link,
.styblog-blog-page .edit-link,
.styblog-blog-page .posted-on,
.styblog-blog-page .byline,
.styblog-blog-page .entry-categories,
.styblog-blog-page .entry-tags {
  display: none !important;
  visibility: hidden !important;
}

/* Ensure our custom metadata is always visible */
.styblog-metadata,
.styblog-metadata-listing,
.styblog-metadata-single {
  display: flex !important;
  visibility: visible !important;
}
