/* NOTE: THE REM NUMBERS ARE ODDLY SPECIFIC B/C I STARTED WITH PX AND THEN CONVERTED TO PX.
 REM IS BETTER FOR RESPONSIVENESS ACCORDING TO JEFF*/

/* base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a,
button,
.category-box,
.nav-link,
.social-icon {
  transition: all 0.3s ease;
}

body {
  font-family: "Nunito", Arial, sans-serif;
  background-color: #f5f7fa;
  line-height: 1.6;
  /* min-height: 100vh;
  display: flex;
  flex-direction: column; */
}

/* main {
  flex: 1;
} */

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.section-header {
  font-family: "Poppins", Arial, sans-serif;
}

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 3rem);
}

/* navigation bar */
.navbar {
  background-color: #1a3a6e;
  padding: 0.9375rem 0;
  color: #ffffff;
  position: relative;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: clamp(1.125rem, 3vw, 1.375rem); /* bruh */
}

.navbar-logo {
  height: clamp(3.5rem, 10vw, 4.375rem);
  margin-right: 0.9375rem;
}

/* mobile menu stuff - sidebar */
.menu-toggle {
  display: none; /* hide the checkbox */
}

.checkbtn {
  font-size: 1.5rem;
  color: #ffffff;
  cursor: pointer;
  display: none; /* hide by default on desktop */
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1a3a6e;
  width: 100%;
  padding: 0;
  border-top: 4px double #ffffff;
  list-style: none;
  z-index: 100;
  box-shadow: 0 5px 0.625rem rgba(0, 0, 0, 0.2);
}

.nav-mobile li {
  border-bottom: 1px solid #ffffff1a;
}

.nav-mobile .nav-link {
  padding: 0.9375rem 1.25rem;
  display: block;
}

.nav-mobile .nav-link.active {
  border-bottom: none;
  background-color: #ffffff1a;
}

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

.nav-link {
  font-size: clamp(0.875rem, 2vw, 1.25rem); /* BRUH */
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.9375rem;
  transition: opacity 0.3s; /* todo does this actual work?? */
  white-space: nowrap;
}

.nav-link:hover {
  opacity: 0.8;
}

.nav-link.active {
  border-bottom: 2px solid white;
  font-weight: bold;
}

/* info section */
.info-section {
  position: relative;
  background-image: url("images/downtown-davis-davis-ca.jpg");
  background-size: cover;
  background-position: center;
  padding: 1.875rem;
  margin: 1.25rem 0;
  color: #ffffff;
}

.info-section-content {
  position: relative;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 1.25rem;
  border-radius: 0.5rem;
  color: #333333;
}

.info-section-content h1 {
  font-size: 1.375rem;
  margin-bottom: 0.625rem;
  color: #1a3a6e;
}

.hero-content p {
  margin-bottom: 0.625rem;
}

/* categories scroll section */
.categories-section {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.625rem 0;
}

.categories-label {
  color: #1a3a6e;
  font-size: 0.9375rem;
  margin-right: 0.625rem;
  margin-left: 0.625rem;
}

.categories-container {
  display: flex;
  overflow-x: auto;
  padding: 0.625rem 0;
  scrollbar-width: thin;
}

.categories-container::-webkit-scrollbar {
  height: 5px;
}

.categories-container::-webkit-scrollbar-thumb {
  background-color: #1a3a6e;
  border-radius: 0.625rem;
}

.categories-container::-webkit-scrollbar-track {
  background-color: #f8f9fa;
}

.category-box {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  margin-right: 0.625rem;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.category-box.active {
  background-color: #1a3a6e;
  color: white;
  font-weight: bold;
}

.category-box.inactive {
  background-color: #dfe1e2;
  color: #000000;
  text-decoration: none;
  border: 2px solid #90959a;
}

.category-box:hover {
  background-color: #9cafd9;
  color: #091f43;
}

.category-box.disabled {
  background-color: #99a6af99;
  color: #000000;
  border: 2px dashed #90959a;
  cursor: not-allowed;
  opacity: 0.7;
}

/* section headers */
.section-header {
  font-size: 1.375rem;
  color: #1a3a6e;
  margin: 1.25rem 0;
}

/* coupon */
.coupon-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.875rem;
}

.coupon-card {
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
}

.coupon-business {
  padding: 0.9375rem;
  display: flex;
  align-items: center;
  min-height: 7.5rem;
  height: 7.5rem;
}

.business-logo {
  width: auto;
  max-width: 4.375rem;
  height: auto;
  object-fit: contain;
  margin-right: 0.9375rem;
  flex-shrink: 0;
}

.business-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.business-info h4 {
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 1.125rem;
  max-width: 100%;
}

/* business name linking color */
.business-info h4 a {
  color: #1a3a6e; /* instead of bright blue for url */
}

.business-info h4 a:hover {
  color: #0056b3;
}

.business-info p {
  font-size: 0.875rem;
  max-width: 100%;
  font-weight: bold;
  color: #666666;
}

.coupon-discount {
  background-color: black;
  color: white;
  padding: 0.9375rem;
  text-align: center;
  height: 6.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-style: dashed;
}

.coupon-discount h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.coupon-discount p {
  font-size: 0.875rem;
}

.coupon-details {
  padding: 0.9375rem;
  font-size: 0.75rem;
  color: #666666;
  min-height: 4.375rem;
}

/* footer styling */
.footer {
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  padding: 0.9375rem 0;
  margin-top: 1.875rem;
  text-align: center;
}

.footer-top,
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 0 1.25rem;
  max-width: 75rem;
  margin: 0 auto;
}

.social-links {
  display: flex;
  gap: 0.625rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background-color: #1a3a6e;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
}

.social-icon:hover {
  background-color: #0f2851;
}

.footer a:hover {
  text-decoration: underline;
}

.btn-donate {
  background-color: #1a3a6e;
  color: white;
  padding: 5px 0.625rem;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
}

.btn-donate:hover {
  background-color: #0f2851;
  text-decoration: none;
}

/* #check:checked ~ .nav-mobile {
  display: block;
  
} */

.footer-bottom {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  font-size: 0.875rem;
  color: #2f2f2f;
}

@media (max-width: 56.25rem) {
  body {
    font-size: 1.25rem;
  }

  .coupon-card {
    transform: scale(1.05);
  }

  .business-logo {
    max-width: 6rem;
  }

  .coupon-discount {
    font-size: 1.25rem;
  }

  .checkbtn {
    display: block;
  }
  .nav-links {
    display: none;
  }

  #check:checked ~ .nav-mobile {
    display: block;
  }
}

@media (max-width: 48rem) {
  html {
    font-size: clamp(16px, 1vw, 15px);
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    gap: 0.625rem;
  }

  .business-info h4 {
    font-size: 1rem;
  }

  .social-links {
    margin-bottom: 1.25rem;
  }

  /* show hamburger menu on mobile screenssizes */
  .checkbtn {
    display: block;
  }

  #check:checked ~ .nav-mobile {
    display: block;
  }

  .nav-links {
    display: none;
  }
  .coupon-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 31.25rem) {
  .info-section-content h1 {
    font-size: 1.125rem;
  }

  .category-box {
    padding: 0.375rem 0.9375rem;
    font-size: 0.875rem;
  }

  .section-header {
    font-size: 1.125rem;
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 120%;
  }

  .navbar {
    padding: 2rem 0;
  }

  .navbar-brand {
    font-size: 3rem;
  }

  .navbar-logo {
    size: 5rem;
  }
  .section-header {
    font-size: 2.5rem;
  }

  body {
    font-size: 2rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 2rem;
  }

  h4 {
    font-size: 1.75rem;
  }

  h5 {
    font-size: 1.5rem;
  }

  h6 {
    font-size: 1.25rem;
  }

  p,
  li,
  .business-info p,
  .coupon-discount p,
  .coupon-details,
  .categories-label {
    font-size: 1.75rem;
  }

  .info-section-content p {
    font-size: 1.75rem;
  }

  .info-section-content h1 {
    font-size: 3rem;
  }

  .business-logo {
    max-width: 5.5rem;
  }

  .navbar-brand {
    font-size: 3rem;
  }

  .navbar-logo {
    height: 5rem;
  }

  .info-section-content {
    padding: 3rem;
  }

  .coupon-.container {
    padding-inline: clamp(2rem, 6vw, 6rem);
    max-width: 90rem;
  }

  .coupon-container {
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
    margin-bottom: 3rem;
  }

  .coupon-card {
    padding: 1.5rem;
  }

  .coupon-business {
    min-height: 9rem;
  }

  .coupon-discount {
    font-size: 2rem;
    height: 8rem;
  }

  .coupon-details {
    font-size: 2rem;
    min-height: 5rem;
  }

  .nav-link {
    font-size: 2rem;
  }

  .category-box {
    font-size: 2rem;
    padding: 0.75rem 1.75rem;
  }
}
