/* Navorexila - Custom Styles */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Base body */
body {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Body scroll lock for mobile menu */
body.menu-open {
  overflow: hidden;
}

/* Selection color */
::selection {
  background-color: #f19248;
  color: white;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ed7624;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #b84517;
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* Image fallback styling */
img {
  background-color: #fdecd8;
  border: none;
}

img[src=""] {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdecd8 0%, #fad5b0 50%, #fdecd8 100%);
  background-size: 200% 200%;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero gradient animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-gradient {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

/* Card hover effects */
.recipe-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #fef7f0;
}

::-webkit-scrollbar-thumb {
  background: #f6b77d;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #f19248;
}

/* Mobile menu transitions */
#mobile-menu {
  transition: visibility 0s linear 0.3s;
}

#mobile-menu.active {
  transition: visibility 0s linear 0s;
}

#mobile-menu #menu-backdrop {
  transition: opacity 0.3s ease;
  opacity: 0;
}

#mobile-menu.active #menu-backdrop {
  opacity: 1;
}

#mobile-menu > div:last-child {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

#mobile-menu.active > div:last-child {
  transform: translateX(0);
}

/* Newsletter form validation */
#newsletter-form input:invalid:not(:placeholder-shown) {
  border: 2px solid #e94848;
}

#newsletter-form input:valid:not(:placeholder-shown) {
  border: 2px solid #22c55e;
}

/* Cookie consent entrance animation */
#cookie-consent {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Button active states */
button:active,
a:active {
  transform: scale(0.98);
}

/* Star rating colors */
.star-filled {
  color: #f19248;
}

/* Form elements consistent styling */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(237, 118, 36, 0.2);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-consent,
  #mobile-menu,
  .no-print {
    display: none !important;
  }
  
  body {
    color: #000;
    background: #fff;
  }
}

/* Transition utilities */
.transition-smooth {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading skeleton animation */
.skeleton {
  background: linear-gradient(90deg, #fdecd8 25%, #fef7f0 50%, #fdecd8 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

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

/* Aspect ratio fallback */
.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

/* Text balance for headings */
h1, h2, h3 {
  text-wrap: balance;
}