/* Forum-specific styles */

/* Mobile/Desktop visibility utilities */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
    margin-top: 2rem;
  }
}

/* Added fixed floating back-to-top button styles */
.floating-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  z-index: 1000;
}

.floating-back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
  background: var(--accent);
}

.floating-back-to-top i {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .floating-back-to-top {
    bottom: 5rem;
    right: 1rem;
    width: 50px;
    height: 50px;
  }

  .floating-back-to-top i {
    font-size: 1.1rem;
  }
}

/* Mobile responsive navigation */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

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

  .nav {
    padding: 0 1rem;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-light);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    gap: 2rem;
    transition: right 0.3s ease;
    z-index: 999;
  }

  body.dark .nav-links {
    background: var(--bg-dark);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
    text-align: center;
    text-decoration: none;
    color: inherit;
  }

  body.dark .nav-link {
    border-bottom-color: var(--border-dark);
  }

  .container {
    padding: 120px 1rem 2rem;
    /* Added bottom padding for floating button */
    padding-bottom: 6rem;
  }
}

/* Breadcrumb Navigation */
.breadcrumb {
  background: var(--card-light);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
}

body.dark .breadcrumb {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.breadcrumb-link {
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.breadcrumb-separator {
  margin: 0 0.8rem;
  opacity: 0.5;
}

.breadcrumb-current {
  font-weight: 600;
}

/* Forum Layout */
.forum-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .forum-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Swapped order so categories appear before sidebar on mobile */
  .sidebar {
    order: 2;
  }

  .categories-section {
    order: 1;
  }
}

/* Category Cards */
.categories-section {
  width: 100%;
}

.category-card {
  background: var(--card-light);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

body.dark .category-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

body.dark .category-card:hover {
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.category-card:hover::before {
  transform: scaleY(1);
}

.category-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.category-icon {
  font-size: 2.5rem;
  margin-right: 1rem;
}

.category-info {
  flex: 1;
}

.category-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.category-description {
  opacity: 0.7;
  font-size: 0.9rem;
  line-height: 1.4;
}

.category-stats {
  text-align: center;
  padding: 0 1rem;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-last-post {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0.8;
  border: 1px solid var(--border-light);
}

body.dark .category-last-post {
  background: var(--bg-dark);
  border-color: var(--border-dark);
}

/* Category View */
.category-header-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--card-light);
  border-radius: 15px;
  border: 1px solid var(--border-light);
}

body.dark .category-header-section {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.category-header-info h1 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.category-header-info p {
  opacity: 0.8;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .category-header-section {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem;
  }

  .category-header-info h1 {
    font-size: 1.5rem;
  }

  .category-header-section .btn {
    width: 100%;
  }
}

/* Post Form */
.post-form {
  background: var(--card-light);
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  border: 1px solid var(--border-light);
  animation: slideDown 0.3s ease;
}

body.dark .post-form {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

body.dark .form-group input,
body.dark .form-group textarea {
  border-color: var(--border-dark);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* Post Items */
.post-item {
  background: var(--card-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  cursor: pointer;
}

body.dark .post-item {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

body.dark .post-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.post-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    flex-wrap: nowrap !important;
}

.post-header .author-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
}

.post-header .menu-btn {
    margin-left: auto !important;
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    transform: translateY(-2px);
    align-self: center !important;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  opacity: 0.7;
  flex-wrap: wrap;
}

.post-content-preview {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: inherit;
  opacity: 0.85;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

.helpful-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Post Detail View */
.post-detail-card {
  background: var(--card-light);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-light);
}

body.dark .post-detail-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.post-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-light);
  /* Added gap for better mobile spacing */
  gap: 1rem;
}

body.dark .post-detail-header {
  border-bottom-color: var(--border-dark);
}

.post-detail-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-detail-content {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-detail-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.delete-btn {
  background: none;
  border: 2px solid var(--error);
  color: var(--error);
  padding: 0.5rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.6rem;
}

.delete-btn:hover {
  background: var(--error);
  color: white;
  transform: scale(1.05);
}

/* Added post detail navigation styles */
.post-detail-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.nav-back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-light);
  border: 2px solid var(--border-light);
  color: inherit;
  padding: 0.7rem 1.2rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

body.dark .nav-back-btn {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.nav-back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-3px);
}

.nav-back-btn i {
  font-size: 0.9rem;
}

.back-to-top-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.back-to-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.back-to-top-btn i {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .post-detail-nav {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: var(--bg-light);
    padding: 0.5rem 0;
    margin-bottom: 1rem;
  }

  body.dark .post-detail-nav {
    background: var(--bg-dark);
  }

  .nav-back-btn span {
    display: none;
  }

  .nav-back-btn {
    width: 45px;
    height: 45px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .back-to-top-btn {
    width: 40px;
    height: 40px;
  }

  .post-detail-header {
    flex-direction: row;
    gap: 1rem;
  }

  .post-meta {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .post-header {
    flex-direction: row !important;
  }

  .post-meta {
    margin-top: 0.5rem;
  }

  .whatsapp-cta {
    padding: 1.5rem;
  }

  .whatsapp-cta h3 {
    font-size: 1.2rem;
  }

  .whatsapp-btn {
    width: 100%;
    padding: 0.9rem;
  }
}

/* Replies Section */
.replies-section {
  background: var(--card-light);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-light);
}

body.dark .replies-section {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.reply-item {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

body.dark .reply-item {
  background: var(--bg-dark);
  border-color: var(--border-dark);
}

.reply-item:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  /* Added gap and flex-wrap for better mobile spacing */
  gap: 0.8rem;
  flex-wrap: wrap;
}

.reply-content {
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Reply Form Section */
.reply-form-section {
  background: var(--card-light);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid var(--border-light);
}

body.dark .reply-form-section {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.reply-form-section textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
}

body.dark .reply-form-section textarea {
  border-color: var(--border-dark);
}

.reply-form-section textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.helpful-btn {
  background: none;
  border: 2px solid var(--border-light);
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: inherit;
  font-weight: 500;
}

body.dark .helpful-btn {
  border-color: var(--border-dark);
}

.helpful-btn.voted {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.helpful-btn:hover:not(.voted) {
  border-color: var(--success);
  color: var(--success);
  transform: translateY(-2px);
}

.helpful-btn-small {
  background: none;
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: inherit;
  font-weight: 500;
}

body.dark .helpful-btn-small {
  border-color: var(--border-dark);
}

.helpful-btn-small.voted {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.helpful-btn-small:hover:not(.voted) {
  border-color: var(--success);
  color: var(--success);
  transform: scale(1.05);
}

.helpful-btn-small i {
  font-size: 0.8rem;
}

.post-menu {
  position: relative;
  margin-left: auto;
  align-self: center;
  display: inline-block;
  cursor: pointer;
}

.post-menu-btn {
  background: none;
  border: 2px solid var(--border-light);
  color: inherit;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark .post-menu-btn {
  border-color: var(--border-dark);
}

.post-menu-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.post-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: none;
  min-width: 150px;
  z-index: 50;
}

body.dark .post-menu-dropdown {
  background: var(--card-dark);
  border-color: var(--border-dark);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.post-menu-dropdown button {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.post-menu-dropdown button:hover {
  background: rgba(99, 102, 241, 0.1);
}

.post-menu-dropdown button i {
  width: 16px;
}

@media (max-width: 768px) {
 .post-header {
    flex-direction: row !important;
    align-items: center !important;
  }

  .post-header .menu-btn {
    margin-top: 0 !important;
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
  }

  .post-menu {
    margin-left: auto;
  }

  .post-menu-dropdown {
    right: 0;
    left: auto !important;
  }

  .post-menu-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 0.4rem 0.6rem;
  }
}

.delete-btn-small {
  background: none;
  border: 1px solid var(--error);
  color: var(--error);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.delete-btn-small:hover {
  background: var(--error);
  color: white;
  transform: scale(1.05);
}

.report-btn-small {
  background: none;
  border: 1px solid var(--warning);
  color: var(--warning);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.report-btn-small:hover {
  background: var(--warning);
  color: white;
  transform: scale(1.05);
}

.reported-reply {
  border-left: 3px solid var(--warning) !important;
  background: rgba(245, 158, 11, 0.05) !important;
}

body.dark .reported-reply {
  background: rgba(245, 158, 11, 0.1) !important;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.contributors-card {
  background: var(--card-light);
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  border: 1px solid var(--border-light);
}

body.dark .contributors-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.contributor-item {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  border-radius: 10px;
  background: var(--bg-light);
  transition: all 0.3s ease;
}

body.dark .contributor-item {
  background: var(--bg-dark);
}

.contributor-rank {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.95rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.contributor-rank.gold {
  background: #ffd700;
  color: #333;
}
.contributor-rank.silver {
  background: #c0c0c0;
  color: #333;
}
.contributor-rank.bronze {
  background: #cd7f32;
}

.contributor-info {
  flex: 1;
}

.contributor-name {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contributor-helpful {
  font-size: 0.85rem;
  opacity: 0.7;
}

.whatsapp-cta {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.whatsapp-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

.whatsapp-btn {
  background: white;
  color: #25d366;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

.whatsapp-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.1) rotate(180deg);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  opacity: 0.7;
}

.empty-state h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.empty-state p {
  opacity: 0.8;
  margin-bottom: 2rem;
}

.notification {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.notification.success {
  background: var(--success);
  color: white;
}

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

@media (max-width: 768px) {
  .category-card {
    padding: 1.2rem;
  }

  .category-header {
    flex-wrap: wrap;
  }

  .category-stats {
    margin-top: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0;
  }

  .stat-number {
    display: inline-block;
    margin-right: 0.3rem;
  }

  .stat-label {
    display: inline-block;
  }

  .post-detail-title {
    font-size: 1.5rem;
  }

  .post-detail-content {
    font-size: 1rem;
  }

  .post-detail-actions {
    flex-direction: column;
  }

  .post-detail-actions .btn,
  .post-detail-actions .helpful-btn {
    width: 100%;
    justify-content: center;
  }

  .contributors-card {
    padding: 1.2rem;
  }

  .reply-item {
    padding: 1rem;
  }

  .form-group input,
  .form-group textarea,
  .reply-form-section textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .reply-header > div:first-child {
    flex: 1;
    min-width: 0;
  }

  .reply-header > div:last-child {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .post-header {
    flex-direction: row;
  }

  .post-meta {
    margin-top: 0.5rem;
  }

  .whatsapp-cta {
    padding: 1.5rem;
  }

  .whatsapp-cta h3 {
    font-size: 1.2rem;
  }

  .whatsapp-btn {
    width: 100%;
    padding: 0.9rem;
  }
}

/* Focus styles for accessibility */
.category-card:focus,
.helpful-btn:focus,
.whatsapp-btn:focus,
.delete-btn:focus,
.helpful-btn-small:focus,
.delete-btn-small:focus,
.report-btn-small:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .whatsapp-cta::before {
    animation: none;
  }
}
