:root {
  /* Professional Color Palette - Modern Business Theme */
  --color-primary: #2563eb; /* Professional Blue */
  --color-primary-variant: #1e40af; /* Darker Blue */
  --color-secondary: #7c3aed; /* Purple Accent */
  --color-accent: #10b981; /* Success Green */
  --color-bg: #ffffff; /* Clean White Background */
  --color-surface: #f8fafc; /* Light Surface */
  --color-text-primary: #1e293b; /* Dark Slate */
  --color-text-secondary: #64748b; /* Muted Slate */
  --color-error: #ef4444; /* Error Red */
  --color-success: #10b981; /* Success Green */
  --color-warning: #f59e0b; /* Warning Amber */
  --color-gray-50: #f9fafb; /* Lightest Gray */
  --color-gray-100: #f3f4f6; /* Light Gray */
  --color-gray-200: #e5e7eb; /* Medium Light Gray */
  --color-gray-300: #d1d5db; /* Medium Gray */
  --color-gray-400: #9ca3af; /* Medium Dark Gray */
  --color-gray-500: #6b7280; /* Dark Gray */
  --color-gray-600: #4b5563; /* Darker Gray */
  --color-gray-700: #374151; /* Very Dark Gray */
  --color-gray-800: #1f2937; /* Almost Black */
  --color-gray-900: #111827; /* Black */
  --color-white: #ffffff; /* Pure White */
  --color-border: #e5e7eb; /* Light Border */
  --color-primary-light: #dbeafe; /* Light Blue */
  --color-secondary-light: #e9d5ff; /* Light Purple */
  --color-success-light: #d1fae5; /* Light Green */
  --color-warning-light: #fef3c7; /* Light Amber */
  --color-error-light: #fee2e2; /* Light Red */

  /* Typography - Professional Font Stack */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'Fira Code', 'Source Code Pro', monospace;

  /* Spacing & Sizing - Modern Scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  --spacing-xxxl: 4rem;

  /* Layout & Containers */
  --container-width-lg: 70%;
  --container-width-md: 85%;
  --container-width-sm: 95%;
  --form-width: 40%;
  --max-width: 1200px;

  /* Border Radius - Modern Rounded Corners */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-xxl: 1rem;
  --radius-full: 9999px;

  /* Shadows - Layered Approach */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions - Smooth Animations */
  --transition-fast: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --global-zoom: 0.67;
  --nav-height: 5rem;
}

/* START GENERAL */

* {
  margin: 0;
  padding: 0;
  outline: 0;
  border: 0;
  appearance: 0;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary), sans-serif;
  line-height: 1.6;
  color: var(--color-text-primary);
  overflow-x: hidden;
  background: var(--color-bg);
  font-size: 1rem;
  font-weight: 400;
}

html {
  zoom: var(--global-zoom);
}

@supports not (zoom: 0.7) {
  body {
    transform: scale(var(--global-zoom));
    transform-origin: top center;
    width: calc(100% / var(--global-zoom));
    margin: 0 auto;
  }
}

.container {
  width: var(--container-width-lg);
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 0 var(--spacing-md);
}
.container-footer {
  width: var(--container-width-sm);
  margin-inline: auto;
  padding: 0 var(--spacing-md);
}
.container-blog {
  width: var(--container-width-lg);
  margin-inline: auto;
  padding: 0 var(--spacing-md);
}
section {
  margin-top: var(--spacing-xxl);
  width: 100%;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 var(--spacing-sm) 0;
}

/* add to posts on index if there are no featured posts */
.section__extra-margin {
  margin-top: var(--spacing-xxxl);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
}

h6 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-normal);
}

a:hover {
  color: var(--color-primary-variant);
  text-decoration: underline;
}

img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Professional Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-variant);
  border-color: var(--color-primary-variant);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
}

.btn-secondary:hover {
  background-color: #6d28d9;
  border-color: #6d28d9;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 0.85rem;
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1.1rem;
}

/* Card Component */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-body {
  padding: var(--spacing-lg);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-primary);
}

.card-text {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-secondary {
  background-color: var(--color-secondary-light);
  color: var(--color-secondary);
}

.badge-success {
  background-color: var(--color-success-light);
  color: var(--color-success);
}

.badge-warning {
  background-color: var(--color-warning-light);
  color: var(--color-warning);
}

.badge-error {
  background-color: var(--color-error-light);
  color: var(--color-error);
}

/* Alert Component */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
}

.alert-success {
  background-color: var(--color-success-light);
  color: var(--color-success);
  border-left: 4px solid var(--color-success);
}

.alert-error {
  background-color: var(--color-error-light);
  color: var(--color-error);
  border-left: 4px solid var(--color-error);
}

.alert-info {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-left: 4px solid var(--color-primary);
}

.alert-warning {
  background-color: var(--color-warning-light);
  color: var(--color-warning);
  border-left: 4px solid var(--color-warning);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.05em; }
.text-capitalize { text-transform: capitalize; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-normal { font-weight: 400; }
.font-light { font-weight: 300; }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.pt-xs { padding-top: var(--spacing-xs); }
.pt-sm { padding-top: var(--spacing-sm); }
.pt-md { padding-top: var(--spacing-md); }
.pt-lg { padding-top: var(--spacing-lg); }
.pt-xl { padding-top: var(--spacing-xl); }

.pb-xs { padding-bottom: var(--spacing-xs); }
.pb-sm { padding-bottom: var(--spacing-sm); }
.pb-md { padding-bottom: var(--spacing-md); }
.pb-lg { padding-bottom: var(--spacing-lg); }
.pb-xl { padding-bottom: var(--spacing-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* END */

/* START NAV */

nav {
  background: var(--color-primary-variant);
  width: 100%;
  height: var(--nav-height);
  position: fixed;
  top: 0;
  z-index: 10;
  box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.2);
}

nav button {
  display: none;
}

.nav__container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.avatar {
  width: 2.5rem;
  /* aspect-ratio: 1/1; */
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 0.3rem solid var(--color-bg);
}

.nav__logo {
  font-weight: 600;
  font-size: 1.2rem;
}

.nav__items {
  display: flex;
  align-items: center;
  gap: 4rem;
}

/* Responsive Layout Fixes */
@media screen and (max-width: 1200px) {
  .posts {
    flex-direction: column;
  }

  .post-aside {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    position: static;
  }

  .left-aside, .right-aside {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem 0;
    width: 100%;
  }

  .aside-slot {
    min-width: 250px;
    flex-shrink: 0;
  }

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

@media screen and (max-width: 768px) {
  .posts__container {
    grid-template-columns: 1fr;
  }

  .post-aside {
    flex-direction: column;
    align-items: center;
  }

  .aside-slot {
    min-width: 100%;
    margin-bottom: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .posts__container {
    grid-template-columns: 1fr;
  }

  .post {
    margin-bottom: 1rem;
  }

  .post__thumbnail {
    height: 150px;
  }
}

/* Search Bar Styling - Professional Design */
.search__bar {
  margin-top: 3rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.search__bar-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: linear-gradient(135deg, var(--color-gray-900), var(--color-gray-800));
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 0.8rem 1.2rem;
  border-radius: 60px;
  color: var(--color-gray-300);
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search__bar-container:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.search__bar-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
}

.search__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: var(--color-primary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.search__bar-container:hover .search__icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-primary-variant);
  transform: scale(1.05);
}

.search__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.5rem 0.75rem;
  color: var(--color-white);
  font-size: 1rem;
  font-family: var(--font-primary);
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.search__input::placeholder {
  color: var(--color-gray-400);
  font-weight: 400;
}

.search__input:focus {
  color: var(--color-white);
}

.search__submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  border: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  text-transform: uppercase;
}

.search__submit-btn:hover {
  background: linear-gradient(135deg, var(--color-primary-variant), #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.search__submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.search__submit-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.search__submit-btn:hover i {
  transform: translateX(2px);
}

/* Search Bar Responsive Styles */
@media screen and (max-width: 768px) {
  .search__bar-container {
    width: 95%;
    padding: 0.5rem 0.75rem;
    border-radius: 40px;
  }
  
  .search__icon {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
  }
  
  .search__input {
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
  }
  
  .search__submit-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .search__submit-btn span {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  .search__bar-container {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border-radius: 35px;
  }
  
  .search__icon {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  
  .search__input {
    font-size: 0.9rem;
    padding: 0.35rem 0.5rem;
  }
  
  .search__submit-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
  }
  
  .search__submit-btn i {
    font-size: 0.9rem;
  }
}

.search__bar .btn {
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
}

/* Category Button Icon Spacing */
.category__button i {
  margin-right: 0.5rem;
}

/* Featured Post Category Button */
.featured .category__button {
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
}

.featured .category__button i {
  margin-right: 0.5rem;
}

/* Post Layout Fixes */
@media screen and (max-width: 1200px) {
  .posts {
    flex-direction: column;
  }

  .post-aside {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
  }
}

@media screen and (max-width: 768px) {
  .posts__container {
    grid-template-columns: 1fr;
  }

  .post-aside {
    flex-direction: column;
    align-items: center;
  }
}

/* Category Button Icon Alignment */
.category__button i {
  vertical-align: middle;
  font-size: 0.9em;
}

/* Post Category Button Styling */
.post__info .category__button {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
}

.post__info .category__button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Posts Section Layout - Fixed */
.posts {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.main-posts-content {
  flex: 2;
  min-width: 0;
  width: 100%;
  order: 2;
}

.container-blog.posts__container {
  width: 100%;
  max-width: 100%;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 0 auto;
}

/* Blog-specific container adjustments */
.blog-posts-wrapper {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
}

/* Ensure proper alignment for blog posts */
@media screen and (min-width: 1201px) {
  .posts {
    justify-content: flex-start;
  }
  
  .container-blog.posts__container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media screen and (max-width: 1200px) {
  .posts {
    flex-direction: column;
    align-items: center;
  }
  
  .post-aside {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    position: static;
  }
  
  .left-aside, .right-aside {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem 0;
    width: 100%;
  }
  
  .aside-slot {
    min-width: 250px;
    flex-shrink: 0;
  }
  
  .container-blog.posts__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .container-blog.posts__container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .post-aside {
    flex-direction: column;
    align-items: center;
  }
  
  .aside-slot {
    min-width: 100%;
    margin-bottom: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .container-blog.posts__container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .post {
    margin-bottom: 1rem;
  }
  
  .post__thumbnail {
    height: 150px;
  }
}

/* Enhanced Ad Layout for Blog Posts */
.post-aside {
  width: 300px;
  flex-shrink: 0;
  margin: 0 1rem;
  position: relative;
  top: 0;
}

.left-aside {
  order: 1;
}

.right-aside {
  order: 3;
}

.main-posts-content {
  order: 2;
  flex: 2;
  min-width: 0;
  width: 100%;
}

/* Ensure ads don't overlap content */
@media screen and (min-width: 1201px) {
  .posts {
    position: relative;
  }
  
  .post-aside.left-aside {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    height: fit-content;
  }
  
  .post-aside.right-aside {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    height: fit-content;
  }
  
  .main-posts-content {
    order: 2;
    flex: 2;
    min-width: 0;
    width: 100%;
  }
}

/* Fix content flow issues */
@media screen and (max-width: 1200px) {
  .posts {
    flex-direction: column;
    align-items: center;
  }
  
  .post-aside {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    position: static;
  }
  
  .left-aside, .right-aside {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem 0;
    width: 100%;
  }
  
  .aside-slot {
    min-width: 250px;
    flex-shrink: 0;
  }
  
  .main-posts-content {
    order: 2;
    width: 100%;
  }
}

/* Mobile ad stacking */
@media screen and (max-width: 768px) {
  .post-aside {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .aside-slot {
    min-width: 100%;
    margin-bottom: 1rem;
  }
  
  .main-posts-content {
    order: 2;
    width: 100%;
  }
}

/* Small mobile optimization */
@media screen and (max-width: 480px) {
  .post-aside {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .aside-slot {
    min-width: 100%;
    margin-bottom: 1rem;
  }
  
  .main-posts-content {
    order: 2;
    width: 100%;
  }
}

/* Post Card Layout Fixes */
.post {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-normal);
  margin-bottom: 0;
  min-height: 100%;
  border: 1px solid var(--color-border);
  height: 100%;
}

.post:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-primary-light);
}

.post__thumbnail {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--spacing-md);
  background: var(--color-gray-100);
  position: relative;
  height: 200px;
  width: 100%;
}

.post__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease;
}

.post:hover .post__thumbnail img {
  transform: scale(1.02);
}

.post__info {
  padding: var(--spacing-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Category Button Fix */
.category__button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  margin-bottom: 1rem;
  text-decoration: none;
}

.category__button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(255, 255, 255, 0.3);
}

.category__button i {
  margin-right: 0.5rem;
  font-size: 0.9em;
}

/* Post Title Styling */
.post__title {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 1rem 0;
  line-height: 1.3;
  flex: 1;
  min-height: 3rem;
}

.post__title a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: var(--transition-normal);
}

.post__title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Post Body Styling */
.post__body {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
  flex: 1;
  min-height: 4rem;
}

.post__body p {
  margin: 0;
  padding: 0;
}

/* Post Author Section */
.post__author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  min-height: 4rem;
}

.post__author-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--color-primary-light);
}

.post__author-info {
  flex: 1;
}

.post__author-info h5 {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 0.25rem 0;
}

.post__author-info small {
  font-family: var(--font-primary);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Post Engagement Stats */
.post__engagement {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.post__engagement > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
}

.post__engagement > div:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.post__engagement i {
  font-size: 0.9rem;
}

/* Posts Grid Layout */
.posts__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  margin-bottom: 3rem;
}
.posts__container_home {
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  margin-bottom: 3rem;
}
/* Ad Layout Fixes */
.post-aside {
  width: 300px;
  flex-shrink: 0;
  margin: 0 1rem;
}

.left-aside, .right-aside {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* Ad Slot Styling */
.aside-slot {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  width: 100%;
  transition: var(--transition-normal);
  min-height: 200px;
}

.aside-slot:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.aside-slot h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
  text-align: center;
}

/* Affiliate Ad Fixes */
.affiliate-aside-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.affiliate-product {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
  padding: 1rem;
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
  min-height: 150px;
}

.affiliate-product:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.affiliate-product img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  object-fit: cover;
  aspect-ratio: 4/3;
  background: var(--color-gray-100);
  border: 1px solid var(--color-border);
}

.affiliate-product h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.affiliate-product p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Google Ad Fixes */
.google-ad-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
}

.google-ad-unit {
  background: #f5f5f5;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px dashed var(--color-border);
  width: 100%;
}

.google-ad-unit p {
  color: #666;
  font-size: 0.9rem;
  margin: 0.3rem 0;
  font-weight: 500;
}

/* Ad Layout Fixes */
.post-aside {
  width: 300px;
  flex-shrink: 0;
  margin: 0 1rem;
}

.left-aside, .right-aside {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.aside-slot {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  border: 1px solid var(--color-border);
  width: 100%;
  min-height: 200px;
}

/* Affiliate Ad Fixes */
.affiliate-aside-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.affiliate-product {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  min-height: 150px;
}

.affiliate-product img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  object-fit: cover;
  aspect-ratio: 4/3;
  background: var(--color-gray-100);
}

/* Google Ad Fixes */
.google-ad-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 200px;
  justify-content: center;
  align-items: center;
}

/* Responsive Layout Fixes */
@media screen and (max-width: 1200px) {
  .posts {
    flex-direction: column;
  }

  .post-aside {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    position: static;
  }

  .left-aside, .right-aside {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem 0;
    width: 100%;
  }

  .aside-slot {
    min-width: 250px;
    flex-shrink: 0;
  }

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

@media screen and (max-width: 768px) {
  .posts__container {
    grid-template-columns: 1fr;
  }

  .post-aside {
    flex-direction: column;
    align-items: center;
  }

  .aside-slot {
    min-width: 100%;
    margin-bottom: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .posts__container {
    grid-template-columns: 1fr;
  }

  .post {
    margin-bottom: 1rem;
  }

  .post__thumbnail {
    height: 150px;
  }
}

/* Search Bar Styling - Professional Design */
.search__bar {
  margin-top: 3rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.search__bar-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: linear-gradient(135deg, var(--color-gray-900), var(--color-gray-800));
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 0.8rem 1.2rem;
  border-radius: 60px;
  color: var(--color-gray-300);
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search__bar-container:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.search__bar-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
}

.search__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: var(--color-primary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.search__bar-container:hover .search__icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-primary-variant);
  transform: scale(1.05);
}

.search__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.5rem 0.75rem;
  color: var(--color-white);
  font-size: 1rem;
  font-family: var(--font-primary);
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.search__input::placeholder {
  color: var(--color-gray-400);
  font-weight: 400;
}

.search__input:focus {
  color: var(--color-white);
}

.search__submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  border: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  text-transform: uppercase;
}

.search__submit-btn:hover {
  background: linear-gradient(135deg, var(--color-primary-variant), #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.search__submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.search__submit-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.search__submit-btn:hover i {
  transform: translateX(2px);
}

/* Search Bar Responsive Styles */
@media screen and (max-width: 768px) {
  .search__bar-container {
    width: 95%;
    padding: 0.5rem 0.75rem;
    border-radius: 40px;
  }
  
  .search__icon {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
  }
  
  .search__input {
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
  }
  
  .search__submit-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .search__submit-btn span {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  .search__bar-container {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border-radius: 35px;
  }
  
  .search__icon {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  
  .search__input {
    font-size: 0.9rem;
    padding: 0.35rem 0.5rem;
  }
  
  .search__submit-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
  }
  
  .search__submit-btn i {
    font-size: 0.9rem;
  }
}

.search__bar .btn {
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
}

/* Category Button Icon Spacing */
.category__button i {
  margin-right: 0.5rem;
}

/* Featured Post Category Button */
.featured .category__button {
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
}

.featured .category__button i {
  margin-right: 0.5rem;
}

/* Post Layout Fixes */
@media screen and (max-width: 1200px) {
  .posts {
    flex-direction: column;
  }

  .post-aside {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
  }
}

@media screen and (max-width: 768px) {
  .posts__container {
    grid-template-columns: 1fr;
  }

  .post-aside {
    flex-direction: column;
    align-items: center;
  }
}

/* Category Button Icon Alignment */
.category__button i {
  vertical-align: middle;
  font-size: 0.9em;
}

/* Post Category Button Styling */
.post__info .category__button {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
}

.post__info .category__button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* START CATEGORY FOOTER */
footer {
  background: var(--color-gray-900);
  padding: 5rem 0 0;
  box-shadow: inset 0 1.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.footer__socials {
  margin-inline: auto;
  width: fit-content;
  margin-bottom: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
}

.footer__socials a {
  background: var(--color-bg);
  border-radius: 50%;
  height: 2.3rem;
  width: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.uil-github {
  font-size: 1.3rem;
}

.footer__socials a:hover {
  background: var(--color-white);
  color: var(--color-bg);
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

footer li {
  padding: 0.4rem 0;
}

footer h4 {
  color: var(--color-white);
  margin-bottom: 0.6rem;
}

footer ul a {
  opacity: 0.75;
}

footer ul a:hover {
  letter-spacing: 0.1rem;
  opacity: 1;
  transition: var(--transition);

}

.footer__copyright {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 2px solid var(--color-bg);
  margin-top: 4rem;
}

/* END CATEGORY FOOTER */

/* START CATEGORY SEARCH */
.search__bar {
  margin-top: 3rem;
}

.search__bar-container {
  position: relative;
  width: 30rem;
  background: var(--color-gray-900);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  color: var(--color-gray-300);
}

.search__bar-container > div {
  width: 100%;
  display: flex;
  align-items: center;
}

.search__bar input {
  background: transparent;
  margin-left: 0.7rem;
  padding: 0.5rem 0;
  width: 100%;
  color: var(--color-white);
}

.search__bar input::placeholder {
  color: var(--color-gray-200);
}

/* START CATEGORY BUTTON */
.btn {
  display: inline-block;
  width: fit-content;
  padding: 0.6rem 1.2rem;
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  color: var(--color-white);
}

.btn.sm {
  padding: 0.3rem;
  font-size: 0.8rem;
}

.btn.danger {
  background-color: red;
}

.btn:hover {
  background: var(--color-white);
  color: var(--color-bg);
}

/* END CATEGORY BUTTON */

/* START DASHBOARD */
.dashboard {
  margin-top: 6rem;
  padding: 2rem;
}

.sidebar__toggle {
  display: none;
}

.dashboard__container {
  display: grid;
  grid-template-columns: 14rem auto;
  gap: 2rem;
  background: var(--color-gray-900);
  padding: 2rem;
  margin-bottom: 5rem;
  border-radius: 2rem;
}

.dashboard aside a {
  color: var(--color-white);
  background: var(--color-primary);
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.6rem;
}

.dashboard aside ul li:not(:last-child) a {
  border-bottom: 1px solid var(--color-gray-700);
}

.dashboard aside a:hover {
  background: var(--color-gray-700);
}

.dashboard aside a.active {
  background-color: var(--color-gray-700);
}

.dashboard aside ul li:not(:last-child):not(:first-child) a {
  border-bottom: 1px solid var(--color-gray-700);
}

.dashboard aside ul li:first-child a {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.dashboard main table th:first-child {
  border-top-left-radius: 10px;
}

.dashboard main table th:last-child {
  border-top-right-radius: 10px;
}

.dashboard aside ul li:last-child a {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.dashboard main {
  margin-left: 1.5rem;
}

.dashboard main h2 {
  margin: 0 0 2rem 0;
  line-height: 1;
}

.dashboard main table {
  width: 100%;
  text-align: left;
}

.dashboard main table th {
  background: var(--color-gray-700);
  padding: 0.8rem;
  color: var(--color-white);
}

.dashboard main table td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.dashboard main table tr:hover {
  background-color: var(--color-bg);
  color: var(--color-white);
  cursor: default;
  transition: var(--transition);
}

/* END DASHBOARD */

/* START SINGLE POST */
.singlepost {
  margin: 4rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.singlepost__container {
  width: 100%;
  background: var(--color-white);
  padding: 2rem 3rem;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  margin: 0 1rem;
}

.singlepost__container h2 {
  margin-top: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-align: left;
  line-height: 1.2;
}

/* Post Content Container - Main content area */
.post-content-container {
  margin: 1rem;
  flex: 1;
}
/* Post Ads Layout */
.post-aside {
  width: 350px;
  flex-shrink: 0;
  margin: 0 1rem;
}

.left-aside, .right-aside {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 80px;
  height: fit-content;
}

/* Ad Slot Styling */
.aside-slot {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  border: 1px solid var(--color-border);
  min-height: 200px;
}

.aside-slot h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

/* Affiliate Ad Styling */
.affiliate-aside-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.affiliate-product {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  min-height: 150px;
}

.affiliate-product img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  object-fit: cover;
  aspect-ratio: 4/3;
}

.affiliate-product h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.affiliate-product p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

/* Google Ad Styling */
.google-ad-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 200px;
}

/* Responsive Layout for Single Post with Ads */
@media screen and (min-width: 1200px) {
  .singlepost {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
  }

  .post-content-container {
    flex: 2;
    order: 2;
  }

  .left-aside {
    order: 1;
  }

  .right-aside {
    order: 3;
  }
}

@media screen and (max-width: 1199px) {
  .singlepost {
    flex-direction: column;
  }

  .post-aside {
    width: 100%;
    max-width: 100%;
    margin: 0;
    position: static;
  }

  .left-aside, .right-aside {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem 0;
  }

  .aside-slot {
    min-width: 250px;
    flex-shrink: 0;
  }
}

@media screen and (max-width: 768px) {
  .singlepost__container {
    padding: 1.5rem;
  }

  .post-aside {
    display: none;
  }
}

/* Breadcrumb Navigation */
.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-gray-200);
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--color-white);
}

/* Post Meta Information */
.post__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post__author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post__author-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-primary);
}

.post__author-info h5 {
  margin: 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-600);
}

.post__author-info small {
  font-size: 0.9rem;
  color: var(--color-gray-900);
  text-align: left;
}

/* Post Stats */
.post__stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.reading-time, .post-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
}

.reading-time {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.post-category {
  background: var(--color-green-light);
  color: var(--color-green);
}

.singlepost__thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  margin: 2rem 0;
}

/* Image Caption */
.image-caption {
  font-size: 0.8rem;
  color: var(--color-gray-200);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Post Content */
.post__content {
  margin-top: 1rem;
  line-height: 1.8;
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  text-align: justify;
}

/* Social Sharing */
.social-share {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.social-share h4 {
  margin-bottom: 1rem;
  color: var(--color-gray-900);
}

.social-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-gray-700);
  border-radius: var(--radius-md);
  color: var(--color-white);
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}

.social-icons i {
  font-size: 1.1rem;
}

/* Related Posts */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  width: 100%;
}

.related-posts h3 {
  margin-bottom: 1.5rem;
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
}

.related-posts h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 3px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.related-post-card {
  background: var(--color-gray-700);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.related-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.related-post-card a {
  color: var(--color-white);
  text-decoration: none;
  display: block;
}

.related-post-thumbnail {
  height: 12rem;
  overflow: hidden;
  position: relative;
}

.related-post-thumbnail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 50%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.related-post-card:hover .related-post-thumbnail::before {
  opacity: 1;
}

.related-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  transform: scale(1.0);
}

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

.related-post-content {
  padding: 1rem;
  position: relative;
  z-index: 2;
}

.related-post-card h4 {
  padding: 0;
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-white);
}

.related-post-card small {
  display: block;
  padding: 0;
  margin: 0;
  font-size: 0.7rem;
  color: var(--color-primary);
  font-weight: 500;
}

/* Ensure thumbnails are always visible and prominent */
.related-post-thumbnail img {
  min-height: 12rem;
  background: var(--color-gray-900);
}

/* Responsive adjustments for related posts */
@media screen and (max-width: 768px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-post-thumbnail {
    height: 10rem;
  }
}

@media screen and (max-width: 480px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .related-post-thumbnail {
    height: 8rem;
  }
}

/* END SINGLE POST */

/* END CATEGORY SEARCH */

/* START CATEGORY POSTS */
.category__title {
  height: 4rem;
  margin-top: 4.5rem;
  background: var(--color-gray-200);
  display: grid;
  place-items: center;
}

/* END CATEGORY POSTS */

/* START EMPTY PAGES */
.empty__page {
  height: 70vh;
  text-align: center;
  display: grid;
  place-content: center;
}

/* END EMPTY PAGES */

/* START GENERAL FORM */
.form__section {
  display: grid;
  place-items: center;
  height: 100vh;
  margin: 5rem 0;
}

.form__section-container {
  width: var(--form-width);
}

.alert__message {
  padding: 0.8rem 1.4rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
}

.alert__message.error {
  background: var(--color-red-light);
  color: var(--color-red);
}

.alert__message.success {
  background: var(--color-green-light);
  color: var(--color-green);
}

.alert__message.lg {
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form__control {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form__control.inline {
  flex-direction: row;
  align-items: center;
}

.form__section small {
  margin-top: 1rem;
  display: block;
}

.form__section small a {
  color: var(--color-primary);
}

/* START GENERAL DASHBAORD */

/* END GENERAL DASHBAORD */

input,
textarea,
select {
  padding: 0.8rem 1.4rem;
  background-color: var(--color-gray-900);
  border-radius: var(--radius-md);
  resize: none;
  color: var(--color-white);
}

/* END GENERAL FORM */

/* START  MEDIA QUERIES (Medium-Sized Devices) */
@media screen and (max-width: 1024px) {

  /* START  GENERAL STYLES */
  .container {
    width: var(--container-width-md);
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  h5 {
    font-size: 0.8rem;
  }

  /* END  GENERAL STYLES */

  /* START  NAV STYLES */
  nav button {
    display: inline-block;
    font-size: 1.5rem;
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
  }

  nav button#close__nav-btn {
    display: none;
  }

  .nav__container {
    position: relative;
  }

  .nav__items {
    display: none;
    position: absolute;
    flex-direction: column;
    top: 100%;
    right: 0;
    width: 12rem;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
  }

  .nav__items li {
    width: 100%;
    height: 4.5rem;
    display: flex;
    align-items: center;
    box-shadow: -2rem 3rem 7rem rgba(0, 0, 0, 0.7);
    background: var(--color-gray-900);
    border-top: 1px solid var(--color-bg);
    opacity: 0;

    animation: animateDropdown 400ms 0s ease forwards;
    transform-origin: top;
  }

  .nav__items li:nth-child(2) {
    animation-delay: 150ms;
  }

  .nav__items li:nth-child(3) {
    animation-delay: 250ms;
  }

  .nav__items li:nth-child(4) {
    animation-delay: 350ms;
  }

  .nav__items li:nth-child(5) {
    animation-delay: 450ms;
  }

  .nav__items li:nth-child(6) {
    animation-delay: 550ms;
  }

  /* Nav dropodwn animations */
  @keyframes animateDropdown {
    0% {
      transform: rotateX(90deg);
    }

    100% {
      transform: rotateX(0deg);
      opacity: 1;
    }
  }

  .nav__items a {
    border-radius: 0;
    width: 100%;
    height: 100%;
    background: var(--color-gray-900);
    padding: 0 2rem;
    display: flex;
    align-items: center;
  }

  .nav__profile {
    background: var(--color-gray-900);
  }

  .nav__profile ul {
    top: 100%;
    width: 100%;
  }

  .nav__profile ul li a {
    padding: 0 2rem;
    display: block;
    width: 100%;
    text-align: left;
    align-self: center;
    display: flex;
  }

  .nav__profile .avatar {
    margin-left: 2rem;
  }

  .featured__container {
    gap: 3rem;
  }

  .posts__container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .footer__container {
    grid-template-columns: 1fr 1fr;
  }

  /* START  BLOG */
  .search__bar-container {
    width: 100%;    
  }

  /* END  BLOG */

  /* START  GENERAL FORM */
  .form__section-container {
    padding: 3rem;
  }

  /* END  GENERAL FORM */

  /* END  GENERAL STYLES */

  /* START DASHBOARD (Tablets)*/
  .dashboard__container {
    grid-template-columns: 4.5rem auto;
  }

  .dashboard aside {}

  .dashboard aside h5 {
    display: none;
  }

  .dashboard main table thead {
    display: none;
  }

  .dashboard main table tr {
    display: flex;
    flex-direction: column;
  }

  .dashboard main table tr:nth-child(even) {
    background: var(--color-gray-900);
  }

  .dashboard main table tr:hover td {
    background: transparent;
  }

  /* END DASHBOARD */

  .sidebar__toggle {
    display: none;
  }

  /* END  MEDIA QUERIES *(Medium-Sized Devices) */
}

/* START  MEDIA QUERIES (Small-Sized Devices) */

@media screen and (max-width: 600px) {
  section {
    margin-top: 2rem;
  }

  h1 {
    font-size: 2rem;
  }

  .featured {
    margin-top: 6rem;
  }

  .featured__container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .posts__container {
    grid-template-columns: 1fr;
  }

  .category__buttons-container {
    grid-template-columns: 1fr 1fr;
  }

  .footer__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  /* START  BLOG */
  .search__bar-container {
    width: var(--container-width-md);
  }

  /* END  BLOG */

  /* START  SINGLE POST */
  .singlepost__container {
    background-color: transparent;
    padding: 0;
  }

  /* END  SINGLE POST */

  /* START  GENERAL FORM*/
  .form__section-container {
    padding: 0;
  }

  .form__section form a {
    padding-bottom: 2rem;
  }

  /* END  GENERAL FORM*/

  /* START  DASHBAORD*/
  .dashboard {
    margin-top: 5rem;
  }

  .dashboard__container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dashboard main {
    margin: 0;
  }

  .dashboard main h2 {
    margin-top: 1rem;
  }

  .dashboard aside {
    position: fixed;
    box-shadow: 2rem 0 4rem rgba(0, 0, 0, 0.4);
    left: 0;
    z-index: 2;
    height: 100vh;
    transition: var(--transition);
    background: var(--color-primary);
  }

  .singlepost__container {
    box-shadow: none;
  }

  .dashboard .sidebar__toggle {
    display: inline-block;
    background: var(--color-primary-variant);
    color: var(--color-white);
    position: fixed;
    right: 0;
    bottom: 4rem;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50% 0 0 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: -1rem 0 2rem rgba(0, 0, 0, 0.4);
  }

  .dashboard aside a h5 {
    display: inline-block;
  }

  #hide_sidebar-btn {
    display: none;
  }

  /* END  DASHBAORD*/
}

/* END  MEDIA QUERIES (Small-Sized Devices) */
