/* Enhanced Blog Layout */
/* Import CSS Variables */
:root {
  --primary-green: #03582f;
  --primary-light: #155d1b;
  --accent-green: #7da929;
  --accent-bright: #06f325;
  --success-green: #20e206;
  --text-dark: #333;
  --text-light: #555;
  --text-muted: #777;
  --bg-light: #fafafa;
  --bg-card: #ffffff;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-dark: rgba(0, 0, 0, 0.2);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --Size-1: clamp(2.5rem, 4vw, 3rem);
  --Size-2: clamp(1.8rem, 3vw, 2rem);
  --Size-3: clamp(1.6rem, 2.5vw, 1.8rem);
  --Size-4: clamp(1.4rem, 2vw, 1.6rem);
  --Size-5: clamp(1.3rem, 1.8vw, 1.5rem);
  --Size-6: clamp(1.2rem, 1.6vw, 1.4rem);
  --Size-7: clamp(1.1rem, 1.4vw, 1.2rem);
  --Size-8: clamp(1rem, 1.2vw, 1.3rem);
  --weight-medium: 500;
  --weight-semiBold: 600;
  --weight-bold: 700;
  --weight-extraBold: 800;
}

.post-content {
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
}

.post-content .main-content {
  flex: 2;
  background: transparent;
  overflow-x: hidden;
}

.post-content .sidebar {
  flex: 1;
  max-width: 400px;
  position: sticky;
  top: 100px;
  height: fit-content;
}
/* .post-content .sidebar::-webkit-scrollbar {
  display: none;
} */

.recent-post-title {
  margin: var(--space-lg, 2rem) 0;
  font-size: clamp(2.5rem, 4vw, 3rem);
  font-weight: var(--weight-extraBold, 800);
  color: var(--primary-green, #03582f);
  text-align: center;
  position: relative;
}

.recent-post-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(45deg, var(--accent-green, #7da929), var(--success-green, #20e206));
  border-radius: 2px;
}

.post {
  width: 95%;
  height: 190px;
  margin: 13px auto;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(45deg, #7da929, #20e206);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg, 2rem);
}

.post {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--space-md, 1.5rem);
  padding: var(--space-lg, 2rem);
}

.card .post-img {
  width: 200px;
  height: 150px;
  flex-shrink: 0;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
}

.card .post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal, 0.3s ease);
}

.post:hover .card .post-img img {
  transform: scale(1.1);
}

.post-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.post:hover::before {
  transform: scaleX(1);
}

.meta {
  display: flex;
  /* align-items: center; */
  gap: 0.3rem;
  flex-direction: column;
  /* flex-wrap: nowrap; */
}

.meta p {
  margin-top: 5px;
  font-size: 1.1rem;
  margin-left: 20px;
  font-weight: 500;
}
.blog-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-content h3 {
  font-size: var(--Size-5, 1.5rem);
  font-weight: var(--weight-bold, 700);
  color: var(--text-dark, #333);
  line-height: 1.3;
  margin-bottom: var(--space-sm, 1rem);
  transition: color var(--transition-fast, 0.2s ease);
}

.post:hover .blog-content h3 {
  color: var(--accent-green, #7da929);
}

.blog-text {
  font-size: var(--Size-7, 1.2rem);
  line-height: 1.6;
  flex: 1;
}

.post-btn {
  background: linear-gradient(135deg, var(--accent-green, #7da929), var(--success-green, #20e206));
  color: white;
  padding: var(--space-sm, 1rem) var(--space-md, 1.5rem);
  border: none;
  border-radius: var(--radius-md, 12px);
  font-size: var(--Size-8, 1rem);
  font-weight: var(--weight-semiBold, 600);
  cursor: pointer;
  transition: all var(--transition-normal, 0.3s ease);
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: absolute;
  top: 70%;
  right: 2%;
}

.post-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(125, 169, 41, 0.4);
}

/* Enhanced Sidebar */
.search {
  background: var(--bg-card, #ffffff);
  padding: var(--space-lg, 2rem);
  margin-bottom: var(--space-lg, 2rem);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 4px 20px var(--shadow-light, rgba(0, 0, 0, 0.1));
  width: 100%;
}

.section-title {
  font-size: var(--Size-3, 1.8rem);
  font-weight: var(--weight-bold, 700);
  color: var(--primary-green, #03582f);
  margin-bottom: var(--space-md, 1.5rem);
}

.text-input {
  color: var(--text-dark, #333);
  font-size: var(--Size-7, 1.2rem);
  font-family: "Lora", serif;
  padding: var(--space-md, 1.5rem);
  background-color: var(--bg-light, #f2f2f2);
  border: 2px solid #7da929;
  border-radius: var(--radius-md, 12px);
  margin-top: var(--space-sm, 1rem);
  width: 100%;
  transition: all var(--transition-normal, 0.3s ease);
}

.text-input:focus {
  border-color: var(--accent-green, #7da929);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(125, 169, 41, 0.1);
}

.topic {
  background: var(--bg-card, #ffffff);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-lg, 2rem);
  width: 100%;
  box-shadow: 0 4px 20px var(--shadow-light, rgba(0, 0, 0, 0.1));
}

.suggestions {
  display: none;
}

.section label {
  font-size: var(--Size-6, 1.4rem);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-md, 1.5rem);
  color: var(--text-dark, #444);
  padding: var(--space-md, 1.5rem) var(--space-sm, 1rem);
  border-bottom: 1px solid var(--bg-light, #eee);
  border-radius: var(--radius-sm, 6px);
  margin-bottom: var(--space-xs, 0.5rem);
  transition: all var(--transition-normal, 0.3s ease);
}

.section label:hover {
  background: linear-gradient(135deg, var(--accent-green, #7da929), var(--success-green, #20e206));
  color: white;
  transform: translateX(5px);
  border-color: transparent;
}

.popular-one {
  background-color: white;
  border-radius: 4px;
}

/* Style radio buttons */
.section input[type="radio"] {
  width: 16px;
  height: 16px;
  border: 2px solid #007bff;
  border-radius: 50%;
  outline: none;
  display: none;
  cursor: pointer;
  position: relative;
}

/* .section input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
} */

/* DETAIL POST PAGE DESIGN */
.post-section {
  margin-top: 35px;
}

.post-heading {
  font-size: var(--Size-1);
  text-align: center;
  padding: 14px 0;
}

/* #renderpost {
  margin-bottom: 10px;
} */

.post-card {
  background-color: rgb(255, 255, 255);
  margin-top: 31.5px;
  margin-left: 20px;
  padding: 15px;
  margin-right: 20px;
  border-radius: 6px;
}

.post-paragraphs {
  font-size: var(--Size-4);
}

.popular-posts {
  margin-top: 5px;
}

.popular-content {
  padding-right: 3px;
}

.center {
  position: absolute;
  top: 40%;
  left: 25%;
  font-size: 3rem;
  font-weight: 800;
}

.popular-post {
  display: flex;
  background: rgb(114, 114, 114);
  margin-top: 1.5px;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.popular-img {
  height: 100%;
  width: 150px;
  object-fit: cover;
}

/* Container */
#renderpost {
  max-width: 850px;
  /* margin: 35px 30px; */
  margin-top: 35px;
  padding: 20px;
  line-height: 1.7;
  font-family: "Arial", sans-serif;
  color: #333;
  background-color: #fff;
}

/* Title */
#renderpost h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  color: #1a1a1a;
}

/* Author */
#renderpost p {
  margin-bottom: 15px;
  font-size: 1rem;
}

#renderpost p[style*="italic"] {
  font-style: italic;
  color: #555;
  text-align: center;
}

/* Headings */
#renderpost h2,
#renderpost h3,
#renderpost h4 {
  margin-top: 25px;
  margin-bottom: 10px;
  color: #222;
}

#renderpost h2 {
  font-size: 1.6rem;
  padding-bottom: 5px;
}

#renderpost h3 {
  font-size: 1.4rem;
}

#renderpost h4 {
  font-size: 1.2rem;
}

/* Paragraphs */
#renderpost p {
  font-size: 1.5rem;
  color: #444;
  text-align: justify;
}

/* Nepali text specific */
p[lang="ne"],
h1[lang="ne"],
h2[lang="ne"],
h3[lang="ne"],
h4[lang="ne"] {
  font-family: "Kalimati", "Mangal", "Noto Sans Devanagari", sans-serif;
  direction: ltr;
}

/* Links (if any) */
#renderpost a {
  color: #007bff;
  text-decoration: none;
}

#renderpost a:hover {
  text-decoration: underline;
}

/* Optional: spacing between sections */
#renderpost section {
  margin-bottom: 30px;
}

/* DETAIL PAGE DESIGN */

/* Enhanced Responsive Design for Blog */
@media only screen and (max-width: 1299px) {
  .post-content {
    flex-direction: column;
    gap: var(--space-lg, 2rem);
  }

  .post-content .main-content {
    flex: none;
  }

  .post-content .sidebar {
    position: static;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg, 2rem);
  }

  .card .post-img {
    width: 40%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md, 12px);
  }
}

@media only screen and (max-width: 820px) {
  .post-content {
    padding: var(--space-md, 1.5rem);
  }

  .post {
    height: auto;
    min-height: 200px;
    padding: var(--space-md, 1.5rem);
  }

  .card {
    flex-direction: column;
    gap: var(--space-md, 1.5rem);
  }

  .card .post-img {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md, 12px);
  }

  .meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-sm, 1rem);
    justify-content: space-between;
  }

  .meta p {
    font-size: var(--Size-8, 1rem);
  }

  .post-btn {
    padding: var(--space-sm, 1rem);
    margin-top: var(--space-md, 1.5rem);
    align-self: flex-start;
  }

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

  .search, .topic {
    padding: var(--space-md, 1.5rem);
  }
}
.post-btn a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.meta p {
  margin: 0;
  font-size: var(--Size-8);
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.meta i {
  color: var(--accent-green);
}

.designation {
  font-style: italic;
  color: var(--text-muted) !important;
}

/* Enhanced Search and Filter Styling */
.suggestions {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--shadow-light);
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
}

.suggestions li {
  padding: var(--space-sm);
  cursor: pointer;
  border-bottom: 1px solid var(--bg-light);
  transition: background var(--transition-fast);
}

.suggestions li:hover {
  background: var(--bg-light);
}

.suggestions li:last-child {
  border-bottom: none;
}

/* Radio Button Styling */
.section input[type="radio"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-green);
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  position: relative;
  display: inline-block;
  margin-right: var(--space-sm);
}

.section input[type="radio"]:checked {
  background: var(--accent-green);
}

.section input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}