/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.0
*/

/* =====================================================================
   0) БАЗА / ТИПОГРАФІЯ
   ===================================================================== */
/* Опційно ввімкнути глобальний шрифт */
/*
html, body,
h1, h2, h3, h4, h5, h6,
p, span, a, li, ul, ol, blockquote,
input, textarea, select, button,
div, section, article, nav, header, footer {
  font-family: 'FONTSPRING', sans-serif;
}
*/

/* Заголовок поста під хедером */
[data-animate="fade_in"].featured-media-under-header .entry-title {
  font-size: 44px;
  line-height: 48px;
}

/* h2 усередині single */
body.single .post .content-inner > h2 {
  font-size: 24px;
  line-height: 28px;
  margin: 30px 0;
}

/* Підкреслені заголовки (Salient underline) */
#ajax-content-wrap .nectar-underline .item-main,
#ajax-content-wrap .nectar-underline .post-heading,
#ajax-content-wrap .nectar-underline .post-heading span {
  line-height: 1.1;
}

/* =====================================================================
   1) ХЕДЕР / МЕНЮ
   ===================================================================== */
/* Активний пункт top-меню при ховері — білий */
#header-outer #top nav > ul > li.sfHover > a {
  color: #fff !important;
}

/* Скруглення для конкретного елемента меню */
#header-outer .menu-item-558 > a:before {
  border-radius: 20px;
}

/* Дропдауни в хедері без скруглення зверху */
#header-outer #top .sf-menu > li > ul,
#header-outer #header-secondary-outer .sf-menu > li > ul,
#header-outer #top .sf-menu > li:not(.megamenu) ul:not(.woocommerce-mini-cart),
#header-outer .widget_shopping_cart,
#header-outer .cart-notification,
body[data-fancy-form-rcs="1"] .nectar-shop-header .woocommerce-ordering .select2-dropdown,
body[data-fancy-form-rcs="1"] .variations_form .select2-dropdown,
#header-outer nav .nectar-global-section-megamenu {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}

/* =====================================================================
   2) МОБІЛЬНИЙ ХЕДЕР / МОБІЛЬНЕ МЕНЮ
   ===================================================================== */
body .nectar-mobile-only.mobile-header a {
  font-size: 12px;
}

.nectar-mobile-only.mobile-header .inner,
.nectar-mobile-only.mobile-header .inner ul {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 158px;
  transform: translate(-50%, -50%);
}

/* Паддінги і скруглення пунктів */
#header-outer #mobile-menu ul li {
  padding: 0 20px;
  border-radius: 20px;
}

/* Лінії-підкреслення пунктів */
#mobile-menu .menu-items-wrap ul:not(.nectar_widget) > li:before {
  left: 20px !important;
  width: calc(100% - 40px) !important;
}

/* Ховер/фокус кольори */
#header-outer #mobile-menu ul li a:hover,
#header-outer #mobile-menu ul li a:focus,
#header-outer #mobile-menu ul li a:hover .sf-sub-indicator i,
#header-outer #mobile-menu ul li a:focus .sf-sub-indicator i,
#header-outer #mobile-menu ul li[class*="current"] > a {
  color: #000 !important;
}

/* Активний пункт */
#header-outer #mobile-menu ul li[class*="current"] {
  background-color: #f33341;
}

/* Відкритий пункт */
#header-outer #mobile-menu ul li.current-open-item,
#header-outer #mobile-menu ul li.current-open-item a {
  color: #fff !important;
}

/* Додатковий відступ у прозорому хедері */
#header-outer.transparent #mobile-menu .menu-items-wrap[data-has-secondary-text=false] > ul:first-child {
  padding-bottom: 20px;
}

/* =====================================================================
   3) СІТКА ПОСТІВ (Nectar Post Grid)
   ===================================================================== */
/* Розмір текстів */
.nectar-fancy-box[data-style="hover_desc"] .hover-content { font-size: 16px; }
.nectar-post-grid-item__meta-wrap { font-size: 12px; }
.nectar-post-grid .nectar-post-grid-item .item-meta-extra { font-size: 18px; }

/* Категорія поверх зображення — flex */
.nectar-post-grid-wrap .category-position-overlaid .nectar-post-grid-item .meta-category {
  display: flex;
}

/* Обмеження висоти зображень (lock aspect) */
.nectar-post-grid-wrap[data-style="content_under_image"]
  .nectar-post-grid[data-lock-aspect="yes"]
  .nectar-post-grid-item-bg img {
  max-height: 350px;
}

/* Фільтри над грідом */
.nectar-post-grid-filters[data-align="left"] a {
  display: inline-block;
  margin: 0 10px 0 0;
  padding: 10px 20px;
  line-height: 1.1;
  color: #fff;
  background-color: #ff6464;
  border-radius: 10px;
  text-transform: uppercase;
}
.nectar-post-grid-filters[data-align="left"] a.active {
  background-color: #f33341;
}
/* Прибрати стандартні underline-ефекти */
.nectar-post-grid-filters a.active:after,
.nectar-post-grid-filters a:hover:after {
  display: none;
}

/* =====================================================================
   4) ВІДЕО ПОПАП + КНОПКА PLAY
   ===================================================================== */
/* Попап */
#video-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.85);
}
.video-popup-inner {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
}
.video-popup-close {
  position: absolute;
  top: -25px;
  right: -25px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}
.video-popup-content iframe,
.video-popup-content video {
  max-width: 100%;
  max-height: 100%;
}

/* Кнопка Play — клікабельний оверлей поверх картки */
.nectar-post-grid-item { position: relative; }

.video-play-btn {
  position: absolute;
  inset: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: transparent;
}
.video-play-btn svg {
  width: 64px;
  height: 64px;
  fill: #fff;
  pointer-events: none;
  filter:
    drop-shadow(0 0 6px rgba(0,0,0,0.7))
    drop-shadow(0 0 12px rgba(0,0,0,0.5));
}
/* Легкий ховер-ефект */
.video-play-btn:hover { background: rgba(0,0,0,0.25); }

/* =====================================================================
   5) ВІНТАЖНИЙ СЛАЙДЕР (POLAROID)
   ===================================================================== */
.pol {
  position: relative;
  width: 100%;
  height: 490px;
  border: solid #F2EBE8;
  border-width: 13px 8px 80px 8px;
  border-radius: 3px;
  box-shadow: 0 0 10px 0 black;
  background-color: rgba(255,255,255,0.6);
}

/* Слайд */
.slide {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 600px;
  height: 100%;
  transform: translateX(-50%);
  text-align: center;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s;
}

/* Зображення в картці */
.row .col .slide img {
  width: auto;
  height: 402px;
  margin: 0 auto;
  object-fit: cover;
  filter: sepia(37%) brightness(87%) contrast(113%);
  border-radius: 4px;
}

/* Підпис */
.caption {
  margin-top: 5px;
  font-size: 24px;
  font-weight: bold;
  font-family: 'Permanent Marker', cursive;
  background: linear-gradient(to top, #020314 0%, #05152E 50%, #3B0400 100%, #001A61 94%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Кадрування анімацій по таймлайну */
.slide1 { animation: fade1 20s infinite; z-index: 2; }
.slide2 { animation: fade2 20s infinite; z-index: 2; }
.slide3 { animation: fade3 20s infinite; z-index: 2; }
.slide4 { animation: fade4 20s infinite; z-index: 2; }

@keyframes fade1 {
  0%, 25%   { opacity: 1; pointer-events: auto; }
  30%, 100% { opacity: 0; pointer-events: none; }
}
@keyframes fade2 {
  0%, 25%   { opacity: 0; pointer-events: none; }
  30%, 50%  { opacity: 1; pointer-events: auto; }
  55%, 100% { opacity: 0; pointer-events: none; }
}
@keyframes fade3 {
  0%, 50%   { opacity: 0; pointer-events: none; }
  55%, 75%  { opacity: 1; pointer-events: auto; }
  80%, 100% { opacity: 0; pointer-events: none; }
}
@keyframes fade4 {
  0%, 75%   { opacity: 0; pointer-events: none; }
  80%, 100% { opacity: 1; pointer-events: auto; }
}
.nectar-cta[data-style=curved-arrow-animation] .link_text {
  opacity: .5;
  margin-top: 30px;
}
/* =====================================================================
   6) РЕСПОНСИВ
   ===================================================================== */
@media only screen and (max-width: 690px) {
  /* Базова типографіка */
  p { font-size: 18px; line-height: 150%; }

  /* Уточнення висоти лінії для underline-заголовків на мобільних */
  .full-width-section > .col.span_12.dark
    .nectar-post-grid[data-text-color="light"] .nectar-post-grid-item .content *,
  .nectar-post-grid[data-text-color="light"] .nectar-post-grid-item .content *,
  #ajax-content-wrap .nectar-underline .post-heading {
    line-height: 70%;
  }

  /* Контейнер хедера — вужчі відступи */
  body #header-outer .container {
    padding-left: min(max(calc(var(--container-padding) / 3), 15px), 12px);
    padding-right: min(max(calc(var(--container-padding) / 3), 15px), 12px);
  }

  /* Полароід/слайдер */
  .pol { height: 380px; }
  .row .col .slide img { height: 300px; }
  .nectar-post-grid .nectar-post-grid-item .meta-excerpt {
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
    opacity: .8;
  }
}
