/* ============================================================
   HowToEdibles Static Site Stylesheet
   Consolidated from Rails asset pipeline
   ============================================================ */

/* 1. CSS Variables */
:root {
  --color-orange: #f27242;
  --color-orange-dark: #e16a3e;
  --color-green: #5cb85c;
  --color-yellow: #f0aa41;
  --color-red: #ff0000;
  --color-bg-light: #f8f9fa;
}

/* 2. Base / Typography (from main.scss) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

@media (min-width: 1200px) {
  .container {
    max-width: 1300px;
  }
  .donating-title {
    font-size: 1.5vmax !important;
  }
}

@media (max-width: 991px) {
  .container {
    max-width: 100%;
  }
}

@media (max-width: 500px) {
  .donating-title {
    font-size: 20px !important;
  }
}

html, body {
  -webkit-overflow-scrolling: touch;
  font-family: 'Poppins', sans-serif;
  font-display: swap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 1rem;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }

p.title {
  font-size: 22px;
  font-weight: 600;
}

p.spaced-subtitle {
  font-size: 20px;
  font-weight: 450;
  margin: 20px 0 20px 0;
}

h1 {
  display: inline;
  font-size: 30px;
  font-weight: 600;
  line-height: 30px;
}

h2 {
  display: inline;
  font-size: 23px;
  line-height: 35px;
  font-weight: 500;
  margin-bottom: 10px;
}

.popular-recipes h2 {
  display: inline;
  font-size: 30px;
  font-weight: 600;
  line-height: 30px;
}

h3 {
  font-size: 1.15rem;
  font-weight: 500;
}

a {
  color: #f27242;
}

a:hover, a:focus {
  color: #e16a3e;
  text-decoration: none;
}

input[type=number] {
  width: 50px;
  text-align: center;
  transition: background-color 5000s ease-in-out 0s;
}

/* Remove up/down arrows from number input */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.badge-label {
  margin: 3px;
  font-size: 15px;
  font-weight: 500;
}

.badge-success {
  background-color: #5cb85c;
}

.harm-reduction-box {
  margin: 20px 30px 60px 20px;
}

.text-center {
  text-align: center;
}

.fb-page-widget {
  margin-top: 70px;
  text-align: left;
}

.far {
  font-display: swap;
}

.fa-lg {
  font-size: 1.66em;
  font-display: swap;
}

span.bottomtip {
  display: inline;
  font-size: 14px;
  color: #666;
}

.sidenote {
  font-size: 0.72rem;
  color: #bbb;
  text-align: center;
  font-style: italic;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.ads {
  margin: 10px auto 30px auto;
}

i.icon-medium {
  position: relative;
  margin-right: 6px;
}

i.icon-large {
  position: relative;
  margin-right: 6px;
  top: 3px;
}

p.warning-item {
  padding-top: 10px;
}

.span-block {
  display: block;
}

.suggest-recipes {
  padding-top: 10px;
  text-align: left;
}

.fa-left-head {
  margin-top: auto;
  margin-bottom: auto;
}

.donating-title {
  font-size: 1.8vmax;
  color: #000;
  font-weight: 600;
}

/* 3. Color Utilities (from colors.css) */
.orange { color: #f27242; }
.darkorange { color: #d1400c; }
.yellow { color: #f0aa41; }
.green { color: #5CB85C; }
.darkgreen { color: #72ff72; }
.red { color: #ff0000; }
.white { color: #fff; }

/* 4. Navbar */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-top: 3px solid #f27242;
  padding: 0.5rem 0;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.logo-link {
  flex-shrink: 0;
}

.logo-link img {
  height: 52px;
  width: auto;
}

.navbar-toggler,
.navbar-toggler:focus,
.navbar-toggler:active {
  outline: none;
  border: none;
  box-shadow: none;
}

.navbar-icon { color: #555; font-size: 1.1rem; }

.nav-link {
  color: #444 !important;
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.45rem 0.7rem !important;
  border-radius: 0;
  position: relative;
  transition: color 0.15s;
  letter-spacing: 0.01em;
}

.nav-link::after {
  content: none !important; /* suppress Bootstrap caret override */
}

/* animated underline on hover — skip the dropdown caret pseudo */
.nav-item:not(.dropdown) .nav-link::before,
.nav-item.dropdown .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.7rem;
  right: 0.7rem;
  height: 2px;
  background: #f27242;
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.18s ease;
}

.nav-link:hover::before,
.nav-link:focus::before {
  transform: scaleX(1);
}

.nav-link:hover,
.nav-link:focus {
  background: none !important;
  color: #f27242 !important;
  text-decoration: none;
}

/* Bootstrap dropdown caret — keep it */
.nav-link.dropdown-toggle::after {
  content: '' !important;
  display: inline-block !important;
  border-top: 0.3em solid !important;
  border-right: 0.3em solid transparent !important;
  border-bottom: 0 !important;
  border-left: 0.3em solid transparent !important;
  vertical-align: 0.15em;
  margin-left: 0.3em;
  opacity: 0.6;
}

/* Calculator CTA button */
.btn-nav-calculator {
  background: linear-gradient(135deg, #f27242 0%, #e05a28 100%);
  color: #fff !important;
  font-weight: 600;
  padding: 0.38rem 1.1rem;
  border-radius: 20px;
  font-size: 0.88rem;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(242,114,66,0.35);
}

.btn-nav-calculator:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(242,114,66,0.4);
}

/* Dropdown */
.dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.13);
  padding: 0.4rem 0;
  min-width: 200px;
  max-height: 340px;
  overflow-y: auto;
  border-top: 2px solid #f27242;
  animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar styling for dropdowns */
.dropdown-menu::-webkit-scrollbar { width: 4px; }
.dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.dropdown-menu::-webkit-scrollbar-thumb { background: #e0d0c8; border-radius: 4px; }

.dropdown-item {
  font-size: 0.875rem;
  padding: 0.42rem 1.1rem 0.42rem 1.3rem;
  color: #444;
  transition: background 0.1s, border-color 0.1s, padding-left 0.1s;
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: #fff8f5;
  color: #f27242;
  border-left-color: #f27242;
  padding-left: 1.5rem;
}

/* Search bar (below navbar) */
.site-search-bar {
  background: linear-gradient(to bottom, #fff8f5, #fff);
  border-bottom: 1px solid rgba(242,114,66,0.12);
  padding: 14px 0 16px;
  margin-bottom: 28px;
  position: sticky;
  top: 67px;
  z-index: 1020;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.site-search-bar .container {
  position: relative;
  display: flex;
  align-items: center;
}

.site-search-icon {
  position: absolute;
  left: 28px;
  color: #f27242;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

.site-search-input {
  width: 100%;
  padding: 0.75rem 1.4rem 0.75rem 3rem;
  border: 1.5px solid #f0e8e4;
  border-radius: 50px;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  color: #333;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.site-search-input:focus {
  border-color: #f27242;
  box-shadow: 0 2px 18px rgba(242,114,66,0.18);
}

.site-search-input::placeholder {
  color: #c0b0a8;
  font-size: 0.9rem;
}

/* Autocomplete dropdown */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  border: 1px solid rgba(242,114,66,0.15);
  overflow: hidden;
  z-index: 2000;
}

.search-dropdown.open {
  display: block;
  animation: dropdownFadeIn 0.12s ease;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  transition: background 0.1s;
  border-bottom: 1px solid #f5f0ee;
  gap: 10px;
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown-item.active {
  background: #fff8f5;
  text-decoration: none;
  color: #333;
}

.search-dropdown-item.active .sdi-name {
  color: #f27242;
}

.sdi-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sdi-name mark {
  background: none;
  color: #f27242;
  font-weight: 700;
  padding: 0;
}

.sdi-cat {
  font-size: 0.75rem;
  color: #bbb;
  white-space: nowrap;
  flex-shrink: 0;
}

/* No results message */
#search-no-results {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
  font-size: 1.1rem;
}

@media (min-width: 992px) {
  .site-search-bar .container {
    max-width: 680px;
  }
}

@media (max-width: 991px) {
  .site-search-bar {
    position: static;
    margin-bottom: 20px;
  }
}

/* Hide category label on desktop — image color/icon is sufficient */
@media (min-width: 768px) {
  .card-category {
    display: none !important;
  }
}

@media (max-width: 991px) {
  /* Mobile nav panel */
  .navbar-collapse {
    background: #fff;
    border-top: 1px solid #f0ebe8;
    margin: 0 -15px;
    padding: 8px 8px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  }

  .navbar-nav {
    gap: 0;
  }

  /* Top-level nav links */
  .nav-link {
    padding: 0.75rem 0.75rem !important;
    font-size: 1rem !important;
    border-radius: 6px;
  }

  .nav-link:hover,
  .nav-link:focus {
    background: #fff8f5 !important;
  }

  .nav-link::before {
    display: none;
  }

  /* Dropdowns on mobile — plain indented list, no background box */
  .dropdown-menu {
    max-height: none;
    overflow-y: visible;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    margin: 0 0 4px 0;
    padding: 0 0 4px 0;
    animation: none;
  }

  .dropdown-item {
    border-radius: 6px;
    font-size: 0.95rem;
    border-left: none;
    padding: 0.6rem 0.75rem !important;
    color: #555;
  }

  .dropdown-item:hover {
    background: #fff8f5;
    color: #f27242;
    border-left: none;
    padding-left: 0.75rem !important;
  }

  /* Calculator button */
  .btn-nav-calculator {
    display: block;
    width: 100%;
    text-align: center;
    margin: 10px 0 4px;
    padding: 0.65rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
  }

  /* Burger icon styling */
  .navbar-toggler {
    padding: 6px 10px;
    border-radius: 8px;
    background: #fff8f5;
    border: 1px solid rgba(242,114,66,0.25) !important;
  }

  .navbar-toggler:hover {
    background: #fff0e8;
  }

  .navbar-icon {
    color: #f27242;
    font-size: 1.1rem;
  }
}

/* 5. Cards */
.recipe-card-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 4px;
}

.card-img-top {
  display: block;
  width: 100%;
  height: 175px;
  object-fit: cover;
  border-radius: 0;
}

.card-img-left {
  max-width: 30vw;
  height: auto;
  border-radius: 5px;
}

.card-block {
  padding: 12px 14px 14px;
}

.card-category {
  display: block;
  color: #f27242;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1.2px;
  font-size: 0.9rem;
  margin: 0 0 5px;
}

.card-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #1a1a1a;
  margin: 0 0 6px;
  letter-spacing: 0;
}

.card-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 400;
  color: #777;
  line-height: 1.5;
  margin: 0;
}

.card-internal {
  display: flex;
  flex-direction: row;
}

/* Small tablets: 2 cards per row instead of 4 */
@media (min-width: 576px) and (max-width: 767px) {
  .recipe-card-item {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Mobile: horizontal card layout */
@media (max-width: 575px) {
  .recipe-card-item {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 6px;
  }
  .card {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 12px;
    min-height: 80px;
  }
  .card-img-top {
    width: 84px !important;
    height: 84px !important;
    flex-shrink: 0;
    border-radius: 0 !important;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
  }
  .card-block {
    padding: 8px 12px;
  }
  .card-category {
    font-size: 0.6rem;
    margin-bottom: 3px;
  }
  .card-title {
    font-size: 0.88rem;
    margin-bottom: 0;
  }
  .card-text {
    display: none !important;
  }
}

/* 6. Calculator widget */

/* Section labels */
.calculator-item h3,
.calculator-item-large h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  margin-bottom: 4px;
}

.calculator-item {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f2f2f2;
}
.calculator-item:last-child {
  border-bottom: none;
  margin-bottom: 4px;
}

.calculator-item-large {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f2f2f2;
}

.average-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* Range sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: #e8e8e8;  /* overridden by JS for fill */
  outline: none;
  margin: 10px 0 6px;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f27242 0%, #e05a28 100%);
  box-shadow: 0 2px 6px rgba(242,114,66,0.45);
  cursor: pointer;
  margin-top: -7px;
  transition: transform 0.1s, box-shadow 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover,
input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(242,114,66,0.55);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 4px;
  background: #e8e8e8;
}

input[type="range"]::-moz-range-progress {
  background: #f27242;
  border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f27242 0%, #e05a28 100%);
  box-shadow: 0 2px 6px rgba(242,114,66,0.45);
  cursor: pointer;
  border: none;
}

/* +/- control row */
.calculator-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.calculator-control a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f5f5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  color: #666;
}

.calculator-control a:hover {
  background: #f27242;
  color: #fff;
  text-decoration: none;
}

.calculator-control a i {
  font-size: 0.8rem;
  color: inherit !important;
}

.calculator-input {
  width: 58px;
  text-align: center;
  border: none;
  border-bottom: 2px solid #e8e8e8;
  border-radius: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #333;
  padding: 2px 4px;
  background: transparent;
  transition: border-color 0.15s;
}

.calculator-input:focus {
  outline: none;
  border-bottom-color: #f27242;
}

/* Dose result cards */
.dose-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 14px;
}

.dose-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 14px 10px 12px;
  text-align: center;
  border: 1.5px solid #f0f0f0;
}

.dose-card--highlight {
  background: linear-gradient(135deg, #fff8f5 0%, #fff3ec 100%);
  border-color: #f8d5c4;
}

.dose-card i {
  font-size: 1.2rem;
  color: #ccc;
  margin-bottom: 6px;
  display: block;
}

.dose-card--highlight i {
  color: #f27242;
}

.dose-card-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.dose-card--highlight .dose-card-value {
  color: #e05a28;
}

.dose-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #aaa;
  margin-top: 4px;
}

.dose-card--highlight .dose-card-label {
  color: #c97050;
}

/* "Not sure?" trigger button */
.potency-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f27242;
  border: 1.5px solid #f8c4a8;
  border-radius: 20px;
  padding: 2px 10px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.potency-help-btn:hover {
  background: #f27242;
  color: #fff !important;
  border-color: #f27242;
  text-decoration: none;
}

/* Potency modal */
.potency-modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.potency-modal-header {
  background: linear-gradient(135deg, #f27242 0%, #e05a28 100%);
  border-bottom: none;
  padding: 16px 20px;
}
.potency-modal-header .modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.potency-modal-header .close {
  color: rgba(255,255,255,0.85);
  text-shadow: none;
  opacity: 1;
}
.potency-modal-header .close:hover { color: #fff; opacity: 1; }

.potency-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #f5f5f5;
}
.potency-row:last-child { border-bottom: none; }

.potency-row-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}
.potency-row-label::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.potency-row--low    .potency-row-label::before { background: #5cb85c; }
.potency-row--medium .potency-row-label::before { background: #f0c040; }
.potency-row--high   .potency-row-label::before { background: #f27242; }
.potency-row--conc   .potency-row-label::before { background: #e02020; }

.potency-row-range {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.potency-row--low    .potency-row-range { background: #f0fff0; color: #3a8a3a; }
.potency-row--medium .potency-row-range { background: #fffbe6; color: #a08010; }
.potency-row--high   .potency-row-range { background: #fff5f0; color: #c05020; }
.potency-row--conc   .potency-row-range { background: #fff0f0; color: #c02020; }

/* Dose level pill */
.dose-level {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 16px;
  border-radius: 14px;
  margin: 4px 0 10px;
  border: 1.5px solid transparent;
}

.dose-level-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.dose-level-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dose-level-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.dose-level-desc {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.75;
  line-height: 1.3;
}

.dose-level--threshold { background: #edfaf1; border-color: #b8e8c8; color: #1e6e3a; }
.dose-level--common    { background: #fffbe6; border-color: #f5d87a; color: #8a6800; }
.dose-level--strong    { background: #fff5f0; border-color: #f8c4a8; color: #c04a10; }
.dose-level--heavy     { background: #fff0f0; border-color: #f0b0b0; color: #b02020; }

.potency-avg-note {
  font-size: 0.77rem;
  color: #aaa;
  text-align: center;
  padding: 8px 20px 12px;
  margin: 0;
  border-top: 1px solid #f0f0f0;
}

.potency-modal-footer {
  border-top: none;
  padding: 10px 20px 16px;
  justify-content: center;
}
.btn-potency-close {
  background: linear-gradient(135deg, #f27242 0%, #e05a28 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 32px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.15s;
}
.btn-potency-close:hover { opacity: 0.88; color: #fff; }

/* Legacy table fallback */
.modal-potency-table { width: 100%; margin-top: 10px; }
.modal-potency-table td { padding: 6px 10px; }

/* 7. Recipe content (from recipe.scss) */
.directions-container ul {
  counter-reset: number;
  margin-top: 10px;
  list-style-position: inside;
}

.directions-container ul li {
  list-style: none;
  counter-increment: number;
  margin-bottom: 18px;
}

.directions-container ul li::before {
  content: "Step " counter(number) ": ";
  font-weight: bold;
  -webkit-font-smoothing: antialiased;
}

.directions-container ul li {
  margin: 5px 0px 5px 0px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.recipe-title {
  margin-bottom: 10px;
}

.recipe-content {
  margin-top: 10px;
}

/* 8. Ads (from ad.css) */
@media (max-width: 991px) {
  #ad-medium-top, #ad-medium-bottom {
    min-height: 320px;
  }
}

@media (min-width: 992px) {
  #ad-leaderboard-top, #ad-leaderboard-bottom {
    min-height: 90px;
  }
}

/* 9. Pagination (from pagination.css) */
.pagination {
  margin: 0 auto;
  width: 200px;
  padding-bottom: 20px;
}

.page-item.active .page-link {
  background-color: #e16a3e;
  border-color: #e16a3e;
}

.page-item a:hover {
  color: #e16a3e;
}

.page-link {
  color: #414141;
}

/* Client-side pagination hidden state */
.recipe-card-item.hidden {
  display: none !important;
}

/* 10. 404 Error Page */
.error-page {
  padding: 48px 16px 64px;
}
.error-illustration {
  margin-bottom: 8px;
}
.error-illustration svg {
  filter: drop-shadow(0 6px 18px rgba(92,184,92,0.25));
  animation: leafFloat 4s ease-in-out infinite;
}
@keyframes leafFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.error-code {
  font-size: 6rem;
  font-weight: 800;
  color: #f27242;
  line-height: 1;
  letter-spacing: -4px;
  margin-bottom: 12px;
}
.error-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
}
.error-subtitle {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.7;
  margin-bottom: 28px;
}
.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.error-btn-primary {
  background: #f27242;
  color: #fff;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 24px;
  border: none;
  transition: background 0.2s;
}
.error-btn-primary:hover {
  background: #e06030;
  color: #fff;
  text-decoration: none;
}
.error-btn-secondary {
  background: transparent;
  color: #f27242;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 24px;
  border: 2px solid #f27242;
  transition: all 0.2s;
}
.error-btn-secondary:hover {
  background: #f27242;
  color: #fff;
  text-decoration: none;
}
@media (max-width: 576px) {
  .error-code { font-size: 4.5rem; }
  .error-title { font-size: 1.15rem; }
}

/* 10. Footer */
.site-footer {
  background-color: #1c1c1c;
  color: #aaa;
  padding: 48px 0 0 0;
  margin-top: 48px;
}

.footer-brand img {
  height: 80px;
  width: auto;
}

.footer-tagline {
  font-size: 0.88rem;
  color: #888;
  line-height: 1.6;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2e2e2e;
  color: #bbb !important;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.footer-social-link:hover {
  background: #f27242;
  color: #fff !important;
  text-decoration: none;
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #888;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #f27242;
}

.footer-tip {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid #2e2e2e;
  margin-top: 32px;
  padding: 18px 0;
  text-align: center;
  font-size: 0.78rem;
  color: #555;
}

/* 11. Flash animation (from animate.css) */
@keyframes flash {
  from, 50%, to {
    opacity: 1;
  }
  25%, 75% {
    opacity: 0;
  }
}

.flash {
  animation-name: flash;
  animation-duration: 0.4s;
}

/* Badge large variant */
.badge-label-large {
  font-size: 18px;
  padding: 6px 12px;
}

/* Utility: push footer to bottom */
.page-content {
  flex: 1;
}

/* Homepage hero */
.homepage-hero {
  background: linear-gradient(120deg, #fff4ef 0%, #fff9f6 55%, #ffffff 100%);
  border: 1px solid rgba(242,114,66,0.18);
  border-radius: 18px;
  padding: 32px 36px 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 24px rgba(242,114,66,0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.homepage-h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.25;
  margin: 0;
}

.homepage-h1 span.hero-accent {
  color: #f27242;
}

.homepage-intro {
  font-size: 0.93rem;
  color: #666;
  line-height: 1.75;
  margin: 0;
}

.homepage-intro a {
  color: #f27242;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(242,114,66,0.35);
  transition: border-color 0.15s;
}

.homepage-intro a:hover {
  border-bottom-color: #f27242;
  text-decoration: none;
}

.hero-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hero-stat {
  font-size: 0.8rem;
  font-weight: 500;
  color: #999;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-stat i {
  color: #f27242;
  font-size: 0.75rem;
}

@media (max-width: 576px) {
  .homepage-hero {
    padding: 22px 20px 18px;
    border-radius: 14px;
    gap: 8px;
  }
  .homepage-h1 { font-size: 1.25rem; }
  .homepage-intro { font-size: 0.88rem; }
  .hero-stats { gap: 12px; }
}

.section-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
  display: flex;
  align-items: center;
}

/* Donate CTA banner (homepage) */
.donate-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff8f5;
  border: 1px solid #fce0d4;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0 8px;
}

.donate-cta-icon {
  color: #f27242;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.donate-cta-text {
  flex: 1;
  font-size: 0.92rem;
  color: #444;
}

.donate-cta-btn {
  background: #f27242;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 7px 18px;
  border-radius: 20px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s;
  flex-shrink: 0;
}

.donate-cta-btn:hover {
  background: #e16a3e;
  text-decoration: none;
}

@media (max-width: 575px) {
  .donate-cta { flex-wrap: wrap; }
  .donate-cta-btn { width: 100%; text-align: center; margin-top: 6px; }
}

/* Donation page */
.donate-page {
  padding: 32px 0 48px;
}

.donate-hero {
  margin-bottom: 28px;
}

.donate-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #f27242, #e16a3e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.6rem;
  color: #fff;
}

.donate-title {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.donate-subtitle {
  font-size: 1.05rem;
  color: #666;
  max-width: 420px;
  margin: 0 auto;
}

.donate-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  line-height: 1.75;
  color: #444;
}

.btn-donate {
  display: inline-block;
  background: #f27242;
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 36px;
  border-radius: 30px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn-donate:hover {
  background: #e16a3e;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff !important;
}

.donate-note {
  text-align: center;
  font-size: 0.88rem;
  color: #999;
  margin-bottom: 0;
}

.donate-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.donate-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafafa;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: #555;
}

.donate-feature i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* Card hover effect */
.recipe-card-item .card {
  transition: transform 0.18s, box-shadow 0.18s;
}

.recipe-card-item .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.13);
}

.recipe-card-item a:focus-visible .card {
  outline: 2px solid #f27242;
  outline-offset: 2px;
}

/* 12. Recipe Page Layout */

/* Column spacing */
.recipe-left-col { padding-right: 24px; }
.recipe-right-col { padding-left: 8px; }
@media (max-width: 767px) {
  .recipe-left-col, .recipe-right-col { padding-left: 15px; padding-right: 15px; }
}

/* Hero image */
.recipe-hero-img-wrap {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #f0f0f0;
}
.recipe-hero-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}
@media (max-width: 575px) {
  .recipe-hero-img { height: 200px; }
}

/* Header block */
.recipe-header {
  margin-bottom: 24px;
}
.recipe-category-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #f27242;
  background: #fff3ee;
  border: 1px solid #fce0d4;
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 10px;
}
.recipe-page-title {
  display: block !important;
  font-size: 1.9rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin: 6px 0 12px;
}
.recipe-page-description {
  font-size: 0.97rem;
  color: #555;
  line-height: 1.7;
  margin: 0 0 4px;
}
@media (max-width: 575px) {
  .recipe-page-title { font-size: 1.45rem; }
}

/* Ingredients / Directions cards */
.recipe-section-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.recipe-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  border-bottom: 1px solid #eeeeee;
  padding: 13px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}
.recipe-section-header i {
  color: #f27242;
  font-size: 1rem;
}
.recipe-section-body .list-group {
  border-radius: 0;
  margin: 0;
}
.recipe-section-body .list-group-item {
  border-left: none;
  border-right: none;
  border-top: none;
  border-radius: 0 !important;
  padding: 11px 20px;
  font-size: 0.93rem;
  color: #333;
  background: transparent;
}
.recipe-section-body .list-group-item:last-child {
  border-bottom: none;
}

/* Numbered direction steps */
.recipe-steps .list-group {
  counter-reset: step-counter;
}
.recipe-steps .list-group-item {
  padding-left: 56px;
  position: relative;
  min-height: 44px;
  display: block;
  padding-top: 10px;
  padding-bottom: 10px;
}
.recipe-steps .list-group-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background: #f27242;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Recipe cross-reference links */
a.recipe-reference {
  color: #e06020;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-style: dotted;
}
a.recipe-reference:hover {
  color: #c04d10;
  text-decoration-style: solid;
}

/* Calculator sidebar panel */
.calculator-panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.calculator-panel-header {
  background: #f27242;
  color: #fff;
  padding: 13px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.calculator-panel-body {
  padding: 16px 20px 8px;
}

/* Dosage results panel */
.dosage-panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.dosage-panel-header {
  background: #5cb85c;
  color: #fff;
  padding: 13px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dosage-panel-body {
  padding: 16px 20px;
}

/* Effects titles inside dosage panel */
.dosage-effects-title {
  display: block !important;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #bbb;
  margin-bottom: 8px;
}

/* Effect tags */
p.spaced-content {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 0;
  margin-bottom: 14px;
}

.effect-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 20px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.effect-tag--positive {
  background: #edfaf0;
  color: #2d7a47;
  border: 1px solid #c3ebd0;
}

.effect-tag--negative {
  background: #fdf1f1;
  color: #b03030;
  border: 1px solid #f0c8c8;
}

/* 13. Calculator Page */
.calc-info-col { padding-left: 8px; }
@media (max-width: 767px) { .calc-info-col { padding-left: 0; margin-top: 24px; } }

.calc-page-title {
  display: block !important;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.25;
  margin-bottom: 6px;
}
.calc-page-meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 12px;
}
.calc-page-intro {
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 4px;
}
.calc-section-title {
  display: block !important;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}
.calc-section-sub {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 10px;
}

/* Dosage guide table */
.calc-dosage-table { font-size: 0.88rem; border-radius: 8px; overflow: hidden; }
.calc-dosage-table thead th {
  background: #f27242;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  padding: 10px 12px;
}
.calc-dosage-table td { padding: 9px 12px; vertical-align: middle; border-color: #f0f0f0; }
.calc-dosage-table tr.table-success td { background: #f0fff0; }
.calc-dosage-table tr.table-warning td { background: #fffbe6; }
.calc-dosage-table tr.table-danger  td { background: #fff0f0; }

/* How-to steps */
.calc-steps-list {
  padding-left: 20px;
  font-size: 0.93rem;
  line-height: 1.75;
  color: #333;
}
.calc-steps-list li { margin-bottom: 4px; }

/* Recipe chips */
.calc-recipe-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-recipe-chip {
  display: inline-block;
  background: #fff3ee;
  color: #f27242 !important;
  border: 1px solid #fce0d4;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.calc-recipe-chip:hover { background: #f27242; color: #fff !important; text-decoration: none; }
.calc-recipe-chip--more { background: #f8f8f8; color: #555 !important; border-color: #ddd; }
.calc-recipe-chip--more:hover { background: #f27242; color: #fff !important; }

/* FAQ accordion */
.calc-faq { border: 1px solid #e8e8e8; border-radius: 12px; overflow: hidden; }
.calc-faq-item { border-bottom: 1px solid #eee; }
.calc-faq-item:last-child { border-bottom: none; }
.calc-faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: #fafafa;
  border: none;
  padding: 14px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.calc-faq-question:hover { background: #fff5f0; color: #f27242; }
.calc-faq-chevron { font-size: 0.75rem; color: #aaa; flex-shrink: 0; margin-left: 10px; transition: transform 0.2s; }
.calc-faq-answer {
  display: none;
  padding: 0 18px 14px;
  font-size: 0.91rem;
  color: #555;
  line-height: 1.7;
  background: #fff;
}
.calc-faq-answer.open { display: block; }
.calc-faq-answer p { margin: 10px 0 0; }

