/*
Theme Name: Tevily Child
Theme URI: https://gaviaspreview.com/wp/tevily/
Author URI: https://themeforest.net/user/gavias
Author: Gaviasthemes Team
Description: Child theme for the Tevily theme.
Template: tevily
*/

/* ===== Style-4 Gallery: Layout ===== */
.tevily-ba-single-gallery.style-4 {
  position: relative; /* anchors the "Show all" overlay */
}

.tevily-ba-single-gallery.style-4 .gallery-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: stretch;
  height: 520px;
}

.tevily-ba-single-gallery.style-4 .gallery-hero {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.tevily-ba-single-gallery.style-4 .gallery-hero .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.tevily-ba-single-gallery.style-4 .gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 10px;
  height: 100%;
}

.tevily-ba-single-gallery.style-4 .gallery-thumb {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
}

.tevily-ba-single-gallery.style-4 .gallery-thumb img.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ===== "Show all" media bar (camera icon + count + text) ===== */
.tevily-ba-single-gallery.style-4 .style4-media {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1px;
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 10px;
  border-radius: 6px;
}

.tevily-ba-single-gallery.style-4 .style4-media a.ba-gallery:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: none;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  gap: 6px;
  box-shadow: none;
}

.tevily-ba-single-gallery.style-4 .style4-media a.ba-gallery:first-child i {
  margin-right: 4px;
  font-family: "Line Awesome", "Font Awesome 5 Free", sans-serif;
  font-size: 14px;
  line-height: 1;
  display: inline-block;
}

.tevily-ba-single-gallery.style-4 .style4-media a.ba-gallery:first-child span {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.tevily-ba-single-gallery.style-4 .style4-media a.ba-gallery:first-child::after {
  content: "Show all";
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin-left: 6px;
}

/* Hide the extra lightbox-only anchors (all images after the first) */
.tevily-ba-single-gallery.style-4 .style4-media a.ba-gallery:not(:first-child) {
  width: 0;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.tevily-ba-single-gallery.style-4 .style4-media a.ba-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .tevily-ba-single-gallery.style-4 .gallery-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .tevily-ba-single-gallery.style-4 .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
  }

  .tevily-ba-single-gallery.style-4 .style4-media {
    bottom: 10px;
    right: 10px;
  }
}
/* ===== Combined BA Item + Tour Info + Sticky Icon fixes (ready to paste into style.css) ===== */

/* ---------- BA Item Widgets — icon on left side (Tevily structure fix) ---------- */
body .tevily-single-taxonomy .content-inner,
body .tevily-single-duration .content-inner,
body .tevily-single-max-guests .content-inner,
body .tevily-single-min-age .content-inner {
  box-sizing: border-box;
  display: flex !important;
  flex-direction: row !important; /* icon on left */
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}

/* Text block (title + value) */
body .tevily-single-taxonomy .box-content,
body .tevily-single-duration .box-content,
body .tevily-single-max-guests .box-content,
body .tevily-single-min-age .box-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: left !important;
  line-height: 1.4 !important;
  flex-grow: 1 !important;
}

/* Icon styling — fixed size, independent from text */
body .tevily-single-taxonomy .icon,
body .tevily-single-duration .icon,
body .tevily-single-max-guests .icon,
body .tevily-single-min-age .icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  margin-right: 12px !important; /* spacing between icon and text */
  margin-left: 0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

/* Elementor spacing control (keeps original intent but safe fallback) */
.elementor-widget-gva_ba_item_taxonomy[data-spacing] .tevily-single-taxonomy,
.elementor-widget-gva_ba_item_duration[data-spacing] .tevily-single-duration,
.elementor-widget-gva_ba_item_max_guests[data-spacing] .tevily-single-max-guests,
.elementor-widget-gva_ba_item_min_age[data-spacing] .tevily-single-min-age {
  --taxonomy-gap: attr(data-spacing px);
}

/* ---------- Tour Information (align with BA widgets) ---------- */
/* Ensure tour-info items follow same left-icon layout (covers other widget structures) */
body .tour-info-item,
body .tour-info .tour-info-item {
  box-sizing: border-box;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  justify-content: flex-start !important;
}

/* Icon container: fixed square, centered content */
body .tour-info-item .info-icon,
body .tour-info-item .icon,
body .tevily-single-taxonomy .content-inner > .icon,
body .tevily-single-duration .content-inner > .icon,
body .tevily-single-max-guests .content-inner > .icon,
body .tevily-single-min-age .content-inner > .icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  font-size: 18px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  line-height: 1 !important;
}

/* Text block to the right (consistent with BA widgets) */
body .tour-info-item .info-text,
body .tour-info-item .info-label,
body .tour-info-item .info-value,
body .tevily-single-taxonomy .content-inner > .box-content,
body .tevily-single-duration .content-inner > .box-content,
body .tevily-single-max-guests .content-inner > .box-content,
body .tevily-single-min-age .content-inner > .box-content {
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
  line-height: 1.15 !important;
  overflow: visible !important;
  word-break: break-word !important;
}

/* ---------- Sticky / Fixed clone icon centering & sizing ---------- */
/* Ensure buttons clone and sticky bar center icons and buttons visually */
body .krt-fixed-clone,
body .krt-buttons-group.krt-sticky {
  justify-content: center !important;
  align-items: center !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* Center icon inside buttons when sticky/clone */
body .krt-fixed-clone .krt-btn .krt-btn-icon,
body .krt-buttons-group.krt-sticky .krt-btn .krt-btn-icon,
body .krt-fixed-clone .krt-btn,
body .krt-buttons-group.krt-sticky .krt-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* If tour info appears inside the sticky/fixed bar, slightly reduce icon size and center */
body .krt-fixed-clone .tour-info-item .info-icon,
body .krt-buttons-group.krt-sticky .tour-info-item .info-icon {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  margin: 0 6px !important;
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 720px) {
  body .tour-info-item,
  body .tevily-single-taxonomy .content-inner,
  body .tevily-single-duration .content-inner {
    gap: 10px !important;
  }
  body .tour-info-item .info-icon,
  body .tevily-single-taxonomy .content-inner > .icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    font-size: 16px !important;
  }
}

/* ---------- Highest-specificity fallbacks to override inline/plugin rules ---------- */
html body .tour-info-item .info-icon,
html body .tevily-single-max-guests .content-inner > .icon,
html body .tevily-single-min-age .content-inner > .icon,
html body .tevily-single-taxonomy .icon,
html body .tevily-single-duration .icon {
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

/* Small polish: ensure text doesn't collapse when icons are large */
html body .tour-info-item .info-text,
html body .tevily-single-taxonomy .content-inner .box-content {
  overflow: visible !important;
  word-break: break-word !important;
}

/* ===== Match Max Guests, Min Age, Price From with Duration & Taxonomy ===== */
body .tevily-single-max_guests .content-inner,
body .tevily-single-min_age .content-inner,
body .tevily-single-price_from .content-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  box-sizing: border-box !important;
}

/* Icon alignment and sizing */
body .tevily-single-max_guests .icon,
body .tevily-single-min_age .icon,
body .tevily-single-price_from .icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  flex-shrink: 0 !important;
  margin-right: 12px !important;
  font-size: 18px !important;
  line-height: 1 !important;
  color: var(--tevily-primary-color, #d47a00); /* match Duration/Taxonomy icon color */
}

/* Text block alignment */
body .tevily-single-max_guests .box-content,
body .tevily-single-min_age .box-content,
body .tevily-single-price_from .box-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: left !important;
  line-height: 1.4 !important;
  flex-grow: 1 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body .tevily-single-max_guests .content-inner,
  body .tevily-single-min_age .content-inner,
  body .tevily-single-price_from .content-inner {
    gap: 8px !important;
  }
  body .tevily-single-max_guests .icon,
  body .tevily-single-min_age .icon,
  body .tevily-single-price_from .icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
    margin-right: 8px !important;
  }
}
@media (max-width: 767.98px) {
    .header-mobile .header-mobile-content .header-content-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .header-mobile .header-mobile-content .header-content-inner .header-left {
        flex: 0 0 auto !important;
    }

    .header-mobile .header-mobile-content .header-content-inner .header-right,
    .header-mobile .header-mobile-content .header-content-inner .header-right .header-right {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: auto !important;
        flex: 1 1 auto !important;
        float: none !important;
        padding-top: 0 !important;
        gap: 14px;
    }

    .header-search-mobile,
    .header-search-mobile .control-search,
    .gva-user,
    .canvas-mobile {
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        flex: 0 0 auto !important;
    }

    .header-search-mobile {
        order: -1;
    }

    .header-search-mobile .control-search {
        font-size: 18px;
        line-height: 1;
    }
}