{"id":18,"date":"2026-06-02T13:17:13","date_gmt":"2026-06-02T13:17:25","guid":{"rendered":"https:\/\/moroccogotrip.com\/?page_id=18"},"modified":"2026-06-03T17:59:13","modified_gmt":"2026-06-03T17:59:13","slug":"morocco-go-trip-6","status":"publish","type":"page","link":"https:\/\/moroccogotrip.com\/it\/","title":{"rendered":"Morocco Go Trip"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"18\" class=\"elementor elementor-18\">\n\t\t\t\t<div data-aos=\"fade-up\" class=\"hostinger-elementor-aos elementor-element elementor-element-738584d e-con-full e-flex e-con e-parent\" data-id=\"738584d\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7099466 elementor-widget__width-inherit elementor-widget elementor-widget-html\" data-id=\"7099466\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<style>\r\n  @import url('https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@400;500;600;700;800&display=swap');\r\n  \r\n  \/* Hero Section Isolation *\/\r\n  .morocco-hero-wrapper {\r\n    font-family: 'Inter', sans-serif;\r\n    box-sizing: border-box;\r\n    \/* Force full width overriding Elementor containers *\/\r\n    width: 100vw;\r\n    max-width: 100vw;\r\n    margin: 0;\r\n    margin-left: calc(-50vw + 50%);\r\n    padding: 0;\r\n  }\r\n  .morocco-hero-wrapper * {\r\n    box-sizing: inherit;\r\n  }\r\n\r\n  .morocco-hero {\r\n    position: relative;\r\n    width: 100%;\r\n    height: 380px;\r\n    background-image: url('http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/toubkal-trekking.jpg');\r\n    background-size: cover;\r\n    background-position: center;\r\n    background-repeat: no-repeat;\r\n    display: flex;\r\n    align-items: flex-end;\r\n  }\r\n  \r\n  @media (min-width: 768px) {\r\n    .morocco-hero {\r\n      height: 480px;\r\n      align-items: center;\r\n    }\r\n  }\r\n  \r\n  .morocco-hero-overlay {\r\n    position: absolute;\r\n    inset: 0;\r\n    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%);\r\n  }\r\n  \r\n  @media (min-width: 768px) {\r\n    .morocco-hero-overlay {\r\n      background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);\r\n    }\r\n  }\r\n  \r\n  .morocco-hero-content {\r\n    position: relative;\r\n    z-index: 10;\r\n    color: #ffffff;\r\n    width: 100%;\r\n    max-width: 90rem; \/* Wide container max *\/\r\n    margin: 0 auto;\r\n    padding: 2rem 1rem;\r\n  }\r\n  \r\n  @media (min-width: 640px) {\r\n    .morocco-hero-content { padding: 3rem 1.5rem; }\r\n  }\r\n  \r\n  @media (min-width: 1024px) {\r\n    .morocco-hero-content { padding: 4rem 2rem; }\r\n  }\r\n  \r\n  .morocco-hero-title {\r\n    font-size: 2.25rem;\r\n    font-weight: 800;\r\n    line-height: 1.1;\r\n    margin-bottom: 1rem;\r\n    max-width: 600px;\r\n    letter-spacing: -0.02em;\r\n    margin-top: 0;\r\n  }\r\n  \r\n  @media (min-width: 768px) {\r\n    .morocco-hero-title {\r\n      font-size: 3.5rem;\r\n    }\r\n  }\r\n  \r\n  .morocco-hero-description {\r\n    font-size: 1rem;\r\n    font-weight: 500;\r\n    line-height: 1.5;\r\n    max-width: 550px;\r\n    margin: 0;\r\n    opacity: 0.95;\r\n  }\r\n  \r\n  @media (min-width: 768px) {\r\n    .morocco-hero-description {\r\n       font-size: 1.125rem;\r\n    }\r\n  }\r\n<\/style>\r\n\r\n<div class=\"morocco-hero-wrapper\">\r\n  <div class=\"morocco-hero\">\r\n    <div class=\"morocco-hero-overlay\"><\/div>\r\n    <div class=\"morocco-hero-content\">\r\n      <h2 class=\"morocco-hero-title\">Morocco trip and Toubkal experiences<\/h2>\r\n      <p class=\"morocco-hero-description\">Curated by experts, this collection features the region's top-rated tours, iconic attractions, and unmissable things to do.<\/p>\r\n    <\/div>\r\n  <\/div>\r\n<\/div>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div data-aos=\"fade-up\" class=\"hostinger-elementor-aos elementor-element elementor-element-1ad9ddd e-con-full e-flex e-con e-parent\" data-id=\"1ad9ddd\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a506c9c elementor-widget__width-inherit elementor-widget elementor-widget-html\" data-id=\"a506c9c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<style>\r\n  @import url('https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@400;500;600;700&display=swap');\r\n\r\n  .morocco-filter-wrapper {\r\n    font-family: 'Inter', sans-serif;\r\n    width: 100%;\r\n    background-color: #ffffff;\r\n    box-sizing: border-box;\r\n    padding: 3rem 1rem 1rem 1rem;\r\n  }\r\n  .morocco-filter-wrapper * {\r\n    box-sizing: inherit;\r\n  }\r\n\r\n  .morocco-filter-container {\r\n    max-width: 80rem;\r\n    margin: 0 auto;\r\n  }\r\n\r\n  .morocco-filter-title {\r\n    font-size: 1.75rem;\r\n    font-weight: 700;\r\n    color: #111827;\r\n    margin-top: 0;\r\n    margin-bottom: 1.5rem;\r\n  }\r\n\r\n  .morocco-filter-carousel-wrapper {\r\n    position: relative;\r\n    display: flex;\r\n    align-items: center;\r\n    margin-bottom: 2rem;\r\n  }\r\n\r\n  .morocco-filter-scroll-btn {\r\n    position: absolute;\r\n    top: 50%;\r\n    transform: translateY(-50%);\r\n    width: 36px;\r\n    height: 36px;\r\n    border-radius: 50%;\r\n    background: #ffffff;\r\n    border: 1px solid #e5e7eb;\r\n    box-shadow: 0 2px 4px rgba(0,0,0,0.05);\r\n    display: flex;\r\n    align-items: center;\r\n    justify-content: center;\r\n    cursor: pointer;\r\n    z-index: 10;\r\n    color: #374151;\r\n    transition: all 0.2s;\r\n  }\r\n  .morocco-filter-scroll-btn:hover {\r\n    border-color: #d1d5db;\r\n    box-shadow: 0 4px 6px rgba(0,0,0,0.1);\r\n  }\r\n  .morocco-filter-scroll-btn.left {\r\n    left: -18px;\r\n  }\r\n  .morocco-filter-scroll-btn.right {\r\n    right: -18px;\r\n  }\r\n\r\n  .morocco-filter-track {\r\n    display: flex;\r\n    gap: 0.75rem;\r\n    overflow-x: auto;\r\n    scroll-behavior: smooth;\r\n    padding: 0.25rem 0;\r\n    -ms-overflow-style: none; \/* IE and Edge *\/\r\n    scrollbar-width: none; \/* Firefox *\/\r\n    width: 100%;\r\n  }\r\n  .morocco-filter-track::-webkit-scrollbar {\r\n    display: none;\r\n  }\r\n\r\n  .morocco-filter-pill {\r\n    display: flex;\r\n    align-items: center;\r\n    gap: 0.5rem;\r\n    padding: 0.6rem 1rem;\r\n    background: #ffffff;\r\n    border: 1px solid #d1d5db;\r\n    border-radius: 2rem;\r\n    font-size: 0.875rem;\r\n    font-weight: 500;\r\n    color: #374151;\r\n    cursor: pointer;\r\n    white-space: nowrap;\r\n    transition: all 0.2s;\r\n    user-select: none;\r\n    flex-shrink: 0;\r\n  }\r\n  .morocco-filter-pill svg {\r\n    width: 1.1rem;\r\n    height: 1.1rem;\r\n    color: #6b7280;\r\n  }\r\n  \r\n  .morocco-filter-pill:hover {\r\n    background: #f9fafb;\r\n    border-color: #9cb3af;\r\n  }\r\n\r\n  \/* Active State for Pill *\/\r\n  .morocco-filter-pill.is-active {\r\n    background: #f3f4f6;\r\n    border-color: #111827;\r\n    color: #111827;\r\n  }\r\n  .morocco-filter-pill.is-active svg {\r\n    color: #111827;\r\n  }\r\n  \r\n  .morocco-filter-img-icon {\r\n    width: 1.1rem;\r\n    height: 1.1rem;\r\n    object-fit: contain;\r\n    filter: invert(47%) sepia(8%) saturate(417%) hue-rotate(176deg) brightness(94%) contrast(88%);\r\n    transition: all 0.2s;\r\n  }\r\n  .morocco-filter-pill.is-active .morocco-filter-img-icon,\r\n  .morocco-filter-pill:hover .morocco-filter-img-icon {\r\n    filter: invert(5%) sepia(30%) saturate(1065%) hue-rotate(181deg) brightness(20%) contrast(100%);\r\n  }\r\n\r\n  \/* The close X icon inside pill *\/\r\n  .morocco-filter-close {\r\n    display: none;\r\n    width: 0.85rem !important;\r\n    height: 0.85rem !important;\r\n    margin-left: 0.25rem;\r\n    background: #e5e7eb;\r\n    border-radius: 50%;\r\n    padding: 2px;\r\n  }\r\n  .morocco-filter-pill.is-active .morocco-filter-close {\r\n    display: block;\r\n  }\r\n\r\n  .morocco-filter-meta {\r\n    display: flex;\r\n    justify-content: space-between;\r\n    align-items: center;\r\n    border-bottom: 1px solid #e5e7eb;\r\n    padding-bottom: 1rem;\r\n    margin-bottom: 2rem;\r\n  }\r\n\r\n  .morocco-results-count {\r\n    font-size: 0.95rem;\r\n    color: #6b7280;\r\n    font-weight: 500;\r\n  }\r\n\r\n  .morocco-sort-wrapper {\r\n    display: flex;\r\n    align-items: center;\r\n    gap: 0.5rem;\r\n    font-size: 0.95rem;\r\n    color: #111827;\r\n    font-weight: 600;\r\n    cursor: pointer;\r\n  }\r\n  .morocco-sort-wrapper svg {\r\n    width: 1rem;\r\n    height: 1rem;\r\n  }\r\n\r\n<\/style>\r\n\r\n<div class=\"morocco-filter-wrapper\">\r\n  <div class=\"morocco-filter-container\">\r\n    <h2 class=\"morocco-filter-title\">Top experiences<\/h2>\r\n    \r\n    <div class=\"morocco-filter-carousel-wrapper\">\r\n      <button class=\"morocco-filter-scroll-btn left\" id=\"morocco-scroll-left\">\r\n        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m15 18-6-6 6-6\"\/><\/svg>\r\n      <\/button>\r\n      \r\n      <div class=\"morocco-filter-track\" id=\"morocco-filter-track\">\r\n        \r\n        <button class=\"morocco-filter-pill\" data-cat=\"city\">\r\n          <img decoding=\"async\" src=\"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/location-pin.png\" alt=\"\" class=\"morocco-filter-img-icon\" \/>\r\n          <span>City Tours<\/span>\r\n          <svg class=\"morocco-filter-close\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"><\/line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"><\/line><\/svg>\r\n        <\/button>\r\n\r\n        <button class=\"morocco-filter-pill\" data-cat=\"agafay\">\r\n          <img decoding=\"async\" src=\"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/landscape.png\" alt=\"\" class=\"morocco-filter-img-icon\" \/>\r\n          <span>Agafay Desert<\/span>\r\n          <svg class=\"morocco-filter-close\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"><\/line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"><\/line><\/svg>\r\n        <\/button>\r\n\r\n        <button class=\"morocco-filter-pill\" data-cat=\"aerial\">\r\n          <img decoding=\"async\" src=\"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/hot-air-balloon.png\" alt=\"\" class=\"morocco-filter-img-icon\" \/>\r\n          <span>Hot Air Balloon<\/span>\r\n          <svg class=\"morocco-filter-close\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"><\/line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"><\/line><\/svg>\r\n        <\/button>\r\n\r\n        <button class=\"morocco-filter-pill\" data-cat=\"museums\">\r\n          <img decoding=\"async\" src=\"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/museum.png\" alt=\"\" class=\"morocco-filter-img-icon\" \/>\r\n          <span>Museums<\/span>\r\n          <svg class=\"morocco-filter-close\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"><\/line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"><\/line><\/svg>\r\n        <\/button>\r\n\r\n        <button class=\"morocco-filter-pill\" data-cat=\"quad\">\r\n          <img decoding=\"async\" src=\"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/quad.png\" alt=\"\" class=\"morocco-filter-img-icon\" \/>\r\n          <span>Quad Biking<\/span>\r\n          <svg class=\"morocco-filter-close\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"><\/line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"><\/line><\/svg>\r\n        <\/button>\r\n\r\n        <button class=\"morocco-filter-pill\" data-cat=\"mountain\">\r\n          <img decoding=\"async\" src=\"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/montagne.png\" alt=\"\" class=\"morocco-filter-img-icon\" \/>\r\n          <span>Mountain Excursions<\/span>\r\n          <svg class=\"morocco-filter-close\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"><\/line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"><\/line><\/svg>\r\n        <\/button>\r\n\r\n        <button class=\"morocco-filter-pill\" data-cat=\"merzouga\">\r\n          <img decoding=\"async\" src=\"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/camp.png\" alt=\"\" class=\"morocco-filter-img-icon\" \/>\r\n          <span>Merzouga Desert<\/span>\r\n          <svg class=\"morocco-filter-close\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"><\/line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"><\/line><\/svg>\r\n        <\/button>\r\n\r\n      <\/div>\r\n      \r\n      <button class=\"morocco-filter-scroll-btn right\" id=\"morocco-scroll-right\">\r\n        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m9 18 6-6-6-6\"\/><\/svg>\r\n      <\/button>\r\n    <\/div>\r\n\r\n    <!-- Results metadata -->\r\n    <div class=\"morocco-filter-meta\">\r\n      <div class=\"morocco-results-count\" id=\"morocco-results-count\">8 Top experiences<\/div>\r\n      \r\n      <div class=\"morocco-sort-wrapper\">\r\n        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"21\" x2=\"14\" y1=\"4\" y2=\"4\"\/><line x1=\"10\" x2=\"3\" y1=\"4\" y2=\"4\"\/><line x1=\"21\" x2=\"12\" y1=\"12\" y2=\"12\"\/><line x1=\"8\" x2=\"3\" y1=\"12\" y2=\"12\"\/><line x1=\"21\" x2=\"16\" y1=\"20\" y2=\"20\"\/><line x1=\"12\" x2=\"3\" y1=\"20\" y2=\"20\"\/><line x1=\"14\" x2=\"14\" y1=\"2\" y2=\"6\"\/><line x1=\"8\" x2=\"8\" y1=\"10\" y2=\"14\"\/><line x1=\"16\" x2=\"16\" y1=\"18\" y2=\"22\"\/><\/svg>\r\n        Sort by\r\n        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m6 9 6 6 6-6\"\/><\/svg>\r\n      <\/div>\r\n    <\/div>\r\n\r\n  <\/div>\r\n<\/div>\r\n\r\n<script>\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n  const track = document.getElementById('morocco-filter-track');\r\n  const btnLeft = document.getElementById('morocco-scroll-left');\r\n  const btnRight = document.getElementById('morocco-scroll-right');\r\n\r\n  \/\/ Horizontal Scroll\r\n  if(track && btnLeft && btnRight) {\r\n    btnLeft.addEventListener('click', () => track.scrollBy({ left: -250, behavior: 'smooth' }));\r\n    btnRight.addEventListener('click', () => track.scrollBy({ left: 250, behavior: 'smooth' }));\r\n  }\r\n\r\n  \/\/ Filter Selection Logic\r\n  const filterBtns = document.querySelectorAll('.morocco-filter-pill');\r\n  \r\n  filterBtns.forEach(btn => {\r\n    btn.addEventListener('click', function(e) {\r\n      \/\/ Toggle active class\r\n      this.classList.toggle('is-active');\r\n\r\n      \/\/ Get all currently active categories\r\n      const activeBtns = document.querySelectorAll('.morocco-filter-pill.is-active');\r\n      const activeCategories = Array.from(activeBtns).map(b => b.getAttribute('data-cat'));\r\n\r\n      \/\/ Dispatch custom event to notify the Trips Grid\r\n      window.dispatchEvent(new CustomEvent('updateMoroccoFilters', {\r\n        detail: { categories: activeCategories }\r\n      }));\r\n    });\r\n  });\r\n  \r\n  \/\/ Listen for count updates from the grid\r\n  window.addEventListener('updateMoroccoCount', function(e) {\r\n    const countEl = document.getElementById('morocco-results-count');\r\n    if(countEl && e.detail !== undefined) {\r\n      countEl.innerText = e.detail.count + \" Top experiences\";\r\n    }\r\n  });\r\n});\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div data-aos=\"fade-up\" class=\"hostinger-elementor-aos elementor-element elementor-element-085eb12 e-flex e-con-boxed e-con e-parent\" data-id=\"085eb12\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ac0e412 elementor-widget-tablet__width-initial elementor-widget elementor-widget-html\" data-id=\"ac0e412\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<style>\r\n  @import url('https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@400;500;600;700&display=swap');\r\n\r\n  .morocco-grid-wrapper {\r\n    font-family: 'Inter', sans-serif;\r\n    width: 100%;\r\n    background-color: #ffffff;\r\n    box-sizing: border-box;\r\n    padding: 0 1rem 4rem 1rem;\r\n  }\r\n  .morocco-grid-wrapper * {\r\n    box-sizing: inherit;\r\n  }\r\n\r\n  .morocco-grid-container {\r\n    max-width: 80rem;\r\n    margin: 0 auto;\r\n    display: grid;\r\n    grid-template-columns: 1fr;\r\n    gap: 1.5rem;\r\n  }\r\n\r\n  @media (min-width: 640px) {\r\n    .morocco-grid-container {\r\n      grid-template-columns: repeat(2, 1fr);\r\n    }\r\n  }\r\n\r\n  @media (min-width: 1024px) {\r\n    .morocco-grid-container {\r\n      grid-template-columns: repeat(4, 1fr);\r\n      gap: 1.5rem 1.25rem;\r\n    }\r\n  }\r\n\r\n  \/* Trip Card Style *\/\r\n  .morocco-trip-card {\r\n    display: flex;\r\n    flex-direction: column;\r\n    cursor: pointer;\r\n    transition: transform 0.2s;\r\n    height: 100%;\r\n  }\r\n  .morocco-trip-card:hover {\r\n    transform: translateY(-4px);\r\n  }\r\n\r\n  .morocco-card-image {\r\n    width: 100%;\r\n    aspect-ratio: 4 \/ 2.8;\r\n    border-radius: 0.75rem;\r\n    object-fit: cover;\r\n    margin-bottom: 0.75rem;\r\n  }\r\n\r\n  .morocco-card-rating {\r\n    display: flex;\r\n    align-items: center;\r\n    font-size: 0.8rem;\r\n    font-weight: 700;\r\n    color: #e11d48; \/* Pink star *\/\r\n    margin-bottom: 0.25rem;\r\n  }\r\n  .morocco-card-rating svg {\r\n    width: 0.9rem;\r\n    height: 0.9rem;\r\n    margin-right: 0.25rem;\r\n    fill: currentColor;\r\n  }\r\n  .morocco-card-rating-count {\r\n    color: #e11d48;\r\n    margin-left: 0.2rem;\r\n  }\r\n\r\n  .morocco-card-title {\r\n    font-size: 1rem;\r\n    font-weight: 700;\r\n    color: #111827;\r\n    line-height: 1.3;\r\n    margin: 0 0 0.5rem 0;\r\n    display: -webkit-box;\r\n    -webkit-line-clamp: 2;\r\n    -webkit-box-orient: vertical;\r\n    overflow: hidden;\r\n  }\r\n\r\n  .morocco-card-features {\r\n    display: flex;\r\n    flex-direction: column;\r\n    gap: 0.35rem;\r\n    margin-bottom: 1rem;\r\n    flex-grow: 1;\r\n  }\r\n  .morocco-feature {\r\n    display: flex;\r\n    align-items: center;\r\n    font-size: 0.85rem;\r\n    color: #4b5563;\r\n  }\r\n  .morocco-feature svg {\r\n    width: 1rem;\r\n    height: 1rem;\r\n    margin-right: 0.35rem;\r\n    color: #6b7280;\r\n  }\r\n  .morocco-feature.green svg {\r\n    color: #16a34a;\r\n  }\r\n\r\n  .morocco-card-pricing {\r\n    display: flex;\r\n    flex-direction: column;\r\n    margin-top: auto;\r\n  }\r\n\r\n  .morocco-price-from {\r\n    font-size: 0.75rem;\r\n    color: #6b7280;\r\n    margin-bottom: 0.15rem;\r\n  }\r\n  .morocco-price-strikethrough {\r\n    text-decoration: line-through;\r\n    margin-left: 0.25rem;\r\n  }\r\n\r\n  .morocco-price-row {\r\n    display: flex;\r\n    align-items: center;\r\n    gap: 0.5rem;\r\n  }\r\n  .morocco-price-current {\r\n    font-size: 1.1rem;\r\n    font-weight: 700;\r\n    color: #111827;\r\n  }\r\n  .morocco-price-badge {\r\n    background-color: #16a34a;\r\n    color: #ffffff;\r\n    font-size: 0.7rem;\r\n    font-weight: 700;\r\n    padding: 0.15rem 0.35rem;\r\n    border-radius: 0.25rem;\r\n  }\r\n\r\n  \/* When no results match *\/\r\n  .morocco-no-results {\r\n    grid-column: 1 \/ -1;\r\n    text-align: center;\r\n    padding: 4rem 1rem;\r\n    font-size: 1.1rem;\r\n    color: #6b7280;\r\n    font-weight: 500;\r\n    display: none;\r\n  }\r\n\r\n  \/* Show More Button *\/\r\n  .morocco-show-more-container {\r\n    text-align: center;\r\n    margin-top: 2.5rem;\r\n    display: none; \/* controlled by JS *\/\r\n  }\r\n  .morocco-show-more-btn {\r\n    background-color: #ffffff;\r\n    border: 1px solid #111827;\r\n    color: #111827;\r\n    font-size: 1rem;\r\n    font-weight: 600;\r\n    padding: 0.75rem 2rem;\r\n    border-radius: 0.5rem;\r\n    cursor: pointer;\r\n    transition: all 0.2s;\r\n  }\r\n  .morocco-show-more-btn:hover {\r\n    background-color: #f3f4f6;\r\n  }\r\n<\/style>\r\n\r\n<div class=\"morocco-grid-wrapper\">\r\n  <div class=\"morocco-grid-container\" id=\"morocco-grid-container\">\r\n    \r\n    <!-- No Results Message -->\r\n    <div class=\"morocco-no-results\" id=\"morocco-no-results\">\r\n      No experiences match the selected filters.\r\n    <\/div>\r\n\r\n  <\/div>\r\n  \r\n  <div class=\"morocco-show-more-container\" id=\"morocco-show-more-container\">\r\n    <button class=\"morocco-show-more-btn\" id=\"morocco-show-more-btn\">Show more<\/button>\r\n  <\/div>\r\n<\/div>\r\n\r\n<script>\r\ndocument.addEventListener('DOMContentLoaded', async function() {\r\n  const container = document.getElementById('morocco-grid-container');\r\n  const noResultsEl = document.getElementById('morocco-no-results');\r\n  \r\n  \/\/ Default trips data fallback in case trips.json fails to load or hasn't been created yet\r\n  let tripDataCache = [\r\n    {\r\n      \"id\": \"1\",\r\n      \"categories\": \"city\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/15-days-complete-morocco-grand-tour-from-marrakech-to-north-south-regions\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/CITY-MOROCCO-TOURS.jpg\",\r\n      \"rating\": 5.0,\r\n      \"reviews\": 128,\r\n      \"title\": \"15 Days Complete Morocco Grand Tour from Marrakech to North & South Regions\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"15 days\",\r\n      \"price_strikethrough\": \"\",\r\n      \"price_current\": \"Select Dates\",\r\n      \"discount\": \"\"\r\n    },\r\n    {\r\n      \"id\": \"2\",\r\n      \"categories\": \"city,merzouga\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/5-days-morocco-highlights-tour-from-marrakech-to-desert-imperial-cities\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/lidzoobvzt0.jpg\",\r\n      \"rating\": 4.9,\r\n      \"reviews\": 210,\r\n      \"title\": \"5 Days Morocco Highlights Tour from Marrakech to Desert & Imperial Cities\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"5 days\",\r\n      \"price_strikethrough\": \"\u20ac450.00\",\r\n      \"price_current\": \"\u20ac395.00\",\r\n      \"discount\": \"12% off\"\r\n    },\r\n    {\r\n      \"id\": \"3\",\r\n      \"categories\": \"city,merzouga\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/7-days-sahara-desert-imperial-cities-experience-from-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/DESERT-TOUR-MOROCCO.jpg\",\r\n      \"rating\": 4.8,\r\n      \"reviews\": 340,\r\n      \"title\": \"7 Days Sahara Desert & Imperial Cities Experience from Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"7 days\",\r\n      \"price_strikethrough\": \"\",\r\n      \"price_current\": \"Available\",\r\n      \"discount\": \"\"\r\n    },\r\n    {\r\n      \"id\": \"4\",\r\n      \"categories\": \"city,merzouga\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/8-days-grand-morocco-tour-marrakech-sahara-desert-atlantic-coast\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/COAST-MOROCCO-TOURS.jpg\",\r\n      \"rating\": 5.0,\r\n      \"reviews\": 85,\r\n      \"title\": \"8 Days Grand Morocco Tour: Marrakech, Sahara Desert & Atlantic Coast\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"8 days\",\r\n      \"price_strikethrough\": \"\u20ac780.00\",\r\n      \"price_current\": \"\u20ac695.00\",\r\n      \"discount\": \"10% off\"\r\n    },\r\n    {\r\n      \"id\": \"5\",\r\n      \"categories\": \"city,mountain,merzouga\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/10-days-morocco-discovery-tour-cities-atlas-mountains-sahara-desert\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/morocco-go-trip-destination.jpg\",\r\n      \"rating\": 4.9,\r\n      \"reviews\": 115,\r\n      \"title\": \"10 Days Morocco Discovery Tour: Cities, Atlas Mountains & Sahara Desert\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"10 days\",\r\n      \"price_strikethrough\": \"\",\r\n      \"price_current\": \"See Prices\",\r\n      \"discount\": \"\"\r\n    },\r\n    {\r\n      \"id\": \"6\",\r\n      \"categories\": \"agafay\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/agafay-desert-sunset-experience-from-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/Morocco-go-trip-3.jpg\",\r\n      \"rating\": 4.7,\r\n      \"reviews\": 512,\r\n      \"title\": \"Agafay Desert Sunset Experience from Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"5 hrs\",\r\n      \"price_strikethrough\": \"\u20ac65.00\",\r\n      \"price_current\": \"\u20ac48.50\",\r\n      \"discount\": \"25% off\"\r\n    },\r\n    {\r\n      \"id\": \"7\",\r\n      \"categories\": \"museums,city\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/majorelle-garden-ysl-museum-cultural-experience-in-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/Morocco-go-trip-Marrakech-3.jpg\",\r\n      \"rating\": 4.6,\r\n      \"reviews\": 943,\r\n      \"title\": \"Majorelle Garden & YSL Museum Cultural Experience in Marrakech\",\r\n      \"cancellation\": false,\r\n      \"duration\": \"Explore at your pace\",\r\n      \"price_strikethrough\": \"\",\r\n      \"price_current\": \"\u20ac25.50\",\r\n      \"discount\": \"\"\r\n    },\r\n    {\r\n      \"id\": \"8\",\r\n      \"categories\": \"mountain\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/atlas-mountains-day-trip-berber-villages-experience-from-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/MOUNTAIN-VILLAGE-IMLIL.jpg\",\r\n      \"rating\": 4.8,\r\n      \"reviews\": 602,\r\n      \"title\": \"Atlas Mountains Day Trip & Berber Villages Experience from Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"8 hrs\",\r\n      \"price_strikethrough\": \"\u20ac45.00\",\r\n      \"price_current\": \"\u20ac32.00\",\r\n      \"discount\": \"28% off\"\r\n    },\r\n    {\r\n      \"id\": \"9\",\r\n      \"categories\": \"quad\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/palm-grove-camel-ride-quad-biking-adventure-experience-in-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/Morocco-go-trip-Marrakech-quad.jpg\",\r\n      \"rating\": 4.7,\r\n      \"reviews\": 830,\r\n      \"title\": \"Palm Grove Camel Ride & Quad Biking Adventure Experience in Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"4 hrs\",\r\n      \"price_strikethrough\": \"\u20ac55.00\",\r\n      \"price_current\": \"\u20ac45.00\",\r\n      \"discount\": \"18% off\"\r\n    },\r\n    {\r\n      \"id\": \"10\",\r\n      \"categories\": \"city\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/medina-souks-historic-marrakech-guided-walking-experience\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/SOUK-MEDINA-MARRAKECH-MOROCCO.jpg\",\r\n      \"rating\": 4.9,\r\n      \"reviews\": 420,\r\n      \"title\": \"Medina Souks & Historic Marrakech Guided Walking Experience\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"3 hrs\",\r\n      \"price_strikethrough\": \"\",\r\n      \"price_current\": \"\u20ac35.00\",\r\n      \"discount\": \"\"\r\n    },\r\n    {\r\n      \"id\": \"11\",\r\n      \"categories\": \"mountain\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/2-days-toubkal-trekking-experience-from-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/TOUBKAL-FROM-MARRAKECH.jpg\",\r\n      \"rating\": 4.9,\r\n      \"reviews\": 118,\r\n      \"title\": \"2 Days Toubkal Trekking Experience from Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"2 days\",\r\n      \"price_strikethrough\": \"\u20ac120.00\",\r\n      \"price_current\": \"\u20ac95.00\",\r\n      \"discount\": \"20% off\"\r\n    },\r\n    {\r\n      \"id\": \"12\",\r\n      \"categories\": \"mountain\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/imlil-valley-day-hiking-experience-from-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/IMLIL-VALLEY.jpg\",\r\n      \"rating\": 4.8,\r\n      \"reviews\": 235,\r\n      \"title\": \"Imlil Valley Day Hiking Experience from Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"8 hrs\",\r\n      \"price_strikethrough\": \"\",\r\n      \"price_current\": \"\u20ac45.00\",\r\n      \"discount\": \"\"\r\n    },\r\n    {\r\n      \"id\": \"13\",\r\n      \"categories\": \"mountain\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/tachedirt-high-atlas-villages-trek-experience-from-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/9bwimx-rq9a.jpg\",\r\n      \"rating\": 5.0,\r\n      \"reviews\": 92,\r\n      \"title\": \"Tachedirt & High Atlas Villages Trek Experience from Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"1 day\",\r\n      \"price_strikethrough\": \"\u20ac70.00\",\r\n      \"price_current\": \"\u20ac55.00\",\r\n      \"discount\": \"21% off\"\r\n    },\r\n    {\r\n      \"id\": \"14\",\r\n      \"categories\": \"mountain,city\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/rose-valley-dades-gorges-scenic-tour-from-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/Dades-Gorges-ROSE-VALLEY.jpg\",\r\n      \"rating\": 4.7,\r\n      \"reviews\": 184,\r\n      \"title\": \"Rose Valley & Dades Gorges Scenic Tour from Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"1 day\",\r\n      \"price_strikethrough\": \"\",\r\n      \"price_current\": \"\u20ac65.00\",\r\n      \"discount\": \"\"\r\n    },\r\n    {\r\n      \"id\": \"15\",\r\n      \"categories\": \"mountain\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/atlas-mountains-full-day-hiking-experience-from-marrakech\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/ATLAS-MOUNTAIN-FULL-DAY-FROM-MARRAKECH-MOROCCO-GO-TRIP.jpg\",\r\n      \"rating\": 4.8,\r\n      \"reviews\": 215,\r\n      \"title\": \"Atlas Mountains Full Day Hiking Experience from Marrakech\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"8 hrs\",\r\n      \"price_strikethrough\": \"\u20ac50.00\",\r\n      \"price_current\": \"\u20ac35.00\",\r\n      \"discount\": \"30% off\"\r\n    },\r\n    {\r\n      \"id\": \"16\",\r\n      \"categories\": \"merzouga,city\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/3-days-fes-to-merzouga-desert-tour\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/DESERT-MOROCCO-MERZOUGA.jpg\",\r\n      \"rating\": 4.9,\r\n      \"reviews\": 320,\r\n      \"title\": \"3 Days Fes to Merzouga Desert Tour\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"3 days\",\r\n      \"price_strikethrough\": \"\u20ac220.00\",\r\n      \"price_current\": \"\u20ac185.00\",\r\n      \"discount\": \"15% off\"\r\n    },\r\n    {\r\n      \"id\": \"17\",\r\n      \"categories\": \"merzouga,mountain\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/4-day-marrakech-desert-tour-via-dades-valley-merzouga\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/zztgn1z2ng.jpg\",\r\n      \"rating\": 4.8,\r\n      \"reviews\": 415,\r\n      \"title\": \"4-Day Marrakech Desert Tour via Dades Valley & Merzouga\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"4 days\",\r\n      \"price_strikethrough\": \"\",\r\n      \"price_current\": \"\u20ac250.00\",\r\n      \"discount\": \"\"\r\n    },\r\n    {\r\n      \"id\": \"18\",\r\n      \"categories\": \"merzouga\",\r\n      \"url\": \"https:\/\/moroccogotrip.com\/private-luxury-desert-camp-experience\/\",\r\n      \"image\": \"http:\/\/moroccogotrip.com\/wp-content\/uploads\/2026\/06\/Morocco-go-trip-5.jpg\",\r\n      \"rating\": 5.0,\r\n      \"reviews\": 270,\r\n      \"title\": \"Private Luxury Desert Camp Experience\",\r\n      \"cancellation\": true,\r\n      \"duration\": \"1 night\",\r\n      \"price_strikethrough\": \"\u20ac180.00\",\r\n      \"price_current\": \"\u20ac145.00\",\r\n      \"discount\": \"19% off\"\r\n    }\r\n  ];\r\n\r\n  \/\/ Reusable SVGs\r\n  const starIcon = `<svg viewBox=\"0 0 24 24\"><path d=\"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z\"\/><\/svg>`;\r\n  const checkIcon = `<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z\"\/><path d=\"m9 12 2 2 4-4\"\/><\/svg>`;\r\n  const clockIcon = `<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"\/><polyline points=\"12 6 12 12 16 14\"\/><\/svg>`;\r\n\r\n  \/\/ Function to create HTML for a single card dynamically\r\n  function createCardHTML(trip) {\r\n    let featuresHTML = '';\r\n    \r\n    if (trip.cancellation) {\r\n        featuresHTML += `<div class=\"morocco-feature green\">${checkIcon} Free cancellation<\/div>`;\r\n    }\r\n    \r\n    if (trip.duration) {\r\n       featuresHTML += `<div class=\"morocco-feature\">${clockIcon} ${trip.duration}<\/div>`;\r\n    }\r\n\r\n    let priceFromHTML = 'from';\r\n    if (trip.price_strikethrough) {\r\n      priceFromHTML += ` <span class=\"morocco-price-strikethrough\">${trip.price_strikethrough}<\/span>`;\r\n    } else {\r\n      priceFromHTML = '<div style=\"visibility:hidden\">from<\/div>';\r\n    }\r\n\r\n    let badgeHTML = '';\r\n    if (trip.discount) {\r\n      badgeHTML = `<span class=\"morocco-price-badge\">${trip.discount}<\/span>`;\r\n    }\r\n\r\n    return `\r\n      <a href=\"${trip.url}\" class=\"morocco-trip-card\" data-cats=\"${trip.categories}\" style=\"text-decoration:none;\">\r\n        <img decoding=\"async\" src=\"${trip.image}\" alt=\"${trip.title}\" class=\"morocco-card-image\">\r\n        <div class=\"morocco-card-rating\">\r\n          ${starIcon}\r\n          ${trip.rating} <span class=\"morocco-card-rating-count\">(${trip.reviews})<\/span>\r\n        <\/div>\r\n        <h3 class=\"morocco-card-title\">${trip.title}<\/h3>\r\n        <div class=\"morocco-card-features\">\r\n          ${featuresHTML}\r\n        <\/div>\r\n        <div class=\"morocco-card-pricing\">\r\n          <div class=\"morocco-price-from\">${priceFromHTML}<\/div>\r\n          <div class=\"morocco-price-row\">\r\n            <span class=\"morocco-price-current\">${trip.price_current}<\/span>\r\n            ${badgeHTML}\r\n          <\/div>\r\n        <\/div>\r\n      <\/a>\r\n    `;\r\n  }\r\n\r\n  \/\/ Load JSON from server\r\n  try {\r\n    const response = await fetch('\/trips.json');\r\n    if (response.ok) {\r\n        const fetchedData = await response.json();\r\n        if (Array.isArray(fetchedData) && fetchedData.length > 0) {\r\n            tripDataCache = fetchedData;\r\n        }\r\n    }\r\n  } catch(e) {\r\n    console.error(\"Could not fetch trips.json, using fallback default trips\", e);\r\n  }\r\n\r\n  const renderedCardsHtml = tripDataCache.map(trip => createCardHTML(trip)).join('');\r\n  \r\n  \/\/ Append generated cards right after the no-results message\r\n  noResultsEl.insertAdjacentHTML('afterend', renderedCardsHtml);\r\n\r\n  \/\/ Re-select cards after injecting\r\n  const cards = Array.from(document.querySelectorAll('.morocco-trip-card'));\r\n\r\n  const showMoreContainer = document.getElementById('morocco-show-more-container');\r\n  const showMoreBtn = document.getElementById('morocco-show-more-btn');\r\n  \r\n  let showAll = false;\r\n  let currentActiveCategories = [];\r\n\r\n  \/\/ Calculate and broadcast initial count\r\n  function triggerCountUpdate(count) {\r\n    window.dispatchEvent(new CustomEvent('updateMoroccoCount', { detail: { count: count } }));\r\n  }\r\n\r\n  function updateDisplay() {\r\n    let matchingCards = [];\r\n    \r\n    cards.forEach(card => {\r\n        const cardCatsStr = card.getAttribute('data-cats') || '';\r\n        const cardCats = cardCatsStr.split(',').map(c => c.trim());\r\n        \r\n        let isMatch = false;\r\n        if (currentActiveCategories.length === 0) {\r\n            isMatch = true;\r\n        } else {\r\n            isMatch = currentActiveCategories.some(activeCat => cardCats.includes(activeCat));\r\n        }\r\n        \r\n        if (isMatch) {\r\n            matchingCards.push(card);\r\n        } else {\r\n            card.style.display = 'none';\r\n        }\r\n    });\r\n\r\n    if (matchingCards.length === 0) {\r\n        noResultsEl.style.display = 'block';\r\n        showMoreContainer.style.display = 'none';\r\n    } else {\r\n        noResultsEl.style.display = 'none';\r\n        \r\n        let displayCount = showAll ? matchingCards.length : Math.min(8, matchingCards.length);\r\n        \r\n        for (let i = 0; i < matchingCards.length; i++) {\r\n            if (i < displayCount) {\r\n                matchingCards[i].style.display = 'flex';\r\n            } else {\r\n                matchingCards[i].style.display = 'none';\r\n            }\r\n        }\r\n        \r\n        if (matchingCards.length > 8 && !showAll) {\r\n            showMoreContainer.style.display = 'block';\r\n        } else {\r\n            showMoreContainer.style.display = 'none';\r\n        }\r\n    }\r\n    \r\n    triggerCountUpdate(matchingCards.length);\r\n  }\r\n\r\n  showMoreBtn.addEventListener('click', () => {\r\n      showAll = true;\r\n      updateDisplay();\r\n  });\r\n\r\n  setTimeout(() => updateDisplay(), 100);\r\n\r\n  \/\/ Listen for filter selections from the external Filter widget\r\n  window.addEventListener('updateMoroccoFilters', function(e) {\r\n    currentActiveCategories = e.detail.categories || [];\r\n    showAll = false; \/\/ Reset to 8 items visible when filter changes\r\n    updateDisplay();\r\n  });\r\n});\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Morocco trip and Toubkal experiences Curated by experts, this collection features the region&#8217;s top-rated tours, iconic attractions, and unmissable things to do. Top experiences City Tours Agafay Desert Hot Air Balloon Museums Quad Biking Mountain Excursions Merzouga Desert 8 Top experiences Sort by No experiences match the selected filters. Show more<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-18","page","type-page","status-publish","hentry"],"acf":[],"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"_links":{"self":[{"href":"https:\/\/moroccogotrip.com\/it\/wp-json\/wp\/v2\/pages\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/moroccogotrip.com\/it\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/moroccogotrip.com\/it\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/moroccogotrip.com\/it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/moroccogotrip.com\/it\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":50,"href":"https:\/\/moroccogotrip.com\/it\/wp-json\/wp\/v2\/pages\/18\/revisions"}],"predecessor-version":[{"id":273,"href":"https:\/\/moroccogotrip.com\/it\/wp-json\/wp\/v2\/pages\/18\/revisions\/273"}],"wp:attachment":[{"href":"https:\/\/moroccogotrip.com\/it\/wp-json\/wp\/v2\/media?parent=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}