html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Constrain home content for better readability */
.home-content {
  max-width: 980px;
  margin: 0 auto;
}

/* Constrain public listing pages */
.public-content {
  max-width: 980px;
  margin: 0 auto;
}
.public-content h1,
.public-content .h1 { margin-top: 1.25rem; margin-bottom: 1rem; }
.public-content p { margin-bottom: 1.15rem; }
.public-content .lead { margin-top: .25rem; margin-bottom: 1.6rem; line-height: 1.7; }
.public-content form { margin-bottom: 1.25rem; }
.public-content .row,[class^="row "] { row-gap: 1rem; }

/* Global vertical rhythm adjustments for home */
.home-content h1,
.home-content .h1 { margin-top: 1.75rem; margin-bottom: 1rem; }
.home-content h2,
.home-content .h2 { margin-top: 1.5rem; margin-bottom: .95rem; }
.home-content h3,
.home-content .h3 { margin-top: 1rem; margin-bottom: .75rem; }
.home-content p { margin-bottom: 1.15rem; }
.home-content .lead { margin-top: .75rem; margin-bottom: 1.8rem; line-height: 1.75; }
.home-content section { margin-bottom: 3.25rem; }

/* Extra spacing between header rows and carousels */
.home-content .d-flex.align-items-center.mb-2 { margin-bottom: 1rem !important; }
.homepage-carousel { margin-top: .35rem; }

/* Larger 'more' buttons */
.btn-more {
  padding: .6rem 1.1rem;
  font-weight: 600;
}

/* CTA buttons under home sections */
.btn-cta-fallacies {
  border: 1px solid #258cfb;
  color: #258cfb;
  background: transparent;
}
.btn-cta-fallacies:hover,
.btn-cta-fallacies:focus {
  background-color: #258cfb;
  color: #fff;
}

.btn-cta-biases {
  border: 1px solid #c58b00;
  color: #c58b00;
  background: transparent;
}
.btn-cta-biases:hover,
.btn-cta-biases:focus {
  background-color: #c58b00;
  color: #fff;
}

/* Detail cards spacing */
.fallacy-detail-card h5,
.bias-detail-card h5 { margin-top: 1rem; margin-bottom: .75rem; }
.fallacy-detail-card p,
.bias-detail-card p { margin-bottom: 1rem; }

/* Uniform card heights and line clamping for fallacy cards */
.fallacy-card {
  display: flex;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Colorful accents for public cards */
.fallacy-card {
  border: 1px solid rgba(37, 140, 251, 0.15);
  border-radius: .75rem;
  background: linear-gradient(180deg, rgba(37, 140, 251, 0.06), rgba(37, 140, 251, 0));
}
.fallacy-card .card-title {
  color: #114a94;
}
.fallacy-card .btn-outline-primary {
  border-color: #258cfb;
  color: #258cfb;
}
.fallacy-card .btn-outline-primary:hover,
.fallacy-card .btn-outline-primary:focus {
  background-color: #258cfb;
  color: #fff;
}

/* Public details card */
.fallacy-detail-card {
  border: 1px solid rgba(37, 140, 251, 0.2);
  border-radius: .75rem;
  background: linear-gradient(180deg, rgba(37, 140, 251, 0.07), rgba(37, 140, 251, 0));
  padding: 1.25rem;
}

.fallacy-detail-card .card-title {
  color: #114a94;
}

/* Bias cards: slightly yellow theme */
.bias-card {
  border: 1px solid rgba(255, 193, 7, 0.22);
  border-radius: .75rem;
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.12), rgba(255, 193, 7, 0));
}
.bias-card .card-title {
  color: #7a5b00;
}
.bias-card .btn-outline-primary {
  border-color: #c58b00;
  color: #c58b00;
}
.bias-card .btn-outline-primary:hover,
.bias-card .btn-outline-primary:focus {
  background-color: #c58b00;
  color: #fff;
}

/* Bias public detail: slightly yellow */
.bias-detail-card {
  border: 1px solid rgba(255, 193, 7, 0.28);
  border-radius: .75rem;
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.14), rgba(255, 193, 7, 0));
  padding: 1.25rem;
}
.bias-detail-card .card-title {
  color: #7a5b00;
}

/* Small icon inside fallacy card */
.fallacy-icon {
  width: 66px;
  height: 66px;
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(17, 74, 148, 0.2);
  border-radius: 8px;
  background-color: #fff;
  padding: 5px;
}

/* Smaller icon variant for detail header */
.fallacy-icon-sm {
  width: 44px;
  height: 44px;
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(17, 74, 148, 0.2);
  border-radius: 8px;
  background-color: #fff;
  padding: 5px;
}

/* Homepage carousels: make controls visible and outside cards */
.homepage-carousel {
  position: relative;
}
.homepage-carousel .carousel-control-prev,
.homepage-carousel .carousel-control-next {
  width: 3.25rem; /* slightly wider to look separate */
  opacity: 1;
  filter: none;
}

.homepage-carousel .carousel-control-prev-icon,
.homepage-carousel .carousel-control-next-icon {
  background-color: rgba(17, 17, 17, 0.9);
  border-radius: .5rem; /* not round, lightly rounded like cards */
  width: 3rem;
  height: 2.5rem;
  background-size: 1.25rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.homepage-carousel .carousel-control-prev {
  left: -2rem;
}
.homepage-carousel .carousel-control-next {
  right: -2rem;
}
@media (max-width: 576px) {
  .homepage-carousel .carousel-control-prev { left: -1rem; }
  .homepage-carousel .carousel-control-next { right: -1rem; }
}