/* -------------------------------------------------
   styles.css
   ------------------------------------------------- */

/* Basic reset/body styling */
* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  /* Dark background and white text */
  background-color: #121F57;
  color: #fff;
  /* Make text larger */
  font-size: 18px;
}

/* Header with logo + title */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  height: 120px;
  width: 100%;
  background-color: #121F57; /* or set to transparent if you want the video behind it */
  z-index: 999; /* ensure it stays on top of the video */
  display: flex;
  align-items: center;
  padding: 0 1em;
}

#siteLogo {
  width: 270px;
  height: 270px;
  object-fit: cover;
}

/* ========== Account Dropdown Container ========== */
.account-menu-container {
  position: absolute; /* so the dropdown positions relative to this container */
  right: 100px;
  display: flex;
  align-items: center;
}

/* The button that says "Account" + icon */
.account-btn {
  background: none;
  border: none;
  color: #fff; /* if your header text is white */
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem; /* spacing between icon and text */
}

/* Optional: the account icon */
.account-icon {
  width: 34px;
  height: 44px;
  object-fit: contain;
}

/* The caret (little down arrow) - optional */
.caret {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 10px solid #fff; /* a small triangle pointing down */
  margin-left: 0.25rem;
}

/* ========== The Dropdown Box Itself ========== */
.account-dropdown {
  position: absolute;
  top: 110%; /* slightly below the button */
  right: 0;
  background: #fff;
  color: #000;
  border: 0px solid #ccc;
  border-radius: 4px;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);

  /* For the slide-down effect */
  max-height: 0;        /* hidden by default */
  overflow: hidden;     /* hide content until expanded */
  transition: max-height 0.3s ease-out;
  z-index: 9999;        /* above other elements */
}

/* When "open" class is toggled, reveal the dropdown */
.account-menu-container.open .account-dropdown {
  max-height: 400px; /* or something large enough to show all items */
  transition: max-height 0.3s ease-in;
}

/* The individual sections inside the dropdown */
.not-logged-in-menu,
.logged-in-menu {
  padding: 1rem;
  display: none;  /* we show one or the other, depending on user state */
}

/* A “dropdown-link” style for each item inside the dropdown */
.dropdown-link {
  display: block;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  font-size: 1rem;
  color: #000;
  margin: 0.25rem 0;
  padding: 0.5rem 0;
  cursor: pointer;
}

.dropdown-link:hover {
  background: #f0f0f0;
}

/* Profile section inside the logged-in menu */
.profile-section {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.5rem;
}

.username {
  font-weight: bold;
  color: #000; /* black text on white background */
}

/* Hamburger menu */
.menu-btn {
  position: relative;
  width: 40px;
  height: 25px;
  cursor: pointer;
  margin-left: auto; /* push the hamburger to the right */
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-btn__burger {
  width: 30px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
  position: relative;
}

.menu-btn__burger::before,
.menu-btn__burger::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
}

.menu-btn__burger::before {
  transform: translateY(-10px);
}

.menu-btn__burger::after {
  transform: translateY(10px);
}

/* Animate the burger lines into an X when open */
.menu-btn.open .menu-btn__burger {
  background: transparent;
}

.menu-btn.open .menu-btn__burger::before {
  transform: rotate(45deg);
}

.menu-btn.open .menu-btn__burger::after {
  transform: rotate(-45deg);
}

/* NAV MENU (default hidden) */
.nav-menu {
  position: absolute;
  top: 120px;           /* just below the header */
  left: 0;
  width: 100%;
  background-color: #121F57;
  overflow: hidden;
  max-height: 0;       /* hidden by default */
  transition: max-height 0.3s ease-out;
}

.nav-menu.show {
  max-height: 300px;   /* or something large enough for all items */
  transition: max-height 0.4s ease-in;
}

.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0.5em 0;
  text-align: center;
}

.nav-menu ul li {
  margin: 0.5em 0;
}

.nav-menu ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
}

.nav-menu ul li a:hover {
  text-decoration: underline;
}

h1 {
  margin: 0;
  display: flex;
  font-size: 3rem;
}

/* Map */
#map {
  width: 90%;
  height: 350px;
  margin-bottom: 1em;
  position: static;
  margin-left: auto;
  margin-right: auto;
}

.filter {
  margin-left: 5%;
  margin-right: 5%;
}

/* Search Bar & Button */
#searchWrapper {
  display: flex;
  flex-direction: column; /* Stack input & button */
  gap: 0.5em;
  margin: 5% 5%;
}

#keyword {
  padding: 0.5em;
  font-size: 2em;
}

button[onclick]:hover {
  background: #0056b3;
}

/* Results List */
#placesList {
  list-style: none;
  padding: 0;
  margin: 5% 5%;
  font-size: 1.4rem;
}

#placesList li {
  padding: 0.5em;
  border-bottom: 1px solid #444; /* Darker border for dark theme */
  cursor: pointer;
  font-size: 1rem;
}

#placesList li:hover {
  background-color: #333;
}

/* Form styling */
form {
  margin: 0 1em;
}

fieldset {
  margin-bottom: 1em;
  border: 1px solid #444;
  padding: 1;
}

legend {
  font-weight: bold;
  font-size: 2rem;
}

label {
  display: block;
  margin-bottom: 0.25em;
  font-size: 2rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select {
  width: 100%;
  padding: 0.5em;
  margin-bottom: 1em;
  font-size: 1.5em;
}

.checkboxes {
  display: grid;
  flex-wrap: wrap;
  gap: 0.75em;
}

.checkboxes input[type="checkbox"] {
  width: 45px;
  height: 45px;
  margin-right: 10px;
}

.checkboxes label {
  white-space: nowrap;
  font-size: 3rem;
}

button[type="submit"] {
  padding: 0.6em 1.2em;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 2.5rem;
  display: block;
  margin: 5% auto 0 auto;
}

button[type="submit"]:hover {
  background: #0056b3;
}

/* The success/error message area */
#message {
  margin: 1em;
  font-weight: bold;
}

/* Responsive: smaller screens */
@media (max-width: 600px) {
  #map {
    height: 250px;
  }
  fieldset {
    padding: 0.75em;
  }
  button[type="submit"],
  button[onclick] {
    width: 100%;
    margin-top: 0.5em;
  }
}

/****************************************************
 * The following styles are for the index.html
 ****************************************************/

.full-screen {
  /* Each section fills the viewport minus the header's height */
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* optional: distinct background or keep the same as body */
  /* background-color: #1E2B6C; for example */
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
}

#siteLogo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  cursor: pointer;
}

.brand-title {
  font-size: 1.5rem;
  margin: 0;
}

@media (max-width: 600px) {
  .site-header {
    height: 200px;
    padding: 0 1.5em;
  }
  .brand-title {
    display: none;
  }
  .nav-menu {
    top: 200px;
  }
}

nav {
  margin-left: auto; /* Push nav links to the right */
}

nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.5em;
  font-size: 1.2rem;
}

nav a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  position: relative;
  margin-top: 80px;
  width: 100%;
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 80px;
  overflow: hidden;
  padding-bottom: 20vh; /* Adjust this value to move the content up */
}

#heroVideo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  padding-top: 20vh;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.4rem;
  max-width: 700px;
  margin-bottom: 2rem;
}

.hero button {
  background: #007bff;
  border: none;
  padding: 0.75em 1.5em;
  font-size: 1.2rem;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.hero button:hover {
  background: #0056b3;
}

.hero-content h1,
.hero-content p,
.hero-content button {
  margin: 0.5em 0;
}

/* Section Wrapper */
.section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.section p {
  font-size: 1.5rem;
  line-height: 2;
  margin-bottom: 2rem;
  text-align: center;
}

/* Features */
/* The container for all feature cards */
.feature-gallery {
  display: flex;
  flex-wrap: wrap;           /* allows multiple cards to flow to the next row */
  justify-content: center;   /* center the cards horizontally */
  gap: 2rem;                 /* space between cards */
  margin-top: 2rem;          /* slight spacing from the heading */
}

/* Each feature card */
.feature-card {
  background-color: #1E2B6C; /* or any other color in your palette */
  border: 1px solid #444;
  border-radius: 8px;
  width: 400px;              /* card width; adjust as desired */
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s ease-in-out;
}

.feature-card:hover {
  transform: translateY(-8px); /* simple hover effect */
}

/* Icon within each card */
.feature-icon {
  width: 80px;
  height: 80px;
  object-fit: contain; 
  margin-bottom: 1rem;
}

/* Headings within the card */
.feature-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Paragraph text within the card */
.feature-card p {
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 0; /* let the .feature-card handle top/bottom spacing */
}

/* CTA Section */
.cta {
  text-align: center;
}

.cta button {
  background: #007bff;
  border: none;
  padding: 0.75em 1.5em;
  font-size: 1.2rem;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.cta button:hover {
  background: #0056b3;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #444;
  margin-top: 2rem;
}

/* Responsive: smaller screens */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
  .section h2 {
    font-size: 2rem;
  }
  nav a {
    font-size: 1rem;
  }
}

.Prompt p {
  font-size: 1.5rem;
  text-align: center;
}

/****************************************************
 * The following styles are for the community.html
 ****************************************************/
.layout-container {
  margin-top: 140px;
  display: grid;
  grid-template-columns: 200px 1fr 200px; /* left sidebar, main feed, right sidebar */
  gap: 1rem;
  padding: 1rem;
  position: relative; /* Ensure it is positioned relative to the document flow */
  z-index: 1; /* Ensure it is beneath the site-header */
}

.sidebar-left,
.sidebar-right {
  background-color: #1E2B6C;
  padding: 1rem;
  border: 1px solid #444;
  border-radius: 8px;
}

.sidebar-left h2,
.sidebar-right h2 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.sidebar-left ul {
  list-style: none;
  margin-bottom: 1rem;
}

.sidebar-left li {
  margin-bottom: 0.5rem;
}

.create-subcat-btn {
  width: 100%;
  background: #007bff;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
}

.create-subcat-btn:hover {
  background: #0056b3;
}

.main-feed {
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #1E2B6C;
  padding: 1rem;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.feed-header h2 {
  font-size: 1.4rem;
  margin: 0;
}

#create-post-btn {
  background: #007bff;    /* consistent bright blue */
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  margin-left: auto;
}

#create-post-btn:hover {
  background: #0056b3;
}

/* Modal Backdrop */
.modal {
  position: fixed;           /* so it floats over everything */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* a semi-transparent backdrop */
  display: none;           /* hidden by default */
  z-index: 9999;           /* higher than your header's 999 */
}

/* Modal Content (Generic) */
.modal-content {
  width: 600px;         /* Fixed width (no max-width). */
  height: 400px;        /* Fixed height. */
  overflow-y: auto;     /* Enables a scrollbar for overflow. */
  overflow-x: hidden;   /* If you don’t want horizontal scroll. */
  background-color: #fff;
  color: #000;
  margin: 10% auto;     /* Center horizontally & push down from top. */
  padding: 2rem;
  border-radius: 6px;
  position: relative;
  z-index: 2;           /* Ensure it’s above the backdrop, if needed. */
}

/* The select/textarea in Create Post Modal */
#newPostSubcat {
  width: auto;
  min-width: 490px;
  height: auto;
}

#newPostContent {
  width: auto;
  min-width: 490px;
  height: 200px;
  min-height: 200px;
}

/* Style all subcategory links inside .subcat-list */
.subcat-list a {
  color: #fff;            /* Or any other color you like */
  text-decoration: none;  /* Removes the underline */
}

/* If you want a hover effect (e.g., underline on hover) */
.subcat-list a:hover {
  text-decoration: underline;
}

/* If you want visited links to be the same color as unvisited */
.subcat-list a:visited {
  color: #fff;
}

/* Buttons inside the modal forms */
.modal-content form button[type="submit"],
.modal-content form button[type="button"] {
  background: #007bff;      /* Same bright blue as other buttons */
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.75em 1.5em;
  margin-right: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

.modal-content form button[type="submit"]:hover,
.modal-content form button[type="button"]:hover {
  background: #0056b3;
}

/* Post Card */
.post-card {
  display: flex;
  background: #2A3D8B;
  border: 1px solid #444;
  border-radius: 6px;
  margin-bottom: 1rem;
  padding: 0.5rem;
  transition: background 0.2s;
}

.post-card:hover {
  background: #324798;
}

.post-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  margin-right: 1rem;
  font-size: 1.2rem;
}

.upvote,
.downvote {
  cursor: pointer;
  margin: 0.2rem 0;
}

.upvote:hover,
.downvote:hover {
  color: #007bff;
}

.vote-count {
  margin: 0.2rem 0;
  font-weight: bold;
}

.post-content {
  flex: 1;
}

.post-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.post-meta {
  font-size: 0.9rem;
  opacity: 0.8;
}

.sidebar-right {
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #1E2B6C;
  padding: 1rem;
}

.trending-item {
  margin-bottom: 0.5rem;
}

/****************************************************
 * The following styles are for the authorization
 ****************************************************/
.auth-container {
  max-width: 400px;
  margin: 5rem auto;
  background: #1E2B6C;
  padding: 2rem;
  border-radius: 8px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh; /* Full viewport height */
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form h2 {
  margin-top: 0;
  text-align: center;
}

.auth-form label {
  font-size: 1rem;
}

.auth-form input {
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid #444;
  border-radius: 4px;
  background: #fff;
  color: #000;
}

.auth-form button {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem; /* Smaller font size */
}

.auth-form button:hover {
  background: #0056b3;
}

.signup-redirect {
  text-align: center;
}

.signup-redirect a {
  color: #fff;
  text-decoration: underline;
}

/* Profile Setup Container: ensure we push it down below the header */
.profile-setup-container {
  max-width: 800px;
  margin: 0 auto;       /* center horizontally */
  padding: 1rem;
  margin-top: 120px;    /* must be >= .site-header height, so it doesn't hide behind */
}

/* For the form fields, you can add basic spacing, etc. */
.profile-setup-container form {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* spacing between label/input pairs */
}

/* A simple class that fixes the height and allows scrolling */
.scrollable-list {
  max-height: 200px;    /* or however tall you want the box to be */
  overflow-y: auto;     /* vertical scroll if content exceeds 200px */
  border: 1px solid #444;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background-color: #1E2B6C; /* optional if you want a background color */
}

/* ================================================
   Post Detail Modal Styles (NEW ADDITIONS)
   ================================================ */
#postDetailModal .modal-content {
  /* You can give it a different height if you like */
  width: 700px;         /* Slightly wider than create-post modal */
  height: auto;         /* Let its height grow based on content */
  max-height: 80vh;     /* Keep it from getting too tall */
  margin-top: 5%;
}

#postDetailModal .modal-content h2#detailPostTitle {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #000; /* black text on white background */
}

#postDetailModal .modal-content h4#detailPostMeta {
  margin-bottom: 1rem;
  color: #555;
}

#postDetailModal .modal-content #detailPostContent {
  margin-bottom: 1rem;
  line-height: 1.4;
}

#detailPostActions button,
#detailPostVoting button {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  margin-right: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

#detailPostActions button:hover,
#detailPostVoting button:hover {
  background: #0056b3;
}

#voteCounts {
  margin-left: 0.5rem;
}

#commentsList {
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 1rem;
  border-top: 1px solid #ccc;
  padding-top: 0.5rem;
}

#addCommentSection {
  margin-bottom: 1rem;
}

#addCommentSection textarea {
  width: 100%;
  margin-bottom: 0.5rem;
}