@import url(https://fonts.googleapis.com/css2?family=Bagel+Fat+One&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@8..144,100..1000&display=swap);

:root {
  --special-color: #f89641;
  --background-color: #e4d7c7;
  --main-color1: #d9c8b4;
  --secondary-color: #1c1c1c;
  --footer-text: rgba(0, 0, 0, 0.72);
  --footer-heading: rgba(0, 0, 0, 0.82);
  
  --font-display: "Bagel Fat One", cursive;
  --font-heading: "Merriweather", serif;
  --font-body: "Google Sans Flex", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  background-color: var(--background-color);
  font-family: var(--font-body);
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  height: auto;
  padding: 20px;
  margin: 0;
  /* Prevent horizontal swipes from being interpreted as scroll gestures */
  touch-action: pan-y;
  /* border: 1px solid black; */
}
p {
  line-height: 1.6; /* Sets line spacing to 1.6 times the font size */
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
}
h1 {
  font-size: clamp(3.5rem, 5.5vw, 5rem);
}
h2 {
  font-size: 3rem;
}
h3 {
  font-size: 1.1rem;
}
.primary-font {
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-size: 3rem;
}
.fat-title {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 1.15em;
  letter-spacing: -0.02em;
  color: var(--secondary-color);
}
.secondary-font,
p,
button,
input {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.1rem;
}

.logo {
  height: 70px;
  width: auto; /* Automatically adjusts to prevent distortion */
  max-height: 100%;
  display: block;
}

footer .footer-brand .logo {
  height: 120px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-tagline {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 2px solid rgba(0, 0, 0, 0.2);
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--footer-text);
  max-width: 220px;
}

.footer-tagline strong.special-color {
  font-weight: 700;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  z-index: 999;
  font-family: "Google Sans Flex", "Inter", system-ui, sans-serif;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: var(--background-color);
  height: 80px;
  padding: 0 50px;
  box-sizing: border-box;
}

.navbar nav {
  height: 100%;
  display: flex;
  align-items: center;
}

.hero {
  width: 100%;
  padding-top: 10px;
  display: flex;
  align-items: self-end;
  justify-content: baseline;
  flex-wrap: wrap;
}

.bottom-text {
  justify-content: flex-end; /* Pushes content to the bottom */
}

.special-color {
  color: #ff9900;
}

.horizontal-menu {
  display: flex; /* Aligns items in a row */
  align-items: center;
  list-style: none; /* Removes bullet points */
  padding: 0; /* Removes default padding */
  margin: 0; /* Removes default margin */
  height: 100%;
  gap: 25px;
}
.vertical-menu {
  display: flex; /* Aligns items in a col */
  flex-direction: column;
  list-style: none; /* Removes bullet points */
  padding: 0; /* Removes default padding */
  margin: 0; /* Removes default margin */
}
.vertical-menu a {
  /* Styles the links as blocks to fill the width */
  display: block;
  padding: 5px 5px; /* Adds padding inside each menu item */
  background-color: #f4f4f4;
  color: var(--special-color);
  text-decoration: none; /* Removes default underline */
  border-radius: 4px;
}

.vertical-menu a:hover {
  background-color: #262424;
}
.horizontal-menu li {
  padding: 0; /* Adds spacing around menu items */
}

.vertical-menu li {
  padding: 3px 3px; /* Adds spacing around menu items */
  max-width: 200px;
}

.horizontal-menu a {
  color: rgb(11, 13, 34);
  text-decoration: none; /* Removes underlines */
  font-size: .85rem;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.horizontal-menu a:hover {
  color: var(--special-color);
}

/* Navbar button styles (Cats + Apply) */
.navbar .nav-btn {
  padding: 12px 16px;
  border: 2px solid currentColor;
  border-radius: 0; /* rectangular */
  margin-left: -6px;
  margin-right: -6px;
}

/* Favorites count badge on Cats navbar button */
.navbar #catsFavoritesBtn {
  position: relative;
}

.favorites-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  border-radius: 999px;
  background: var(--special-color);
  color: white;

  font-size: 0.75rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;

  border: 2px solid var(--background-color);
}

.navbar .nav-btn i {
  color: inherit; /* icon follows the link text color */
}

/* Cats: outline only */
.navbar .nav-btn--outline {
  background: transparent;
  color: rgb(11, 13, 34);
}

/* Apply: solid black with white text+icon */
.navbar .nav-btn--solid {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* Keep Apply solid/white even on hover (overrides .horizontal-menu a:hover) */
.navbar .nav-btn--solid:hover {
  background: #000;
  border-color: #000;
  color: var(--special-color);
}

.banner {
  --banner-top-space: 140px;
  margin: var(--banner-top-space) auto 100px;
  display: grid;
  max-width: 90%;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  justify-items: flex-end;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 0;
  --pattern-bleed: clamp(40px, 6vw, 120px);
  --pattern-bleed-bottom: clamp(140px, 14vw, 360px);
}

.banner .banner-brand {
  display: inline-block;
  margin-right: 0.08em;
  text-decoration: underline;
  text-underline-offset: 0.24em;
  text-decoration-thickness: 0.06em;
}

.banner .banner-adoption {
  display: inline-block;
  transform: translateX(clamp(140px, 1vw, 64px));
}

.banner .banner-cat {
  color: #000;
}

/* Subtle repeating paw-print pattern behind the banner */
.banner::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  top: calc(-1 * (var(--pattern-bleed) + var(--banner-top-space)));
  bottom: calc(-1 * var(--pattern-bleed-bottom));
  --paw-bg: url("../assets/paw-pattern.png");
  background-image: var(--paw-bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top center;
  /* Fade the pattern towards the bottom */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

.banner > * {
  position: relative;
  z-index: 1;
}

.banner-image {
  width: 40vw;
  display: inline-block;
}

.plants {
  width: 80vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  padding: 20px;
}

.card {
  background-color: var(--main-color1);
  margin: 5px;
  padding: 10px;
  border-radius: 10px;
  position: relative;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Favorite star button (bottom-right of each card) */
.favorite-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;

  background: transparent;
  border: none;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

/* Ensure this overrides the global button styles */
.favorite-btn:hover {
  background-color: transparent;
}

.favorite-btn i {
  color: var(--special-color);
  font-size: 1.2rem;
  line-height: 1;
}

.favorite-btn:focus-visible {
  outline: 2px solid var(--special-color);
  outline-offset: 3px;
}

/* Favorites panel (toggled from navbar Cats button) */
.favorites-panel {
  position: fixed;
  top: calc(80px + 10px);
  right: 20px;
  z-index: 998;

  width: min(360px, calc(100vw - 40px));
  max-height: calc(100vh - (80px + 30px));
  overflow: auto;

  padding: 14px 16px;
  border-radius: 10px;
  background-color: var(--main-color1);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.1);
}

.favorites-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.favorites-empty {
  margin: 10px 0 0;
  color: var(--secondary-color);
}

.favorites-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.favorite-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--secondary-color);
}

.favorite-chip img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}
.card img {
  /* Essential image styles */
  width: 290px; /* Image takes the full width of the card container */
  height: 300px; /* Example fixed height for uniform cards */
  object-fit: cover; /* Crops the image to cover the area while maintaining aspect ratio */

  /* Optional: Round the top corners of the image to match the card */
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

button {
  display: inline-block; /* Allows padding and margin, and keeps it inline */
  padding: 10px 10px; /* Space between text and border (top/bottom, left/right) */
  text-align: center; /* Center the text */
  text-decoration: none; /* Remove underlines from <a> tags */

  /* Color and background */
  background-color: var(--secondary-color);
  color: white; /* White text color */

  /* Font and appearance */
  font-size: 16px; /* Increase font size */
  font-family: var(--font-body);
  cursor: pointer; /* Change mouse cursor to a hand on hover */
  border: none; /* Remove default border */
  border-radius: 8px; /* Rounded corners */
  transition: background-color 0.3s; /* Smooth transition for hover effect */
}

button:hover {
  /* Hover effect: changes background color when the user hovers over the button */

  background-color: var(--special-color); /* A different color on hover */
}

.news-letter-container {
  position: relative; /* Essential for positioning the pseudo-element */
  width: 100%;
  height: 600px;
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.news-letter-container::before {
  content: "";
  background-image: url("../assets/newslettercat.png");
  background-size: cover;
  position: absolute;
  /* top: 0;
    left: 0; */
  width: 100%;
  height: 100%;
  opacity: 1; /* Set desired opacity here (0.0 to 1.0) */
  z-index: -1; /* Places the image behind the container's content */
}

footer {
  width: 99%;
  bottom: 0;
  z-index: 999;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  background: var(--background-color);
  padding: 40px;
  padding-bottom: 70px;
  gap: 30px;
  box-shadow: none;
  border: none;
}

.footer-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(70px, 9vw, 200px);
  flex-wrap: wrap;
}

.footer-links-group {
  display: flex;
  justify-content: center;
  gap: clamp(40px, 8vw, 140px);
}

.footer-links {
  min-width: 180px;
}

.footer-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.2);
  margin-top: 10px;
}

.footer-heading {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--footer-heading);
}

/* Footer: make link lists look like text links (not boxed menu buttons) */
footer .vertical-menu li {
  padding: 0;
  max-width: none;
}

footer .vertical-menu a {
  background-color: transparent;
  padding: 4px 0;
  border-radius: 0;
  color: var(--footer-text);
  font-family: var(--font-body);
}

footer .vertical-menu a:hover {
  background-color: transparent;
  color: var(--special-color);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 0 0;
  gap: 10px;
}

.footer-social-icons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.footer-copyright {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--footer-text);
}

/* for smaller screen */
@media screen and (max-width: 768px) {
  body {
    width: 90%;
    margin: 0 auto;
    padding: auto;
  }
  .horizontal-menu li {
    padding: 0 5px; /* Adds spacing around menu items */
  }

  .banner {
    width: fit-content;
    display: flex; /* Hide an element on small screens */
    flex-wrap: wrap;
    flex-direction: column-reverse;
    justify-items: baseline;
    align-items: flex-start;
  }
  .banner-image {
    width: 90vw;
  }

  .cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 5px;
  }

  .favorites-panel {
    left: 10px;
    right: 10px;
    width: auto;
    top: calc(80px + 10px);
    max-height: calc(100vh - (80px + 20px));
  }

  .email-div {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
  }
  footer {
    display: grid;
    position: relative;
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }

  .footer-main {
    flex-direction: column;
    align-items: center;
    gap: 22px;
  }

  .footer-links-group {
    flex-direction: column;
    align-items: center;
    gap: 22px;
  }

  footer .footer-brand .logo {
    height: 110px;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
  }

  .footer-tagline {
    max-width: 320px;
  }

  .footer-social {
    gap: 10px;
  }

  .footer-social-icons {
    gap: 16px;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: var(--main-color1);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-content img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--secondary-color);
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--special-color);
  background: transparent;
}