/* General Styles */
body {
  margin: 0;
  font-family: "Helvetica Neue", sans-serif;
  background: #fafafa;
  color: #333;
}

.site-header, .site-footer {
  background: #333;
  color: #fff;
  padding: 20px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .logo {
  display: flex;
  align-items: center;
}

.site-header .logo img {
  height: 40px;
  margin-right: 10px;
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav a {
  color: #fff;
  margin-right: 20px;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.main-nav a i, .main-nav button i {
  margin-right: 8px;
}

.cta-button {
  background: #7562d5;
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cta-button:hover {
  background: #5b48b8;
}

.user-actions button {
  margin-left: 10px;
  background: #fff;
  color: #444;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 5px;
}

.user-actions button:hover {
  background: #f0f0f0;
}

/* Hero Section */
.hero {
  position: relative;
  background: url('images/hero-bg.jpg') no-repeat center center/cover;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 50px;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.4);
}

.hero-content {
  position: relative;
  max-width: 600px;
  z-index: 1;
}

.hero-content h2 {
  font-size: 3em;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.2em;
  margin-bottom: 30px;
}

.hero-search {
  display: flex;
  position: relative;
}

.hero-search input {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 5px 0 0 5px;
}

.hero-search button {
  background: #7562d5;
  padding: 15px 20px;
  border: none;
  border-radius: 0 5px 5px 0;
  color: #fff;
  cursor: pointer;
}

.hero-search button:hover {
  background: #5b48b8;
}

/* Search Suggestions */
.search-suggestions {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  position: absolute;
  background: #fff;
  color: #333;
  width: calc(100% - 100px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: none;
  border-radius: 5px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
}

.search-suggestions li {
  padding: 10px;
  cursor: pointer;
}

.search-suggestions li:hover {
  background: #f0f0f0;
}

/* Features Section */
.features {
  background: #fff;
  padding: 80px 50px;
  text-align: center;
}

.features h2 {
  font-size: 2.5em;
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.feature-card {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card i {
  display: block;
  margin-bottom: 15px;
  color: #7562d5;
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card p {
  margin: 0;
}

/* How It Works Section */
.how-it-works {
  background: linear-gradient(to bottom right, #f0f0ff, #eae7ff);
  padding: 80px 50px;
  text-align: center;
}

.how-it-works h2 {
  font-size: 2.5em;
  margin-bottom: 40px;
}

.steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.steps li {
  max-width: 250px;
}

.steps img {
  height: 80px;
  margin-bottom: 20px;
}

.steps h4 {
  margin-bottom: 10px;
}

.steps p {
  margin: 0;
  color: #555;
}

/* Testimonials Section */
.testimonials {
  background: #fff;
  padding: 80px 50px;
  text-align: center;
}

.testimonial-intro h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.testimonial-intro p {
  font-size: 1.1em;
  color: #555;
}

.testimonial-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin-top: 40px;
}

.testimonial-card {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  max-width: 400px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.testimonial-card blockquote {
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-card cite {
  display: block;
  text-align: right;
  color: #777;
}

.poem-highlight {
  margin-top: 50px;
  font-style: italic;
  color: #555;
}

/* Map Preview Section */
.map-preview {
  background: #fafafa;
  padding: 80px 50px;
  text-align: center;
}

.map-preview h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.map-preview p {
  max-width: 400px;
  margin: 0 auto 40px;
  font-size: 1.1em;
  line-height: 1.5em;
}

.map-container {
  height: 400px; /* Ensure this is set */
  width: 100%;
  margin: 40px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}


/* Footer */
.site-footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
}

.footer-links {
  margin-bottom: 20px;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  margin: 0 10px;
  display: inline-block;
}

.footer-links a:hover {
  color: #fff;
}

/* Listings Section */
.listing-section {
  background: #fff;
  padding: 40px 50px;
}

.listing-section h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2em;
  color: #7562d5;
}

.search-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.search-section input,
.search-section select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.search-section button {
  padding: 10px 15px;
  background: #7562d5;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.search-section button:hover {
  background: #5b48b8;
}

.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.listing {
  background: #fdfdfd;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.listing:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.listing header h3.deceased-name {
  margin: 0 0 10px 0;
  font-size: 1.5em;
  color: #333;
}

.listing header p {
  margin: 5px 0;
  color: #555;
}

.listing .details p {
  margin: 5px 0;
  color: #555;
}

.listing footer.actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.listing footer.actions button {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.listing footer.actions .edit-btn {
  background-color: #4CAF50;
  color: white;
}

.listing footer.actions .delete-btn {
  background-color: #f44336;
  color: white;
}

.listing footer.actions button:hover {
  opacity: 0.9;
}

/* Modal Styles */
.modal {
  display: none; 
  position: fixed; 
  z-index: 999; 
  padding-top: 100px; 
  left: 0; top: 0; width: 100%; height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background: #fff;
  margin: auto;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  position: relative;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content label {
  display: block;
  margin: 10px 0 5px;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.modal-content button {
  margin-top: 15px;
  background: #7562d5;
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
}

.modal-content button:hover {
  background: #5b48b8;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 24px;
  cursor: pointer;
}

/* Reveal Animations */
.hidden-on-load {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hidden-on-load.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .listing-section {
    padding: 20px 25px;
  }

  .hero {
    padding: 0 20px;
  }

  .hero-content {
    max-width: 100%;
  }

  .listings {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 480px) {
  .listing footer.actions {
    flex-direction: column;
    align-items: stretch;
  }

  .listing footer.actions button {
    justify-content: center;
  }

  .search-section {
    flex-direction: column;
    align-items: stretch;
  }

  .search-section input,
  .search-section select,
  .search-section button {
    width: 100%;
    margin: 5px 0;
  }
}

