/*
 * Souffle des plantes - Main Stylesheet
 * A modern, zen-themed blog website focused on plants
 */

/* ===== Variables ===== */
:root {
  /* Color Scheme */
  --primary-green: #4a7c59;
  --secondary-green: #6a994e;
  --light-green: #a1c181;
  --beige: #f2e8cf;
  --dark-beige: #d8c3a5;
  --white: #ffffff;
  --black: #333333;
  --gray: #666666;
  --light-gray: #f5f5f5;
  --error: #e74c3c;
  --success: #2ecc71;
  --warning: #f39c12;
  --info: #3498db;
  --primary-blue: #3498db;

  /* Typography */
  --font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --base-font-size: 16px;
  --small-font-size: 0.875rem;
  --large-font-size: 1.125rem;
  --line-height: 1.6;
  --heading-1: 2.5rem;
  --heading-2: 2rem;
  --heading-3: 1.5rem;
  --heading-4: 1.25rem;
  --heading-5: 1.125rem;
  --heading-6: 1rem;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  --spacing-xxxl: 4rem;
  --spacing-section: 5rem; /* New spacing for sections */

  /* Layout */
  --container-width: 1200px;
  --container-padding: 1rem;
  --border-radius: 8px; /* Increased border radius */
  --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Enhanced shadow */
  --card-aspect-ratio: 1; /* For square cards */
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--base-font-size);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height);
  color: var(--black);
  background-color: var(--beige);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-green);
}

ul, ol {
  list-style-position: inside;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
  color: var(--primary-green);
}

h1 { font-size: var(--heading-1); }
h2 { font-size: var(--heading-2); }
h3 { font-size: var(--heading-3); }
h4 { font-size: var(--heading-4); }
h5 { font-size: var(--heading-5); }
h6 { font-size: var(--heading-6); }

p {
  margin-bottom: var(--spacing-md);
}

.ql-editor p {
  margin-bottom: var(--spacing-md) !important;
}

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

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--gray);
}

.text-small {
  font-size: var(--small-font-size);
}

.text-large {
  font-size: var(--large-font-size);
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  box-sizing: border-box;
}

.row {
  /*display: flex;
  flex-wrap: wrap;*/
  margin-top: 5rem;
  margin-left: 1rem;
  margin-right: 1rem;
}

.col {
  flex: 1;
  padding: 0 1rem;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

.section {
  padding: var(--spacing-xl) 0;
}

.section-sm {
  padding: var(--spacing-lg) 0;
}

.section-lg {
  padding: var(--spacing-xxl) 0;
}

/* ===== Header ===== */
.header {
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--container-padding);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
  /* Image logo */
  background-image: url('/images/logo_vert.png');
  background-repeat: no-repeat;
  padding-left: 2em;
  background-size: contain;
}
.logo:hover {
  color: var(--primary-green);
}

@media (max-width: 350px) {
  .logo {
    background-image: none;
    padding-left: 0;
  }
}

/*
.logo a {
  color: inherit;
}*/

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: var(--spacing-lg);
}

.nav-link {
  color: var(--black);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-green);
}

.nav-link.active {
  color: var(--primary-green);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--black);
  position: fixed;
  right: 1em;
}

/* ===== Hero Section ===== */
.hero {
  background-color: var(--light-green);
  color: var(--white);
  text-align: center;
  padding: var(--spacing-xxxl) 0; /* Increased padding */
  position: relative;
  overflow: hidden;
  min-height: 500px; /* Minimum height for the hero section */
  display: flex;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

.hero-title {
  font-size: 3.5rem; /* Larger font size */
  margin-bottom: var(--spacing-lg);
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Add text shadow for better readability */
}

.hero-subtitle {
  font-size: 1.75rem; /* Larger font size */
  margin-bottom: var(--spacing-xl);
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* Add text shadow for better readability */
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

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

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

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-green);
  border: 1px solid var(--primary-green);
}

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

.btn-danger {
  background-color: var(--error);
  color: var(--white);
}

.btn-danger:hover {
  background-color: #c0392b;
  color: var(--white);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--small-font-size);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--large-font-size);
}

.btn-block {
  display: block;
  width: 100%;
}

/* ===== Sections ===== */
.section {
  padding: var(--spacing-section) 0;
  position: relative;
}

.section:not(:last-child) {
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: var(--heading-2);
  margin-bottom: var(--spacing-xxl);
  text-align: center;
  position: relative;
  padding-bottom: var(--spacing-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-green);
}

.section-subtitle {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  color: var(--gray);
}

.section-articles {
  padding: 0;
}

.section.bg-light {
  background-color: var(--light-gray);
}

.section.bg-primary {
  background-color: var(--primary-green);
  color: var(--white);
}

.section.bg-beige {
  background-color: var(--beige);
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  /*margin-left: auto;
  margin-right: auto;*/
  margin-bottom: var(--spacing-xl);
  max-width: var(--container-width);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Cards ===== */
.card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /*height: 100%;*/
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-lg); /* Add margin between cards */
  max-width: 350px; /* Limit maximum width */
  /*margin-left: auto;
  margin-right: auto;*/
  min-width: 100%; /* For empty summary */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: none;
  color: inherit;
}

.card-link:hover .card-title {
  color: var(--primary-green);
}

.card-image {
  width: 100%;
  height: 0;
  padding-bottom: 60%; /* Makes it square */
  position: relative;
  overflow: hidden;
}

.card-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  padding: 5px 0;
}

.card-stat {
  flex: 1;
  text-align: center;
  color: white;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.card-stat .icon {
  font-size: 0.9rem;
}

.card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease; /* Add transition for zoom effect */
}

.card:hover .card-image img {
  transform: scale(1.05); /* Slight zoom effect on hover */
}

.card-image-placeholder {
  width: 100%;
  height: 0;
  padding-bottom: 100%; /* Makes it square */
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-image-placeholder::after {
  content: '🌿';
  font-size: 2rem;
  opacity: 0.5;
}

.card-content {
  padding: var(--spacing-md); /* Reduced padding */
  flex-grow: 1; /* Allow content to grow and fill the card */
  display: flex;
  flex-direction: column;
  font-size: 0.9rem; /* Slightly smaller font size */
}

.card-title {
  font-size: var(--heading-5); /* Smaller heading */
  margin-bottom: var(--spacing-xs); /* Less margin */
  line-height: 1.3;
  transition: color 0.3s ease;
  max-height: 2.6em; /* Limit to 2 lines */
  overflow: hidden;
  /*display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;*/
}

.card:hover .card-title {
  color: var(--primary-green);
}

.card-text {
  color: var(--gray);
  margin-bottom: var(--spacing-sm); /* Less margin */
  line-height: 1.4;
  flex-grow: 1; /* Push meta info to the bottom */
  max-height: 4.2em; /* Limit to 3 lines */
  overflow: hidden;
  /*display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;*/
  font-size: 0.85rem; /* Even smaller font for summary */
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem; /* Smaller font size */
  color: var(--gray);
  margin-top: auto; /* Push to bottom of card */
  padding-top: var(--spacing-sm); /* Less padding */
  border-top: 1px solid var(--light-gray);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-xs) / 2); /* Smaller gap */
  margin-bottom: var(--spacing-md);
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.35rem; /* Smaller padding */
  background-color: #ff000000;
  color: var(--primary-green);
  border-radius: var(--border-radius);
  font-size: 0.7rem; /* Smaller font */
  font-weight: 500;
  border: var(--primary-green) 1px solid;
  margin-right: 5px;
}

/* ===== Category Grid ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--spacing-md);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-xl);
  max-width: var(--container-width);
  box-sizing: border-box;
}

@media (min-width: 576px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Category Cards ===== */
.category-card {
  display: block;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  padding: 20%;
  padding-top: 40%;
  padding-bottom: 0%;
  margin: 1rem;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.category-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-lg);
  background-color: rgba(74, 124, 89, 0.9); /* Semi-transparent primary green */
  color: var(--white);
  text-align: center;
  transition: background-color 0.3s ease;
}

.category-card:hover .category-content {
  background-color: rgba(74, 124, 89, 0.9); /* Darker on hover */
}

.category-title {
  font-size: var(--heading-3);
  margin-bottom: var(--spacing-sm);
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.category-count {
  font-size: var(--small-font-size);
  color: var(--beige);
}

/* ===== Article ===== */

/* Like Button */
.like-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  color: var(--gray);
  font-size: var(--small-font-size);
  cursor: pointer;
  transition: all 0.3s ease;
}

.like-button:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.like-button.active {
  background-color: var(--light-green);
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.like-button .icon-heart {
  font-size: 1.2em;
}

.like-button .like-count {
  font-weight: 600;
}

.article-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--light-gray);
}
.article-header {
  margin-bottom: var(--spacing-xl);
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.article-meta {
  display: flex;
  align-items: center;
  color: var(--gray);
  font-size: var(--small-font-size);
  margin-bottom: var(--spacing-md);
}

.article-meta > * {
  margin-right: var(--spacing-md);
}

.article-cover {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  /*margin-bottom: var(--spacing-xl);*/
}

.article-content {
  background-color: var(--white);
  padding: var(--spacing-xl);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: var(--spacing-xl);
  margin-top: -2%;
}

.article-content h2 {
  margin-top: var(--spacing-xl);
}

/* For styling blockquote */
.article-content blockquote {
  border-left: 4px solid var(--primary-green);
  padding-left: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  color: var(--gray);
  font-style: italic;
}

.article-content img {
  margin: var(--spacing-lg) 0;
  /*border-radius: var(--border-radius);*/
}

/* Image alignment classes */
.article-content img.align-left {
  float: left;
  margin-right: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.article-content img.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-lg);
}

.article-content img.align-right {
  float: right;
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

/* Image size classes */
/*
.article-content img.img-small {
  width: 25%;
  height: auto;
}

.article-content img.img-medium {
  width: 50%;
  height: auto;
}

.article-content img.img-large {
  width: 75%;
  height: auto;
}

.article-content img.img-full {
  width: 100%;
  height: auto;
}*/

/* Clear float after images */
.article-content p.clear-float {
  clear: both;
}

.article-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.like-button {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-size: var(--base-font-size);
  border: 1px solid black;
}

.like-button.active {
  color: var(--primary-green);
}

.like-button i {
  margin-right: var(--spacing-xs);
}

.share-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.share-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-gray);
  color: var(--gray);
  transition: all 0.3s ease;
}

.share-button:hover {
  background-color: var(--primary-green);
  color: var(--white);
}

/* ===== Comments ===== */
.comments-section {
  margin-bottom: var(--spacing-xxl);
}

.comments-title {
  margin-bottom: var(--spacing-lg);
}

.comment-form {
  margin-bottom: var(--spacing-xl);
}

.comment-list {
  list-style: none;
}

.comment {
  background-color: var(--white);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: var(--spacing-md);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.comment-author {
  font-weight: 600;
}

.comment-date {
  font-size: var(--small-font-size);
  color: var(--gray);
}

.comment-content {
  margin-bottom: var(--spacing-sm);
}

.comment-actions {
  display: flex;
  gap: var(--spacing-sm);
  font-size: var(--small-font-size);
}

/* ===== Articles Header ===== */
.articles-header {
  padding-bottom: calc(var(--spacing-xxl) + 30px);
  margin-bottom: 0;
}

/* ===== Filter Bar ===== */
.filter-bar-wrapper {
  position: relative;
  margin-top: -80px;
  /*margin-bottom: var(--spacing-xl);*/
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
}

.filter-card {
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: var(--spacing-md);
  width: 100%;
  max-width: 100% !important; /* Override the max-width from .card */
  margin-left: 0;
  margin-right: 0;
}

.filter-row {
  display: flex;
  flex-direction: row; /* Ensure horizontal layout */
  flex-wrap: nowrap; /* Prevent wrapping on larger screens */
  gap: var(--spacing-md);
  width: 100%;
  box-sizing: border-box;
}

.filter-col {
  flex: 1 1 calc(33.333% - var(--spacing-md)); /* Each column takes exactly 1/3 of the space minus the gap */
  min-width: 0; /* Allow columns to shrink below min-content if needed */
  box-sizing: border-box;
}

.search-input-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
}

.search-input-wrapper .form-control {
  padding-left: 40px;
  height: 48px;
  width: 100%;
  box-sizing: border-box;
}

.filter-card .form-control {
  height: 48px;
  border-radius: var(--border-radius);
  /*border: 1px solid var(--light-gray);*/
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .filter-row {
    flex-direction: column;
  }

  .filter-col {
    width: 100%;
    flex: 1 1 100%;
    margin-bottom: var(--spacing-sm);
  }

  .articles-header {
    padding-bottom: var(--spacing-xl);
  }

  .filter-bar-wrapper {
    margin-top: 0;
  }

  .filter-card {
    padding: var(--spacing-sm);
  }
}

/* ===== Profile Page ===== */
.profile-section {
  min-height: calc(100vh - 300px); /* Adjust for header and footer */
}

.profile-avatar img {
  border: 3px solid var(--primary-green);
  padding: 3px;
  background-color: var(--white);
}

.profile-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-nav-item {
  margin-bottom: var(--spacing-sm);
}

.profile-nav-link {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  color: var(--black);
  transition: all 0.3s ease;
}

.profile-nav-link:hover {
  background-color: var(--light-gray);
  color: var(--primary-green);
}

.profile-nav-link.active {
  background-color: var(--primary-green);
  color: var(--white);
}

.profile-nav-link i {
  margin-right: var(--spacing-sm);
}

.profile-tab {
  display: none;
}

.profile-tab.active {
  display: block;
}

/* Profile layout */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.profile-sidebar {
  grid-column: 1;
}

.profile-info {
  grid-column: 2;
}

.profile-content {
  grid-column: 3;
}

@media (max-width: 991px) {
  .profile-grid {
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-md);
  }

  .profile-sidebar {
    grid-column: 1;
    grid-row: 1;
  }

  .profile-info {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-content {
    grid-column: 1 / span 2;
    grid-row: 2;
    margin-top: var(--spacing-lg);
  }
}

@media (max-width: 767px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-sidebar,
  .profile-info,
  .profile-content {
    grid-column: 1;
  }

  .profile-sidebar {
    grid-row: 1;
  }

  .profile-info {
    grid-row: 2;
    margin-top: var(--spacing-lg);
  }

  .profile-content {
    grid-row: 3;
    margin-top: var(--spacing-lg);
  }
}

/* Profile Stats */
.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--light-gray);
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-stat-value {
  font-size: var(--heading-3);
  font-weight: 600;
  color: var(--primary-green);
}

.profile-stat-label {
  font-size: var(--small-font-size);
  color: var(--gray);
}

/* Activity Items */
.activity-item {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--light-gray);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-title {
  margin-bottom: var(--spacing-xs);
  font-size: var(--heading-5);
}

.activity-text {
  margin-bottom: var(--spacing-xs);
}

.activity-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--small-font-size);
  color: var(--gray);
}

.activity-stats {
  display: flex;
  gap: var(--spacing-sm);
}

/* ===== Auth Pages ===== */
.auth-section {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 300px); /* Adjust for header and footer */
  padding: var(--spacing-xxl) 0;
}

.auth-section .card {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
  width: 100%;
}

.auth-section .card-content {
  padding: var(--spacing-xl);
  max-width: 100%;
}

.auth-section .card-title {
  color: var(--primary-green);
  margin-bottom: var(--spacing-md);
}

.auth-section .btn-primary {
  margin-top: var(--spacing-md);
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-green);
}

.form-text {
  font-size: var(--small-font-size);
  color: var(--gray);
  margin-top: var(--spacing-xs);
}

.form-error {
  color: var(--error);
  font-size: var(--small-font-size);
  margin-top: var(--spacing-xs);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ===== Newsletter ===== */
.newsletter-section {
  background-color: var(--primary-green);
  color: var(--white);
  padding: var(--spacing-xxl) 0;
  text-align: center;
}

.newsletter-container {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-title {
  font-size: var(--heading-2);
  margin-bottom: var(--spacing-md);
  color: var(--white);
}

.newsletter-description {
  margin-bottom: var(--spacing-lg);
  font-size: var(--large-font-size);
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.newsletter-form .form-control {
  padding: 1rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--base-font-size);
}

.newsletter-form .btn {
  padding: 1rem;
  font-size: var(--base-font-size);
}

@media (min-width: 768px) {
  .newsletter-form {
    flex-direction: row;
  }

  .newsletter-form .form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .newsletter-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

/* ===== Alerts ===== */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
}

.alert-success {
  background-color: rgba(46, 204, 113, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.alert-error {
  background-color: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-xl);
}

.pagination-item {
  margin: 0 var(--spacing-xs);
}

.pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--black);
  transition: all 0.3s ease;
}

.pagination-link:hover {
  background-color: var(--light-green);
  color: var(--white);
}

.pagination-link.active {
  background-color: var(--primary-green);
  color: var(--white);
}

/* ===== Comments ===== */
.comments-section {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--light-gray);
}

.comments-title {
  font-size: var(--heading-3);
  margin-bottom: var(--spacing-lg);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.comment-author {
  font-weight: 600;
  color: var(--primary-green);
}

.admin-author {
  color: var(--error);
}

.comment-date {
  font-size: var(--small-font-size);
  color: var(--gray);
}

.comment-content {
  margin-bottom: var(--spacing-md);
}

.comment-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-green);
  cursor: pointer;
  font-size: var(--small-font-size);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.btn-link:hover {
  text-decoration: underline;
}

.edit-button {
  color: var(--primary-blue);
}

.delete-button {
  color: var(--error);
}

.edit-form-container {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: var(--white);
  border-radius: var(--border-radius);
  border: 1px solid var(--light-gray);
}

.edit-form-container.hidden {
  display: none;
}

.edit-form textarea {
  width: 100%;
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  resize: vertical;
  min-height: 80px;
}

.reply-form-container {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: var(--white);
  border-radius: var(--border-radius);
  border: 1px solid var(--light-gray);
}

.reply-form-container.hidden {
  display: none;
}

.reply-form textarea {
  width: 100%;
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: var(--spacing-md);
}

.comment-replies {
  list-style: none;
  padding-left: var(--spacing-xl);
  margin-top: var(--spacing-md);
  border-left: 2px solid var(--light-green);
}

/* Style for reply comments */
.comment-replies .comment {
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  margin-bottom: var(--spacing-md);
  position: relative;
}

.comment-replies .comment::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 20px;
  width: 10px;
  height: 2px;
  background-color: var(--light-green);
}

.comment-replies .comment-author {
  font-size: 0.9em;
}

.comment-replies .comment-date {
  font-size: 0.8em;
}

.comment-replies .comment-content {
  font-size: 0.95em;
}

.reply-indicator {
  display: block;
  font-size: 0.8em;
  color: var(--gray);
  margin-bottom: var(--spacing-xs);
  font-style: italic;
}

.reply-comment {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.reply-comment:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* ===== Footer ===== */
.footer {
  background-color: var(--primary-green);
  color: var(--white);
  padding: var(--spacing-lg) 0; /* Reduced padding */
  margin-top: auto;
  font-size: 0.9rem; /* Smaller font size */
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.footer-text {
  margin-bottom: var(--spacing-md);
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--white);
}

.footer-links {
  list-style: none;
}

.footer-link {
  margin-bottom: var(--spacing-sm);
}

.footer-link a {
  color: var(--beige);
  transition: color 0.3s ease;
}

.footer-link a:hover {
  color: var(--white);
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.social-icon .icon {
  font-size: 1.2em;
}

/* Responsive footer */
@media (max-width: 767px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--white);
  color: var(--primary-green);
}

.footer-bottom {
  margin-top: var(--spacing-lg); /* Reduced margin */
  padding-top: var(--spacing-sm); /* Reduced padding */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.8rem; /* Smaller font size */
}

/* ===== Utilities ===== */
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.ml-1 { margin-left: var(--spacing-xs); }
.ml-2 { margin-left: var(--spacing-sm); }
.ml-3 { margin-left: var(--spacing-md); }
.ml-4 { margin-left: var(--spacing-lg); }
.ml-5 { margin-left: var(--spacing-xl); }

.mr-1 { margin-right: var(--spacing-xs); }
.mr-2 { margin-right: var(--spacing-sm); }
.mr-3 { margin-right: var(--spacing-md); }
.mr-4 { margin-right: var(--spacing-lg); }
.mr-5 { margin-right: var(--spacing-xl); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--box-shadow); }

.bg-white { background-color: var(--white); }
.bg-primary { background-color: var(--primary-green); }
.bg-light { background-color: var(--beige); }

.text-white { color: var(--white); }
.text-primary { color: var(--primary-green); }
.text-dark { color: var(--black); }

.hidden { display: none; }
.visible { display: block; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  :root {
    --container-padding: 2rem;
  }
}

@media (max-width: 992px) {
  :root {
    --heading-1: 2.25rem;
    --heading-2: 1.75rem;
    --heading-3: 1.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .article-cover {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-list {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md) 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-200%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav-list.active {
    transform: translateY(0);
  }

  .nav-item {
    margin: var(--spacing-sm) 0;
  }

  .row {
    flex-direction: column;
  }

  .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    max-width: 100%;
  }

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

@media (max-width: 576px) {
  :root {
    --heading-1: 2rem;
    --heading-2: 1.5rem;
    --heading-3: 1.25rem;
    --container-padding: 1rem;
  }

  .hero {
    padding: var(--spacing-xl) 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .article-cover {
    height: 200px;
  }

  .article-content {
    padding: var(--spacing-lg);
  }
}

/* ===== Modals ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--light-gray);
}

.modal-title {
  font-size: var(--heading-4);
  margin: 0;
  color: var(--primary-green);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--error);
}

.modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
  max-height: calc(90vh - 130px);
}

.modal-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--light-gray);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
}

/* Full-screen modal for article editor */
.modal-fullscreen .modal-dialog {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  margin: 0;
}

.modal-fullscreen .modal-body {
  max-height: calc(100vh - 130px);
}

@media (max-width: 768px) {
  .modal-dialog {
    width: 95%;
    max-height: 95vh;
  }

  .modal-body {
    max-height: calc(95vh - 130px);
  }
}

/* ===== Alerts ===== */
.alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 350px;
}

.alert {
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: var(--border-radius);
  color: var(--white);
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  animation: slideIn 0.4s ease-out forwards;
  font-weight: 500;
  display: flex;
  align-items: center;
  border-left: 5px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.alert:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.alert-success {
  background-color: rgba(46, 204, 113, 0.95);
  border-left-color: #27ae60;
}

.alert-error {
  background-color: rgba(231, 76, 60, 0.95);
  border-left-color: #c0392b;
}

.alert-info {
  background-color: rgba(74, 124, 89, 0.95);
  border-left-color: #2c3e50;
}

.alert::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 15px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.alert-success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
}

.alert-error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z'/%3E%3C/svg%3E");
}

.alert-info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z'/%3E%3C/svg%3E");
}

.alert-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.alert-close:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.2);
}

.admin-preview-notification div {
  background-color: var(--primary-green);
}

/* ===== Toast Notifications ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.toast {
  background-color: var(--white);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: toast-in 0.3s ease-in-out;
  border-left: 4px solid var(--primary-green);
}

.toast-hiding {
  animation: toast-out 0.3s ease-in-out forwards;
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 12px 16px;
}

.toast-message {
  flex: 1;
  font-size: var(--small-font-size);
  color: var(--black);
}

.toast-close {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  margin-left: 8px;
}

.toast-info {
  border-left-color: var(--info);
}

.toast-success {
  border-left-color: var(--success);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-error {
  border-left-color: var(--error);
}

@keyframes toast-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ===== Article Content Image Styles ===== */

/* Image size presets */
.article-content img.img-small,
.article-body img.img-small {
  width: 25% !important;
  min-width: 150px !important; /* Ensure image is not too small on mobile */
}

.article-content img.img-medium,
.article-body img.img-medium {
  width: 50% !important;
  min-width: 200px !important; /* Ensure image is not too small on mobile */
}

.article-content img.img-large,
.article-body img.img-large {
  width: 75% !important;
  min-width: 250px !important; /* Ensure image is not too small on mobile */
}

.article-content img.img-full,
.article-body img.img-full {
  width: 100% !important;
}

/* Responsive image styles */
@media (max-width: 768px) {
  .article-content img.img-small,
  .article-body img.img-small {
    width: 40% !important;
  }

  .article-content img.img-medium,
  .article-body img.img-medium {
    width: 60% !important;
  }

  .article-content img.img-large,
  .article-body img.img-large {
    width: 80% !important;
  }
}

@media (max-width: 480px) {
  .article-content img.img-small,
  .article-content img.img-medium,
  .article-content img.img-large,
  .article-body img.img-small,
  .article-body img.img-medium,
  .article-body img.img-large {
    width: 100% !important;
    float: none !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Image alignment styles */
.article-content img.align-left,
.article-body img.align-left {
  float: left !important;
  margin-right: 15px !important;
  margin-bottom: 10px !important;
}

.article-content img.align-center,
.article-body img.align-center {
  float: none !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 10px !important;
}

.article-content img.align-right,
.article-body img.align-right {
  float: right !important;
  margin-left: 15px !important;
  margin-bottom: 10px !important;
}

/* Fix for line breaks with floated images */
.article-content br,
.article-body br {
  clear: none !important;
}

/* Make sure paragraphs don't clear floats unless explicitly told to */
.article-content p,
.article-body p {
  clear: none !important;
  overflow: auto; /* This helps contain floats within paragraphs */
}

/* Clear floats only when needed */
.article-content .clear-float,
.article-content p.clear-float,
.article-body .clear-float,
.article-body p.clear-float {
  clear: both !important;
  display: block;
  content: "";
  height: 0;
}

/* Clear floats after specific elements if needed */
.article-content p:after,
.article-body p:after {
  content: "";
  display: table;
  clear: none; /* Changed from 'both' to 'none' to prevent automatic clearing */
}