/* 
  Comments Page Styles
  Matches Story & Donations Page Design System
*/

/* Base Reset & Page Layout */
.comments-page {
  font-family: var(--font-brand);
  color: var(--charcoal);
  background-color: var(--light-bg);
  /* Dot pattern background */
  background-image: radial-gradient(#e5e5e5 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  position: relative;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.comments-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  position: relative;
  z-index: 2;
}

/* --- HERO SECTION --- */
.comments-hero {
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
  margin-bottom: 2rem;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--black);
  -webkit-text-stroke: 2px var(--black);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  z-index: 1;
  transform: rotate(-2deg);
  animation: wiggle 3s ease-in-out infinite;
}

.page-title::before {
  content: '💬';
  position: absolute;
  top: -40px;
  left: -40px;
  font-size: 3rem;
  animation: bounce-sm 2s ease-in-out infinite;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.page-title::after {
  content: '📣';
  position: absolute;
  bottom: -20px;
  right: -40px;
  font-size: 3rem;
  animation: bounce-sm 2s ease-in-out infinite;
  animation-delay: 1s;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.page-subtitle {
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--black);
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 0.5rem 1.5rem;
  border: var(--border-thick);
  border-radius: 50px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
  transform: rotate(1deg);
  display: inline-block;
}

/* --- COMMENTS GRID --- */
.comments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.comment-card {
  background: var(--white);
  border: var(--border-thick);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-hard);
  position: relative;
  transition: transform 0.2s var(--transition-standard);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: float-y 3s ease-in-out infinite;
}

/* Speech bubble tail */
.comment-card::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 30px;
  width: 24px;
  height: 24px;
  background: var(--white);
  border-bottom: var(--border-thick);
  border-right: var(--border-thick);
  transform: rotate(45deg);
}

.comment-card:hover {
  transform: translate(-4px, -4px) scale(1.02);
  box-shadow: var(--shadow-hover);
  background-color: #FFFDF5;
  z-index: 5;
  animation-play-state: paused;
}

.comment-card:nth-child(even) {
  transform: rotate(1deg);
  animation-delay: 1s;
}

.comment-card:nth-child(odd) {
  transform: rotate(-1deg);
  animation-delay: 0.5s;
}

.comment-card:nth-child(3n) {
  animation-delay: 1.5s;
}

.comment-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
  font-style: italic;
  line-height: 1.5;
}

.comment-text::before {
  content: '"';
  font-size: 3rem;
  color: var(--yellow);
  font-family: serif;
  line-height: 0;
  vertical-align: -10px;
  margin-right: 5px;
  text-shadow: 1px 1px 0 var(--black);
}

.comment-author {
  font-weight: 800;
  text-transform: uppercase;
  color: var(--black);
  text-align: right;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.comment-author::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 2px;
  background: var(--yellow);
  border: 1px solid var(--black);
}

/* --- FLOATING STICKERS --- */
.sticker-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-sticker {
  position: absolute;
  font-size: 4rem;
  opacity: 0.15;
  filter: grayscale(100%);
  animation: float-y 4s ease-in-out infinite;
}

.bg-sticker:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; transform: rotate(-10deg); }
.bg-sticker:nth-child(2) { top: 20%; right: 10%; animation-delay: 2s; transform: rotate(15deg); }
.bg-sticker:nth-child(3) { bottom: 15%; left: 10%; animation-delay: 1s; transform: rotate(5deg); }
.bg-sticker:nth-child(4) { bottom: 30%; right: 5%; animation-delay: 3s; transform: rotate(-5deg); }

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 2.5rem;
  }
  
  .page-title::before, .page-title::after {
    font-size: 2rem;
  }
  
  .comments-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .comment-card:nth-child(n) {
    transform: rotate(0deg);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .page-title, .comment-card, .bg-sticker, .page-title::before, .page-title::after {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}
