/* ============================================
   Revive & Co - Custom Styles
   Bootstrap 5 + WCAG AA Accessible
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --rc-green: #145029;
  --rc-green-dark: #0d361b;
  --rc-green-light: #e8f5e9;
  --rc-brown: #5d4037;
  --rc-cream: #faf8f5;
  --rc-text: #212529;
  --rc-text-muted: #495057;
  --rc-white: #ffffff;
  --rc-border: #6c757d;
}

/* ---------- Global ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--rc-text);
  background-color: var(--rc-white);
  line-height: 1.6;
}

/* Skip to content link – accessible keyboard navigation */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--rc-green-dark);
  color: var(--rc-white);
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

/* ---------- Focus Styles (Accessibility) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

/* Programmatic focus targets (skip link / in-page jumps) should not show a focus ring
   but must still be focusable so screen readers announce the new location. */
main[tabindex="-1"]:focus,
section[tabindex="-1"]:focus,
[tabindex="-1"]:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- External Link Indicator (Accessibility - WCAG 3.2.5) ---------- */
/* Visually warn users when a link opens in a new window or external site. */
a[target="_blank"]:not(.no-ext-icon)::after {
  content: " \2197"; /* north-east arrow ↗ */
  display: inline-block;
  margin-left: 0.2em;
  font-size: 0.85em;
  line-height: 1;
  text-decoration: none;
  speak: none;
}
/* Icon-only links already have descriptive aria-labels; suppress the arrow
   so the icon stays visually clean. */
.social-links a[target="_blank"]::after,
.navbar-brand[target="_blank"]::after {
  content: none;
}

/* ---------- Navbar ---------- */
.navbar {
  background-color: var(--rc-white);
  border-bottom: 1px solid var(--rc-border);
  padding: 0.75rem 0;
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--rc-green) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--rc-green-dark) !important;
}
.nav-link {
  font-weight: 600;
  color: var(--rc-text) !important;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem !important;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--rc-green) !important;
}
.nav-link.active {
  color: var(--rc-green) !important;
}

/* ---------- Site Search ---------- */
.site-search {
  max-width: 320px;
}
.site-search .form-control {
  border: 2px solid var(--rc-border);
}
.site-search .form-control:focus {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 0.2rem rgba(27, 107, 58, 0.25);
}
@media (max-width: 991.98px) {
  .site-search {
    max-width: 100%;
  }
}

/* ---------- Hero Section ---------- */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.68)),
    url('https://img1.wsimg.com/isteam/ip/1a080d41-341e-4859-96a9-47bbecbc8e5d/rs%3Dw_1200%2Ch_600%2Ccg_true.jpeg/:/rs=w:1200,h:600,cg:true,m/cr=w:1200,h:600') center/cover no-repeat;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--rc-white);
  position: relative;
}
.hero-section h1 {
  font-size: 2.75rem;
  font-weight: 700;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  max-width: 800px;
  margin: 0 auto 1.5rem;
}
.hero-section .lead {
  font-size: 1.25rem;
  font-weight: 600;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
  margin-bottom: 2rem;
}

/* ---------- CTA Buttons ---------- */
.btn-rc-primary {
  background-color: var(--rc-green);
  color: var(--rc-white);
  border: 2px solid var(--rc-green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.btn-rc-primary:hover,
.btn-rc-primary:focus {
  background-color: var(--rc-green-dark);
  border-color: var(--rc-green-dark);
  color: var(--rc-white);
}
.btn-rc-outline {
  background-color: transparent;
  color: var(--rc-white);
  border: 2px solid var(--rc-white);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.btn-rc-outline:hover,
.btn-rc-outline:focus {
  background-color: var(--rc-white);
  color: var(--rc-green);
}

/* ---------- Section Styling ---------- */
.section-heading {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  color: var(--rc-text);
}
.section-padding {
  padding: 5rem 0;
}
.section-bg-cream {
  background-color: var(--rc-cream);
}
.section-bg-green {
  background-color: var(--rc-green);
  color: var(--rc-white);
}
.section-bg-green .section-heading {
  color: var(--rc-white);
}

/* ---------- Food Gallery ---------- */
.food-gallery-item {
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.food-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.food-gallery-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

/* ---------- Instagram Section ---------- */
.instagram-section {
  text-align: center;
}
.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--rc-green);
  text-decoration: none;
}
.instagram-link:hover,
.instagram-link:focus {
  color: var(--rc-green-dark);
  text-decoration: underline;
}

/* ---------- Social Links ---------- */
.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--rc-green);
  color: var(--rc-white);
  font-size: 1.25rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.social-links a:hover,
.social-links a:focus {
  background-color: var(--rc-green-dark);
}

/* ---------- Contact Form ---------- */
.contact-form .form-label {
  font-weight: 600;
  color: var(--rc-text);
}
.contact-form .form-control {
  border: 2px solid var(--rc-border);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  color: var(--rc-text);
}
.contact-form .form-control:focus {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 0.2rem rgba(27, 107, 58, 0.25);
}

/* ---------- Location Cards ---------- */
.location-card {
  background: var(--rc-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}
.location-card:hover {
  transform: translateY(-4px);
}
.location-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.location-card-body {
  padding: 1.5rem;
}

/* ---------- Hours Table ---------- */
.hours-table th,
.hours-table td {
  padding: 0.5rem 0;
  border: none;
  font-size: 1rem;
}
.hours-table caption {
  color: var(--rc-text);
}
.hours-table th {
  font-weight: 600;
  color: var(--rc-text);
  text-align: left;
  padding-right: 2rem;
}
.hours-table td {
  color: var(--rc-text-muted);
}

/* ---------- Contact Links ---------- */
a[href^="tel:"] {
  color: var(--rc-green-dark);
  font-weight: 600;
}

a[href^="tel:"]:hover,
a[href^="tel:"]:focus {
  color: var(--rc-green);
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: #1a1a1a;
  color: #b0b0b0;
  padding: 2rem 0;
  font-size: 1rem;
}
.site-footer a {
  color: #d0d0d0;
  text-decoration: none;
}
.site-footer a:hover,
.site-footer a:focus {
  color: var(--rc-white);
  text-decoration: underline;
}

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--rc-white);
  border-top: 2px solid var(--rc-border);
  padding: 1.25rem;
  z-index: 1050;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}
/* Ensure body text inside the cookie banner is at least 12pt (1rem) */
.cookie-banner p,
.cookie-banner .small,
.cookie-banner small {
  font-size: 1rem;
}

/* ---------- Map Embed ---------- */
.map-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
}

/* ---------- Accessibility Page ---------- */
.accessibility-content h2 {
  color: var(--rc-green);
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.accessibility-content ul {
  padding-left: 1.25rem;
}
.accessibility-content li {
  margin-bottom: 0.5rem;
}

/* ---------- Menu Page ---------- */
.menu-nav {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rc-border);
}
.menu-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-nav-list a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--rc-green);
  border: 1px solid var(--rc-green);
  transition: all 0.2s ease;
}
.menu-nav-list a:hover,
.menu-nav-list a:focus {
  background-color: var(--rc-green);
  color: var(--rc-white);
}
.menu-section {
  padding-top: 1rem;
}
.menu-category-heading {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rc-green);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  border-left: 4px solid var(--rc-green);
  padding-left: 0.75rem;
}
.menu-category-note {
  color: var(--rc-text-muted);
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}
.menu-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}
.menu-item:last-child {
  border-bottom: none;
}
.menu-item-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--rc-text);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.menu-item-price {
  margin-left: auto;
  font-weight: 700;
  color: var(--rc-green);
  white-space: nowrap;
}
.menu-item-desc {
  font-size: 1rem;
  color: var(--rc-text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}
.vegan-badge {
  color: var(--rc-green);
  font-weight: 700;
}
.menu-divider {
  margin: 2rem 0;
  border-color: var(--rc-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  .hero-section {
    min-height: 60vh;
  }
  .hero-section h1 {
    font-size: 1.75rem;
  }
  .section-padding {
    padding: 3rem 0;
  }
  .food-gallery-item img {
    height: 220px;
  }
}
@media (max-width: 575.98px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }
  .btn-rc-primary,
  .btn-rc-outline {
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
  }
}

/* ---------- Reduced Motion (Accessibility) ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .food-gallery-item,
  .location-card,
  .btn-rc-primary,
  .btn-rc-outline,
  .social-links a,
  .menu-nav-list a {
    transition: none;
  }
  .food-gallery-item:hover,
  .location-card:hover {
    transform: none;
  }
}

/* ---------- High Contrast (Accessibility) ---------- */
@media (prefers-contrast: more) {
  :root {
    --rc-text-muted: #212529;
    --rc-border: #495057;
  }
  .hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
      var(--rc-hero-bg);
  }
  .btn-rc-outline {
    border-width: 3px;
  }
  .skip-link:focus {
    outline-width: 4px;
  }
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  [tabindex]:focus-visible {
    outline-width: 4px;
  }
}
