/* Temporary for development stage, recommend to copy these CSS code to frontend.css when production */
section[data-module="happening"] {}

/* Container height limit */
section[data-module="happening"] .box.item-grid {
    position: relative;
}

/* Overlay Gradient */
section[data-module="happening"] .overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px; /* Height of the gradient */
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    pointer-events: none; /* Prevent interaction */
    z-index: 2;
    transition: opacity 0.3s ease-in-out;
}

/* Hide overlay when content is fully expanded */
section[data-module="happening"] .box.item-grid.expanded + .overlay-bottom {
    opacity: 0;
    pointer-events: none; /* Ensure it's not interactive when hidden */
}


    /* Expanded container */
section[data-module="happening"] .box.item-grid.expanded {
        max-height: none; /* Show all items */
    }

    .box.item-grid.expanded + .overlay-bottom {
        display: none; /* Hide the overlay when expanded */
    }


 /* Toggle Container */
section[data-module="happening"] .toggle-container {
	position: relative;
	width: 180px;
	height: auto;
	border-radius: 10px;
	background-color: #c7a600;
	display: flex;
	align-items: center;
	cursor: pointer;
	overflow: hidden;
	margin-right: 20px;
}

    /* Toggle Slider */
section[data-module="happening"] .toggle-slider {
	position: absolute;
	width: 80px;
	height: 60px;
	background-color: #047857;
	border-radius: 10px;
	transition: all 0.3s ease;
	left: 5px;
}

section[data-module="happening"] h5 {
  padding-right: 20px;
  color: #000;
}

    /* Labels */
section[data-module="happening"] .toggle-label {
	flex: 1;
	text-align: center;
	z-index: 1;
	color: #fff;
	font-size: 20px;
}
section[data-module="happening"] .active .toggle-slider {
	left: 90px;
	background-color: #047857;
}

section[data-module="happening"] .toggle-container .active .label-now {
      color: black; /* Change "Now" text color */
    }

section[data-module="happening"] .toggle-container .active .label-soon {
      color: white; /* Highlight "Soon" text */
    }

section[data-module="happening"] .label-now {
      color: white;
    }


 /* Remove the default Bootstrap dropdown arrow */
section[data-module="happening"] .dropdown-toggle::after {
      content: ""; /* Remove default arrow */
      display: inline-block;
      margin-left: 0.5rem;
      vertical-align: middle;
      border-top: 0.4em solid; /* Custom arrow style */
      border-right: 0.4em solid transparent;
      border-left: 0.4em solid transparent;
    }

    /* Custom arrow when dropdown is expanded */
section[data-module="happening"] .dropdown-toggle[aria-expanded="true"]::after {
      border-top: none;
      border-bottom: 0.4em solid; /* Arrow pointing up */
    }

section[data-module="happening"] .btn-secondary {
	color: #fff;
	background-color: #f6671b;
	border-color: transparent;
	font-size: 20px;
	padding: 20px 30px;
	border-radius: 10px;
	transition:0.3s;
}

section[data-module="happening"] .btn-secondary:hover {
	color: #fff;
	background-color: #000;
	transition:0.3s;
}


section[data-module="happening"] .btn-secondary:not(:disabled):not(.disabled).active:focus, section[data-module="happening"] .btn-secondary:not(:disabled):not(.disabled):active:focus, section[data-module="happening"] .show > .btn-secondary.dropdown-toggle:focus {
	box-shadow: none;
}


/* Default Box Layout */
section[data-module="happening"] .box {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 3 columns */
  grid-auto-rows: 350px; /* Increased height for smaller boxes */
  gap: 10px;
  transition: transform 0.3s ease;
  position:relative;
	margin-top:40px;	
}

/* Box Item Styles */
section[data-module="happening"] .box-item {
  position: relative;
  background-position: center;
  background-size: cover;
  border-radius: 20px;
	z-index:1;
}

/* Smaller Box Items - Explicitly define height */
section[data-module="happening"] .box-item:not(.boxbig) {
  grid-row: span 1; /* Make sure it spans only 1 row */
  height: auto; /* Allow the height to adjust dynamically */
  background-size: cover;
  border-radius: 20px;
}

/* Large Box - No height adjustment */
section[data-module="happening"] .boxbig {
  grid-column: span 2; /* Spans 2 columns */
  grid-row: span 2; /* Spans 2 rows */
}

section[data-module="happening"] .box-item:hover {
	transform: scale(1.02);
	transition:0.3s;
	-webkit-box-shadow: 1px 1px 14px 0px rgba(0,0,0,0.45);
	-moz-box-shadow: 1px 1px 14px 0px rgba(0,0,0,0.45);
	box-shadow: 1px 1px 14px 0px rgba(0,0,0,0.45);
	z-index:2;
}


section[data-module="happening"] .label {
	background-color: #f57e2a;
	position: absolute;
	right: 0;
	padding: 10px 20px;
	border-radius: 0px 20px;
	color: #fff;
	font-weight: bold;
	transition:0.3s;
}

section[data-module="happening"] .box-item:hover .label{
	background-color: #000;
}

section[data-module="happening"] .content {
	position: absolute;
	bottom: 20px;
	left: 20px;
	width: 100%;
}

section[data-module="happening"] a {
	height: 100%;
	width: 100%;
	display: inline-flex;
	background: rgb(255,255,255);
	background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255,255,255,0) 60%);
	color: #000;
	border-radius:20px;
}
section[data-module="happening"] .overlay-bottom {
  background: rgb(255,255,255);
  background: linear-gradient(0deg, rgb(255, 255, 255) 40%, rgba(255,255,255,0) 100%);
  position: absolute;
  width: 100%;
  height: 300px;
  bottom: 0;
  left: 0;
  z-index: 1;
}

section[data-module="happening"] .more-activities-button {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	font-family: Arial, sans-serif;
	color: #f57e2a;
	font-size: 18px;
	font-weight: bold;
	text-align: center;
	transition: transform 0.3s ease;
	width: 200px;
	margin: auto;
	z-index: 2;
  	position: relative;
	top: 20px;
}

section[data-module="happening"] .more-activities-button:hover {
  transform: scale(1.1);
}

section[data-module="happening"] .chevron {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 8px;
	rotate: 90deg;
}
section[data-module="happening"] .chevron2 {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 10px;
	rotate: 90deg;
}

section[data-module="happening"] .chevron-line {
  position: absolute;
  width: 14px;
  height: 2px;
  background-color: #f57e2a; /* Orange color */
  transition: all 0.3s ease;
}

section[data-module="happening"] .chevron-line:first-child {
  transform: translateY(-5px) rotate(45deg);
}

section[data-module="happening"] .chevron-line:last-child {
  transform: translateY(5px) rotate(-45deg);
}



/* =======================================
The juicy stuff
======================================= */
section[data-module="happening"] .filter-section {
  padding: 30px 60px;
  transition: 1.3s;
}

section[data-module="happening"] .controls ul {
  text-align: center;
}

section[data-module="happening"] .controls ul li {
  color: #f1f1f1;
  opacity: .7;
  background: transparent;
  display: inline;
  padding: 12px 16px;
  margin: 0 5px;
  cursor: pointer;
  -webkit-transition: 0.2s;
  -moz-transition: 0.2s;
  -o-transition: 0.2s;
  transition: 0.2s;
  -webkit-tap-highlight-color: transparent;
}

section[data-module="happening"] .controls ul li:hover,
.controls ul li.active {
  text-decoration: underline solid white 2px;
  text-underline-offset: 0.5rem;
  opacity: 1;
}

section[data-module="happening"] .clearfix:after {
  display: table;
  content: " ";
  clear: both;
}



section[data-module="happening"] .item-grid .item {
  display: none;
  overflow: hidden;
}


section[data-module="happening"] .dropdown-menu {
	width: 100%;
}

.dropdown-item.active, .dropdown-item:active {
	background-color: #f57e2a;
}

.dropdown-item {
	padding: 10px;
}


/* Media Queries */
@media (max-width: 768px) {
  section[data-module="happening"] .item-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media only screen and (min-width: 768.1px) and (max-width: 991px) {
  section[data-module="happening"] .item-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}





/* Typical laptop screen size*/
@media (max-width: 1400px) {
	
}

/* Portrait tablet to landscape and desktop */
@media (min-width: 768px) and (max-width: 980px) {
	
	section[data-module="happening"] .box {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    grid-auto-rows: 180px; /* Adjust height for smaller screens */
  }
  section[data-module="happening"] .boxbig {
    grid-column: span 2; /* Always span 2 columns */
    grid-row: span 1; /* Adjust to span 1 row for consistency */
  }
	
}

/* Mobile screen size - landscape view */
@media (max-width: 767px) {
   
}

/* Mobile screen size */
@media (max-width: 480px) {
	
	section[data-module="happening"] .box {
    grid-template-columns: 1fr; /* Single column */
    grid-auto-rows: 150px; /* Adjust height */
  }
  section[data-module="happening"] .box-item {
    grid-column: span 1; /* Single column layout */
    grid-row: span 2;
  }
  section[data-module="happening"] .boxbig {
    grid-column: span 1; /* Large box spans full width */
    grid-row: span 2;
  }
section[data-module="happening"] .box-item:not(.boxbig) {
  grid-row: span 2;
  height: auto;
  background-size: cover;
  border-radius: 20px;
}
	
	section[data-module="happening"] a {
  background: linear-gradient(0deg, rgb(255, 255, 255) 0%, rgba(255,255,255,0) 100%);
}

	section[data-module="happening"] h5 {
  font-size: 1.2rem;
	}
	
	section[data-module="happening"] .toggle-container {
	margin-right: 10px;
		 height: 55px;
	}
	
	section[data-module="happening"] .toggle-label {
	font-size: 16px;
	}
	
	section[data-module="happening"] .toggle-slider {
	width: 78px;
	height: 40px;
	}
	
	section[data-module="happening"] .active .toggle-slider {
	left: 80px;
	}
	
	section[data-module="happening"] .btn-secondary {
	font-size: 16px;
		height: 55px;
	padding: 10px 15px;
	}
	section[data-module="happening"] .toggle-container {
  width: 165px;
}
	
      
}