/* =================================================
   GLOBAL RESET & BOX-SIZING
================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  background-color: #e3f0c3; /* Light green background */
  font-family: Arial, sans-serif;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: stretch; /* <-- stretch children full-width */
  min-height: 100vh;
}

/* =================================================
   HERO SECTION (WHITE CARD AT TOP)
================================================= */
#hero {
  background-color: #fff;
  /* border-radius: 2rem; */
  width: 100%; /* <-- full viewport width */
  max-width: none; /* <-- remove previous max-width */
  /* margin-top: 4vh; */
  padding: 4vh 3rem; /* inner side-padding */
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: 0 0 2rem rgba(0, 0, 0, 0.05);
  height: 100vh;
  /* align-items: center; */
}

.hero-header {
  display: flex;
  align-items: center;
}
.hero-header .logo {
  font-size: 2.4rem;
  font-weight: 700;
  color: #4f7c2a;
}

.logo {
  font-size: 2.4rem;
  font-weight: 700;
  color: #4f7c2a;
}

.hero-header .nav-button {
  margin-left: auto;
  padding: 1rem 2rem;
  font-size: 1.6rem;
  background-color: #fff;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}
.hero-header .nav-button:hover {
  background-color: rgba(79, 124, 42, 0.15);
}

#hero h1 {
  font-size: 5rem;
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 2rem;
}
#hero h1 .accent {
  color: #4f7c2a;
}

#hero p {
  margin-top: 2rem;
  /* margin-bottom: 2rem; */
  font-size: 1.6rem;
  line-height: 1.6;
  color: #555;
  max-width: 60rem;
}

#landing-p2 {
  margin-bottom: 2rem;
}

/* styling the container */
.landing-txtbox-container {
  width: 75%;
  display: flex;
  flex-direction: column;
  /* align-items: center; */
  margin-left: 15rem;
  margin-top: 5rem;
}

.hero-buttons {
  display: flex;
  width: 100%;
  /* justify-content: center; */
  gap: 2rem;
}
.hero-buttons .btn-primary {
  padding: 1.2rem 2.4rem;
  font-size: 1.4rem;
  text-decoration: none;
  background-color: #4f7c2a;
  color: #fff;
  border-radius: 2rem;
  transition: background-color 0.2s ease-in-out;
}
.hero-buttons .btn-primary:hover {
  background-color: #3e6a23;
}

/* =================================================
   EXISTING DECKS SECTION (GREEN BACKGROUND)
================================================= */
#existing-section {
  background-color: #e3f0c3;
  width: 100%;
  /* height: 100vh;  remove if not needed */
  padding: 6vh 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4rem;
  height: 100vh;
}

/* Give inner blocks side-padding so content doesn’t touch edges */
.secondary-nav,
.existing-decks-header,
#decks-grid {
  width: 100%;
  padding: 0 3rem;
  box-sizing: border-box;
}

/* ——— F I X E D  S T Y L E S ——— */

/* 1) Center the header and its underline */
.existing-decks-header {
  display: flex;
  flex-direction: column;
  align-items: center; /* centered instead of flex-start */
  gap: 0.5rem;
}
.existing-decks-header h2 {
  font-size: 3rem;
  font-weight: 600;
}
.existing-decks-header .underline-short {
  width: 16rem;
  margin-top: 0.5rem;
  height: 0.2rem;
  background-color: #4f7c2a;
}

/* 2) Two‐column fixed grid, smaller gap, centered as a unit */
#decks-grid {
  /* note: should change this to a proper container */
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(2, 14rem);
  gap: 7rem;
  justify-content: center; /* center the 2-card group */
}

/* ——— R E M A I N I N G  S T Y L E S ——— */

.secondary-nav {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
}
.secondary-nav .nav-link {
  font-size: 1.8rem;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 2rem;
  transition: background-color 0.2s;
}
.secondary-nav .nav-link:hover {
  background-color: rgba(79, 124, 42, 0.15);
}
.secondary-nav .nav-link.active {
  background-color: #8fbe4f;
}

/* STYLING INDIVIDUAL NAV ELEMENTS */
ul.nav-lists {
  list-style: none; /* no bullets */
  margin: 0; /* reset default UL margin */
  padding: 0; /* reset default UL padding */

  display: flex; /* lay out li’s in a row */
  flex-direction: row;
  gap: 3rem;
  align-items: center;
}

.deck-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  /* margin-right: 3rem; */
}
.deck-title {
  font-size: 1.6rem;
  text-decoration: none;
  transition: color 0.2s;
}
.deck-title:hover {
  color: #4f7c2a;
}

/* make link text default black */
.nav-link,
.deck-title {
  color: #000; /* explicitly black */
}

.card-deck {
  position: relative;
  width: 14rem;
  height: 18.6rem;
}
.card {
  position: absolute;
  top: 0;
  left: 0;
  width: 14rem;
  height: 18.6rem;
  background-color: #fbf8e8;
  border-radius: 1.6rem;
  box-shadow: 0.6rem 0.8rem 1.6rem rgba(0, 0, 0, 0.1);
  /* margin-right: 2rem; */
}
.card2 {
  top: -1rem;
  left: -1rem;
}
.card3 {
  top: -2rem;
  left: -2rem;
  /* margin-right: 100rem; */
}

.error-container {
  text-align: center;
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-container h1 {
  font-size: 5rem;
  color: #4f7c2a;
}

.error-container p {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 20px;
}

.error-container a {
  text-decoration: none;
  background-color: #4f7c2a;
  color: #fff;
  padding: 10px 20px;
  border-radius: 3px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.error-container a:hover {
  background-color: #4f7a1a;
}

/* -------------------------------
   MOBILE RESPONSIVENESS
--------------------------------*/
@media (max-width: 48rem) {
  #hero {
    padding: 6vh 2rem;
  }
  #hero h1 {
    font-size: 3rem;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 1.5rem;
  }
  .hero-buttons .btn-primary {
    width: 100%;
    text-align: center;
  }

  .secondary-nav {
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .secondary-nav .nav-link {
    padding: 0.7rem 1.4rem;
    font-size: 1.6rem;
  }

  .existing-decks-header {
    gap: 1rem;
  }
  .existing-decks-header h2 {
    font-size: 2.6rem;
  }

  #decks-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .card-deck,
  .card,
  .card2,
  .card3 {
    width: 12rem;
    height: 16rem;
  }
  .card {
    border-radius: 1.2rem;
    box-shadow: 0.5rem 0.7rem 1.2rem rgba(0, 0, 0, 0.1);
  }
}
