/*
 * Custom CSS for TZnew Trekking Theme
 * Enhanced styling with animations and modern design
 */

/* Override Tailwind pt-20 class */
.pt-20 {
  padding-top: 0 !important;
}

/* CSS Variables for consistent theming - Green to Blue Gradient */
:root {
  --primary-color: #16a34a;
  --primary-hover: #15803d;
  --secondary-color: #2563eb;
  --accent-color: #0891b2;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-light: #f8fafc;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.3s ease;
}

/* Modern Blob Animation */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Fade In Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out 0.3s both;
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

/* Animation Classes */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out;
}

.animate-slide-down {
  animation: slideDown 0.4s ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Header Layout - Logo with minimum 200px width and Menu 85% on larger screens */
@media (min-width: 1024px) {
  header .flex.items-center.justify-between {
    justify-content: flex-start !important;
  }
  
  header .flex.items-center.justify-between > div:first-child {
    flex: 0 0 auto !important;
    min-width: 200px !important;
    max-width: 300px !important;
    padding-right: 20px !important;
  }
  
  /* Logo image styling to maintain aspect ratio and natural size */
  header .flex.items-center.justify-between > div:first-child .custom-logo {
    min-width: 200px !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
  }
  
  /* Site title styling if no logo */
  header .flex.items-center.justify-between > div:first-child h1 {
    min-width: 200px !important;
    white-space: nowrap !important;
  }
  
  header .flex.items-center.justify-between > nav.mega-menu-nav {
    flex: 1 !important;
    max-width: calc(100% - 220px) !important;
    display: block !important;
  }
  
  /* Ensure mega menu takes full width of its container */
  #mega-menu-wrap-primary {
    width: 100% !important;
    position: relative !important;
  }
  
  #mega-menu-wrap-primary #mega-menu-primary {
    width: 100% !important;
    justify-content: flex-start !important;
    display: flex !important;
    align-items: center !important;
  }
  
  /* Header container with fixed height - only logo expands */
  header .container {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    min-height: auto !important;
    height: auto !important;
  }
  
  /* Header flex container - fixed height, logo can overflow */
  header .flex.items-center.justify-between {
    align-items: center !important;
    min-height: 60px !important;
    height: 60px !important;
    overflow: visible !important;
  }
  
  /* Logo container allows overflow */
  header .flex.items-center.justify-between > div:first-child {
    overflow: visible !important;
    z-index: 10 !important;
  }
}

/* Fix header positioning to ensure menu stays fixed */
header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
  transition: all 0.3s ease !important;
}

/* Header transparency on scroll */
header.scrolled {
  background: rgba(22, 163, 74, 0.1) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Default header with slight transparency */
header {
  background: rgba(22, 163, 74, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

/* Ensure mega menu wrapper inherits proper positioning */
#mega-menu-wrap-primary {
  position: relative !important;
  z-index: 999 !important;
}

/* Fix mega menu items alignment and ensure proper text display */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item {
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Ensure menu links have proper height and line-height */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
  min-height: 44px !important;
  line-height: 1.4 !important;
  display: flex !important;
  align-items: center !important;
  padding: 12px 20px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Fixed header height - logo can extend beyond */
header {
  min-height: 60px !important;
  height: 60px !important;
  overflow: visible !important;
}

/* ==========================================================================
   MEGA MENU STYLES
   ========================================================================== */

/* Main mega menu container */
.mega-menu-nav {
  position: relative;
}

/* Main menu list */
.mega-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Main menu items */
.mega-menu > li {
  position: relative;
  margin: 0;
}

/* Main menu links */
.mega-menu > li > a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border-radius: 0.5rem;
}

.mega-menu > li > a:hover {
  color: var(--primary-color);
  background-color: var(--bg-light);
}

/* Dropdown arrow */
.mega-menu-arrow {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.has-mega-menu:hover .mega-menu-arrow {
  transform: rotate(180deg);
}

/* Modern Mega Menu Dropdown Container */
.mega-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  max-width: 90vw;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(22, 163, 74, 0.1), 0 8px 16px rgba(37, 99, 235, 0.06);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  border: 1px solid rgba(22, 163, 74, 0.1);
  margin-top: 12px;
}

/* Ensure parent has relative positioning */
.has-mega-menu {
  position: relative;
}

/* Show dropdown on hover with smooth animation */
.has-mega-menu:hover .mega-menu-dropdown,
.mega-menu-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Add subtle arrow pointer */
.mega-menu-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ffffff;
  filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
}

/* Modern Mega Menu Content Grid */
.mega-menu-content {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
}

/* Mega Menu Columns */
.mega-menu-column {
  flex: 1;
  min-width: 280px;
  padding: 2.5rem;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.mega-menu-column:last-child {
  border-right: none;
}

.mega-menu-column > li:first-child {
  margin-bottom: 1rem;
}

.mega-menu-column > li:first-child > a {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a202c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  display: block;
  margin-bottom: 1rem;
  position: relative;
}

.mega-menu-column > li:first-child > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 1px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1024px) {
  .mega-menu-dropdown {
    width: 95vw;
    max-width: 900px;
  }
  
  .mega-menu-content {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .mega-menu-dropdown {
    position: static;
    width: 100%;
    margin-top: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transform: none;
  }
  
  .mega-menu-dropdown::before {
    display: none;
  }
  
  .mega-menu-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
}

/* Modern Sub Menu Column Styling */
.mega-menu-dropdown .sub-menu,
.mega-menu-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Column Header Styling */
.mega-menu-dropdown .sub-menu > li:first-child > a,
.mega-menu-column > li:first-child > a {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a202c;
  padding: 0 0 1rem 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.mega-menu-dropdown .sub-menu > li:first-child > a::after,
.mega-menu-column > li:first-child > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 1px;
}

/* Regular Menu Items */
.mega-menu-dropdown .sub-menu li,
.mega-menu-column li {
  margin: 0;
  padding: 0;
  position: relative;
}

.mega-menu-dropdown .sub-menu li:not(:first-child),
.mega-menu-column li:not(:first-child) {
  margin-top: 0.5rem;
}

.mega-menu-dropdown .sub-menu a,
.mega-menu-column a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #4a5568;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.mega-menu-dropdown .sub-menu a::before,
.mega-menu-column a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  transition: left 0.3s ease;
  z-index: -1;
}

.mega-menu-dropdown .sub-menu a:hover,
.mega-menu-column a:hover {
  color: var(--primary-color);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

.mega-menu-dropdown .sub-menu a:hover::before,
.mega-menu-column a:hover::before {
  left: 0;
}

/* Icon Styling */
.mega-menu-dropdown .sub-menu a i,
.mega-menu-column a i {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  color: var(--primary-color);
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.mega-menu-dropdown .sub-menu a:hover i,
.mega-menu-column a:hover i {
  transform: scale(1.1);
}

/* Featured/Highlighted Items */
.mega-menu-dropdown .sub-menu .featured-item a,
.mega-menu-column .featured-item a {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

.mega-menu-dropdown .sub-menu .featured-item a::after,
.mega-menu-column .featured-item a::after {
  content: 'New';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modern Main Navigation Menu Styling */
.mega-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu > li {
  position: relative;
  margin: 0;
}

.mega-menu > li > a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

/* Hover effect with gradient background */
.mega-menu > li > a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  transition: left 0.3s ease;
  z-index: -1;
}

.mega-menu > li > a:hover::before {
  left: 0;
}

.mega-menu > li > a:hover {
  color: #fef3c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

/* Active menu item styling */
.mega-menu > li.current-menu-item > a,
.mega-menu > li.current-menu-ancestor > a {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* Dropdown arrow styling */
.mega-menu-arrow {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: #a0aec0;
}

.has-mega-menu:hover .mega-menu-arrow {
  transform: rotate(180deg);
  color: #fef3c7;
}

/* Add animation for dropdown items */
.mega-menu-dropdown .sub-menu li {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.mega-menu-dropdown.show .sub-menu li {
  opacity: 1;
  transform: translateY(0);
}

.mega-menu-dropdown.show .sub-menu li:nth-child(1) { animation-delay: 0.1s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(2) { animation-delay: 0.15s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(3) { animation-delay: 0.2s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(4) { animation-delay: 0.25s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(5) { animation-delay: 0.3s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(6) { animation-delay: 0.35s; }

/* First level items in mega menu (column headers) */
.mega-menu-dropdown > .mega-menu-content > li {
  margin-bottom: 1rem;
}

.mega-menu-dropdown > .mega-menu-content > li > a {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

/* Responsive mega menu */
@media (max-width: 1024px) {
  .mega-menu-nav {
    display: none;
  }
  
  .mega-menu-dropdown {
    position: static;
    width: 100%;
    max-width: none;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border-color);
    margin-left: 0;
  }
  
  .mega-menu-content {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .has-mega-menu:hover .mega-menu-dropdown {
    transform: none;
  }
}

/* Tablet specific adjustments */
@media (max-width: 768px) {
  .mega-menu-nav {
    display: none;
  }
  
  /* Ensure mobile menu is properly sized */
  #mobile-menu {
    padding-top: 100px;
  }
  
  #mobile-menu .menu-item a {
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
  }
  
  #mobile-menu .sub-menu a {
    padding: 1rem 2.5rem;
    font-size: 1rem;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .mega-menu-dropdown {
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
  }
  
  .mega-menu-content {
    padding: 1rem 0.5rem;
  }
  
  #mobile-menu {
    padding-top: 90px;
  }
  
  #mobile-menu .menu-item a {
    padding: 1rem 1rem;
  }
  
  #mobile-menu .sub-menu a {
    padding: 0.75rem 2rem;
  }
}

/* Animation for mega menu items */
.mega-menu-dropdown .sub-menu li {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.3s ease forwards;
}

.mega-menu-dropdown.show .sub-menu li:nth-child(1) { animation-delay: 0.1s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(2) { animation-delay: 0.15s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(3) { animation-delay: 0.2s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(4) { animation-delay: 0.25s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(5) { animation-delay: 0.3s; }
.mega-menu-dropdown.show .sub-menu li:nth-child(6) { animation-delay: 0.35s; }

/* Reset animation when dropdown is hidden */
.mega-menu-dropdown:not(.show) .sub-menu li {
  opacity: 0;
  transform: translateY(10px);
  animation: none;
}

/* Improved mega menu positioning */
.mega-menu {
  position: relative;
  z-index: 100;
}

/* Ensure proper stacking context */
.mega-menu-nav {
  position: relative;
  z-index: 100;
}

/* Better dropdown arrow animation */
.mega-menu-arrow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth hover transitions */
.has-mega-menu > a {
  transition: all 0.3s ease;
}

/* Focus styles for accessibility */
.has-mega-menu > a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Improved mobile menu accessibility */
#mobile-menu-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
  .has-mega-menu > a,
  #mobile-menu .menu-item a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* Hover effect for main menu items */
.mega-menu > li {
  position: relative;
}

.mega-menu > li::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.mega-menu > li:hover::after {
  width: 80%;
}

/* Active menu item */
.mega-menu > li.current-menu-item > a,
.mega-menu > li.current-menu-ancestor > a {
  color: var(--primary-color);
}

.mega-menu > li.current-menu-item::after,
.mega-menu > li.current-menu-ancestor::after {
  width: 80%;
}

/* Preloader Styles */
.preloader,
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.preloader.fade-out,
#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: var(--transition);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Header */
.site-header {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  transition: var(--transition);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header.scrolled {
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.98);
}

/* Custom Logo Styling - Fix white logo visibility */
.custom-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  padding: 8px 12px;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: block;
  margin: 0 auto;
}

/* Large screen sizing */
@media (min-width: 768px) {
  .custom-logo {
    width: 100px;
    height: 100px;
    margin: 0;
  }
}

.custom-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #94a3b8;
}

/* Alternative styling for dark logos */
.custom-logo.dark-logo {
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 8px 12px;
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .custom-logo.dark-logo {
    width: 100px;
    height: 100px;
    margin: 0;
  }
}

.custom-logo.dark-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Navigation Enhancements */
.primary-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.primary-menu a {
  position: relative;
  padding: 0.5rem 1rem;
  color: var(--text-dark);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border-radius: 0.5rem;
}

.primary-menu a:hover {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
}

.primary-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

.primary-menu a:hover::after {
  width: 80%;
}

/* Modern Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  padding: 12px;
  z-index: 10000;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  width: 48px;
  height: 48px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1px;
  transform-origin: center;
}

.menu-toggle.active {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.4);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: #667eea;
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: #667eea;
}

/* Focus styles for accessibility */
.menu-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Modern Mobile Menu Styles */
#mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.98) 0%, rgba(37, 99, 235, 0.98) 100%);
  backdrop-filter: blur(10px);
  z-index: 9999;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding-top: 80px;
}

#mobile-menu.active {
  left: 0;
}

#mobile-menu .menu {
  list-style: none;
  padding: 20px;
  margin: 0;
}

#mobile-menu .menu-item {
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#mobile-menu .menu > .menu-item:first-child {
  margin-top: 20px;
}

#mobile-menu .menu-item a {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#mobile-menu .menu-item a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
  transition: left 0.3s ease;
}

#mobile-menu .menu-item a:hover {
  color: var(--primary-color);
  transform: translateX(8px);
}

#mobile-menu .menu-item a:hover::before {
  left: 0;
}

/* Mobile menu items with children */
#mobile-menu .menu-item-has-children > a {
  position: relative;
  padding-right: 60px;
}

#mobile-menu .menu-item-has-children > a::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu .menu-item-has-children.open > a::after {
  transform: translateY(-50%) rotate(225deg);
}

/* Mobile sub-menu */
#mobile-menu .sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.2);
  margin: 0;
  border-radius: 0 0 12px 12px;
  list-style: none;
  padding: 0;
}

#mobile-menu .menu-item-has-children.open .sub-menu {
  max-height: 600px;
}

#mobile-menu .sub-menu .menu-item {
  background: transparent;
  border: none;
  margin-bottom: 0;
  border-radius: 0;
}

#mobile-menu .sub-menu a {
  padding: 15px 30px 15px 40px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  position: relative;
}

#mobile-menu .sub-menu a::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: rgba(22, 163, 74, 0.6);
  border-radius: 50%;
  transition: all 0.3s ease;
}

#mobile-menu .sub-menu a:hover {
  color: #ffffff;
  background: rgba(22, 163, 74, 0.1);
  transform: translateX(12px);
}

#mobile-menu .sub-menu a:hover::before {
  background: var(--primary-color);
  transform: translateY(-50%) scale(1.5);
}

/* Mobile Menu Icons */
#mobile-menu .menu-item a i {
  margin-right: 12px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
  min-width: 20px;
}

#mobile-menu .menu-item a:hover i {
  color: var(--primary-color);
}

#mobile-menu .sub-menu a i {
  font-size: 14px;
  margin-right: 10px;
}

#mobile-menu-toggle.active {
  position: fixed;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(22, 163, 74, 0.2);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

/* Improved mobile menu toggle button */
#mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

#mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

#mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

#mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}

/* Mobile menu overlay */
#mobile-menu::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

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

/* Responsive adjustments */
@media (min-width: 1024px) {
  #mobile-menu {
    display: none !important;
  }
  
  #mobile-menu-toggle {
    display: none !important;
  }
}

/* Ensure mobile menu is visible on mobile devices */
@media (max-width: 1023px) {
  #mobile-menu {
    display: block !important;
  }
  
  #mobile-menu-toggle {
    display: flex !important;
  }
}

/* Hero Section Enhancements */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.3) 0%, rgba(37, 99, 235, 0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  background: linear-gradient(135deg, #ffffff 0%, #dcfce7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-cta {
  animation: fadeInUp 1s ease-out 0.6s both;
  position: relative;
  overflow: hidden;
}

.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.hero-cta:hover::before {
  left: 100%;
}

/* Card Enhancements */
.card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

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

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: var(--transition);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-image {
  position: relative;
  overflow: hidden;
}

.card-image img {
  transition: var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.card:hover .card-overlay {
  opacity: 1;
}

/* Button Enhancements */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Loading Animation */
.loading {
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility Classes */
.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-bounce-in {
    animation: bounceIn 0.6s ease-out;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease;
}

.transition-transform {
    transition: transform 0.2s ease;
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.group:hover .group-hover\:text-blue-600 {
    color: #2563eb;
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Form Enhancements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: var(--transition);
  background: #ffffff !important;
  color: #1f2937 !important;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #ffffff !important;
  color: #1f2937 !important;
}

/* Additional form input styling for better visibility */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border: 2px solid #d1d5db !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border-color: #3b82f6 !important;
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

/* Search Form Styles */
.search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.search-form.focused {
    transform: scale(1.02);
}

.search-field {
    width: 100%;
    padding: 12px 120px 12px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #374151;
}

.search-field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-form.focused .search-field {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

/* Search Icon */
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 5;
    pointer-events: none;
}

.search-form.focused .search-icon {
    color: #3b82f6;
}

.search-icon svg {
    width: 20px;
    height: 20px;
}

.search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 5;
}

.search-submit:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-50%) scale(1.05);
}

.search-form .search-field::placeholder {
    color: #9ca3af;
}

.search-form .search-submit {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 14px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.search-form .search-submit:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: scale(1.05);
}

.search-form .search-submit svg {
    width: 20px;
    height: 20px;
}

/* Search Results Styling */
.search-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Live Search Results */
.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.live-search-item {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.live-search-item:hover,
.live-search-item.highlighted {
    background-color: #f8fafc;
    transform: translateX(4px);
}

.live-search-item:last-child {
    border-bottom: none;
}

.live-search-item.loading {
    cursor: default;
    background-color: #f9fafb;
}

.live-search-item.loading:hover {
    transform: none;
}

.live-search-item .title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.live-search-item .excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.live-search-footer {
    background-color: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.live-search-footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.live-search-footer a:hover {
    text-decoration: underline;
}

/* Search Clear Button */
.search-clear {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
}

.search-clear.show {
    opacity: 1;
    visibility: visible;
}

.search-clear:hover {
    color: #374151;
    background-color: #f3f4f6;
}

.search-clear svg {
    width: 18px;
    height: 18px;
}

/* Popular Searches */
.popular-searches-header {
    background-color: #fafafa;
    border-radius: 12px 12px 0 0;
}

.popular-searches-list {
    max-height: 300px;
    overflow-y: auto;
}

.popular-search-item {
    margin: 2px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.popular-search-item:hover {
    background-color: #f8fafc !important;
    transform: translateX(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.popular-search-item:active {
    transform: translateX(2px) scale(0.98);
}

.search-loading,
.search-no-results,
.search-error {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* Search Result Cards */
.search-result-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.search-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Post Type Badges */
.post-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 6px;
}

.post-type-badge.trekking {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.post-type-badge.tours {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.post-type-badge.blog {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.post-type-badge.post {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Difficulty/Rating Badges */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 12px;
}

.difficulty-badge.easy {
    background: #dcfce7;
    color: #166534;
}

.difficulty-badge.moderate {
    background: #fef3c7;
    color: #92400e;
}

.difficulty-badge.challenging {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive Design for Search */
@media (max-width: 768px) {
    .search-hero {
        padding: 40px 0;
    }
    
    .search-form {
        max-width: 100%;
        margin: 0 20px;
        position: relative;
    }
    
    .search-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .search-filters .flex {
        flex-wrap: nowrap;
        min-width: max-content;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .search-result-card {
        margin: 0 20px 20px;
    }
    
    .live-search-results {
        max-height: 70vh;
        border-radius: 8px;
        left: -8px;
        right: -8px;
    }
    
    .live-search-item {
        padding: 12px;
    }
    
    .live-search-item .flex {
        gap: 8px;
    }
    
    .live-search-item img,
    .live-search-item .w-12 {
        width: 40px;
        height: 40px;
    }
    
    .popular-search-item {
        padding: 12px;
    }
    
    .search-clear {
        right: 45px;
    }
    
    .search-field,
    .search-input {
        padding-right: 80px;
    }
}

@media (max-width: 480px) {
    .search-hero {
        padding: 30px 0;
    }
    
    .search-hero h1 {
        font-size: 1.5rem;
    }
    
    .search-hero .subtitle {
        font-size: 0.875rem;
    }
    
    .live-search-results {
        max-height: 60vh;
        left: -12px;
        right: -12px;
    }
    
    .search-result-card .grid {
        grid-template-columns: 1fr;
    }
    
    .search-result-card .image {
        height: 200px;
    }
    
    .filter-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .search-form {
        margin: 0 12px;
    }
}

/* Animation for search results */
.search-result-card {
    animation: fadeInUp 0.5s ease forwards;
}

.search-result-card:nth-child(1) { animation-delay: 0.1s; }
.search-result-card:nth-child(2) { animation-delay: 0.2s; }
.search-result-card:nth-child(3) { animation-delay: 0.3s; }
.search-result-card:nth-child(4) { animation-delay: 0.4s; }
.search-result-card:nth-child(5) { animation-delay: 0.5s; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
  list-style: none;
  padding: 0;
}

.page-item {
  border-radius: 0.5rem;
  overflow: hidden;
}

.page-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.page-link:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.page-item.active .page-link {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Footer Enhancements */
.site-footer {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
}

.breadcrumb-separator {
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .primary-menu-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  
  .primary-menu-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .primary-menu {
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }
  
  .primary-menu a {
    width: 100%;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --bg-light: #1f2937;
    --bg-white: #374151;
    --border-color: #4b5563;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .pagination,
  .btn {
    display: none;
  }
  
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Accessibility Enhancements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Post Navigation Styles */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 3rem 0;
}

.nav-previous,
.nav-next {
  flex: 1;
  max-width: 48%;
}

.nav-previous a,
.nav-next a {
  display: block;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-previous a:hover,
.nav-next a:hover {
  background: linear-gradient(135deg, #16a34a 0%, #2563eb 100%);
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.nav-previous a:hover .nav-subtitle,
.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-subtitle,
.nav-next a:hover .nav-title {
  color: white;
}

.nav-subtitle {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
}

.nav-previous {
  text-align: left;
}

.nav-next {
  text-align: right;
}

.nav-previous a::before {
  content: '←';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.nav-next a::after {
  content: '→';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.nav-previous a:hover::before,
.nav-next a:hover::after {
  color: white;
  transform: translateY(-50%) scale(1.2);
}

.nav-previous .nav-title {
  padding-left: 2rem;
}

.nav-next .nav-title {
  padding-right: 2rem;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-previous,
  .nav-next {
    max-width: 100%;
  }
  
  .nav-previous a,
  .nav-next a {
    padding: 1rem;
    text-align: center;
  }
  
  .nav-previous a::before,
  .nav-next a::after {
    display: none;
  }
  
  .nav-previous .nav-title,
  .nav-next .nav-title {
    padding: 0;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Selection */
::selection {
  background: var(--primary-color);
  color: white;
}

::-moz-selection {
  background: var(--primary-color);
  color: white;
}