/* ===============================================
   BIENENMARMELADE - Custom Styles
   Honey-themed design with bee accents
   =============================================== */

/* ===============================================
   CSS CUSTOM PROPERTIES (Color Palette)
   =============================================== */
:root {
  /* Honey-inspired colors */
  --honey-amber: #F5A623;
  --honey-gold: #FFC30B;
  --honey-brown: #8B4513;
  --honeycomb-gold: #FFD700;
  --cream-bg: #FFF8DC;
  --dark-text: #3E2723;
  --light-cream: #FFFAF0;

  /* Shadows and effects */
  --box-shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 8px 15px rgba(245, 166, 35, 0.3);

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
}

/* ===============================================
   GLOBAL STYLES
   =============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark-text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Improve text rendering */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--honey-brown);
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 0.875rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

/* ===============================================
   NAVIGATION
   =============================================== */
.navbar-custom {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  transition: var(--transition-smooth);
}

.navbar-custom.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--honey-brown) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.navbar-brand:hover {
  color: var(--honey-amber) !important;
  transform: translateY(-2px);
}

.bee-icon {
  font-size: 1.75rem;
  animation: bee-wiggle 2s ease-in-out infinite;
  display: inline-block;
  transform: scaleX(-1); /* Flip bee to face the other direction */
}

@keyframes bee-wiggle {
  0%, 100% { transform: scaleX(-1) rotate(0deg); }
  25% { transform: scaleX(-1) rotate(-5deg); }
  75% { transform: scaleX(-1) rotate(5deg); }
}

.nav-link {
  color: var(--dark-text) !important;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 1rem !important;
  transition: var(--transition-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--honey-amber), var(--honey-gold));
  transform: translateX(-50%);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

.nav-link:hover {
  color: var(--honey-amber) !important;
}

/* ===============================================
   HERO SECTION
   =============================================== */
#home {
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
}

.hero-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: var(--box-shadow-soft);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.hero-image-container:hover .hero-image {
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(245, 166, 35, 0.15) 0%,
    rgba(255, 195, 11, 0.1) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-content {
  animation: fadeInUp 1s ease;
}

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

.hero-title {
  color: var(--honey-brown);
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-subtitle {
  color: var(--dark-text);
  font-size: 1.25rem;
  font-weight: 400;
  animation: fadeInUp 1s ease 0.4s both;
}

/* ===============================================
   SECTION STYLES
   =============================================== */
section {
  padding: 4rem 0;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

section:nth-child(even) {
  background: var(--light-cream);
}

.section-divider {
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--honey-amber) 30%,
    var(--honey-gold) 50%,
    var(--honey-amber) 70%,
    transparent
  );
  margin: 2rem auto;
  width: 80%;
  max-width: 600px;
  border-radius: 3px;
}

/* ===============================================
   ABOUT SECTION
   =============================================== */
#about .card {
  border: none;
  background: white;
  box-shadow: var(--box-shadow-soft);
  border-radius: 15px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

#about .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--honey-amber), var(--honey-gold), var(--honeycomb-gold));
}

#about .card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

#about .card p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--dark-text);
}

/* ===============================================
   GALLERY SECTION
   =============================================== */
#gallery {
  animation-delay: 0.2s;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--box-shadow-soft);
  transition: var(--transition-smooth);
  margin-bottom: 1.5rem;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-hover);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(245, 166, 35, 0.7),
    rgba(255, 195, 11, 0.6)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Staggered animation for gallery items */
.gallery-item:nth-child(1) { animation: fadeInUp 0.6s ease 0.1s both; }
.gallery-item:nth-child(2) { animation: fadeInUp 0.6s ease 0.2s both; }
.gallery-item:nth-child(3) { animation: fadeInUp 0.6s ease 0.3s both; }
.gallery-item:nth-child(4) { animation: fadeInUp 0.6s ease 0.4s both; }
.gallery-item:nth-child(5) { animation: fadeInUp 0.6s ease 0.5s both; }
.gallery-item:nth-child(6) { animation: fadeInUp 0.6s ease 0.6s both; }
.gallery-item:nth-child(7) { animation: fadeInUp 0.6s ease 0.7s both; }
.gallery-item:nth-child(8) { animation: fadeInUp 0.6s ease 0.8s both; }

/* ===============================================
   CONTACT SECTION
   =============================================== */
#contact {
  animation-delay: 0.3s;
}

.contact-card {
  background: white;
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: var(--box-shadow-soft);
  text-align: center;
  transition: var(--transition-smooth);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.contact-icon {
  font-size: 3rem;
  color: var(--honey-amber);
  margin-bottom: 1rem;
  animation: bee-wiggle 2s ease-in-out infinite;
}

.email-link {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--honey-amber), var(--honey-gold));
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition-smooth);
  box-shadow: var(--box-shadow-soft);
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.email-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.email-link:hover::before {
  width: 300px;
  height: 300px;
}

.email-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--box-shadow-hover);
  color: white;
}

.beekeepers-info {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--cream-bg);
}

.beekeepers-info p {
  font-size: 1.1rem;
  color: var(--dark-text);
  margin-bottom: 0.5rem;
}

.beekeepers-info strong {
  color: var(--honey-brown);
}

/* ===============================================
   FOOTER
   =============================================== */
footer {
  background: linear-gradient(135deg, var(--honey-brown) 0%, #6d3710 100%);
  color: white;
  padding: 2.5rem 0;
  margin-top: 4rem;
  text-align: center;
}

.footer-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: bee-float 3s ease-in-out infinite;
}

@keyframes bee-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

footer p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

footer a {
  color: var(--honey-gold);
  text-decoration: none;
  transition: var(--transition-fast);
}

footer a:hover {
  color: var(--honeycomb-gold);
  text-decoration: underline;
}

/* Game card in footer */
.game-card {
  background: linear-gradient(135deg, #FFF8DC 0%, #FFFAF0 100%);
  border: 3px solid var(--honey-gold);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(255, 195, 11, 0.4);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '🍯';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 120px;
  opacity: 0.1;
  transform: rotate(-15deg);
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(255, 195, 11, 0.5);
  border-color: var(--honey-amber);
}

.game-card .card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
}

/* Game link button in footer */
.game-link-btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #FFD700, #FFC30B);
  color: var(--honey-brown);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.game-link-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.game-link-btn:hover::before {
  width: 300px;
  height: 300px;
}

.game-link-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
  color: var(--honey-brown);
  border-color: rgba(255, 255, 255, 0.5);
}

.game-link-btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* ===============================================
   HONEYCOMB ACCENT (Subtle Corner Decoration)
   =============================================== */
.hexagon-accent {
  position: relative;
}

.hexagon-accent::before,
.hexagon-accent::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--honey-amber);
  opacity: 0.15;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hexagon-accent::before {
  top: -10px;
  left: -10px;
}

.hexagon-accent::after {
  bottom: -10px;
  right: -10px;
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  section {
    padding: 2.5rem 0;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .gallery-item {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .contact-card {
    padding: 1.5rem;
  }

  .email-link {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* ===============================================
   LIGHTBOX STYLES
   =============================================== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 50px rgba(255, 195, 11, 0.3);
  transition: opacity 0.15s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: var(--honey-gold);
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10000;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.lightbox-close:hover {
  color: white;
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10000;
}

.lightbox-prev,
.lightbox-next {
  background-color: rgba(245, 166, 35, 0.8);
  color: white;
  border: none;
  font-size: 30px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-smooth);
  font-weight: bold;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: var(--honey-gold);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 195, 11, 0.5);
}

/* ===============================================
   FLYING BEES ANIMATION
   =============================================== */
.bee-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.flying-bee {
  position: absolute;
  font-size: 24px;
  transform: scaleX(-1); /* Flip bee horizontally to face flight direction */
}

/* First bee - flies in figure-8 pattern */
.flying-bee:nth-child(1) {
  offset-path: path('M -100 300 Q 150 150, 400 300 Q 650 450, 900 300 Q 1150 150, 1400 300 Q 1650 450, 1900 300 Q 2150 150, 2400 300');
  animation:
    fly-path var(--duration) linear infinite,
    bee-fade var(--duration) linear infinite;
  animation-delay: var(--delay);
}

/* Second bee - flies in circular loops */
.flying-bee:nth-child(2) {
  offset-path: path('M -100 400 Q 100 200, 300 400 Q 500 600, 700 400 Q 900 200, 1100 400 Q 1300 600, 1500 400 Q 1700 200, 1900 400 Q 2100 600, 2300 400');
  animation:
    fly-path var(--duration) linear infinite,
    bee-fade var(--duration) linear infinite;
  animation-delay: var(--delay);
}

/* Third bee - flies in spiral/wavy pattern */
.flying-bee:nth-child(3) {
  offset-path: path('M -100 500 Q 50 450, 200 500 Q 350 550, 500 500 Q 650 450, 800 500 Q 950 550, 1100 500 Q 1250 450, 1400 500 Q 1550 550, 1700 500 Q 1850 450, 2000 500 Q 2150 550, 2300 500');
  animation:
    fly-path var(--duration) linear infinite,
    bee-fade var(--duration) linear infinite;
  animation-delay: var(--delay);
}

/* Path animation - moves along offset-path */
@keyframes fly-path {
  0% {
    offset-distance: 0%;
  }
  100% {
    offset-distance: 100%;
  }
}

/* Fade in/out animation */
@keyframes bee-fade {
  0%, 100% { opacity: 0; }
  5%, 95% { opacity: 0.6; }
}

/* Hide bees when container has paused class */
.bee-container.paused .flying-bee {
  animation-play-state: paused;
  opacity: 0 !important;
  transition: opacity 0.3s ease;
}

.bee-container.paused .cursor-bee {
  opacity: 0 !important;
  transition: opacity 0.3s ease;
}

/* Cursor-following bee */
.cursor-bee {
  position: fixed;
  font-size: 28px;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform, left, top;
}

/* Bee toggle button */
.bee-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--honey-amber), var(--honey-gold));
  border: 3px solid white;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bee-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
}

.bee-toggle-btn:active {
  transform: scale(0.95);
}

/* Button when bees are paused */
.bee-toggle-btn.paused {
  background: linear-gradient(135deg, #888, #666);
  border-color: #ddd;
}

/* Add cursor pointer hint to gallery items */
.gallery-item {
  cursor: pointer;
  position: relative;
}

.gallery-item::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 0.9;
}

/* ===============================================
   PRINT STYLES
   =============================================== */
@media print {
  .navbar-custom,
  footer,
  .lightbox,
  .bee-container,
  .bee-toggle-btn {
    display: none;
  }

  section {
    page-break-inside: avoid;
  }
}

/* ===============================================
   MOBILE RESPONSIVE - LIGHTBOX & BEES
   =============================================== */
@media (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 40px;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 24px;
    padding: 10px 15px;
  }

  .flying-bee {
    font-size: 18px;
  }

  .bee-toggle-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
    bottom: 15px;
    right: 15px;
  }

  .cursor-bee {
    font-size: 22px;
  }
}

@media (max-width: 576px) {
  .lightbox-content {
    max-width: 95%;
    max-height: 85vh;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 20px;
    padding: 8px 12px;
  }

  .gallery-item::after {
    font-size: 2rem;
  }
}
