/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */
/* General Setting Changes */

* {
  font-family: var(--e-global-typography-text-font-family);
  /* padding: 0;
    margin: 0; */
}

a p {
  margin: 0;
}

/* Tipologia Cards on Home Page */

.tipologiaCardGallery {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

a:has(.tipologiaCard) {
  width: 20%;
  height: 250px;
  min-width: 300px;
}

.tipologiaCard {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0 18px 18px 18px;
  border-radius: 12px;
  box-shadow: 0px 4px 13px 0px rgba(0, 0, 0, 0.1);
  border: solid 1px transparent;
}

.tipologiaCard:hover {
  border: solid 1px var(--e-global-color-primary);
}

.tipologiaIllustration {
  height: 160px;
  width: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tipologiaCard .tipologiaTitle {
  color: var(--e-global-color-primary);
  font-size: 20px;
  font-weight: 700;
  padding-bottom: 12px;
}

.tipologiaDetailsWrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 12px;
}

.tipologiaDetails {
  margin: 0;
  display: flex;
  flex-direction: row;
}

.tipologiaDetailsText {
  margin: 0;
  color: var(--e-global-color-text);
  font: var(--e-global-typography-primary-font-family);
}

.tipologiaDetailsIcon {
  width: 16px;
  fill: var(--e-global-color-primary);
  outline: var(--e-global-color-primary);
  margin-right: 8px;
}

/* Tipologia Page details icons */

.tipologia_details .dce-acf-repeater {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tipologia_details .repeater-item {
  display: flex;
  /* flex-direction: column; */
  gap: 8px;
}

.tipologia_details .repeater-item::before {
  content: '';
  background: url('/wp-content/uploads/2024/08/check.svg');
  background-repeat: no-repeat !important;
  display: inline-block;
  height: 24px;
  width: 24px;
  background-size: 22px;
  margin: 0 8px 0 0;
}

/* Destination cards for Destination Pages */

.destinationCardGallery {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.destinationCard {
  width: 100%;
  height: 100%;
  min-width: 300px;
  height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0px 4px 13px 0px rgba(0, 0, 0, 0.1);
  border: solid 1px transparent;
}

.destinationCard:hover {
  border: solid 1px var(--e-global-color-accent);
}

h4.destinationText {
  color: var(--e-global-color-secondary);
}

/* Destination cards for Home */

.destinationCardGalleryHome {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  grid-column-gap: 0px;
  grid-row-gap: 0px;
}

.destinationCardGalleryHome > a:nth-child(1) {
  grid-area: 1 / 1 / 3 / 3;
}

.destinationCardGalleryHome > a:nth-child(1) {
  grid-area: 1 / 1 / 3 / 3;
}

.destinationCardGalleryHome > a:nth-child(2) {
  grid-area: 1 / 3 / 2 / 4;
}

.destinationCardGalleryHome > a:nth-child(3) {
  grid-area: 1 / 4 / 2 / 5;
}

.destinationCardGalleryHome > a:nth-child(4) {
  grid-area: 2 / 3 / 3 / 5;
}

.destinationCardGalleryHome > a:nth-child(5) {
  grid-area: 3 / 1 / 4 / 2;
}

.destinationCardGalleryHome > a:nth-child(6) {
  grid-area: 4 / 1 / 5 / 2;
}

.destinationCardGalleryHome > a:nth-child(7) {
  grid-area: 3 / 2 / 5 / 4;
}

.destinationCardGalleryHome > a:nth-child(8) {
  grid-area: 3 / 4 / 4 / 5;
}

.destinationCardGalleryHome > a:nth-child(9) {
  grid-area: 4 / 4 / 5 / 5;
}

.destinationCardHome {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  min-height: 200px;

  padding: 8px;
  box-shadow: 0px 4px 13px 0px rgba(0, 0, 0, 0.1);
  border: solid 1px var(--e-global-color-secondary);

  background: transparent;
  background-position: center center;
  background-size: cover;
}

/* small-size breakpoint for mobile */
@media screen and (max-width: 767px) {
  .destinationCardGalleryHome {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  /* Reset all grid areas for mobile */
  .destinationCardGalleryHome > a:nth-child(n) {
    grid-area: unset;
    width: 100%;
  }

  .destinationCardHome {
    min-height: 250px;
    /* Slightly taller on mobile for better visibility */
    margin: 0;
  }
}

/* Medium-size breakpoint for tablets */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .destinationCardGalleryHome {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
  }

  /* Reset all grid areas for tablet */
  .destinationCardGalleryHome > a:nth-child(n) {
    grid-area: unset;
  }

  .destinationCardHome {
    min-height: 225px;
  }
}

/* Base Search Filter Form Styles */

.elementor-widget-search-filter-form,
form.searchandfilter {
  min-width: 300px !important;
}

/* Base Form Reset */
form.searchandfilter ul {
  margin: 0;
  padding: 0;
}

/* Checkbox Styles */
form.searchandfilter li[data-sf-field-input-type='checkbox'] {
  input {
    accent-color: var(--e-global-color-primary);
  }

  label {
    padding-bottom: 4px;
  }
}

/* Section Headers */
form.searchandfilter h4 {
  background-color: var(--e-global-color-f6bfa4d);
  margin: 4px 0;
  padding: 8px;
  border-radius: 8px;
}

/* Custom Select Styling */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

/* Select Trigger Button */
.custom-select-trigger {
  width: 100%;
  min-width: 200px;
  padding: 8px 40px;
  border: 2px solid var(--e-global-color-primary);
  border-radius: 32px;
  color: var(--e-global-color-text);
  font-family: var(--e-global-typography-text-font-family);
  cursor: pointer;
  text-align: left;
  background-repeat: no-repeat;
  background-position: 6px 50%;
  background-size: 32px;

  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;

  &:hover,
  &:active,
  &:focus,
  &:focus-visible {
    background-color: var(--e-global-color-primary);
    color: var(--e-global-color-text);
  }
}

/* Dropdown Options Container */
.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--e-global-color-primary);
  border-radius: 8px;
  margin-top: 5px;
  max-height: 300px;
  min-width: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: var(--e-global-typography-text-font-family);

  &.active {
    display: block;
  }
}

/* Option Items */
.custom-option {
  padding: 8px 12px;
  cursor: pointer;
  font: 13px var(--e-global-typography-text-font-family);

  white-space: pre-wrap;

  &:hover {
    background-color: var(--e-global-color-primary);
  }

  &.sf-level-0 {
    font-weight: 600;
  }

  &.sf-level-1 {
    padding-left: 18px;
  }

  &.sf-level-2 {
    padding-left: 24px;
  }
}

/* Dropdown Select Styles */
form.searchandfilter {
  select,
  select:focus-visible,
  select:active,
  select:focus {
    border: solid 2px var(--e-global-color-primary);
    border-radius: 32px;
    -moz-appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-size: 32px;
    background-repeat: no-repeat;
    background-position: 7% 50%;
    outline: none;
    width: 100%;
    padding: 8px 8px 8px 48px;
  }

  /* Hide Original Selects */
  #search-filter-form-16145 select {
    display: none;
  }
}

/* Submit Button */
div.search-widget div form input[type='submit'] {
  color: var(--e-global-color-secondary);
  background-color: var(--e-global-color-primary);
  border: solid 2px var(--e-global-color-primary);
  border-radius: 32px;
  padding: 8px 12px;
}

/* Search Widget Layout */
div.search-widget div form,
div.search-widget div form ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  /* flex-wrap: wrap; */
  gap: 16px;
}

div.search-widget div form ul li label {
  max-width: 260px;
}

/* Mobile Layout */
@media screen and (max-width: 1024px) {
  div.search-widget div form,
  div.search-widget div form ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px;
    width: 100%;
    max-width: none;

    li {
      width: 100%;
      padding: 4px;

      label {
        width: 100%;
        max-width: none;
      }
    }

    input[type='submit'] {
      width: 100%;
    }
  }
}

.elementor-widget-container :has(div.search-widget div form) {
  z-index: 5;
}

/* Calendar Icon Specific Styling */
.sf-field-post-meta-mese_di_partenza .custom-select-trigger,
.sf-field-post-meta-mese_di_partenza .sf-input-select {
  background-image: url('/wp-content/uploads/2024/07/calendario.svg');
}

/* Icon styles for each category */
.sf-field-taxonomy-destinazione .custom-select-trigger {
  background-image: url('/wp-content/uploads/2024/07/earth.svg');
}

.sf-field-taxonomy-livello_surf .custom-select-trigger {
  background-image: url('/wp-content/uploads/2024/07/surf.svg');
}

.sf-field-taxonomy-tipologia .custom-select-trigger {
  background-image: url('/wp-content/uploads/2024/07/camper.svg');
}

/* Hide Children if not selected for destinations  */

form.searchandfilter li:has(.children) > label::after {
  background-image: url('/wp-content/uploads/2024/07/chevron-right-solid.svg');
  background-size: 10px;
  background-repeat: no-repeat;
  display: inline-block;
  width: 24px;
  height: 10px;
  content: ' ';
  margin-left: 4px;
}

form.searchandfilter li.sf-option-active:has(.children) > label::after {
  transform: rotate(90deg);
}

form.searchandfilter ul.children {
  display: none;
}

form.searchandfilter input:checked ~ ul.children {
  display: block;
}

/* Keep children visible if the parent li has sf-option-active class */
form.searchandfilter ul.children:has(.sf-option-active) {
  display: block;
}

/* Fold Search Filters on Mobile */

@media (max-width: 767px) {

    .elementor-widget-search-filter-form {
        width: 100%;
    }

    .searchandfilter h4 {
        position: relative;
        cursor: pointer;
    }

    /* Add arrow indicator */
    .searchandfilter h4:after {
        background-image: url('/wp-content/uploads/2024/07/chevron-right-solid.svg');
        background-size: 10px;
        background-repeat: no-repeat;
        display: inline-block;
        width: 10px;
        height: 10px;
        content: "";
        margin-left: 4px;
    }

    /* Rotate arrow when active */
    .searchandfilter h4.is-active:after {
        transform: rotate(90deg);
    }

    /* Hide all filter lists by default on mobile */
    .searchandfilter ul ul {
        display: none;
    }

    /* Show filter list when active */
    .searchandfilter ul ul.is-active {
        display: block;
    }

    /* ADDED: Show filter lists that have selected elements */
    .searchandfilter li:has(.sf-option-active) > ul,
    .searchandfilter li:has(input:checked) > ul {
        display: block !important;
    }

    /* ADDED: Rotate arrow for headers with selected elements */
    .searchandfilter li:has(.sf-option-active) > h4:after,
    .searchandfilter li:has(input:checked) > h4:after {
        transform: rotate(90deg);
    }
}

/* Services List icons */

.pack-service-list .dce-menu.dce-flex-menu.vertical ul.first-level {
  padding-left: 8px;
  /* Adjust as needed */
}

.pack-service-list .dce-menu.dce-flex-menu.vertical ul.first-level li {
  padding-left: 26px;
  /* Space for the marker (18px) + some extra space (10px) */
  position: relative;
  list-style-type: none;
}

.pack-service-list .dce-menu.dce-flex-menu.vertical ul.first-level li::before {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 18px;
  background-color: var(--e-global-color-accent);
  /* Fill color instead of border */
  mask-image: url('/wp-content/uploads/2024/08/check.svg');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: top;
  -webkit-mask-image: url('/wp-content/uploads/2024/08/check.svg');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: top;
}

/* Camera Cards in Sistemazione pages */

.cameraCard {
  display: flex;
  flex-direction: row;
  padding: 32px 0;
  min-height: 350px;
  gap: 24px;
}

.cameraCardRight,
.cameraCardLeft {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  width: 50%;
  gap: 12px;
}

@media screen and (max-width: 480px) {
  .cameraCard {
    flex-direction: column;
  }

  .cameraCardRight,
  .cameraCardLeft {
    width: 100%;
  }
}

.cameraHead {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
}

.cameraHead .cameraCategoriaIcon {
  height: 32px;
  width: 32px;
}

.cameraCard .cameraCategoria {
  /* background: var(--e-global-color-primary); 
    display: inline;
    border-radius: 32px;
    padding: 4px 8px; */
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 12px;
  margin: 0;
}

.cameraCard .cameraServizi {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-start;
}

.cameraCard .cameraServizi .cameraServiziIcon {
  padding: 2px;
}

.cameraCardRight:has(.flickr-album-slider) {
  max-height: 450px;
}

/* Instagram Feed to show on pacchetto pages */

.instagram-feed {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.instagram-item {
  width: 25%;
  border: solid 1px var(--e-global-color-secondary);
  box-sizing: border-box;
}

.instagram-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  /* border-radius: 32px; */
  display: block;
}

/* Media queries for responsive design */
@media (max-width: 992px) {
  .instagram-item {
    width: 33.33%;
  }
}

@media (max-width: 768px) {
  .instagram-item {
    width: 50%;
  }

  .instagram-item img {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .instagram-item {
    width: 50%;
  }

  .instagram-item img {
    height: 200px;
  }
}

/* Elementor specific styles */
.elementor-shortcode .catImage {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: wrap;
}

.elementor-shortcode .catImage p {
  display: flex;
  flex-direction: row;
  color: var(--e-global-color-text);
  margin: 0;
  padding: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
  .elementor-shortcode .catImage {
    gap: 4px;
  }
}

/* Display destinations shortcode */

.sorted_destinations,
.sorted_destinations_breadcrumbs {
  list-style: none;
  padding: 0;
  margin: 0;

  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.sorted_destinations li {
  /* color: var(--e-global-color-text); */
  color: var(--e-global-color-primary);
  font-weight: 600;
  font-family: var(--e-global-typography-text-font-family);
}

.sorted_destinations li:not(:last-child)::after {
  content: ', ';
}

.sorted_destinations_breadcrumbs li a {
  color: #15bb78;
}

.sorted_destinations_breadcrumbs li:not(:last-child)::after {
  content: ' > ';
  font-size: 12px;
  color: var(--e-global-color-text);
}

/* Phone Shortcode style */

.elementor-shortcode .phone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  width: 100%;
}

/* Hide search meanu item on big screens 
There is the button to replace it
Button is hidden in mobile */

li.menu-item.menu-item-type-post_type.menu-item-object-page:nth-child(4) {
  display: none;
}

@media screen and (max-width: 767px) {
  li.menu-item.menu-item-type-post_type.menu-item-object-page:nth-child(4) {
    display: unset;
  }
}
