/* Additional Theme Fixes for Specific Elements */

/* Hero Section Fixes */
[data-theme="light"] .hero,
[data-theme="light"] .wines-hero,
[data-theme="light"] .gallery-hero {
  /* Lighter overlay for images to be more visible in light mode */
  background: linear-gradient(
      rgba(255, 255, 255, 0.4),
      rgba(255, 255, 255, 0.4)
    ),
    url("/2.jpg") center/cover no-repeat;
}

[data-theme="light"] .hero:before,
[data-theme="light"] .wines-hero:before,
[data-theme="light"] .gallery-hero:before {
  /* Clearer gradient overlay */
  background: linear-gradient(
    135deg,
    rgba(158, 19, 37, 0.1) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
}

/* Hero text color fix */
[data-theme="light"] .hero h1,
[data-theme="light"] .wines-hero h1,
[data-theme="light"] .gallery-hero h1 {
  color: #333333; /* Dark text for light background */
  text-shadow: 0 2px 5px rgba(255, 255, 255, 0.5); /* Light shadow for contrast */
}

[data-theme="light"] .hero h1 span,
[data-theme="light"] .wines-hero h1 span,
[data-theme="light"] .gallery-hero h1 span {
  color: var(--primary); /* Use primary color for heading spans */
}

[data-theme="light"] .hero p,
[data-theme="light"] .wines-hero p,
[data-theme="light"] .gallery-hero p {
  color: #333333; /* Dark text for light background */
  text-shadow: 0 2px 5px rgba(255, 255, 255, 0.5); /* Light shadow for contrast */
}

/* Button text color fix */
[data-theme="light"] .btn {
  color: white !important; /* Ensure text is white for all buttons */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Add shadow for better visibility */
}

[data-theme="light"] .btn-outline {
  color: var(--primary) !important; /* Primary color for outline buttons */
  text-shadow: none; /* No shadow for outline buttons */
}

[data-theme="light"] .btn-outline:hover {
  color: var(--dark-bg) !important; /* Dark text on hover */
}

/* Sticky Header Fix */
[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

[data-theme="light"] header.header-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Footer Fix */
[data-theme="light"] footer {
  background-color: #f5f5f5 !important;
  color: #333333;
}

[data-theme="light"] footer:before {
  background: linear-gradient(
    0deg,
    rgba(245, 245, 245, 1) 0%,
    rgba(255, 255, 255, 0.98) 100%
  );
}

[data-theme="light"] .footer-section h3 {
  color: var(--primary);
}

[data-theme="light"] .footer-links a,
[data-theme="light"] .social-links a {
  color: #333333;
}

[data-theme="light"] .footer-links a:hover,
[data-theme="light"] .social-links a:hover {
  color: var(--primary);
}

[data-theme="light"] .copyright {
  color: #666666;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Gallery Page Fixes */
[data-theme="light"] .gallery-categories {
  background: linear-gradient(
    to right,
    rgba(245, 245, 245, 0.9),
    rgba(255, 255, 255, 0.9),
    rgba(245, 245, 245, 0.9)
  );
}

[data-theme="light"] .gallery-item {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .gallery-item-inner {
  background: linear-gradient(145deg, #f0f0f0, #f8f8f8);
}

[data-theme="light"] .gallery-info h3 {
  color: var(--primary);
}

[data-theme="light"] .gallery-modal {
  background-color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .gallery-modal-caption h3 {
  color: var(--primary);
}

/* Wine Detail Modal fixes */
[data-theme="light"] .modal-image:before {
  background: linear-gradient(
    135deg,
    rgba(158, 19, 37, 0.05) 0%,
    transparent 100%
  );
}

/* Wines Page Fixes */
[data-theme="light"] .wine-filters {
  background: linear-gradient(
    to right,
    rgba(245, 245, 245, 0.97),
    rgba(255, 255, 255, 0.97),
    rgba(245, 245, 245, 0.97)
  );
}

/* Text contrast improvements */
[data-theme="light"] .off-white {
  color: #333333;
}

/* Testimonials Fix */
[data-theme="light"] .testimonial:before {
  color: rgba(158, 19, 37, 0.1);
}

/* Additional rules for any specific elements */
[data-theme="light"] .section-header p {
  color: var(--primary);
}

/* Fix for any overlays */
[data-theme="light"] .overlay-dark {
  background-color: rgba(255, 255, 255, 0.7);
}

/* Fix for hamburger menu in light theme */

/* Mobile menu background in light theme */
[data-theme="light"] .nav-links.active {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(245, 245, 245, 0.98) 100%
  );
  border-bottom: 1px solid rgba(194, 136, 39, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Mobile menu text in light theme */
[data-theme="light"] .nav-links.active li a {
  color: #333333;
}

/* Mobile menu hover states in light theme */
[data-theme="light"] .nav-links.active li a:hover {
  color: var(--primary);
}

/* Hamburger icon in light theme */
[data-theme="light"] .hamburger .bar {
  background-color: #333333;
}

/* Dropdown menu in mobile light theme */
[data-theme="light"] .dropdown-menu.show {
  background: transparent;
  border-top: 1px solid rgba(194, 136, 39, 0.1);
  border-bottom: 1px solid rgba(194, 136, 39, 0.1);
}

/* Collapsible filter bar for mobile view */

/* Main filter container - always visible part */
.wine-filters {
  transition: all 0.3s ease;
}

/* Filter categories (always visible) */
.filter-categories {
  position: relative;
  z-index: 3;
}

/* Advanced filter section (collapsible) */
.advanced-filters {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  opacity: 0;
}

.advanced-filters.expanded {
  max-height: 300px; /* Adjust as needed */
  opacity: 1;
}

/* Toggle button for advanced filters */
.filter-toggle {
  display: none; /* Hidden on desktop */
  margin: 0.5rem auto;
  padding: 0.5rem 1.5rem;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 1.3rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-toggle:after {
  content: "▾";
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.filter-toggle.active:after {
  transform: rotate(180deg);
}

/* Filter bar height adjustment for mobile */
@media (max-width: 768px) {
  .wine-filters {
    padding: 1rem 0;
  }

  .filter-toggle {
    display: block;
  }

  /* Make only filter buttons visible by default */
  .filter-categories {
    margin-bottom: 0;
  }

  /* Make the filter bar more compact */
  .filter-btn {
    padding: 0.7rem 1.5rem;
    font-size: 1.3rem;
  }

  /* Indicator for expanded state */
  .wine-filters.expanded {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  }

  [data-theme="light"] .wine-filters.expanded {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  /* When filters are collapsed, make the bar more transparent */
  .wine-filters.collapsed {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
  }

  [data-theme="light"] .wine-filters.collapsed {
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(10px);
  }
}

/* Adjusted Hero Background Overlay for Light Theme */

/* Reduce the white overlay opacity in light mode */
[data-theme="light"] .hero,
[data-theme="light"] .wines-hero,
[data-theme="light"] .gallery-hero {
  /* More subtle overlay - reduces white opacity from 0.4 to 0.15 */
  background: linear-gradient(
      rgba(255, 255, 255, 0.15),
      rgba(255, 255, 255, 0.15)
    ),
    url("/2.jpg") center/cover no-repeat;
}

[data-theme="light"] .hero:before,
[data-theme="light"] .wines-hero:before,
[data-theme="light"] .gallery-hero:before {
  /* Softer gradient overlay */
  background: linear-gradient(
    135deg,
    rgba(158, 19, 37, 0.1) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
}

/* Update the theme-toggle.js function to use this new overlay value */

/* Hero Text Readability Fix */

/* Enhanced text contrast for hero sections in light mode */
[data-theme="light"] .hero h1,
[data-theme="light"] .wines-hero h1,
[data-theme="light"] .gallery-hero h1 {
  color: #ffffff; /* White text instead of black */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.6); /* Strong shadow for contrast */
  position: relative;
}

[data-theme="light"] .hero p,
[data-theme="light"] .wines-hero p,
[data-theme="light"] .gallery-hero p {
  color: #ffffff; /* White text instead of black */
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6); /* Strong shadow for contrast */
  position: relative;
}

[data-theme="light"] .hero h1 span,
[data-theme="light"] .wines-hero h1 span,
[data-theme="light"] .gallery-hero h1 span {
  color: var(--accent-light); /* Keep accent color for heading spans */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.7); /* Stronger shadow for accent text */
}

/* Optional: Add semi-transparent text background for extra readability */
[data-theme="light"] .hero-content,
[data-theme="light"] .wines-hero-content,
[data-theme="light"] .gallery-hero-content {
  background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent dark background */
  padding: 2rem;
  border-radius: 8px;
  backdrop-filter: blur(5px); /* Subtle blur effect */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Make sure the hero button is clearly visible */
[data-theme="light"] .hero .btn,
[data-theme="light"] .wines-hero .btn,
[data-theme="light"] .gallery-hero .btn {
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
