/* Font Face Declarations */
/* Using Bilbo Swash Caps from Google Fonts for elegant headings */

/* CSS Variables */
:root {
  --navbar-height: 51px;
  --navbar-hide-offset: -80px;
  --body-padding-top: 30px;
  --primary-green: #375726;
  --secondary-green: #2d7d3a;
  --text-color: #2d4a2b;
  --note-bg: #e5f0e3;
}

/* Font and Basic Styling */
body, h1, h2, h3, h4, h5, h6 {
  font-family: "Lato", sans-serif;
}

html {
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Reggae One", cursive;
  font-weight: 400;
  letter-spacing: 2px;
  color: #375726;
}

body, html {
  color: var(--text-color);
  line-height: 1.8;
  background: linear-gradient(135deg, 
    rgba(176, 196, 137, 0.3) 0%, 
    rgba(244, 230, 168, 0.3) 25%, 
    rgba(176, 196, 137, 0.3) 50%, 
    rgba(244, 230, 168, 0.3) 75%, 
    rgba(176, 196, 137, 0.3) 100%);
  background-size: 400% 400%;
  padding-top: var(--body-padding-top);
}

/* Utility Classes */
.w3-wide {
  letter-spacing: 10px;
}

.w3-hover-opacity {
  cursor: pointer;
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 4px;
  display: inline-block;
  min-height: 1em;
  min-width: 100px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Fade-in Animations */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }

/* Scroll-triggered animations */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Image loading states */
img {
  transition: opacity 0.3s ease-in;
}

img:not([src]) {
  opacity: 0;
}

/* Hero Section */
.hero {
  background: url('../../images/banner.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #375726;
  padding: 100px 20px;
  text-align: center;
  color: #ffffff;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

.hero h1 {
  font-size: 3em;
  margin: 0;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.9);
  font-style: italic;
  color: #ffffff;
}

/* Navigation */
nav.w3-bar {
  background-color: #375726 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: top 0.3s ease;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-logo {
  font-size: 1.2em !important;
  font-weight: bold;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-link {
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.nav-link:hover {
  background-color: #4a7034 !important;
  transform: translateY(-2px);
}

.nav-link:active {
  background-color: #5a8a42 !important;
}

#mobileMenu {
  border-top: 1px solid #2d7d3a;
}

/* Improved mobile touch targets */
@media (max-width: 600px) {
  .nav-link {
    padding: 16px 20px !important;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  #menuToggle {
    padding: 16px 20px !important;
    font-size: 1.2em;
  }
}

#menuToggle {
  font-size: 1.5em;
  padding: 12px 16px !important;
}

#menuToggle:hover {
  background-color: #4a7034 !important;
}

.w3-light-grey {
  background-color: #e5f0e3 !important;
}

.w3-content {
  max-width: 1200px;
}

/* Custom Color Classes */
.hobbit-gold {
  color: #375726;
}

.hobbit-brown {
  background-color: #375726 !important;
  color: #f0f5f0 !important;
}

/* Dividers */
.section-divider {
  border-top: 3px solid #2d7d3a;
  border-bottom: 3px solid #2d7d3a;
  background: linear-gradient(to right, transparent, #2d7d3a, transparent);
  height: 20px;
  margin: 40px 0;
}

/* Panel Styling */
.accommodation-panel {
  border: 3px solid #2d7d3a;
  background-color: #f5faf5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.accommodation-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(45, 125, 58, 0.2);
}

.accommodation-images {
  width: 100%;
  margin-bottom: 15px;
}

.accommodation-images img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.accommodation-content {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.accommodation-content h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.8em;
  color: #2d7d3a;
  border-bottom: 2px solid #2d7d3a;
  padding-bottom: 10px;
}

.accommodation-content p {
  margin: 8px 0;
  font-size: 0.95em;
}

.accommodation-content strong {
  color: #2d5a2d;
}

.info-panel {
  background-color: #f5faf5;
  margin-top: 20px;
  border-left: 5px solid #2d7d3a;
  padding: 15px 20px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-panel h3 {
  color: #2d5a2d;
  margin-bottom: 10px;
}

.warning-panel {
  background-color: #fff3cd;
}

/* List Styling */
.event-list {
  list-style: none;
  padding-left: 0;
}

.event-list li {
  margin-bottom: 10px;
}

/* Image Styling */
.w3-image {
  max-width: 100%;
  border: 3px solid #2d7d3a;
  border-radius: 8px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2em;
  }

  .w3-col {
    width: 100%;
  }

  /* Mobile-friendly accommodation cards */
  .accommodation-panel {
    margin-bottom: 20px;
  }

  .accommodation-content {
    padding: 20px !important;
  }

  .accommodation-content h3 {
    font-size: 1.5em;
    margin-bottom: 12px;
  }

  .accommodation-content p {
    font-size: 1em;
    margin: 10px 0;
  }

  .accommodation-images img {
    height: 150px;
  }

  /* Better padding and spacing for mobile */
  .w3-padding-16 {
    padding: 12px !important;
  }

  .w3-padding-64 {
    padding: 30px 16px !important;
  }

  h2 {
    font-size: 1.8em;
  }

  /* Improve touch targets */
  .w3-button {
    padding: 12px 20px !important;
    font-size: 1em;
  }

  /* Better list spacing on mobile */
  .event-list li {
    margin-bottom: 15px;
    font-size: 0.95em;
  }
}

/* Form Styling */
.w3-input {
  background-color: #f5faf5 !important;
}

.w3-button.hobbit-brown {
  background-color: #2d5a2d !important;
  color: #f0f5f0 !important;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.w3-button.hobbit-brown:hover:not(:disabled) {
  background-color: #1a3a18 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(45, 90, 45, 0.3);
}

.w3-button.hobbit-brown:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(45, 90, 45, 0.2);
}

.w3-button.hobbit-brown:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 40px 20px;
  border-top: 2px solid #2d7d3a;
  text-align: center;
}

footer p {
  margin: 8px 0;
  font-size: 0.95em;
}

footer .footer-copyright {
  font-weight: bold;
  margin-bottom: 8px;
}

footer .footer-tagline {
  font-style: italic;
  color: #2d7d3a;
}

/* RSVP Section */
.rsvp-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 20px 0;
}

.rsvp-item {
  flex: 1;
  min-width: 200px;
  padding: 15px;
  background-color: #f5faf5;
  border-left: 4px solid #2d7d3a;
  border-radius: 4px;
}

.rsvp-item strong {
  display: block;
  color: #2d7d3a;
  margin-bottom: 8px;
  font-size: 0.9em;
}

.rsvp-item p {
  margin: 5px 0;
  word-break: break-all;
}

.rsvp-item a {
  color: #2d7d3a;
  text-decoration: none;
  font-weight: bold;
}

.rsvp-item a:hover {
  text-decoration: underline;
}

.schedule-note {
  background-color: #e5f0e3;
  border-left: 4px solid #2d7d3a;
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  font-style: italic;
  color: #2d5a2d;
}

/* FAQ Styling */
.faq-item {
  background: #ffffff;
  padding: 25px 30px;
  border-radius: 8px;
  border-left: 4px solid #375726;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.faq-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(55, 87, 38, 0.15);
}

/* Stagger animation for cards */
.faq-item:nth-child(1) { transition-delay: 0s; }
.faq-item:nth-child(2) { transition-delay: 0.05s; }
.faq-item:nth-child(3) { transition-delay: 0.1s; }
.faq-item:nth-child(4) { transition-delay: 0.15s; }
.faq-item:nth-child(5) { transition-delay: 0.2s; }

.faq-item h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.4em;
  line-height: 1.4;
}

.faq-item p {
  margin-bottom: 0;
  color: #2d4a2b;
  line-height: 1.8;
  font-size: 1.05em;
}

/* Note with Dragon Styling */
.note-with-dragon {
  background-color: #e5f0e3;
  position: relative;
  padding-left: 70px;
}

.note-dragon {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 45px;
  height: auto;
}

/* Mobile adjustments for dragon notes */
@media (max-width: 600px) {
  .note-with-dragon {
    padding-left: 60px;
  }
  
  .note-dragon {
    width: 40px;
    top: 8px;
    left: 8px;
  }
}

/* Location Card Styling */
.location-card {
  background: #ffffff;
  padding: 20px 25px;
  border-radius: 8px;
  border-left: 4px solid #375726;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.location-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(55, 87, 38, 0.15);
}

.location-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.3em;
}

.location-card p {
  margin-bottom: 8px;
  color: #2d4a2b;
  line-height: 1.6;
}

.location-card p:last-child {
  margin-bottom: 0;
}

/* Success message animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
