/* ===========================
   UI/UX IMPROVEMENTS - SMOOTH & LIGHTWEIGHT ANIMATIONS
   Modern Front-End Best Practices
   =========================== */

/* 1. SMOOTH FADE-IN ANIMATIONS (GPU-accelerated with transform) */
@keyframes animate-fade-in-up {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes animate-scale-in {
  from {
    opacity: 0;
    transform: scale3d(0.95, 0.95, 1);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes animate-pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Apply Animations with will-change for better performance */
.animate-fade-in-up {
  animation: animate-fade-in-up 0.8s ease-out forwards;
  will-change: opacity, transform;
}

.animate-scale-in {
  animation: animate-scale-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  will-change: opacity, transform;
}

.animate-pulse-subtle {
  animation: animate-pulse-subtle 2s ease-in-out infinite;
}

/* 2. SVG LOGO SMOOTH REVEAL ANIMATION */
.logo-svg-animate {
  animation: animate-scale-in 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-svg-animate:hover {
  transform: scale(1.05) rotate(2deg);
  filter: drop-shadow(0 10px 30px rgba(212, 163, 115, 0.3));
}

/* 3. MOBILE RESPONSIVENESS - Touch-friendly & Optimized */
@media (max-width: 768px) {
  /* Larger touch targets for better UX */
  button#langToggle,
  button#langToggleMobile,
  [id*="langToggle"] {
    min-height: 44px;
    min-width: 60px;
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Smoother mobile animations (reduced motion) */
  .animate-fade-in-up {
    animation-duration: 0.5s;
  }

  .animate-scale-in {
    animation-duration: 0.4s;
  }

  /* Better spacing for mobile */
  .slide-reveal {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* About hero section mobile optimization */
  .about-hero-modern {
    min-height: auto !important;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  /* Typography adjustments for readability */
  h1 {
    font-size: 2.25rem !important;
    line-height: 1.3 !important;
    letter-spacing: 0.01em !important;
    margin-bottom: 1.5rem !important;
  }

  /* About page hero section mobile font sizes */
  .about-hero-modern h1 {
    font-size: 2rem !important;
  }

  .about-hero-modern .text-reveal-word {
    font-size: 2rem !important;
  }

  .about-hero-modern .slide-reveal p {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
  }

  p {
    font-size: 0.95rem !important;
    line-height: 1.75 !important;
  }

  /* Better strong tag visibility on mobile */
  strong {
    font-weight: 700 !important;
    color: #D4A373 !important;
  }

  /* Story & Vision section mobile spacing */
  .space-y-6 {
    gap: 1.5rem;
  }

  /* Feature cards mobile spacing */
  .feature-card {
    margin-bottom: 1.5rem;
  }

  /* Mobile logo sizing */
  .logo-3d-effect {
    width: 120px !important;
    height: auto;
  }

  /* Remove heavy animations on mobile for performance */
  .coffee-particles-enhanced,
  .hero-gradient-bg {
    animation: none !important;
  }

  /* Mobile-friendly badge */
  .slide-reveal.slide-1 span {
    font-size: 0.875rem;
    padding: 0.5rem 1.5rem;
  }

  /* Text reveal optimization for mobile */
  .text-reveal-line {
    margin-bottom: 0.5rem !important;
  }

  .text-reveal-word {
    font-size: 2.25rem !important;
  }
}

/* 4. ACCESSIBILITY & PERFORMANCE IMPROVEMENTS */
/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Hardware acceleration for smooth performance */
.slide-reveal,
.animate-fade-in-up,
.animate-scale-in {
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

/* 5. GLASSMORPHISM BADGE - MODERN UI */
.glassmorphism-badge {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
}

.glassmorphism-badge:hover {
  background: rgba(212, 163, 115, 0.15);
  border-color: rgba(212, 163, 115, 0.3);
}

/* 6. BUTTON CONSISTENCY - MATCH MAIN MENU STYLE */
.btn-primary-consistent {
  background: linear-gradient(135deg, #D4A373 0%, #8B6F47 100%);
  color: white;
  font-family: 'Inter';
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1.25rem 3rem;
  border-radius: 9999px;
  box-shadow: 0 10px 40px rgba(212, 163, 115, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-primary-consistent:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 15px 50px rgba(212, 163, 115, 0.5);
}

.btn-primary-consistent:active {
  transform: translateY(0) scale(1);
}

/* 7. SMOOTH SCROLL BEHAVIOR */
html {
  scroll-behavior: smooth;
}

/* Scroll padding for fixed header */
section {
  scroll-margin-top: 5rem;
}

/* 8. FOCUS STATES FOR ACCESSIBILITY */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #D4A373;
  outline-offset: 4px;
}

/* ===========================
   9. ABOUT PAGE LOGO IMPROVEMENTS
   =========================== */
/* Fix logo sizing on desktop - reduce from lg:w-36 (144px) to appropriate size */
.about-hero-modern .logo-3d-effect {
  width: 120px !important;
  max-width: 120px !important;
}

@media (min-width: 1024px) {
  .about-hero-modern .logo-3d-effect {
    width: 130px !important;
    max-width: 130px !important;
  }
}

/* Ensure logo container is properly centered */
.about-hero-modern .slide-reveal.slide-4 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* ===========================
   10. FOOTER SECTION DIVIDER - SOFTENED
   =========================== */
/* Softer footer border with rgba instead of bold colors */
.footer-section {
  border-top: 1px solid rgba(212, 163, 115, 0.15) !important;
}

.footer-section .border-t {
  border-color: rgba(212, 163, 115, 0.12) !important;
}

/* ===========================
   11. FOOTER LOGO HOVER - SMOOTH EASE-IN-OUT
   =========================== */
.footer-section a.inline-block img {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.footer-section a.inline-block:hover img {
  transform: scale(1.08) !important;
  filter: drop-shadow(0 8px 20px rgba(212, 163, 115, 0.4)) !important;
}

/* ===========================
   12. NAVBAR IMPROVEMENTS
   =========================== */

/* Navbar container - simple balanced spacing for ALL browsers */
header nav.container {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

@media (min-width: 640px) {
  header nav.container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

@media (min-width: 1024px) {
  header nav.container {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

/* Chrome-specific: Scale down container proportionally (no gaps, no zoom) */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-width: 1024px) {
  .container {
    max-width: 85% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Active state underline - change from gold to brown */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #D4A373;
  transition: width 0.3s ease;
}

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

.nav-link.active {
  color: #D4A373 !important;
}

/* Hover state still uses gold */
.nav-link:hover {
  color: #D4A373 !important;
}

/* ===========================
   13. GOOGLE MAPS MOBILE RESPONSIVE
   =========================== */
/* Improve Google Maps embed on mobile */
.footer-section iframe,
iframe[src*="google.com/maps"] {
  border-radius: 8px;
  border: 1px solid rgba(212, 163, 115, 0.2);
}

@media (max-width: 768px) {
  .footer-section iframe,
  iframe[src*="google.com/maps"] {
    height: 180px !important;
    min-height: 180px;
  }

  .footer-section > div > .grid > div:last-child {
    order: -1;
    margin-bottom: 1.5rem;
  }
}

/* Ensure maps container is responsive */
.footer-section .rounded-lg {
  overflow: hidden;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .footer-section .rounded-lg {
    width: 100%;
    max-width: 100%;
  }
}
