

:root {
  
  --color-primary: #4A7C59; 
  --color-secondary: #8B4513; 
  --color-accent: #D2691E; 
  --color-white-soft: #F8F9FA; 
  --color-dark: #2C3E50; 
  --color-light: #FFFFFF; 
  --color-success: #28A745; 
  --color-warning: #FFC107; 
  --color-danger: #DC3545; 

  --font-family-headings: 'Playfair Display', serif; 
  --font-family-body: 'Open Sans', sans-serif; 
  --font-size-h1: clamp(2.5rem, 5vw, 3.5rem);
  --font-size-h2: clamp(2rem, 4vw, 2.75rem);
  --font-size-h3: clamp(1.75rem, 3.5vw, 2.25rem);
  --font-size-h4: clamp(1.5rem, 3vw, 1.75rem);
  --font-size-h5: clamp(1.25rem, 2.5vw, 1.5rem);
  --font-size-h6: clamp(1.125rem, 2vw, 1.25rem);
  --font-size-body: clamp(1rem, 2vw, 1.125rem);
  --font-size-small: 0.875rem;
  --line-height-headings: 1.2;
  --line-height-body: 1.6;

  --space-xs: 0.5rem; 
  --space-sm: 1rem; 
  --space-md: 1.5rem; 
  --space-lg: 2rem; 
  --space-xl: 3rem; 
  --space-2xl: 4rem; 
  --space-3xl: 5rem; 

  --border-radius: 0.5rem; 
  --border-radius-lg: 1rem;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 1rem 2rem rgba(0, 0, 0, 0.15);

  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;

  --z-modal: 1050;
  --z-dropdown: 1060;
  --z-navbar: 1030;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-white-soft: #2C3E50;
    --color-dark: #F8F9FA;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth; 
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-body);
  font-size: var(--font-size-body);
  color: var(--color-dark);
  background-color: var(--color-white-soft);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-md);
  font-family: var(--font-family-headings);
  line-height: var(--line-height-headings);
  font-weight: 400; 
}

p {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

ul, ol {
  margin-top: 0;
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-accent);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

h1 { 
  font-size: var(--font-size-h1); 
  font-weight: 700; 
}
h2 { 
  font-size: var(--font-size-h2); 
  font-weight: 600; 
}
h3 { 
  font-size: var(--font-size-h3); 
  font-weight: 600; 
}
h4 { 
  font-size: var(--font-size-h4); 
  font-weight: 600; 
}
h5 { 
  font-size: var(--font-size-h5); 
  font-weight: 600; 
}
h6 { 
  font-size: var(--font-size-h6); 
  font-weight: 600; 
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.4;
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section-full {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: var(--space-2xl) var(--space-lg);
}

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-sm { margin-top: var(--space-sm) !important; }
.mb-sm { margin-bottom: var(--space-sm) !important; }
.mt-md { margin-top: var(--space-md) !important; }
.mb-md { margin-bottom: var(--space-md) !important; }
.mt-lg { margin-top: var(--space-lg) !important; }
.mb-lg { margin-bottom: var(--space-lg) !important; }
.pt-sm { padding-top: var(--space-sm) !important; }
.pb-sm { padding-bottom: var(--space-sm) !important; }

.text-center { text-align: center; }
.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-white { color: var(--color-light) !important; }

.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-accent { background-color: var(--color-accent) !important; }
.bg-white-soft { background-color: var(--color-white-soft) !important; }

.d-flex { display: flex; }
.d-grid { display: grid; } 

.btn-np {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-np-primary {
  background-color: var(--color-primary);
  color: var(--color-light);
  border-color: var(--color-primary);
}

.btn-np-primary:hover,
.btn-np-primary:focus {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-np-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-np-secondary:hover,
.btn-np-secondary:focus {
  background-color: var(--color-primary);
  color: var(--color-light);
  transform: translateY(-2px);
}

.btn-np-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-np-outline:hover,
.btn-np-outline:focus {
  background-color: var(--color-primary);
  color: var(--color-light);
}

/* Card Styles */
.np-card {
  background: var(--color-white-soft);
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.np-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.np-card-img {
  width: 100%;
  min-height: 250px;
  object-fit: cover;
}

.np-card-body {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.np-card-title {
  font-size: var(--font-size-h4);
  margin-bottom: var(--space-sm);
  color: var(--color-dark);
}

.np-card-text {
  flex-grow: 1;
  color: #6C757D;
}

.np-card-footer {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid #E9ECEF;
}

.row[class*='g-'] > [class*='col-']:has([class*='card'], .gamelift-card, .sf-product-card) { 
  display: flex !important; 
  flex-direction: column !important; 
}
[class*='card'], .gamelift-card, .sf-product-card { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  height: 100%; 
}

.np-form {
  max-width: 600px;
  margin: 0 auto;
}

.np-form-group {
  margin-bottom: var(--space-lg);
}

.np-form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  color: var(--color-dark);
}

.np-form-control {
  width: 100%;
  padding: var(--space-sm);
  border: 2px solid #E9ECEF;
  border-radius: var(--border-radius);
  font-size: var(--font-size-body);
  transition: border-color var(--transition-fast);
  background-color: var(--color-light);
}

.np-form-control:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(74, 124, 89, 0.25);
}

.np-form-control::placeholder {
  color: #6C757D;
}

.np-form-textarea {
  min-height: 120px;
  resize: vertical;
}

.np-form-checkbox {
  margin-right: var(--space-sm);
}

/* Header Styles */
.np-header {
  background-color: var(--color-white-soft);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: var(--z-navbar);
  padding: var(--space-sm) 0;
}

.np-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.np-logo {
  font-family: var(--font-family-headings);
  font-size: var(--font-size-h3);
  font-weight: 700;
  color: var(--color-primary);
}

.np-nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-lg);
}

.np-nav-list li a {
  color: var(--color-dark);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.np-nav-list li a:hover,
.np-nav-list li a:focus {
  color: var(--color-primary);
}

.np-nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 0.25rem;
}

.np-nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--color-dark);
  transition: var(--transition-fast);
}

.np-footer {
  background-color: var(--color-secondary);
  color: var(--color-light);
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-2xl);
}

.np-footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.np-footer h3 {
  color: var(--color-light);
  margin-bottom: var(--space-md);
}

.np-footer a {
  color: var(--color-white-soft);
}

.np-footer a:hover {
  color: var(--color-accent);
}

.np-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--color-light);
  text-align: center;
}

.np-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); 
}

.np-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.np-hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: var(--space-md);
  color: var(--color-light);
}

@media (max-width: 575.98px) {
  
  .np-nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-light);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
  }

  .np-nav-list.active {
    display: flex;
  }

  .np-nav-toggle {
    display: flex;
  }

  .container-custom {
    padding: 0 var(--space-sm);
  }

  .np-hero {
    min-height: 50vh;
  }

  .np-card-img {
    min-height: 200px;
  }
}

@media (min-width: 576px) {
  
}

@media (min-width: 768px) {
  
  .np-hero {
    min-height: 70vh;
  }

  .np-card-img {
    min-height: 250px;
  }
}

@media (min-width: 992px) {
  
  .np-nav-list {
    display: flex !important;
  }

  .np-nav-toggle {
    display: none;
  }

  .np-card-img {
    min-height: 280px;
  }
}

@media (min-width: 1200px) {
  
  .np-card-img {
    min-height: 300px;
  }
}

.np-card,
.btn-np,
.np-nav-list li a {
  transition: all var(--transition-normal);
}

.np-section {
  padding: var(--space-2xl) 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-slow);
}

.np-section.animate {
  opacity: 1;
  transform: translateY(0);
}

.np-parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.lb-outerContainer {
  background-color: rgba(0, 0, 0, 0.9);
}

.lb-data .lb-close {
  color: var(--color-light);
}

.np-tooltip {
  position: absolute;
  background: var(--color-dark);
  color: var(--color-light);
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  font-size: var(--font-size-small);
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.np-tooltip.visible {
  opacity: 1;
}

.np-filter-btn {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: var(--space-xs) var(--space-sm);
  margin-right: var(--space-sm);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.np-filter-btn.active,
.np-filter-btn:hover {
  background: var(--color-primary);
  color: var(--color-light);
}

.np-quiz-option {
  display: block;
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  border: 2px solid #E9ECEF;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.np-quiz-option:hover,
.np-quiz-option:focus {
  border-color: var(--color-primary);
  background-color: rgba(74, 124, 89, 0.05);
}

.np-quiz-option.selected {
  border-color: var(--color-accent);
  background-color: rgba(210, 105, 30, 0.1);
}

.np-carousel {
  position: relative;
  overflow: hidden;
}

.np-carousel-inner {
  display: flex;
  transition: transform var(--transition-normal);
}

.np-carousel-item {
  min-width: 100%;
  padding: var(--space-lg);
}

.np-carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 var(--space-lg);
}

.np-carousel-btn {
  background: rgba(0, 0, 0, 0.5);
  color: var(--color-light);
  border: none;
  padding: var(--space-sm);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.np-carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.np-infographic {
  position: relative;
}

.np-infographic-item {
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.np-infographic-item:hover {
  transform: scale(1.05);
}

.np-shopping-list {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

.np-shopping-list.active {
  display: flex;
}

.np-shopping-list-content {
  background: var(--color-light);
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.np-shopping-list ul {
  list-style: none;
  padding: 0;
}

.np-shopping-list li {
  padding: var(--space-sm);
  border-bottom: 1px solid #E9ECEF;
}

.np-shopping-list button {
  background: var(--color-danger);
  color: var(--color-light);
  border: none;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-left: var(--space-sm);
}

.modal-content {
  border-radius: var(--border-radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid #E9ECEF;
  background: var(--color-white-soft);
}

.modal-body {
  background: var(--color-white-soft);
}

.np-lazy-img {
  background: #F8F9FA;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6C757D;
  font-style: italic;
}

/* Product filter styles - ensure filtered items are properly hidden/shown */
[data-category] {
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

[data-category].filter-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Recipe filter styles - ensure filtered items are properly hidden */
/* Improved filter buttons for recipes page */
.btn-custom-filter {
  padding: var(--space-sm) var(--space-md);
  border: 2px solid #dee2e6;
  border-radius: var(--border-radius-lg);
  background-color: #ffffff;
  color: #212529;
  font-weight: 600;
  transition: all var(--transition-normal);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-custom-filter:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-custom-filter.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.filter-section {
  padding: var(--space-md);
  background-color: #ffffff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
}

/* Gap utility for flexbox */
.gap-3 {
  gap: var(--space-md);
}

/* Modal text colors - ensure black text */
.modal-content {
  background-color: #ffffff !important;
  color: #212529 !important;
}

.modal-content h3,
.modal-content h4,
.modal-content h5,
.modal-content h6 {
  color: #212529 !important;
}

.modal-content p,
.modal-content .lead,
.modal-content ul li {
  color: #495057 !important;
}

.modal-header .modal-title {
  color: #212529 !important;
}

.modal-header .btn-close {
  filter: invert(0);
}

@media (max-width: 767px) {
  .filter-section {
    padding: var(--space-sm);
  }
  
  .btn-custom-filter {
    width: 100%;
    padding: var(--space-sm);
  }
  
  .gap-3 {
    gap: var(--space-xs);
  }
}

/* Recipe grid filtering - ensure elements show/hide correctly */
/* Override Bootstrap column styles for filtered items */
#recipeGrid [data-category].filter-hidden,
#recipeGrid .col-lg-4.filter-hidden,
#recipeGrid .col-md-6.filter-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  flex: none !important;
  flex-basis: 0 !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  max-width: 0 !important;
  width: 0 !important;
}

#recipeGrid [data-category]:not(.filter-hidden),
#recipeGrid .col-lg-4:not(.filter-hidden),
#recipeGrid .col-md-6:not(.filter-hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

/* Media queries to match Bootstrap breakpoints */
@media (min-width: 992px) {
  #recipeGrid .col-lg-4:not(.filter-hidden) {
    flex: 0 0 auto !important;
    width: 33.33333333% !important;
    max-width: 33.33333333% !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  #recipeGrid .col-md-6:not(.filter-hidden) {
    flex: 0 0 auto !important;
    width: 50% !important;
    max-width: 50% !important;
  }
}

@media (max-width: 767.98px) {
  #recipeGrid [data-category]:not(.filter-hidden),
  #recipeGrid .col-lg-4:not(.filter-hidden),
  #recipeGrid .col-md-6:not(.filter-hidden) {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
