/* App-like minimal styling (white + orange) built on Bootstrap */
:root{
  --brand: #ff7a1a;
  --brand-soft: rgba(255, 122, 26, .12);
  --nav-h: 96px; /* reserve space under content for floating actions */
}

.pb-appnav{ padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }

/* Inline SVG icons */
.app-icon{
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
}

/* Brand */
.brand-mark{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.75), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, #ff9a42, #ff7a1a);
  box-shadow: 0 10px 22px rgba(255, 122, 26, .25);
}
.brand-logo{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-block;
  box-shadow: 0 10px 22px rgba(255, 122, 26, .18);
  object-fit: cover;
}
.text-brand{ color: var(--brand) !important; }

/* Buttons */
.btn-brand{
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: #f56f10;
  --bs-btn-hover-border-color: #f56f10;
  --bs-btn-active-bg: #e9660f;
  --bs-btn-active-border-color: #e9660f;
  border-radius: 16px;
}
.btn-outline-brand{
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: rgba(255, 122, 26, .55);
  --bs-btn-hover-bg: var(--brand-soft);
  --bs-btn-hover-border-color: rgba(255, 122, 26, .75);
  --bs-btn-active-bg: rgba(255, 122, 26, .18);
  border-radius: 16px;
}
.btn-icon{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
}

/* Soft badges */
.soft-badge{
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.06);
  color: rgba(0,0,0,.72);
  border-radius: 999px;
  font-weight: 500;
}

/* Hero container */
.hero-photo{
  border: 1px solid rgba(0,0,0,.08);
  overflow:hidden;
  background:
    radial-gradient(circle at 25% 35%, rgba(255, 122, 26, .20), transparent 55%),
    radial-gradient(circle at 75% 55%, rgba(0,0,0,.07), transparent 60%),
    linear-gradient(135deg, rgba(0,0,0,.05), rgba(0,0,0,.02));
}
.hero-photo__inner{
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.06) 100%);
}
.hero-chip{
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  color: rgba(0,0,0,.72);
}

/* Horizontal scroll helpers */
.snap-x{ scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.snap-item{ scroll-snap-align: start; }

/* Gallery items (with real images) */
.gallery-photo{
  min-width: 66%;
  max-width: 66%;
  border: 1px solid rgba(0,0,0,.08);
  overflow:hidden;
  position: relative;
  background: rgba(0,0,0,.02);
}

/* Cards */
.price-card, .map-card, .animal-card, .food-card, .card-soft{
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 18px;
  padding: 12px;
}
.card-soft{
  background: rgba(0,0,0,.015);
}

/* Price stack */
.price-stack{
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  overflow: hidden;
}
.price-item{
  padding: 12px 12px;
  background: rgba(0,0,0,.015);
}
.price-item + .price-item{ border-top: 1px solid rgba(0,0,0,.06); }
.price-label{
  font-size: 13px;
  color: rgba(0,0,0,.62);
}
.price-value{
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  color: rgba(0,0,0,.92);
}

/* Animal carousel */
.animal-card{ padding: 12px; }
.carousel-indicators{ margin-bottom: -6px; }
.carousel-indicators [data-bs-target]{
  width: 6px; height: 6px;
  border-radius: 999px;
  background-color: rgba(0,0,0,.18);
  opacity: 1;
}
.carousel-indicators .active{ background-color: var(--brand); }
.carousel-control-prev, .carousel-control-next{ width: 16%; }
.carousel-nav{
  width: 38px; height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
  color: rgba(0,0,0,.72);
}

/* Food cards */
.food-card{
  min-width: 72%;
  max-width: 72%;
}

/* Map placeholder */
.map-placeholder{
  border: 1px dashed rgba(0,0,0,.18);
  background: rgba(0,0,0,.02);
}
.route-list{
  list-style: none;
  margin: 0;
  padding: 0;
}
.route-list li{
  display:flex;
  gap: 8px;
  align-items:flex-start;
  padding: 6px 0;
}

/* FAQ accordion */
.app-accordion .accordion-item{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 10px;
}
.app-accordion .accordion-button{
  font-weight: 600;
  padding: 14px 14px;
}
.app-accordion .accordion-button:not(.collapsed){
  color: rgba(0,0,0,.92);
  background: var(--brand-soft);
}
.app-accordion .accordion-button:focus{
  box-shadow: 0 0 0 .25rem rgba(255, 122, 26, .18);
}
.app-accordion .accordion-body{ padding: 12px 14px 14px; }

/* Floating bottom actions */
.fab-actions{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  z-index: 1030;
  pointer-events: none;
}
.fab-inner{
  pointer-events: auto;
  max-width: 920px;
  margin: 0 auto;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
  backdrop-filter: blur(10px);
  padding: 10px;
}
.fab-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.call-btn{
  display: flex;
  align-items: center;
  justify-content: center;
}
.call-text{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}
.call-title{
  font-weight: 700;
  color: rgba(0,0,0,.92);
  font-size: 14px;
}
.call-number{
  margin-top: 2px;
  color: rgba(0,0,0,.62);
  font-size: 12px;
  letter-spacing: .1px;
}

/* Fullscreen offcanvas */
.offcanvas-fullscreen{
  height: 100vh !important;
  max-height: 100vh !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
.offcanvas-fullscreen .offcanvas-header{
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding-top: calc(12px + env(safe-area-inset-top));
}
.offcanvas-fullscreen .offcanvas-body{
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

/* Header navigation */
.app-header{ margin-bottom: 0; }
.app-topnav{ gap: 8px; }
.topnav-link{
  text-decoration: none;
  color: rgba(0,0,0,.68);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
}
.topnav-link:hover{
  color: var(--brand);
  border-color: rgba(255,122,26,.32);
  background: var(--brand-soft);
}

/* Mobile menu */
.app-menu .offcanvas-header{
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.menu-link{
  display: block;
  text-decoration: none;
  color: rgba(0,0,0,.80);
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
}
.menu-link:hover{
  color: var(--brand);
  border-color: rgba(255,122,26,.32);
  background: var(--brand-soft);
}

/* Hero video button */
.hero-videoBtn{
  border: 0;
  padding: 0;
  background: transparent;
  display: block;
  text-align: left;
}

/* Full-screen video area */
.video-wrap{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  background:#000;
}
.video-player{
  width:100%;
  height:100%;
  object-fit: contain;
  background:#000;
}

/* 9:16 ratio for Bootstrap ratio */
.ratio-9x16 { --bs-aspect-ratio: 177.7778%; }

/* Slide video gallery: show ~1.5 items on mobile */
.slide-videoItem{
  min-width: 66%;
  max-width: 66%;
}
.slide-videoThumb{
  width: 100%;
  border: 1px solid rgba(0,0,0,.08);
  background: #000;
  display: block;
}
.slide-videoCaption{ padding: 8px 2px 0; }
.slide-videoTitle{
  font-size: 13px;
  font-weight: 600;
  color: rgba(0,0,0,.88);
  line-height: 1.2;
}
.slide-videoMeta{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(0,0,0,.55);
  line-height: 1.2;
}

/* Small desktop */
@media (min-width: 576px){
  .gallery-photo{ min-width: 44%; max-width: 44%; }
  .food-card{ min-width: 44%; max-width: 44%; }
  .slide-videoItem{ min-width: 44%; max-width: 44%; }
}

/* Desktop layout (does not affect mobile) */
@media (min-width: 992px){
  body{ background: #f6f7f9; }

  .app-shell.vh-100{
    height: auto !important;
    min-height: 100vh;
  }

  main[aria-label="Главный экран"]{
    overflow: visible !important;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-top: 24px !important;

    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-content: start;
    align-items: start;
  }

  #topbar{ grid-column: 1 / -1; }
  #hero{ grid-column: 1 / 2; }
  #intro{ grid-column: 2 / 3; align-self: start; }
  #farmPhotos{ grid-column: 1 / 2; }
  #prices{
    grid-column: 2 / 3;
    align-self: start;
    position: sticky;
    top: 24px;
  }

  #animals, #food, #slide, #route, #faq, #blog{ grid-column: 1 / 2; }

  /* Turn horizontal galleries into grids on desktop (farm+food only) */
  #farmPhotos .snap-x, #food .snap-x{
    overflow-x: visible !important;
    flex-wrap: wrap;
  }
  .gallery-photo{
    min-width: calc(50% - 8px);
    max-width: calc(50% - 8px);
  }
  .food-card{
    min-width: calc(50% - 8px);
    max-width: calc(50% - 8px);
  }

  h1.h4{ font-size: 34px; }

  /* Floating actions on desktop */
  .fab-actions{ padding: 16px 24px 24px; }
  .fab-inner{ width: min(760px, calc(100% - 48px)); }

  /* Desktop: fullscreen offcanvas looks like neat sheet */
  .offcanvas-fullscreen.offcanvas-bottom{
    height: auto !important;
    max-height: min(780px, 86vh) !important;
    width: min(560px, calc(100% - 48px));
    left: 0 !important;
    right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    bottom: 24px !important;

    border-radius: 22px !important;
    border: 1px solid rgba(0,0,0,.12);
    box-shadow: 0 18px 52px rgba(0,0,0,.18);
  }
  .offcanvas-fullscreen .offcanvas-header{ padding-top: 14px !important; }
  .offcanvas-fullscreen .offcanvas-body{ padding-bottom: 18px !important; }

  /* Slide gallery on desktop: fixed widths */
  .slide-videoItem{ min-width: 320px; max-width: 320px; }
}
/* FIX: make Bootstrap .btn-close always visible (local bootstrap builds sometimes miss vars) */
.offcanvas-header{
  position: relative;
  z-index: 20; /* поверх видео/контента */
  background: #fff;
}

/* Force close icon SVG + make button visible */
.btn-close{
  /* убираем любые инверты, если где-то были */
  filter: none !important;
  opacity: 1 !important;

  /* гарантируем наличие иконки */
  --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414 1.707 15.707a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");

  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 16px;

  /* лёгкая подложка, чтобы на любом фоне было видно */
  background-color: rgba(0,0,0,.04) !important;
  background: rgba(0,0,0,.04) var(--bs-btn-close-bg) center/1em auto no-repeat !important;

  border: 1px solid rgba(0,0,0,.08) !important;
}

/* Hover/active for nicer feel */
.btn-close:hover{ background-color: rgba(0,0,0,.06) !important; }
.btn-close:active{ background-color: rgba(0,0,0,.08) !important; }
/* ---- FIX DESKTOP: slide video gallery should not break grid ---- */
@media (min-width: 992px){
  /* гарантируем, что блок не вылезает за колонку */
  #slide{ min-width: 0; }

  /* на десктопе превращаем ленту видео в сетку */
  #slide .snap-x{
    overflow-x: visible !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
  }

  /* фиксируем ширину айтема, чтобы подписи не ломали */
  #slide .slide-videoItem{
    min-width: 300px !important;
    max-width: 300px !important;
  }

  /* чтобы элементы нормально переносились */
  #slide .slide-videoItem{ flex: 0 0 auto; }
}