* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    white-space: unset;
}

a {
    text-decoration: none;
}

body {
    font-family: 'Lexend', sans-serif;
    background-color: var(--background);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
}

input[type=checkbox] {
    display: none;
}

.page-wrapper {
    display: flex;
    height: 100%;
}

.navbar {
    width: 100%;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.navlink {
    color: var(--text);
    text-decoration: none;
    width: 10em;
    height: 3em;
	position: relative;
    border: 5px solid black;
    background-color: hsl(208, 65%, 49%);
    text-align:center;
    transition:all cubic-bezier(.68,-0.55,.27,1.55) .5s;
    font-family: sans-serif;
    display:flex;
    justify-content:center;
    align-items:center;
    cursor: pointer;
    font-weight: bold;
    box-shadow: inset 0px 0 0px 7px hsl(203 72% 61% / 1);

    i {
        /* margin-top:-2px; */
    }
	
	p {
		margin-bottom:-1px;
	}
}

.navlink:hover {
	background-color:hsl(271, 85%, 32%) !important;
	box-shadow: inset 0px 0 0px 7px hsl(271 74% 52% / 1) !important;
	transition:all cubic-bezier(.19,-0.27,.42,1.14) 0.3s;
	transform:scale(1.1);
}

.sidebar {
    width: 288px;
    background-color: var(--background-900);
    padding: 1em;
    padding-top: 0;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--background);
}

.main-content header {
    margin-bottom: 24px;
}

.sitebutton {
    width: 50%;
    display: block;
    margin: 1em auto;
    image-rendering: pixelated;
}

.sitebutton > img {
    width: 100%;
}

.gallery-area {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.8);
    overflow-y: auto;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    justify-items: center;
    /*! gap: 24px; */
    align-items: start;
}

@media (min-width: 768px) { 
    .gallery-container { grid-template-columns: repeat(2, 1fr); } 
}

@media (min-width: 1024px) { 
    .gallery-container { grid-template-columns: repeat(3, 1fr); } 
}

@media (min-width: 1280px) { 
    .gallery-container { grid-template-columns: repeat(4, 1fr); } 
}

@media (max-width: 768px) {
    body { 
        height: auto; 
        overflow: auto; 
    }

    .page-wrapper { 
        flex-direction: column; 
        height: auto; 
    }

    .sidebar { 
        width: 100%; height: auto; 
        overflow-y: visible; 
        padding-bottom: 16px; 
    }

    #checkbox-filters { 
        display: none !important;
    }

    .main-content { 
        padding: 16px; 
    }

    .preview-container { 
        flex-direction: column; 
    }
    
    .filter-item { 
        gap: 0; 
    }
    
    .filter-item span {
        position: absolute;
        z-index: 5;
        transform: translateX(-50%);
        left: 50%;
        pointer-events: none;
    }

    .sidebar .toggle-label {
        display: block;
        width: 100%;
        height: auto;
        padding: 1.2rem 8px;
        border-radius: 8px;
        font-weight: 600;
        text-align: center;
        background-color: var(--carolina-blue);
        color: var(--lapis-lazuli);
    }

    .mobile-filters {
        display: block !important;
    }

}

.mobile-filters {
    display: none;
}

.col {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.image-div {
    height: auto;
    width: 100%;
    position: relative;
    min-height: 300px;
    background-color: var(--background-600);
}

.image-div:hover:after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.69) -36%, rgba(0, 0, 0, 0) 100%);
    content: ' ';
    display: block;
    height: 100%;
    position: absolute;
    top: 0;
    width: 100%;
    pointer-events: none;
}

.gallery-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-in-out;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.gallery-image.loaded {
    opacity: 1;
}

.sidebar h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
}

.sidebar h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin: 1rem 0;
}

.sidebar h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--white);
}

#checkbox-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-item {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
}

.filter-item span {
    font-weight: 500;
    color: var(--white);
    cursor: default;
}

.sidebar-section {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.drop-btn, #selectAllCheckboxes {
    background-color: var(--primary);
    color: var(--text);
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: 2.5px solid black;
    transition: all 0.2s;
}

.drop-btn:hover, #selectAllCheckboxes:hover {
    background-color: var(--primary-400);
}

#selectAllCheckboxes {
    width: 100%;
    text-align: center;
    
    padding: 1rem 16px;
    transition: background-color 0.2s;
    border: 2.5px solid black;
    cursor: pointer;
}

.drop-btn {
    width: 100%;
    padding: 12px 16px;
    
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drop-btn::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
}

.drop-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--background-900);
    border: 2px solid var(--background);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 100;
    margin-top: 8px;
    overflow: hidden; 
    
    display: block;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-dropdown:hover .drop-menu {
    max-height: 300px;
    opacity: 1;
    overflow-y: auto;
}

.drop-menu a {
    color: var(--text);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(0, 0, 0, 0.16);
}

.drop-menu a:last-child {
    border-bottom: none;
}

.drop-menu a:hover {
    background-color: var(--background-800);
}

.drop-menu a.selected {
    font-weight: bold;
    background-color: var(--secondary-500);
    color: var(--white);
    /* box-shadow: inset var(--accent-600) 0px -8px 0px 0px; */
    padding-bottom: 9px;
    border-bottom: 6px solid var(--secondary);
}

#image-count-info {
    margin-top: 1rem;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    border-radius: 100px;
    cursor: pointer;
    background-color: var(--carolina-blue);
    transition: background-color 0.3s ease;
}
.toggle-label::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--lapis-lazuli);
    border-radius: 50%;
    transition: all 0.3s ease;
}

#image-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    padding: 16px;
}
.preview-container {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    max-width: 1152px;
    margin: 0 auto;
}
.image-wrapper {
    min-width: 0;
    cursor: pointer;
}
.preview-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    border: 4px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}
.preview-image:hover {
    border-color: var(--image-border);
}

#close-overlay {
    position: absolute;
    top: 16px;
    right: 24px;
    color: var(--white);
    font-size: 3rem;
    font-weight: 700;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

#close-overlay:hover {
    color: var(--pumpkin);
}

.hidden { display: none !important; }




/* Switch Style for desktop */ 
/* From Uiverse.io by zl306 */ 

.switch {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 60px;
  height: 26px;
  cursor: pointer;
}

.toggle {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  image-rendering: pixelated;
  position: absolute;
  cursor: pointer !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url(../assets/mc_toggle_1.png);
  background-size: 100% 100%;
  transition: 0.3s;
}

.slider:before {
  box-sizing: border-box;
  position: absolute;
  content: "";
  height: 32px;
  width: 28px;
  bottom: 0px;
  background: url(../assets/mc_toggle_2.png);
  background-size: 28px 32px;
  transition: 0.3s;
  pointer-events: all;
}

.toggle:checked + .slider {
  background: url(../assets/mc_toggle_4.png);
  background-color: var(--secondary-500);
  background-blend-mode: hard-light;
  background-size: 100% 100%;
}

.toggle:checked + .slider:before {
  transform: translateX(32px);
}


/* Switch style for mobile */ 
/* From Uiverse.io by WhiteNervosa */

.customCheckBoxHolder {
  margin: 5px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
}

.customCheckBox {
  width: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  padding: 0px 18px;
  background-color: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.7);
  transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-duration: 300ms;
  transition-property: color, background-color, box-shadow;
  display: flex;
  height: 3.5em;
  align-items: center;
  box-shadow:
    rgba(0, 0, 0, 0.15) 0px 2px 1px 0px inset,
    rgba(255, 255, 255, 0.17) 0px 1px 1px 0px;
  outline: none;
  justify-content: center;
  min-width: 55px;
}

.customCheckBox:hover {
  background-color: var(--background-800);
  color: white;
  box-shadow:
    rgba(0, 0, 0, 0.23) 0px -4px 1px 0px inset,
    rgba(255, 255, 255, 0.17) 0px -1px 1px 0px,
    rgba(0, 0, 0, 0.17) 0px 2px 4px 1px;
}

.customCheckBox .inner {
  pointer-events: none;
  transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-duration: 300ms;
  transition-property: transform;
  transform: translateY(0px);
}

.customCheckBox:hover .inner {
  transform: translateY(-2px);
}

.customCheckBoxWrapper {
  min-width: 50%;
}

.customCheckBoxWrapper:first-of-type {
    flex-grow: 1;
    flex-basis: 100%;
}

/* Multiple Checkboxes can be chained together for a radio input */
.customCheckBoxWrapper:first-of-type .customCheckBox {
  border-right: 0px;
}

.customCheckBoxWrapper:last-of-type .customCheckBox {
  border-left: 0px;
}

.customCheckBoxInput {
  display: none;
}

.customCheckBoxInput:checked + .customCheckBoxWrapper .customCheckBox {
  background-color: var(--secondary-500);
  color: white;
  box-shadow:
    var(--secondary) 0px -8px 0px 0px inset, rgba(255, 255, 255, 0.17) 0px -1px 1px 0px, rgba(0, 0, 0, 0.17) 0px 2px 4px 1px;
}

.customCheckBoxInput:checked + .customCheckBoxWrapper .customCheckBox .inner {
  transform: translateY(-2px);
}

.customCheckBoxInput:checked + .customCheckBoxWrapper .customCheckBox:hover {
  background-color: var(--secondary-600);
  box-shadow:
    var(--secondary) 0px -4px 0px 0px inset, rgba(255, 255, 255, 0.17) 0px -1px 1px 0px, rgba(0, 0, 0, 0.15) 0px 3px 6px 2px;
}

.customCheckBoxWrapper .customCheckBox:hover .inner {
  transform: translateY(-2px);
}