/* Guestbook section wrapper */
.guestbook-section {
  position: relative;
  background: rgba(12, 5, 5, 0.93);
  padding: clamp(1.5rem, 3vw, 2rem) 1.2rem;
  margin: clamp(2rem, 4vw, 3rem) auto;
  max-width: min(1180px, 95vw);
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
}

.guestbook-section::before {
  content: "";
  position: absolute;
  inset: -6px;
  background: linear-gradient(120deg, rgba(93, 178, 255, 0.35), transparent 55%, rgba(255, 215, 0, 0.45));
  filter: blur(30px);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

/* Guestbook content */
.guestbook-container {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  background: rgba(6, 7, 12, 0.9);
  border: 1px solid rgba(93, 178, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(93, 178, 255, 0.12);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: grid;
  gap: 1rem;
}

.guestbook-pane {
  display: grid;
  gap: 1rem;
}

.guestbook-header h2 {
  font-family: 'Merriweather', 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  color: #FFD700;
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: 0.03em;
}

.guestbook-header p {
  color: rgba(232, 232, 232, 0.85);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.guestbook-form {
  display: grid;
  gap: 0.75rem;
  background: rgba(12, 5, 5, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.18);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.guestbook-has-error .guestbook-form {
  border-color: rgba(239, 68, 68, 0.85);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25), inset 0 0 12px rgba(239, 68, 68, 0.18);
}

.guestbook-field {
  display: grid;
  gap: 0.5rem;
}

.guestbook-field label {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #FFD700;
  font-weight: 600;
}

.guestbook-field input[type="text"],
.guestbook-field input[type="file"],
.guestbook-field textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #E8E8E8;
  font-size: 0.9rem;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: 'Inter', Arial, sans-serif;
}

.guestbook-field input[type="text"]:focus,
.guestbook-field input[type="file"]:focus,
.guestbook-field textarea:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25);
  background: rgba(255, 255, 255, 0.12);
}

.guestbook-field textarea {
  min-height: 90px;
  resize: vertical;
}

.guestbook-media-preview {
 display: none;
  gap: 1rem;
  margin-top: 0.75rem;
}

.guestbook-media-preview.has-media {
  display: grid;
}

.guestbook-consent-text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(232, 232, 232, 0.75);
  margin: 0;
}

.guestbook_consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(232, 232, 232, 0.75);
  margin: 0;
}

.guestbook_consent input[type="checkbox"] {
  margin-top: 0.15rem;
  accent-color: #FFD700;
  flex-shrink: 0;
}

.guestbook_consent a {
  color: #FFD700;
}

.guestbook_consent a:hover,
.guestbook_consent a:focus {
  color: #BFFF00;
}

.guestbook-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.guestbook-disclaimer {
  max-width: 900px;
  margin: clamp(1.25rem, 3vw, 1.75rem) auto 0;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(232, 232, 232, 0.65);
}

.guestbook-disclaimer p {
  margin: 0;
}

.guestbook-media-preview img,
.guestbook-media-preview video {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.guestbook-submit {
  justify-self: start;
  background: linear-gradient(135deg, #FFD700 0%, #daa520 100%);
  color: #000000;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  transition: all 0.25s ease;
}

.guestbook-submit:hover,
.guestbook-submit:focus {
  background: linear-gradient(135deg, #ffed4e 0%, #FFD700 100%);
  color: #000000;
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.4);
  transform: translateY(-1px);
}

.guestbook-note {
  font-size: 0.75rem;
  color: rgba(232, 232, 232, 0.6);
  margin: 0;
}

.guestbook-error {
  min-height: 1rem;
  font-size: 0.85rem;
  color: #ff6b6b;
  border-left: 3px solid rgba(239, 68, 68, 0.7);
  padding-left: 0.85rem;
  margin-top: 0.5rem;
  transition: opacity 0.2s ease;
}

.guestbook-entries {
  display: grid;
  gap: 0.85rem;
  max-height: min(420px, 55vh);
  overflow-y: auto;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.4);
}

.guestbook-entries::-webkit-scrollbar {
  width: 6px;
}

.guestbook-entries::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.guestbook-entries::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.3);
  border-radius: 3px;
}

.guestbook-entries::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.5);
}

.guestbook-entry {
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.18);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: grid;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.guestbook-entry:hover {
  background: rgba(255, 215, 0, 0.09);
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateX(2px);
}

.guestbook-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.guestbook-entry-name {
  font-weight: 600;
  color: #FFD700;
  font-size: 0.9rem;
}

.guestbook-entry-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.guestbook-entry-message {
  font-size: 0.85rem;
  line-height: 1.5;
  word-break: break-word;
  color: rgba(232, 232, 232, 0.9);
}

.guestbook-entry-media {
  text-align: center;
  margin-top: 0.5rem;
}

.guestbook-entry-media img,
.guestbook-entry-media video {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  object-fit: contain;
}

.guestbook-empty {
  text-align: center;
  color: rgba(232, 232, 232, 0.6);
  font-size: 0.85rem;
  font-style: italic;
  padding: 1.5rem 1rem;
}

@media (max-width: 768px) {
  .guestbook-section {
    padding: 1rem 0.75rem;
    margin: 1.5rem auto;
  }

  .guestbook-container {
    padding: 1.25rem 1rem;
    gap: 0.75rem;
  }

  .guestbook-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
  }

  .guestbook-header p {
    font-size: 0.85rem;
  }

  .guestbook-form {
    padding: 1rem;
    gap: 0.65rem;
  }

  .guestbook-field {
    gap: 0.4rem;
  }

  .guestbook-field label {
    font-size: 0.8rem;
  }

  .guestbook-field input[type="text"],
  .guestbook-field input[type="file"],
  .guestbook-field textarea {
    font-size: 0.85rem;
    padding: 0.65rem 0.75rem;
  }

  .guestbook-field textarea {
    min-height: 80px;
  }

  .guestbook-consent-text,
  .guestbook_consent {
    font-size: 0.75rem;
  }

  .guestbook-submit {
    width: 100%;
    padding: 0.7rem 1.25rem;
    font-size: 0.85rem;
    justify-self: stretch;
    text-align: center;
  }

  .guestbook-note {
    font-size: 0.7rem;
  }

  .guestbook-entries {
    max-height: 350px;
    padding: 0.5rem 0.15rem;
    gap: 0.6rem;
  }

  .guestbook-entry {
    padding: 0.75rem 0.85rem;
    gap: 0.35rem;
  }

  .guestbook-entry-name {
    font-size: 0.85rem;
  }

  .guestbook-entry-date {
    font-size: 0.7rem;
  }

  .guestbook-entry-message {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .guestbook-entry-media img,
  .guestbook-entry-media video {
    max-height: 150px;
  }

  .guestbook-disclaimer {
    font-size: 0.75rem;
    margin-top: 1rem;
  }

  .guestbook-empty {
    padding: 1rem 0.75rem;
    font-size: 0.8rem;
  }
}
