/* Base */
* {
  box-sizing: border-box;
}

/* Hide any Converge payment buttons that render incorrectly */
[class*="converge"],
[id*="converge"],
button:empty,
button:not([class]):not([id]) {
  display: none !important;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  padding-top: 56px;
  background-color: #032f03;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Nav bar: brown/gray bar */
.navbar.bar-style,
.navbar.bar-style.bar-style {
  background-color: #523f3f;
  background: #523f3f;
}

.navbar-expand-md .navbar-nav .nav-link {
  color: white;
}

.navbar-dark .navbar-toggler {
  border-color: white;
}

.bar-style {
  background: #523f3f;
}

/* Site title lives in header only */
.site-header {
  padding: 12px 15px;
  background-color: #032f03;
  text-align: center;
  position: relative;
  z-index: 1029;
}
.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Ensure no brand text appears inside the navbar */
.navbar .navbar-brand,
.navbar-brand {
  display: none !important;
}

/* ========== HAMBURGER MENU ========== */
/* DEFAULT: Hide on all screen sizes */
.menu-btn,
.navbar-toggler {
  display: none !important;
  visibility: hidden !important;
}

.menu-btn-icon {
  display: block;
  width: 32px;
  height: 26px;
}
.menu-btn-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* MOBILE ONLY: Show hamburger menu */
@media screen and (max-width: 767px) {
  .navbar .navbar-toggler {
    display: none !important;
    visibility: hidden !important;
  }
  .menu-btn {
    display: inline-flex !important;
    visibility: visible !important;
    padding: 0.5rem 0.75rem;
    margin: 0;
    border: 2px solid #fff !important;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
  }
  .menu-btn-icon {
    width: 36px !important;
    height: 30px !important;
  }
  .navbar-collapse {
    width: 100%;
    background: rgba(82, 63, 63, 0.98);
    margin: 0.5rem -15px 0;
    padding: 12px 15px 16px;
    border-radius: 0 0 8px 8px;
  }
  .navbar-nav .nav-link {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }
  .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}

/* DESKTOP: Absolutely ensure hamburger is hidden */
@media screen and (min-width: 768px) {
  .site-header h1 {
    font-size: 1.75rem;
  }
  .menu-btn,
  .navbar-toggler,
  .navbar .menu-btn,
  .navbar .navbar-toggler {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
  }
}

/* ========== CAROUSEL ========== */
.carousel {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.carousel-inner {
  width: 100%;
  height: 450px;
  overflow: hidden;
}

.carousel-item {
  width: 100%;
  height: 450px;
  position: relative;
  overflow: hidden;
}

/* Image: centered and cropped */
.carousel-item img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: auto;
  min-height: 100%;
  min-width: 100%;
}

/* Hide carousel captions */
.carousel-caption {
  display: none !important;
}

/* Mobile: shorter carousel */
@media screen and (max-width: 767px) {
  .carousel-inner {
    height: 200px;
  }
  .carousel-item {
    height: 200px;
  }
}

.carousel-control-prev,
.carousel-control-next {
  width: 48px;
  height: 48px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.85;
}

/* Sections */
section {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  color: darkgreen;
  margin: 20px;
  max-width: 100%;
}

.container {
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

.fine-print {
  font-size: 0.575em;
  color: #555;
  line-height: 1.5;
  font-style: italic;
}

.float-right {
  float: right;
  margin-left: 15px;
  margin-bottom: 10px;
  max-height: 450px;
  max-width: 100%;
}

/* Map */
.map-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
}

.map-wrap iframe {
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
}

@media (min-width: 768px) {
  .map-wrap iframe {
    height: 450px;
  }
}

/* Mobile layout */
@media (max-width: 767px) {
  body {
    padding-top: 52px;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
  }

  .navbar {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  section {
    margin: 10px 8px;
    padding: 16px 12px;
    border-radius: 8px;
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .float-right {
    float: none;
    display: block;
    margin: 0 auto 15px;
    max-width: 100%;
  }

  section h1, section h2 {
    font-size: 1.35rem;
    word-wrap: break-word;
  }

  section p, section li {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* Mobile table: hide category column, show only Option/Price/Action */
  .container table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
  }

  /* Hide the header completely */
  .container table thead {
    display: none !important;
  }

  /* Hide first column (Category with rowspan) */
  .container table td:first-child,
  .container table th:first-child,
  .container table td[rowspan] {
    display: none !important;
  }

  .container table tbody tr {
    display: flex !important;
    flex-wrap: wrap !important;
    padding: 12px !important;
    margin-bottom: 10px !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    align-items: center !important;
  }

  .container table tbody td {
    width: auto !important;
    padding: 4px 8px !important;
    border: none !important;
    font-size: 1rem !important;
    background: transparent !important;
  }

  /* Option name - takes most of the width */
  .container table tbody td:nth-child(2) {
    flex: 1 1 50% !important;
    font-weight: bold !important;
    font-size: 1rem !important;
  }

  /* Price */
  .container table tbody td:nth-child(3) {
    flex: 0 0 auto !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    color: #032f03 !important;
  }

  /* Action/Purchase button */
  .container table tbody td:nth-child(4),
  .container table tbody td:last-child {
    flex: 1 1 100% !important;
    margin-top: 10px !important;
    text-align: center !important;
  }

  .container table tbody td a {
    display: block !important;
    width: 100% !important;
    padding: 12px 20px !important;
    background: #032f03 !important;
    color: #fff !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    font-family: inherit !important;
    text-align: center !important;
  }
}

@media (max-width: 576px) {
  section {
    margin: 8px 6px;
    padding: 14px 10px;
  }

  .container table tbody tr {
    padding: 12px;
  }

  .container table tbody td:first-child {
    font-size: 1rem;
  }
}
