/* Homepage: main wrapper when not using container */
.home-main {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* Hero */
.home-hero {
  background: #1A1A3A;
  color: #fff;
  min-height: calc(100vh - 96px);
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-hero__card {
  width: 100%;
  align-self: stretch;
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(26,26,58,0.52) 0%, rgba(26,26,58,0.42) 100%),
    url('https://picsum.photos/seed/threadline-hero/1400/900') center/cover;
  padding: 4rem 2.5rem;
}

@media (max-width: 576px) {
  .home-hero__card { padding: 3rem 1.5rem; }
}

.home-hero__inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.home-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.home-hero__subtitle {
  font-size: 1.125rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.home-hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.home-hero .btn-hero-join {
  background: #fff;
  color: #1A1A3A;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
.home-hero .btn-hero-browse {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
.home-hero .btn-hero-join:hover { background: #f0f0f0; color: #1A1A3A; }
.home-hero .btn-hero-browse:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

/* Activity + Stats */
.home-activity {
  background: var(--bg-secondary);
  padding: 4rem 1.5rem;
  transition: background-color 0.2s ease;
}
.home-activity .container { margin: 0 auto; }
.home-activity__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 768px) {
  .home-activity__grid { grid-template-columns: 1fr; }
}
.home-activity__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: 0.5rem; transition: color 0.2s ease; }
.home-activity__title { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; transition: color 0.2s ease; }
.home-activity__desc { color: var(--text-secondary); margin-bottom: 1.5rem; transition: color 0.2s ease; }
.home-activity__actions { display: flex; gap: 1rem; align-items: center; }
.home-activity .btn-explore { background: var(--border-color); color: var(--text-primary); border: none; padding: 0.5rem 1rem; border-radius: 0.375rem; font-weight: 500; transition: background-color 0.2s ease, color 0.2s ease; }
.home-activity .btn-explore:hover { background: var(--text-secondary); }

.home-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.home-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
[data-bs-theme="dark"] .home-stat-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.home-stat-card__value { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); transition: color 0.2s ease; }
.home-stat-card__label { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; transition: color 0.2s ease; }

/* Recent */
.home-recent {
  background: var(--bg-primary);
  padding: 4rem 1.5rem;
  transition: background-color 0.2s ease;
}
.home-recent .container { margin: 0 auto; }
.home-recent__head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.home-recent__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); transition: color 0.2s ease; }
.home-recent__title { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); margin: 0.25rem 0 0.5rem; transition: color 0.2s ease; }
.home-recent__desc { color: var(--text-secondary); font-size: 0.95rem; max-width: 520px; transition: color 0.2s ease; }
.home-recent .btn-view-all { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); padding: 0.4rem 1rem; border-radius: 0.375rem; font-size: 0.9rem; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.home-recent .btn-view-all:hover { background: var(--border-color); }
.home-recent__cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 768px) {
  .home-recent__cards { grid-template-columns: 1fr; }
}
.home-recent-card {
  background: var(--bg-secondary);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--border-color);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
[data-bs-theme="dark"] .home-recent-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.home-recent-card__img { width: 100%; height: 180px; object-fit: cover; }
.home-recent-card__body { padding: 1.25rem; }
.home-recent-card__meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.home-recent-card__cat { background: var(--bg-primary); color: var(--text-primary); padding: 0.2rem 0.5rem; border-radius: 0.25rem; font-size: 0.8rem; transition: background-color 0.2s ease, color 0.2s ease; }
.home-recent-card__time { color: var(--text-secondary); font-size: 0.8rem; transition: color 0.2s ease; }
.home-recent-card__title { font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; transition: color 0.2s ease; }
.home-recent-card__desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; transition: color 0.2s ease; }
.home-recent-card__link { color: var(--text-primary); font-weight: 500; text-decoration: none; transition: color 0.2s ease; }
.home-recent-card__link:hover { text-decoration: underline; }

/* CTA: Ready to join */
.home-cta {
  padding: 4rem 1.5rem;
  background: var(--bg-primary);
  transition: background-color 0.2s ease;
}
.home-cta .container { max-width: 900px; margin: 0 auto; }
.home-cta__banner {
  background: linear-gradient(135deg, rgba(30,27,75,0.92) 0%, rgba(17,24,39,0.95) 100%),
    url('https://picsum.photos/seed/threadline-cta/1200/400') center/cover;
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
}
[data-bs-theme="dark"] .home-cta__banner {
  background: linear-gradient(135deg, rgba(26,26,58,0.95) 0%, rgba(17,24,39,0.98) 100%),
    url('https://picsum.photos/seed/threadline-cta/1200/400') center/cover;
}
.home-cta__title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; }
.home-cta__desc { margin-bottom: 1.5rem; opacity: 0.95; }
.home-cta__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.home-cta .btn-cta-register { background: #fff; color: #1f2937; border: none; padding: 0.6rem 1.5rem; border-radius: 0.5rem; font-weight: 600; transition: background-color 0.2s ease; }
.home-cta .btn-cta-signin { background: #374151; color: #fff; border: none; padding: 0.6rem 1.5rem; border-radius: 0.5rem; font-weight: 600; transition: background-color 0.2s ease; }
.home-cta .btn-cta-register:hover { background: #f0f0f0; color: #1f2937; }
.home-cta .btn-cta-signin:hover { background: #4b5563; color: #fff; }

/* Safety */
.home-safety {
  background: var(--bg-primary);
  padding: 4rem 1.5rem;
  transition: background-color 0.2s ease;
}
.home-safety .container { margin: 0 auto; }
.home-safety__title { font-size: 2rem; font-weight: 700; color: var(--text-primary); text-align: center; margin-bottom: 0.5rem; transition: color 0.2s ease; }
.home-safety__sub { color: var(--text-secondary); text-align: center; max-width: 560px; margin: 0 auto 2.5rem; transition: color 0.2s ease; }
.home-safety__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) {
  .home-safety__grid { grid-template-columns: 1fr; }
}
.home-safety-card {
  background: var(--bg-secondary);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--border-color);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
[data-bs-theme="dark"] .home-safety-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.home-safety-card__label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.25rem; transition: color 0.2s ease; }
.home-safety-card__title { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; transition: color 0.2s ease; }
.home-safety-card__desc { color: var(--text-secondary); margin-bottom: 0.75rem; font-size: 0.95rem; transition: color 0.2s ease; }
.home-safety-card__link { color: var(--text-primary); text-decoration: none; transition: color 0.2s ease; }
.home-safety-card__link:hover { text-decoration: underline; }
.home-safety-card__img { width: 100%; height: 200px; object-fit: cover; border-radius: 0.375rem; margin-top: 1rem; }

/* Testimonials */
.home-testimonials {
  background: #1A1A3A;
  color: #fff;
  padding: 4rem 1.5rem;
}
.home-testimonials .container { max-width: 1000px; margin: 0 auto; }
.home-testimonials__title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.home-testimonials__sub { text-align: center; color: #93c5fd; margin-bottom: 2rem; }
.home-testimonials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 992px) {
  .home-testimonials__grid { grid-template-columns: 1fr; }
}
.home-testimonial-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.home-testimonial-card--active { border-color: #a78bfa; border-width: 2px; }
.home-testimonial-card__stars { color: #fbbf24; margin-bottom: 0.75rem; letter-spacing: 0.1em; }
.home-testimonial-card__quote { font-size: 0.95rem; line-height: 1.5; margin-bottom: 1rem; }
.home-testimonial-card__author { display: flex; align-items: center; gap: 0.75rem; }
.home-testimonial-card__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.home-testimonial-card__name { font-weight: 600; }
.home-testimonial-card__role { font-size: 0.8rem; color: #93c5fd; }
.home-testimonials__dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.home-testimonials__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); border: none; padding: 0; cursor: pointer; }
.home-testimonials__dot--active { width: 10px; height: 10px; background: #a78bfa; }

/* Newsletter pop-up (logged-out users, corner) */
.newsletter-popup {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
  width: 100%;
  max-width: 340px;
  padding: 1.25rem 1.5rem;
  background: #1A1A3A;
  color: #fff;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: inherit;
}
.newsletter-popup--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
}
.newsletter-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.newsletter-popup__close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.newsletter-popup__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  padding-right: 2rem;
}
.newsletter-popup__sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1rem;
  line-height: 1.4;
}
.newsletter-popup__error {
  font-size: 0.875rem;
  color: #fca5a5;
  background: rgba(185, 28, 28, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  margin: 0 0 1rem;
  line-height: 1.35;
}
.newsletter-popup__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.newsletter-popup__input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.newsletter-popup__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.newsletter-popup__input:focus {
  outline: none;
  border-color: #a78bfa;
  background: rgba(255, 255, 255, 0.1);
}
.newsletter-popup__btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #fff;
  color: #1A1A3A;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.newsletter-popup__btn:hover {
  background: #f0f0f0;
  color: #1A1A3A;
}
.newsletter-popup__consent {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.35;
}
@media (max-width: 400px) {
  .newsletter-popup {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

/* FAQ */
.home-faq {
  background: var(--bg-secondary);
  padding: 4rem 1.5rem;
  transition: background-color 0.2s ease;
}
.home-faq .container { max-width: 720px; margin: 0 auto; }
#faq { scroll-margin-top: 100px; }
.home-faq__title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; color: var(--text-primary); transition: color 0.2s ease; }
.home-faq__intro { text-align: center; color: var(--text-secondary); margin-bottom: 2rem; transition: color 0.2s ease; }
.home-faq .accordion-item { border: 1px solid var(--border-color); border-radius: 0.5rem; margin-bottom: 0.75rem; overflow: hidden; background: var(--bg-secondary); transition: background-color 0.2s ease, border-color 0.2s ease; }
.home-faq .accordion-button { font-weight: 600; background: var(--bg-primary); color: var(--text-primary); transition: background-color 0.2s ease, color 0.2s ease; }
.home-faq .accordion-button:not(.collapsed) { background: var(--bg-secondary); color: var(--text-primary); box-shadow: none; }
.home-faq .accordion-body { color: var(--text-secondary); transition: color 0.2s ease; }
.home-faq__more { text-align: center; margin-top: 2.5rem; }
.home-faq__more-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-primary); transition: color 0.2s ease; }
.home-faq__more-desc { color: var(--text-secondary); margin-bottom: 1rem; transition: color 0.2s ease; }

/* Get in touch */
.home-contact {
  background: var(--bg-secondary);
  padding: 4rem 1.5rem;
  transition: background-color 0.2s ease;
}
.home-contact .container { max-width: 1000px; margin: 0 auto; }
#get-in-touch { scroll-margin-top: 100px; }
.home-contact__title { font-size: 2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; transition: color 0.2s ease; }
.home-contact__intro { color: var(--text-secondary); margin-bottom: 2rem; transition: color 0.2s ease; }
.home-contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 768px) {
  .home-contact__grid { grid-template-columns: 1fr; }
}
.home-contact-card { text-align: left; }
.home-contact-card__icon { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--text-secondary); transition: color 0.2s ease; }
.home-contact-card__title { font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; transition: color 0.2s ease; }
.home-contact-card__desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0.5rem; transition: color 0.2s ease; }
.home-contact-card__value { color: var(--text-primary); transition: color 0.2s ease; }
