/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&family=Open+Sans:wght@300;400;600;700&family=Roboto:wght@300;400;500;700&family=Playfair+Display:wght@400;700');

/* Basic styling */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  font-family: 'Nunito', 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Navbar */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;

}

.navbar-brand a {
  text-decoration: none;
  color: #333;
}

.navbar-burger {
  display: none;
  cursor: pointer;
  height: 3.25rem;
  width: 3.25rem;
  position: relative;
}

.navbar-burger span {
  background-color: #333;
  display: block;
  height: 2px;
  width: 24px;
  position: absolute;
  left: calc(50% - 12px);
  border-radius: 1px;
  transition: all 0.3s ease-out;
}

.navbar-burger span:nth-child(1) {
  top: calc(50% - 8px);
}

.navbar-burger span:nth-child(2) {
  top: calc(50% - 1px);
}

.navbar-burger span:nth-child(3) {
  top: calc(50% + 6px);
}

.navbar-burger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-burger.is-active span:nth-child(2) {
  opacity: 0;
}

.navbar-burger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.navbar-menu {
  display: flex;
  justify-content: flex-end;
}

.navbar-item {
  margin-left: 1rem;
  text-decoration: none;
  color: #333;
}

.navbar-item:hover {
  color: #0066cc;
}

@media screen and (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
  }

  .navbar-brand {
    width: 100%;
    justify-content: space-between;
  }

  .navbar-burger {
    display: block;
  }

  .navbar-menu {
    display: none;
    width: 100%;
    margin-top: 1rem;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    padding: 0.5rem;
    z-index: 10;
  }

  .navbar-menu.is-active {
    display: block;
  }

  .navbar-end {
    display: flex;
    flex-direction: column;
  }

  .navbar-item {
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .navbar-item:last-child {
    border-bottom: none;
  }
}

/* Posts styling */
.posts-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
}

.post-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-preview h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.post-meta {
  color: #666;
  margin-bottom: 1rem;
}

.post-excerpt {
  margin-bottom: 1rem;
}

.read-more {
  text-align: right;
  margin-top: auto;
  align-self: flex-end;
}

.post-full {
  max-width: 800px;
  margin: 0 auto;
}

.post-full .post-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.post-content {
  margin: 2rem 0;
  line-height: 1.8;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 4px;
  display: block;
}

.post-content video {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 4px;
  display: block;
}

.post-sharing {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.sharing-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

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

/* Footer */
.footer {
  background-color: #f5f5f5;
  padding: 2rem 0;
  margin-top: 2rem;
  text-align: center;
  flex-shrink: 0;
  width: 100%;
  overflow-x: hidden;
}

/* Hero section */
.hero {
  position: relative;
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 1rem;
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Black overlay with 50% opacity */
  z-index: 1;
}

.hero-body {
  padding: 2rem;
  position: relative;
  z-index: 2; /* Place content above the overlay */
}

.title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.5rem;
}

.hero .title {
  font-size: 3rem;
  color: white;
  font-family: 'Playfair Display', sans-serif;
}

.hero .subtitle {
  color: rgba(255, 255, 255, 0.9);
}

/* Cards */
.card {
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card-content {
  padding: 1rem;
  text-align: center;
}

.card-content h3 {
  margin: 0;
}

/* Columns */
.columns {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

.column {
  flex: 1;
  padding: 0.75rem;
  min-width: 250px;
}

/* Buttons */
.button {
  display: inline-block;
  background-color: #0066cc;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  margin-top: 1rem;
}

.button:hover {
  background-color: #0052a3;
}

.button.is-primary {
  background-color: #305075;
}

.button.is-secondary {
  background-color: white;
  color: #305075;
  border: 1.5px solid #305075;
}

.button.is-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.button.is-danger {
  background-color: #f14668;
}

.button.is-primary:visited {
  color: white;
}

.button.is-secondary:visited {
  color: #305075;
}

/* Form elements */
.field {
  margin-bottom: 1rem;
}

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

.input, .textarea, select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.textarea {
  min-height: 100px;
}

.checkbox {
  margin: 0;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: #305075;
}

/* Custom styling for select elements */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

.post-form-container, .rsvp-form-container {
  width: 100%;
  max-width: 800px;
}

.error-messages {
  color: red;
  margin-bottom: 1.5rem;
}

/* Section */
.section {
  padding: 0rem 0;
}

/* Content */
.content {
  line-height: 1.6;
}

.content h1, .content h2, .content h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.content p {
  margin-bottom: 1rem;
}

.content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .columns {
    flex-direction: column;
  }

  .column {
    width: 100%;
    flex-basis: 100%;
  }

  .container {
    width: 100%;
    padding: 0 10px;
  }

  .title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.25rem;
  }

  /* Fix for grid layouts on mobile */
  .posts-container {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  /* Ensure all content fits within viewport */
  main {
    width: 100%;
    overflow-x: hidden;
  }

  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Photo Collage Styles */
.photo-collage {
  margin-bottom: 2rem;
}

.collage-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
}

/* About Page Photo Styles */
.about-photos {
  display: flex;
  flex-direction: column;
}

.about-image {
  width: 100%;
  border-radius: 5px;
  object-fit: cover;
}

/* Obituary Page Photo Styles */
.obituary-headshot {
  width: 100%;
  border-radius: 5px;
  margin-bottom: 1rem;
}

/* Foundation Page Photo Styles */
.foundation-image {
  width: 100%;
  border-radius: 5px;
}

.pledge-button-container {
  text-align: center;
  margin: 1.5rem 0;
}

/* Calendar Options Styles */
.calendar-options {
  margin-top: 10px;
}

.calendar-dropdown {
  display: inline-block;
}

.calendar-summary {
  cursor: pointer;
  color: #666;
  font-size: 0.9rem;
  font-weight: normal;
  padding: 3px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  background-color: #fafafa;
  transition: all 0.2s ease;
}

.calendar-summary:hover {
  background-color: #f0f0f0;
  color: #333;
}

.calendar-links {
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 3px;
  background-color: #fafafa;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.calendar-links a {
  display: block;
  text-decoration: none;
  color: #666;
  padding: 4px 0;
}

.calendar-links a:hover {
  color: #0066cc;
}

/* RSVP Call-to-Action Styles */
.rsvp-cta, .event-details {
  max-width: 800px;
  margin: 2rem 0;
  /* margin: 2rem auto; */
  /* text-align: center; */
  padding: 1.5rem;
  background-color: #f5f5f5;
  border-radius: 8px;
  border-left: 4px solid #305075;
}

.rsvp-cta h3 {
  margin-top: 0;
  /* color: #305075; */
}

.rsvp-cta .button {
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
}

/* RSVP Table Styles */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.table.is-striped tr:nth-child(even) {
  background-color: #f5f5f5;
}

.table th, .table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dbdbdb;
}

.table th {
  font-weight: bold;
  background-color: #f5f5f5;
}

/* Tag styles for RSVP status */
.tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.tag.is-success {
  background-color: #48c774;
  color: white;
}

.tag.is-warning {
  background-color: #ffdd57;
  color: rgba(0, 0, 0, 0.7);
}

.tag.is-danger {
  background-color: #f14668;
  color: white;
}

/* Pagination styles */
.pagination-controls {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  padding: 0.75rem;
}

.pagination {
  .first,
  .last,
  .prev,
  .next,
  .page {
    padding: 0.6rem 0.25rem;
    text-decoration: none;
    color: #305075;
    font-weight: 600;
    transition: all 0.2s ease;
  }

  .first:hover,
  .last:hover,
  .prev:hover,
  .next:hover,
  .page:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
  }

  .current {
    font-weight: bold;
  }
}

.mt-4 {
  margin-top: 1rem;
}
