/* ---------------------------------------------
   DESIGN SYSTEM + SWIPER INTEGRATION
   Glassmorphic & Modern Alternative
   Includes Blog, Archive, Category & Tag Templates
--------------------------------------------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #FCFDFF;
  color: #0A1A2F;
  line-height: 1.5;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 20% 40%, rgba(15, 123, 58, 0.04) 1.8px, transparent 1.8px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: -2;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ---------------------------------------------
   ARCHIVE HEADER (Category, Tag, Archive)
--------------------------------------------- */
.archive-header {
  margin-bottom: 2.5rem;
}

.archive-header h1,
.archive-header .wp-block-query-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #EFFAF2;
  color: #0F7B3A;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.25rem 1rem 0.25rem 0.75rem;
  border-radius: 40px;
  width: auto;
  border: none;
}

.archive-header h1::before,
.archive-header .wp-block-query-title::before {
  content: "✦";
  font-size: 0.85rem;
  font-weight: normal;
}

.archive-header .wp-block-term-description {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.6;
  margin-top: 1rem;
  max-width: 700px;
}

/* badge-style headings */
.featured-posts-section h2,
.wp-block-column h1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #EFFAF2;
  color: #0F7B3A;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.25rem 1rem 0.25rem 0.75rem;
  border-radius: 40px;
  margin-bottom: 1.75rem;
  width: auto;
  border: none;
}

.featured-posts-section h2::before,
.wp-block-column h1::before {
  content: "✦";
  font-size: 0.85rem;
  font-weight: normal;
}

/* Swiper Nav - Rounded Squares & Glass */
.featured-swiper {
  position: relative;
  padding: 0 0 3rem 0;
}

.swiper-button-next,
.swiper-button-prev {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #0A1A2F;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 18px;
  font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: #0A1A2F;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.swiper-button-disabled {
  opacity: 0 !important;
  transform: scale(0.8);
}

/* Swiper Pagination - Modern Elongated Dots */
.swiper-pagination {
  bottom: 0 !important;
}

.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  opacity: 1;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 6px !important;
}

.swiper-pagination-bullet-active {
  background: #0F7B3A;
  width: 24px;
  border-radius: 4px;
}

/* Overlapping Glassmorphic Cards (Featured & Main Grid) */
.featured-post-card,
.post-card {
  position: relative;
  background: transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.wp-block-post-featured-image {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  z-index: 1;
}

.wp-block-post-featured-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.4) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.wp-block-post-featured-image img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-post-card .wp-block-post-featured-image img { height: 260px; }
.post-card .wp-block-post-featured-image img { aspect-ratio: 16/9; }

/* The Glass Content Box */
.featured-post-card .post-content-wrapper,
.post-card-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  background-color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Hover Effects */
.featured-post-card:hover .wp-block-post-featured-image img,
.post-card:hover .wp-block-post-featured-image img {
  transform: scale(1.08) rotate(1deg);
}

.featured-post-card:hover .wp-block-post-featured-image::after,
.post-card:hover .wp-block-post-featured-image::after {
  opacity: 1;
}

.featured-post-card:hover .post-content-wrapper{
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 1);
}

/* Typography & Links */
.wp-block-post-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0F7B3A;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.wp-block-post-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.post-card .wp-block-post-title { font-size: 1.15rem; }

.wp-block-post-title a {
  color: #0A1A2F;
  text-decoration: none;
  background-image: linear-gradient(transparent calc(100% - 2px), #0F7B3A 2px);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.4s ease, color 0.3s ease;
}

.wp-block-post-title a:hover {
  background-size: 100% 100%;
}

.wp-block-post-excerpt {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animated Read More Link (replaces circle arrow) */
.wp-block-post-excerpt__more-link,
.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0A1A2F;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  transition: color 0.3s ease;
  margin-top: auto;
}

.wp-block-post-excerpt__more-link::after,
.read-more-link::after {
  content: '→';
  transition: transform 0.3s ease;
}

.wp-block-post-excerpt__more-link:hover,
.read-more-link:hover {
  color: #0F7B3A;
}

.wp-block-post-excerpt__more-link:hover::after,
.read-more-link:hover::after {
  transform: translateX(4px);
}

/* ---------------------------------------------
   Main Posts Grid (Latest Posts - Contained Card Design)
   Also used for Archive/Category/Tag grids
--------------------------------------------- */
.main-posts-query .wp-block-post-template,
.category-posts-query .wp-block-post-template,
.tag-posts-query .wp-block-post-template,
.archive-posts-query .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  list-style: none;
  padding: 0;
}

/* The cohesive glass card wrapper */
.post-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Image section fits neatly inside the top of the card */
.post-card .wp-block-post-featured-image {
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  border-radius: 0; 
  box-shadow: none;
}

.post-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover .wp-block-post-featured-image img {
  transform: scale(1.05);
}

/* Content flows naturally inside the card without overlapping */
.post-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: transparent;
  backdrop-filter: none;
  border: none;
  margin-top: 0;
  box-shadow: none;
}

/* Meta Data */
.post-card .wp-block-post-date {
  font-size: 0.8rem;
  color: #6C757D;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* Title */
.post-card .wp-block-post-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.post-card .wp-block-post-title a {
  text-decoration: none;
  color: #0A1A2F;
  background-image: linear-gradient(#0F7B3A, #0F7B3A);
  background-size: 0% 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease, color 0.3s ease;
}

.post-card:hover .wp-block-post-title a {
  color: #0F7B3A;
}

.wp-block-post-author-name{
  display: none;
}

/* Excerpt */
.post-card .wp-block-post-excerpt {
  font-size: 0.95rem;
  color: #6C757D;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Read More Link */
.post-card .wp-block-post-excerpt__more-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0A1A2F;
  text-decoration: none;
  margin-top: auto;
  transition: color 0.3s ease;
}

.post-card .wp-block-post-excerpt__more-link::after {
  content: "→";
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.post-card:hover .wp-block-post-excerpt__more-link {
  color: #0F7B3A;
}

.post-card:hover .wp-block-post-excerpt__more-link::after {
  transform: translateX(4px);
}

/* ---------------------------------------------
   TAG POST CARD (List Layout for Tag Archives)
--------------------------------------------- */
.tag-post-card {
  background-color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 1.5rem;
}

.tag-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.tag-post-card .wp-block-columns {
  margin: 0;
  padding: 1.5rem;
  gap: 1.5rem;
}

.tag-post-card .wp-block-post-featured-image {
  border-radius: 1rem;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 1 / 1;
}

.tag-post-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tag-post-card:hover .wp-block-post-featured-image img {
  transform: scale(1.05);
}

.tag-post-card .wp-block-post-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.tag-post-card .wp-block-post-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0F7B3A;
  font-weight: 700;
}

.tag-post-card .wp-block-post-excerpt {
  font-size: 0.9rem;
  color: #475569;
  margin-top: 0.5rem;
}

/* ---------------------------------------------
   Sidebar & Most Viewed Posts (Minimal)
--------------------------------------------- */
.sidebar-widget {
  position: sticky;
  top: 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  margin-bottom: 2rem;
  counter-reset: popular-counter; 
}

.sidebar-widget h3 {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #0A1A2F;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-widget h3::before { 
  content: ""; 
  display: block;
  width: 8px;
  height: 8px;
  background: #0F7B3A;
  border-radius: 50%;
}

.popular-post-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid transparent; 
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  counter-increment: popular-counter;
}

.popular-post-card .wp-block-post-featured-image {
  display: none; 
}

.popular-post-card::before {
  content: "0" counter(popular-counter);
  font-size: 1.25rem;
  font-weight: 800;
  color: #6C757D;
  opacity: 0.3;
  line-height: 1.2;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.popular-post-card:nth-child(n+10)::before {
  content: counter(popular-counter);
}

.popular-post-info {
  flex-grow: 1;
}

.popular-post-info .wp-block-post-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.popular-post-info .wp-block-post-title a {
  text-decoration: none;
  color: #0A1A2F;
  transition: color 0.3s ease;
}

.popular-post-info .wp-block-post-date { 
  font-size: 0.75rem; 
  color: #6C757D; 
  font-weight: 500;
  opacity: 0.8;
}

.popular-post-card:hover { 
  transform: translateX(6px); 
}

.popular-post-card:hover::before {
  color: #0F7B3A;
  opacity: 1;
}

.popular-post-card:hover .popular-post-info .wp-block-post-title a { 
  color: #0F7B3A; 
}

/* ---------------------------------------------
   SIDEBAR: Categories & Tags Widget
--------------------------------------------- */
.wp-block-categories {
  list-style: none;
  padding: 0;
}

.wp-block-categories li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.wp-block-categories li:last-child {
  border-bottom: none;
}

.wp-block-categories a {
  color: #0A1A2F;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wp-block-categories a:hover {
  color: #0F7B3A;
}

.wp-block-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wp-block-tag-cloud a {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(15, 123, 58, 0.08);
  color: #0F7B3A;
  border-radius: 20px;
  font-size: 0.8rem !important;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.wp-block-tag-cloud a:hover {
  background: #0F7B3A;
  color: white;
  transform: translateY(-2px);
}

/* ---------------------------------------------
   NO RESULTS
--------------------------------------------- */
.wp-block-query-no-results {
  text-align: center;
  padding: 3rem 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.wp-block-query-no-results p {
  font-size: 1.1rem;
  color: #475569;
}

/* ---------------------------------------------
   Pagination
--------------------------------------------- */
.wp-block-query-pagination {
  margin-top: 3rem;
  padding-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wp-block-query-pagination .wp-block-query-pagination-previous,
.wp-block-query-pagination .wp-block-query-pagination-next,
.wp-block-query-pagination-numbers .page-numbers {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  color: #0A1A2F;
  transition: all 0.3s ease;
  text-decoration: none;
}

.wp-block-query-pagination .wp-block-query-pagination-previous:hover,
.wp-block-query-pagination .wp-block-query-pagination-next:hover,
.wp-block-query-pagination-numbers .page-numbers:hover {
  background: #0A1A2F;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wp-block-query-pagination-numbers .page-numbers.current {
  background: #0F7B3A;
  color: white;
  border-color: #0F7B3A;
}

/* ---------------------------------------------
   UTILITY
--------------------------------------------- */
.wp-block-post-excerpt__more-text{
    display:none;
}

.blog-content-wrapper{
  gap: 40px;
}

/* ---------------------------------------------
   RESPONSIVE
--------------------------------------------- */
@media (max-width: 1024px) {
  .main-posts-query .wp-block-post-template,
  .category-posts-query .wp-block-post-template,
  .tag-posts-query .wp-block-post-template,
  .archive-posts-query .wp-block-post-template {
    grid-template-columns: 1fr;
  }
  .swiper-button-next, .swiper-button-prev { width: 40px; height: 40px; border-radius: 10px; }
}

@media (max-width: 768px) {
  .blog-content-wrapper { flex-direction: column; }
  .blog-content-wrapper .wp-block-column { flex-basis: 100% !important; }
  .sidebar-widget { position: static; margin-top: 2rem; }
  .swiper-button-next, .swiper-button-prev { display: none; }
  
  .tag-post-card .wp-block-columns {
    flex-direction: column;
  }
  
  .tag-post-card .wp-block-column {
    flex-basis: 100% !important;
  }
  
  .tag-post-card .wp-block-post-featured-image {
    aspect-ratio: 16 / 9;
  }
}