/* Raja Barang Resto - Main Styles */

/* Accessibility Colors - WCAG AA Compliant */
:root {
  /* Primary brand colors - improved contrast */
  --primary-color: #0f766e; /* Darker cyan for better contrast (7.5:1 ratio) */
  --primary-hover: #0d5f56; /* Even darker on interaction */
  --primary-light: #14b8a6; /* For accents that need to be lighter */
  
  /* Text hierarchy - progressive contrast */
  --text-primary: #0f172a; /* Darkest for headings (21:1 ratio) */
  --text-secondary: #1f2937; /* Dark for body text (16.9:1 ratio) */
  --text-tertiary: #374151; /* Medium for supporting text (11.2:1 ratio) */
  --text-muted: #6b7280; /* Light for captions (5.6:1 ratio) */
  
  /* Background hierarchy */
  --bg-primary: #ffffff; /* Pure white */
  --bg-secondary: #f9fafb; /* Slightly off-white */
  --bg-tertiary: #064e3b; /* Dark green for contrast sections */
  --bg-accent: #f0fdfa; /* Very light cyan for highlights */
  
  /* Interactive elements */
  --border-primary: #6b7280; /* Visible borders (5.6:1 ratio) */
  --border-light: #d1d5db; /* Subtle borders (3.1:1 ratio) */
  
  /* Footer specific (dark background) */
  --footer-text-light: #cbd5e1; /* Light text for footer (8.2:1 ratio) */
  --footer-text-lighter: #e2e8f0; /* Even lighter for footer (11.4:1 ratio) */
  
  /* Status colors - accessible versions */
  --success-color: #047857; /* Dark green (7.8:1 ratio) */
  --warning-color: #b45309; /* Dark amber (6.2:1 ratio) */
  --error-color: #dc2626; /* Dark red (5.9:1 ratio) */
}

/* Animations */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes slideUp {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* Base Components */
.nav-container {
  background-color: #ffffff;
  border-radius: 9999px;
  padding: 0.75rem 1rem;
  box-shadow: 0px 2px 3px -1px rgba(0, 0, 0, 0.1),
    0px 1px 0px 0px rgba(25, 28, 33, 0.02),
    0px 0px 0px 1px rgba(25, 28, 33, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background-color: var(--primary-color);
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 2px solid var(--primary-color);
  background-color: transparent;
  color: var(--primary-color);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background-color: var(--bg-accent);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}

/* Cards */
.card {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.card-feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  background-color: #ffffff;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.card-feature:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Typography */
.heading-hero {
  font-size: 3.75rem;
  line-height: 1.1;
  font-weight: 600;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.heading-section {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 600;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.text-body {
  font-size: 1rem;
  line-height: 1.6;
  font-family: "Inter", sans-serif;
  color: var(--text-secondary);
}

/* Layout */
.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.section-spacing {
  padding-top: 8rem;
  padding-bottom: 8rem;
}

.container-spacing {
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Spacing Utilities */
.mb-large {
  margin-bottom: 3rem;
}
.mb-xlarge {
  margin-bottom: 4rem;
}
.mt-large {
  margin-top: 3rem;
}
.py-large {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}
.animate-slide-up {
  animation: slideUp 0.3s ease-out;
}
.animate-scale-in {
  animation: scaleIn 0.2s ease-out;
}
.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Product Slider Styles */
.product-slider-container {
  touch-action: pan-y pinch-zoom;
}

#product-slider {
  transition: transform 0.5s ease-in-out;
}

/* Slider navigation buttons */
.slider-nav-btn {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.slider-nav-btn:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

/* Slide indicators */
.slide-indicator {
  transition: all 0.3s ease;
}

.slide-indicator:hover {
  transform: scale(1.2);
}

/* Accessibility Utilities */
.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 States for Accessibility */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-primary:focus,
.btn-outline:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.5);
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-secondary: #000000;
    --text-tertiary: #000000;
    --border-primary: #000000;
    --footer-text-light: #ffffff;
    --footer-text-lighter: #ffffff;
  }
  
  footer .text-text-tertiary-tmp {
    color: #ffffff !important;
  }
  
  .text-text-secondary-tmp,
  .text-text-tertiary-tmp {
    color: #000000 !important;
  }
  
  footer .text-text-secondary-tmp,
  footer .text-text-tertiary-tmp {
    color: #ffffff !important;
  }
}

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

/* Footer Contrast Fixes */
footer.bg-text-primary-tmp {
  background-color: #0f172a; /* Dark background */
}

footer .text-text-tertiary-tmp {
  color: #cbd5e1 !important; /* Much lighter gray for better contrast on dark background */
}

footer p.text-text-tertiary-tmp {
  color: #e2e8f0 !important; /* Even lighter for main descriptive text */
}

footer ul.text-text-tertiary-tmp li {
  color: #cbd5e1 !important; /* Light gray for contact info */
}

/* Footer links contrast */
footer a.text-text-tertiary-tmp {
  color: #cbd5e1 !important;
}

footer a.text-text-tertiary-tmp:hover {
  color: #ffffff !important;
}

/* Border contrast in footer */
footer .border-text-tertiary-tmp {
  border-color: #475569 !important; /* Darker border for visibility on dark background */
}

/* Footer copyright text */
footer p.text-text-tertiary-tmp {
  color: #9ca3af !important; /* Balanced contrast for copyright */
}

/* Contact Section Contrast Fixes */
section.bg-bg-tertiary-tmp {
  background-color: #064e3b; /* Ensuring dark green background */
}

section.bg-bg-tertiary-tmp .text-primary-light-tmp {
  color: #e2e8f0 !important; /* Very light text for better contrast */
}

section.bg-bg-tertiary-tmp p.text-primary-light-tmp {
  color: #f3f4f6 !important; /* Almost white for high contrast */
}

/* Ensure all text on dark backgrounds has proper contrast */
.bg-bg-tertiary-tmp .text-body {
  color: #f3f4f6 !important;
}

.bg-bg-tertiary-tmp p {
  color: #e5e7eb !important;
}

/* Override Tailwind classes for better contrast */
.text-text-secondary-tmp {
  color: var(--text-secondary) !important;
}

.text-text-tertiary-tmp {
  color: var(--text-tertiary) !important;
}

/* Specific footer overrides using CSS variables */
footer .text-text-tertiary-tmp {
  color: var(--footer-text-light) !important;
}

footer p.text-text-tertiary-tmp {
  color: var(--footer-text-lighter) !important;
}

/* Contact info list styling */
footer ul li {
  color: var(--footer-text-light) !important;
}

/* Border improvements */
.border-border-primary-tmp {
  border-color: var(--border-primary) !important;
}

/* Updated button classes to use CSS variables */
.btn-outline {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  border-width: 2px !important;
}

.btn-outline:hover {
  color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  background-color: var(--bg-accent) !important;
}

/* Specific Contrast Fixes for Failing Elements */

/* Skip link contrast fix */
.skip-link {
  background: #1f2937 !important; /* Darker background for better contrast */
  color: #ffffff !important;
  font-weight: 600;
}

.skip-link:focus {
  background: #111827 !important;
  color: #ffffff !important;
}

/* Primary button contrast improvements - using CSS variables */
.btn-primary {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--primary-hover) !important;
}

/* Stats cards contrast fixes */
.text-primary-tmp {
  color: var(--primary-color) !important; /* Using CSS variable for consistency */
}

/* Stats background improvements */
.bg-bg-secondary-tmp {
  background-color: var(--bg-secondary) !important;
}

/* Outline button contrast improvements - consolidated */
.btn-outline {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  border-width: 2px !important;
  font-weight: 600;
}

.btn-outline:hover {
  color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  background-color: var(--bg-accent) !important;
}

/* Form elements contrast improvements */
.border-border-primary-tmp {
  border-color: #6b7280 !important; /* Darker border for better visibility */
}

select.border-border-primary-tmp,
input.border-border-primary-tmp,
textarea.border-border-primary-tmp {
  border-color: #6b7280 !important;
  color: #111827 !important; /* Ensure dark text in form fields */
}

/* Focus states for better accessibility */
select:focus,
input:focus,
textarea:focus {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1) !important;
  outline: 2px solid #0f766e !important;
  outline-offset: 2px;
}

/* About section text contrast */
#about .text-body {
  color: #1f2937 !important; /* Darker text for better contrast */
}

#about p {
  color: #1f2937 !important;
}

/* Enhanced Product Slider Styles */
.product-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 118, 110, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(15, 118, 110, 0.25);
  border-color: rgba(15, 118, 110, 0.3);
}

.product-image-overlay {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1) 0%, rgba(15, 118, 110, 0.3) 100%);
}

/* Product Badge Styles */
.product-badge {
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Button Enhancements */
.product-button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
  transition: all 0.3s ease;
}

.product-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 118, 110, 0.4);
}

/* Product Slider Mobile Optimization */
@media (max-width: 768px) {
  /* Hide navigation buttons on mobile, rely on swipe */
  .slider-nav-btn {
    display: none;
  }
  
  /* Optimize slider for mobile */
  #gallery h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  /* Mobile product cards - single column for better visibility */
  #gallery .md\:grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
  }
  
  #gallery .lg\:grid-cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
  }
  
  /* Ensure images are large and visible */
  #gallery .h-64,
  #gallery .h-72 {
    height: 16rem; /* 256px - larger for mobile */
  }
  
  /* Adjust padding for mobile */
  #gallery .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Slide indicators more prominent on mobile */
  .slide-indicator {
    width: 1rem;
    height: 1rem;
  }
  
  /* Mobile button styles */
  #gallery button {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
  
  /* Card padding adjustment for mobile */
  #gallery article .p-6 {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  #gallery h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  /* Maintain large images even on very small screens */
  #gallery .h-64,
  #gallery .h-72 {
    height: 14rem; /* 224px - still quite large */
  }
  
  /* Adjust text sizes but keep readable */
  #gallery h4 {
    font-size: 1.1rem;
  }
  
  #gallery p {
    font-size: 0.9rem;
  }
  
  #gallery ul {
    font-size: 0.8rem;
  }
  
  /* Tighter spacing on very small screens */
  #gallery .px-4 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  #gallery article .p-6 {
    padding: 1rem;
  }
}

/* General Mobile Responsive */
@media (max-width: 768px) {
  /* Navbar optimizations for mobile */
  .nav-container {
    padding: 0.5rem 0.75rem;
  }
  
  .heading-hero {
    font-size: 2.5rem;
  }
  .heading-section {
    font-size: 1.875rem;
  }

  .section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .section-spacing {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .container-spacing {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .mb-large {
    margin-bottom: 2rem;
  }
  .mb-xlarge {
    margin-bottom: 3rem;
  }
  .mt-large {
    margin-top: 2rem;
  }
  .py-large {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  /* Hero spacing fix for mobile */
  #home {
    padding-top: 8rem !important;
  }
}

@media (max-width: 480px) {
  /* Extra mobile navbar optimizations */
  .nav-container {
    padding: 0.375rem 0.5rem;
  }
  
  .heading-hero {
    font-size: 2rem;
  }
  .heading-section {
    font-size: 1.5rem;
  }

  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .section-spacing {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .container-spacing {
    padding-top: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card-feature {
    padding: 1.5rem;
    gap: 1rem;
  }

  .mb-large {
    margin-bottom: 1.5rem;
  }
  .mb-xlarge {
    margin-bottom: 2rem;
  }
  .mt-large {
    margin-top: 1.5rem;
  }
  .py-large {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  #home {
    padding-top: 6rem !important;
  }
}

@media (min-width: 1024px) {
  .mb-large {
    margin-bottom: 4rem;
  }
  .mb-xlarge {
    margin-bottom: 6rem;
  }
  .mt-large {
    margin-top: 4rem;
  }
  .py-large {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}
