/* ================= GLOBAL ================= */
html, body {
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  background: #ffd493;
  margin: 20px;
  color: #1a1a1a;
}

/* ================= HEADINGS ================= */
h1, h2 {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  font-family: sans-serif;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }

/* ================= BUTTON GROUPS ================= */
.home-buttons,
.meeting-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto;
}

.home-buttons {
  width: 200px;
}

/* ================= BUTTONS ================= */
.bigbutton {
  color: #fff;
  font-weight: bold;
  border: none;
  background-color: #004aad;
  padding: 20px;
  border-radius: 10px;
}

.button {
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid #4b8fe8;
  background: #004aad;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
}

button:hover {
  opacity: 0.9;
}

/* ================= LINKS ================= */
#meetings {
  margin: 0 auto;
  text-align: center;
}

#meetings a {
  color: white;
  display: block;
  width: fit-content;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0 auto;
}

#meetings a:visited {
  color: #abbdd2;
}

#meetings div {
  width: fit-content;
  max-width: 100%;
  word-wrap: break-word;
  margin: 10px auto;
}

/* ================= BACKGROUNDS ================= */
.home-body,
.index-body {
  background-color: #ffd493;
  background-image: url("public/uploads/images/CityCivbg.jpg");
  background-size: 100% auto;
  background-position: bottom center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 90vh;
}

.feed-body {
  background-color: #ffd493;
}

/* ================= POSTS GRID ================= */
#posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  padding: 20px;
  margin-top: 16px;
}

/* ================= HEADER ================= */
.feed-header {
  /*position: fixed;*/
  top: 0;
  left: 0;
  width: 100%;
  background: #ffd493;
  z-index: 1000;
  padding: 10px 12px;
  box-sizing: border-box;
  height: 100px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* ================= POST CARD ================= */
.post-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  min-height: 100px;
}

.post-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

/* ================= POST CONTENT ================= */
.post-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #004aad;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px 10px 0 0;
  margin: -14px -14px 10px -14px;
}

.post-content {
  margin: 8px 0;
  line-height: 1.5;
}

.post-image {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  margin: 10px 0 60px 0;
}

.post-likes {
  font-weight: bold;
  color: #4b8fe8;
  font-size: 20px;
  max-width: 20px;
  float: left;

}

.post-heart {
  font-size: 20px;
  float: right;
}

.like-section {
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================= REPLIES ================= */
.reply-section,
.reply {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reply-button {
  background-color: #4b8fe8;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.reply-input {
  padding: 4px 6px;
  border: 1px solid #ccd0d5;
  border-radius: 4px;
  font-size: 0.8rem;
  flex: 1;
  min-width: 60px;
  max-width: 80px;
}

/* ================= MISC ================= */
.home-button {
  border: none;
  background: transparent;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
}

.home-icon {
  height: 8vh;
}

.none {
  border: none;
  background-color: transparent;
}

/* ================= MODAL ================= */
.post1 {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.post2 {
  background: white;
  padding: 20px;
  margin: 100px auto;
  width: 300px;
}

/* ================= EVENT ================= */
.event-details {
  margin-bottom: 60px;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #004aad;
  color: #fff;
  border-radius: 10px;
  padding: 14px;
  width: fit-content;
  max-width: 100%;
}

/* Login */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 auto 20px;
  width: 100%;
  max-width: 340px;
  padding: 0 16px;
  box-sizing: border-box;
}

#signupFields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.login-button {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  cursor: pointer;
  padding: 15px;
  background: #004aad;
  border: none;
  color: #fff;
  border-radius: 6px;
}

.login-input {
  padding: 12px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  font-size: 0.95rem;
  width: 100%;
  max-width: 340px;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

/*this website helped me set up the hamburger code (css, html, js) https://www.w3schools.com/howto/howto_js_mobile_navbar.asp*/

/* Hamburger button */
.hamburger {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
}



/* ================= MOBILE ================= */
@media (max-width: 600px) {

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  .home-buttons,
  .meeting-buttons {
    width: 100%;
    padding: 0 10px;
    align-items: center;
  }

  .bigbutton {
    width: 80%;
    padding: 15px;
    font-size: 1rem;
  }

  #posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 70px 12px 20px;
    align-items: center;
  }

  .post-card {
    width: 85%;
    min-height: unset;
  }

  .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .reply-input {
    width: 100%;
    font-size: 0.7rem;
    padding: 3px 5px;
  }

  .reply-button {
    font-size: 0.7rem;
    padding: 3px 6px;
  }

  .feed-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .home-button {
    top: 10px;
    right: 10px;
  }

  .feed-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Show hamburger */
  .hamburger {
    display: block;
  }

  /* Show when active */
  #headerMenu.active {
    display: flex;
  }

  .header-actions {
    flex-direction: column;
  }

  #headerMenu {
    position: absolute;
    top: 100px;
  
    width: 80%;
    left: 50%;

    /*this website helped me with the transform css property https://www.w3schools.com/cssref/css3_pr_transform.php*/
    transform: translateX(-50%) translateY(-10px); /* 👈 start slightly up */
  
    opacity: 0;
    pointer-events: none;
  
    background: #ffd493;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    z-index: 999;
    border-radius: 10px;

    /*this website helped me with the css box shadow: https://www.w3schools.com/css/css3_shadows_box.asp*/
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    /*this website helped me with the css transition: https://www.w3schools.com/css/css3_transitions.asp*/
    transition: all 0.25s ease;
  }

  #headerMenu.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  .container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto 16px;
    max-width: 320px;
    height: 200px;
  }
}


.container { 
  display: inline-flex;
  position: relative;
  justify-content: center; 
  align-items: center; 
  height: 200px; 
  width: 300px;
  margin: 0 10px 20px;
  vertical-align: top;
}

.container:hover > .card {
  cursor: pointer;
  transform: rotateY(180deg);
}

.card {
  width: 100%;
  height: 100%;
  perspective: 1000px; 
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.front, .back {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.1);
}

.front {
  background-color: #fff;
}

.back {
  background-color: #f8f8f8;
  transform: rotateY(180deg);
}

.flashcardText {
  padding: 10px;
}