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

:root {
  --bg-color: #f7ebdf;
  /* background colour */
  --accent-blue: #4A90B1;
  /* blue accent colour */
  --blue-text: #29779B;
  /* blue text colour */
  --text-color: #1B140E;
  /* default text colour */
  --accent-beige: #EBD6BD;
  /* beige accent colour */
  --card-beige: #F0E3D2
  /* lighter beige for cards */
}


body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Roboto', sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0rem;
}

h2 {
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
}

.bold {
  font-weight: 700;
}

.highlight {
  color: var(--blue-text);
}

a {
  color: var(--blue-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  outline: none;
}


header {
  background-color: var(--accent-beige);
  padding: 0.5rem;
}

nav div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo {
  max-width: 200px;
  height: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav ul li:last-child a {
  color: var(--text-color);
  border-left: black solid 2px;
  padding-left: 15px;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 550px) {
  .menu-toggle {
    display: block;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
  }

  .nav-container ul {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    padding-top: 1rem;
  }

  .nav-container.responsive ul {
    display: flex;
  }

  .nav-container {
    flex-wrap: wrap;
  }
}

.hero-section {
  position: relative;
  width: 100%;
  padding: 0;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 40%;
}

.overlay-buttons button {
  width: 100%;
  max-width: 250px;
  margin: 0.5rem 0;
  text-align: center;
  display: block;
}


.hero-overlay button {
  background-color: var(--accent-blue);
  color: white;
  border: none;
  margin-top: 1rem;
  margin-right: 1rem;
  transition: background-color 0.2s ease;
}

.hero-overlay button:hover {
  filter: brightness(90%);
}

@media (max-width: 900px) {
  .hero-section {
    display: flex;
    flex-direction: column;
  }

  .hero-overlay {
    position: static;
    transform: none;
    max-width: 100%;
    width: 100%;
    background-color: rgba(248, 230, 213, 0.9);
    color: var(--text-color);
    padding: 2rem 1rem;
    text-align: center;
  }

  .overlay-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    width: 100%;
  }


  .overlay-buttons button {
    width: 100%;
    max-width: 250px;
    margin: 0.5rem 0;
    text-align: center;
  }
}

.mission-section {
  text-align: center;
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 1rem;
}

.activity-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.activity-icons li {
  background-color: var(--accent-beige);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-icons img {
  max-width: 100%;
  max-height: 100%;
}

.info-section {
  background-color: var(--accent-beige);
  padding: 4rem 1rem;
}

.info-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 3rem;
  flex-wrap: wrap;
}

.info-text {
  flex: 1;
  min-width: 280px;
}

.info-text article {
  margin-bottom: 2rem;
}

.info-image {
  flex: 1;
  min-width: 280px;
  text-align: center;
}

.info-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.info-image figcaption {
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--text-color);
}

.cta-section {
  color: var(--text-color);
  text-align: center;
  padding: 4rem 1rem;
}

.cta-section h3 {
  margin-bottom: 1rem;
}

.cta-section p {
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.cta-section button {
  background-color: var(--accent-blue);
  color: white;
  font-weight: bold;
  border: none;
  transition: background-color 0.2s ease;
}

.cta-section button:hover {
  background-color: var(--blue-text);
}

.site-footer {
  background-color: var(--accent-blue);
  color: #fff;
  padding: 2rem 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  margin: 0;
}

.footer-socials {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.footer-socials li img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}

.footer-socials li img:hover {
  opacity: 0.75;
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-socials {
    justify-content: center;
  }
}

/* ----------------- Activity Page ----------------- */

.exercise-images {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0;
}

.exercise-image {
  width: 100%;
  max-width: 350px;
  height: auto;
}

@media (max-width: 900px) {
  .exercise-image:nth-of-type(2) {
    display: none;
  }
}

@media (max-width: 768px) {
  .exercise-image {
    display: none;
  }

  .exercise-image:nth-of-type(1) {
    display: block;
  }
}

.activity-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.activity-card {
  background-color: var(--card-beige);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
  margin-bottom: 50px;
}

@media (max-width: 768px) {
  .activity-cards-container {
    flex-direction: column;
    align-items: center;
  }

  .activity-card {
    max-width: 100%;
    margin-bottom: 1rem;
  }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

hr {
  border: none;
  border-top: 1px solid;
  color: #1B140E;

}

.activity-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.detail-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #eceae8;
  padding: 0.5rem 1rem;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  color: var(--text-color);
  width: fit-content;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-box span {
  white-space: normal;
  overflow-wrap: break-word;
  display: inline-block;
}

.detail-box img {
  width: 30px;
  height: 30px;
}

button.join-btn {
  background-color: var(--accent-blue);
  color: white;
  border: none;
  margin-top: 1rem;
  margin-right: 1rem;
  transition: background-color 0.2s ease;
  align-self: flex-start;
  width: 40%;
  max-width: 300px;
}

button.join-btn:hover {
  filter: brightness(90%);
}

.btn-container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  margin-bottom: 30px;
}

@media (max-width: 900px) {
  .btn-container {
    justify-content: center;
  }
}

.filter-btn {
  background-color: var(--accent-blue);
  color: white;
  transition: background-color 0.2s ease;
}

.filter-btn:hover {
  filter: brightness(90%);
}

#opacity {
  background-color: rgba(41, 119, 155, 0.3);
  color: white;
}

.quote {
  text-align: center;
  padding-top: 2rem;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background-color: var(--bg-color);
  padding: 2rem;
  border-radius: 8px;
  width: 400px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-box {
  margin-bottom: 1rem;
}

.modal-box label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.modal-box input,
.modal-box select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
}

.open-modal-btn {
  background-color: var(--accent-beige);
  color: var(--text-color);
  margin-left: auto;
}

.close-modal-btn {
  background-color: var(--accent-beige);
  color: var(--text-color);
}

.submit-btn {
  background-color: var(--accent-blue);
  color: white;
}

.submit-btn:hover,
.open-modal-btn:hover {
  filter: brightness(90%);
}

.close-modal-btn:hover {
  filter: brightness(85%);
}


/* ----------------- Profile Page ----------------- */


.userpage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  margin-top: 50px;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .userpage {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    padding: 20px;
  }

  .userpage img {
    max-width: 100%;
    height: auto;
  }

  button.follow-btn {
    width: 100%;
    justify-content: center;
  }
}

.userpage img {
  width: 200px;
  height: auto;
}


.userpage .stats {
  display: flex;
  gap: 20px;
}

.plus-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 25px;
  height: 25px;
  margin-right: 10px;
  border: 2px solid white;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
}

button.follow-btn {
  background-color: var(--accent-blue);
  color: white;
  border: none;
  margin-top: 1rem;
  margin-right: 1rem;
  transition: background-color 0.2s ease;
}

button.follow-btn:hover {
  filter: brightness(90%);
}

#low-opacity {
  opacity: 0.8;
}

.userpage h4 {
  margin-bottom: 35px;
}

.userpage h5 {
  color: var(--blue-text);
}

.split-layout {
  display: flex;
  gap: 30px;
  padding: 20px;
  margin: 0 auto;
  max-width: 1200px;
}

.activity-section {
  flex: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;

}

.activity-card {
  width: 90%;
  padding: 20px;
}

.friend-list {
  flex: 4;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.friend {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--card-beige);
  padding: 10px;
  border-radius: 10px;
  max-width: 200px;
}

.friend img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

@media (max-width: 700px) {
  .split-layout {
    flex-direction: column;
  }

  .activity-section,
  .friend-list {
    width: 100%;
  }

  .activity-section {
    align-items: center;
  }

  .activity-card {
    width: 100%;
    max-width: 450px;
  }

  .friend-list {
    align-items: center;
  }
}

#activity-heading {
  align-self: flex-start;
  margin-left: auto;
  width: 90%;
  max-width: 450px;
}

.split-layout p {
  color: var(--blue-text);
  font-weight: 700;
}