body {
  font-family: 'Karla', sans-serif;
  background-image: linear-gradient(to bottom right, red, orange);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: #fff;
  margin: 0;
}

/* Keep navbar above content */
.navbar.fixed-top { z-index: 1030; }

/* If you want the navbar NOT to be transparent */
.navbar-top {
  border-bottom: 3px solid #fff;
  background-image: linear-gradient(to bottom right, red, orange);
}

/* Existing */
.navbar-bottom { background-color: #ebeff5 !important; }

.navbar-brand { margin-right: 0; }
.navbar-brand img { height: 100px; }

/* Layout container: offset content for fixed header + add footer clearance */
.site-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 130px 0px 140px; /* top = header space, bottom = footer space */
}

/* Reserve ad space up front to prevent layout shift while Google AdSense loads.
   The <ins> tags in assets/ads/toiduretsept_header_unit.php request fixed sizes
   (728x90 desktop / 320x100 mobile) instead of "auto"/full-width-responsive, so
   the actual creative always matches this box exactly - nothing resizes after
   load, so there's no shift and no need to clip a taller ad. */
.recipe-header-ad {
  min-height: 100px;
  max-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.recipe-hero-wrapper {
  width: 100%;
  height: clamp(240px, 40vw, 520px);
  overflow: hidden; /* lõikab ülejäägi */
}

.recipe-hero {
  width: 100%;
  height: auto;
  display: block;
}

.img-fluid {
  height: auto;
}

.card-transparent {
  background-color: transparent;
}

/* Logo base */
.logo {
  width: auto;
  max-width: 480px;   /* desktop */
  min-width: 240px;   /* do NOT shrink below this */
  height: auto;
  display: block;
}

/* Navbar control */
.navbar-brand {
  max-width: 100%;
}

.navbar-top .mainarea {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.navbar-top .navbar-brand {
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  display: flex;
  justify-content: center;
}

.navbar-top .logo {
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .logo {
    max-width: 360px;
    min-width: 240px;
  }
}

@media (max-width: 400px) {
  .logo {
    max-width: 240px;
    min-width: 240px;
  }
}

/* Navbar dark */
.navbar-dark {
  padding-top: 35px;
  padding-bottom: 35px;
}

.navbar-dark .navbar-text {
  color: #fff;
  opacity: 1;
  padding: 0 20px;
  border-right: 1px solid #fff;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.navbar-dark .navbar-text:last-child { border-right: 0; }

@media (max-width: 767px) {
  .navbar-dark { padding-bottom: 0; }
}

/* Typography */
.page-title {
  font-size: 80px;
  font-weight: bold;
  margin-bottom: 6px;
}

.page-description {
  max-width: 465px;
  font-size: 18px;
  margin-bottom: 59px;
}

p {
  font-size: 14px;
  margin-bottom: 21px;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .navbar-dark { padding-bottom: 0; }

  .page-title {
    font-size: 35px;
    margin-bottom: 14px;
  }

  .page-description {
    font-size: 14px;
  }
}


.meta-card-inverse {
  background-color: #212529;
  border: none;
}

.meta-card-inverse .fw-bold {
  color: #f97316;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meta-card-inverse div:not(.fw-bold):not(.card-body) {
  color: #fff;
  font-weight: 600;
}

.footer-ad-inner {
    width: 100%;
}

@media (max-width: 768px) {
    .footer-ad {
        min-height: 100px; /* mobile adaptive ads */
    }

    .footer-ad-inner {
        max-width: 100%;
    }
}

.footer-ad {
    width: 100%;
    display: flex;
    justify-content: center;   /* horisontaalne tsentreerimine */
    align-items: center;
    min-height: 280px;          /* reserveerib ruumi (728x90 banner) */
    margin: 20px 0;
}

/* ===== Retseptiotsing (inverse, nagu retseptilehe meta-kaardid) ===== */
/* Kaart peab lubama dropdownil kaardist välja ulatuda. */
.recipe-search-card {
  overflow: visible;
  position: relative;
  z-index: 20;
}

.recipe-search {
  position: relative;
}

/* Sisend tumedal kaardil: tume taust, hele tekst, oranž fookusaktsent. */
.recipe-search__input,
.recipe-search__input:focus {
  font-family: 'Karla', sans-serif;
  background-color: #2b3035;
  color: #fff;
  border: 1px solid #495057;
}

.recipe-search__input::placeholder {
  color: #adb5bd;
  opacity: 1;
}

.recipe-search__input:focus {
  border-color: #ff5300;
  box-shadow: 0 0 0 0.2rem rgba(255, 83, 0, 0.35);
}

/* Tulemuste paneel: tume (inverse), sisendiga seotud, alati teiste ees. */
.recipe-search__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1080;               /* üle kaartide ja reklaami, alla navbari (1030 on fixed-top) */
  max-height: 60vh;
  overflow-y: auto;
  background-color: #212529;
  border: 1px solid #ff5300;
  border-radius: 0.25rem;      /* Bootstrap card-raadius */
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
  -webkit-overflow-scrolling: touch;
}

.recipe-search__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.55rem 0.75rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.recipe-search__item:last-child {
  border-bottom: 0;
}

/* Hover- ja klaviatuuri-aktiivne olek: oranž aktsent teemaga sobiv. */
.recipe-search__item:hover,
.recipe-search__item.is-active {
  background-color: rgba(255, 83, 0, 0.18);
  color: #fff;
  text-decoration: none;
}

.recipe-search__item-title {
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

/* Kategooria: oranž versaal, nagu meta-kaartide sildid. */
.recipe-search__item-cat {
  font-size: 0.72rem;
  color: #f97316;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.recipe-search__empty {
  padding: 0.6rem 0.75rem;
  color: #adb5bd;
  font-style: italic;
}

/* Mobiilis piira paneeli kõrgust, et see jääks mugavalt kerbitavaks. */
@media (max-width: 575px) {
  .recipe-search__panel {
    max-height: 55vh;
  }
}
