/*
 * Main stylesheet for Lwano Grill Space website
 *
 * Colour palette:
 *   --color-primary: Dark green used for backgrounds and headers
 *   --color-accent: Warm orange/gold used for highlights and buttons
 *   --color-light: Off‑white background for sections requiring contrast
 *   --color-dark: Dark text colour for readability on light backgrounds
 *
 * The CSS is mobile‑first and progressively enhances layouts for larger
 * screens. Where appropriate, elements are arranged using Flexbox and
 * Grid to facilitate responsive behaviour. Spacing and typography are
 * controlled by CSS custom properties for consistency.
 */

/* CSS custom properties (variables) */
:root {
  --color-primary: #00492e;     /* deep green representing the brand */
  --color-accent:  #f5a623;     /* warm orange/gold accent colour */
  --color-light:   #fdfcf9;     /* very light neutral background */
  --color-dark:    #1e1e1e;     /* dark neutral for text on light backgrounds */

  /* Updated typography to use more contemporary system fonts for a cleaner look. */
  --font-base:     'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-heading:  'Poppins', 'Segoe UI', 'Georgia', serif;

  --max-content-width: 1200px;

  --header-height: 64px;
  --nav-height:    60px;
  --transition-time: 0.3s;
}

/* Global resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  line-height: 1.6;
  background-color: var(--color-light);
  color: var(--color-dark);
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}
a:focus,
a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background-color: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Subtle shadow below the navigation to separate it from the content */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 40px;
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}
nav li {
  position: relative;
}
nav a {
  color: #fff;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  display: block;
  border-radius: 4px;
  transition: background-color var(--transition-time);
}
nav a:focus,
nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  outline: none;
}

/* Mobile navigation (hamburger) */
.nav-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: var(--nav-height);
    right: 0;
    background-color: var(--color-primary);
    flex-direction: column;
    width: 200px;
    transform: translateX(100%);
    transition: transform var(--transition-time) ease-in-out;
  }
  nav ul.open {
    transform: translateX(0);
  }
  .nav-toggle {
    display: block;
  }
}

/* Hero section */
.hero {
  position: relative;
  /* Increase hero height slightly for a more immersive first impression */
  height: 80vh;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Lighter overlay for better visibility of background imagery */
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 1rem;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 0.75rem;
}
.hero p {
  font-size: 1.35rem;
  margin-bottom: 1.75rem;
}
.btn {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color var(--transition-time);
  cursor: pointer;
}
/* Slightly darken accent colour on hover using reduced opacity overlay */
.btn:hover,
.btn:focus {
  background-color: #cc8a1b;
  outline: none;
}

/* Highlights section */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  max-width: var(--max-content-width);
  margin: 3rem auto;
  padding: 0 1rem;
}
.highlight-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--transition-time), box-shadow var(--transition-time);
}
.highlight-card:hover,
.highlight-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.highlight-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: var(--color-primary);
}
.highlight-card p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--color-dark);
}

/* Sections (common) */
section {
  padding: 3rem 1rem;
  max-width: var(--max-content-width);
  margin: 0 auto;
}
section h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  text-align: center;
}

/* Footer */
footer {
  background-color: var(--color-primary);
  color: #fff;
  padding: 2rem 1rem;
}
.footer-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
footer h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
footer a {
  color: #fff;
  display: inline-block;
  margin-bottom: 0.5rem;
  transition: color var(--transition-time);
}
footer a:hover,
footer a:focus {
  color: var(--color-accent);
  outline: none;
}

.social-icons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.social-icons a {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: transparent;
  border-radius: 4px;
  transition: background-color var(--transition-time);
}
.social-icons a:hover,
.social-icons a:focus {
  background-color: rgba(255, 255, 255, 0.2);
}
.social-icons img {
  width: 18px;
  height: 18px;
}

/* Back to top button */
#backToTop {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#backToTop:focus {
  outline: 2px dashed #fff;
}

/* Menu page */
.menu-container {
  max-width: var(--max-content-width);
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Menu actions row for print button */
.menu-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.print-btn {
  padding: 0.5rem 0.75rem;
  border: none;
  background-color: var(--color-accent);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color var(--transition-time);
}

.print-btn:hover,
.print-btn:focus {
  background-color: #cc8a1b;
}
.menu-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.menu-search input[type="text"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.menu-search button {
  padding: 0.5rem 0.75rem;
  border: none;
  background-color: var(--color-accent);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--transition-time);
}
.menu-search button:hover,
.menu-search button:focus {
  background-color: #cc8a1b;
}
.category-chips {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  margin-bottom: 1rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.category-chips button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  /* Use a very light tinted background for chips to stand out on the page */
  background-color: rgba(0, 73, 46, 0.05);
  color: var(--color-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--transition-time), color var(--transition-time), box-shadow var(--transition-time);
  scroll-snap-align: start;
}
.category-chips button.active,
.category-chips button:hover,
.category-chips button:focus {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.menu-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .menu-items {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .menu-items {
    grid-template-columns: repeat(3, 1fr);
  }
}

.menu-item {
  background-color: #fff;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-time), box-shadow var(--transition-time);
}
.menu-item h4 {
  margin-bottom: 0.25rem;
  color: var(--color-primary);
  font-weight: 600;
}
.menu-item .price {
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* Subtle hover effect for menu cards */
.menu-item:hover,
.menu-item:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Galeria */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform var(--transition-time), box-shadow var(--transition-time);
  cursor: pointer;
}
.gallery-grid img:hover,
.gallery-grid img:focus {
  transform: scale(1.03);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  outline: none;
}

/* Formulario de reservas */
.reservation-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.reservation-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--color-primary);
}
.reservation-form input,
.reservation-form select,
.reservation-form textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.reservation-form button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  background-color: var(--color-accent);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-time);
}
.reservation-form button:hover,
.reservation-form button:focus {
  background-color: #cc8a1b;
}
.honeypot {
  display: none;
}

/* 404 page */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}
.error-page h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}
.error-page p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Print styles for menu */
@media print {
  header, footer, #backToTop, .menu-search, .category-chips, .btn-print, .nav-toggle {
    display: none !important;
  }
  body {
    font-size: 12pt;
  }
  .menu-item {
    page-break-inside: avoid;
  }
}