:root {
	--nav-h: 88px;
	--nav-h-m: 68px;
	--drawer-w: min(85vw, 360px);
}

html, body {
	margin: 0;
	padding: 0;
	background-color: #f7f7f7;

	font-family: "Inter";
}

body {
	min-height: 100vh; 
	overflow-x: hidden;
}

#top_bar.navbar { position: relative; top: 0;
	left: 0;
	right: 0;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	background: transparent;
	color: #111111;
	z-index: 10; 
}

#logo_img.logo {
	height: 100%;
	display: flex;
	align-items: center;
	text-decoration: none;
}

#logo_img.logo img {
	height: 70%;
	width: auto;
	display: block;
}

.nav-toggle {
	color: #111;
	font-size: 28px;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 10px 12px;
	line-height: 1;
	border-radius: 10px;
}

.nav-toggle:hover {
	background: #5f6a72;
}

.behind {
	position: fixed; 
	left: 0;
	right: 0;
	top: 0;
	height: 100vh; 
	z-index: 0; 
	display: grid;
	place-items: center;
	overflow: hidden;
}

.behind img {
	width: 100%;
	height: 100%;
	object-fit: cover; 
}

#search_section {
	position: relative;
	width: 100%;
	height: 100vh;
	z-index: 2;
	margin-top: calc(-1*var(--nav-h));

	text-align: center;
}

.transparent_section {
	position: relative;
	width: 100%;
	height: 500px; 
	background: transparent;
	z-index: 3;
}

.nav-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100vh;
	width: var(--drawer-w);
	z-index: 20001;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	background-color: #f0f0f0;
	color: #111111;
}

.nav-drawer.open {
	transform: translateX(0);
}

.drawer-links {
	display: flex;
	flex-direction: column;
	padding: 10px 8px;
	flex: 1;
	overflow-y: auto;
	padding-bottom: 24px;
	-webkit-overflow-scrolling: touch;

	font-weight: 500;
}

.drawer-links a {
	display: block;
	padding: 14px 14px;
	margin: 4px 6px;
	border-radius: 12px;
	text-decoration: none;
	font-size: 1rem;
	color: #111111;

	cursor: pointer;
}

.drawer-links a:hover {
	text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
	.nav-drawer {
		transition: none;
	}
}

.drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 16px;
	border-bottom: 1px solid #e2e2e2;
	color: #111111;

	font-weight: 500;
	font-size: 1rem;
}

.drawer-title {
	font-size: 1rem;
	font-weight: 500;
	color: #111111;
}

.drawer-close {
	font-size: 32px;
	line-height: 1;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 10px;

	color: #111;
}

.drawer-close:hover {
	background: rgba(0,0,0,0.06);
}

#what_we_do{
	position: relative;
	width: 100%;
	margin-top: -20px;
	box-sizing: border-box;

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;

	padding: clamp(32px, 6vw, 80px) 0;
}

#what_we_do > h1{
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	margin: 0 0 18px 0;
}

#what_we_do #boxes{
	width: 100%;
	box-sizing: border-box;

	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: stretch;
	gap: clamp(16px, 2vw, 36px);

	padding: clamp(24px, 6vw, 80px) clamp(16px, 4vw, 48px);
	margin-top: 0;

	height: auto;
	background-color: transparent;
}

#what_we_do_upload,
#what_we_do_search{
	flex: 1 1 260px; 
	max-width: 420px;
	min-height: 340px;
	aspect-ratio: 4 / 5;

	background: black;
	border-radius: 32px;
	transition: transform 0.3s ease;

	position: relative;
	overflow: hidden;	
	display: block;	 
	text-decoration: none;
}

#boxes img{
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	z-index: 10;
}

.gradient{
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 11;

	background-image: linear-gradient(
		to bottom,
		rgba(0,0,0,0) 35%,
		rgba(0,0,0,0.95) 100%
	);
}

#boxes a:hover{
	transform: scale(1.06);
}

#boxes h1{
	position: absolute;
	left: 50%;
	top: 68%;
	transform: translate(-50%, -50%);
	z-index: 12;
	margin: 0;

	color: #fff;
	font-size: clamp(1.25rem, 3vw, 2rem);
	white-space: nowrap;
}

#boxes p{
	position: absolute;
	left: 50%;
	top: 82%;
	transform: translate(-50%, -50%);
	z-index: 12;
	margin: 0;

	color: #fff;
	font-size: clamp(0.95rem, 2.4vw, 1.25rem);
	width: 90%;
	max-width: 28ch;
}

@media (max-width: 768px){
	#what_we_do #boxes{
		flex-direction: column;
		align-items: center;
		padding: 24px 16px 48px;
	}

	#what_we_do_upload,
	#what_we_do_search{
		width: 100%;
		max-width: 520px;
		aspect-ratio: 16 / 10;
		min-height: auto;
	}

	#boxes a:hover{
		transform: none;
	}
}

.pipe {
	padding: 0 10px;
}

.drawer-group {
	margin: 4px 6px;
	border-radius: 12px;
	overflow: hidden;
}

.drawer-summary {
	list-style: none;
	cursor: pointer;

	padding: 14px 14px;
	border-radius: 12px;
	font-size: 1rem;
	color: #111111;

	display: flex;
	align-items: center;
	justify-content: space-between;
}

.drawer-summary::-webkit-details-marker {
	display: none;
}


.drawer-summary::after {
	content: "›";
	font-size: 1.2rem;
	transform: rotate(0deg);
	transition: transform 180ms ease;
}

.drawer-group[open] .drawer-summary::after {
	transform: rotate(90deg);
}

.drawer-sub {
	display: flex;
	flex-direction: column;
	padding: 6px 0 10px 0;
}

.drawer-sub a {
	display: block;
	padding: 12px 14px 12px 28px;
	margin: 2px 6px;
	border-radius: 10px;
	text-decoration: none;
	font-size: 0.95rem;
	color: #111111;
}

.drawer-sub a:hover {
	text-decoration: underline;
}

.drawer-links .drawer-link {
	display: block;
	padding: 14px 14px;
	margin: 4px 6px;
	border-radius: 12px;
	text-decoration: none;
	font-size: 1rem;
	color: #111111;
}

#login_panel {
	position: relative;
	width: 100%;
	height: 100vh;
	z-index: 2;
	margin-top: calc(-1*var(--nav-h));
	
	background: #f7f7f7;

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

#login_panel h1 {
	position: relative;
	z-index: 2;

	margin-bottom: 50px;

	font-size: 30px;
	margin-top: var(--nav-h);

	color: #111111;
}

#login_panel p {
	position: relative;
	z-index: 2;

	font-size: 20px;
	padding: 80px 80px;

	color: #111111;
}

#login_panel label{
	font-size: 16px;
	color: #111;
}

#login_panel input{
	color: #111;
	font-size: 16px;
	padding: 12px 14px;

	width: 500px;
	margin-bottom: 50px;
	background: transparent;

	border-radius: 999px;
	border: 2px solid #111;
	box-sizing: border-box;
}

#login_panel input:focus{
	border-color: #5f6a72;
	outline: 2px solid #5f6a72;
	outline-offset: 2px;
}

#login_panel button{
	border-radius: 999px;
	border: 2px solid #111;
	color: #111;
	font-size: 18px;

	width: 150px;
	height: 48px;

	margin-bottom: 50px;

	cursor: pointer;
	background: transparent;
}

#login_panel button:hover{
	background: #5f6a72;
	color: #fff;
}

@media (max-width: 768px){
	#login_panel input {
		width: 100%;
		max-width: 420px;
	}

	#login_panel button{
		width: 100%;
		max-width: 420px;
	}
}

.login_error {
	color: #b00020;
}


#account_menu {
	position: relative;
	width: 100%;
	height: 100vh;
	z-index: 2;
	margin-top: calc(-1 * var(--nav-h));
	background: #f7f7f7;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

#account_menu button {
	align-items: center;
	justify-content: center;

	padding: 14px 14px;
	margin: 4px 6px;

	border-radius: 999px;
	border: 2px solid #111;

	text-decoration: none;
	color: #111;
	font-size: 18px;

	width: 150px;
	height: 48px;
	
	cursor: pointer;

	background: transparent;
}

#account_menu button:hover {
	background: #5f6a72;
}

#add_location {
	position: relative;
	width: 100%;
	min-height: 100vh; 
	height: auto;
	background: #f7f7f7;
	z-index: 3;
	
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;

	margin-top: calc(-1 * var(--nav-h));
	box-sizing: border-box;
}

#add_location h1 {
	position: relative;
	z-index: 100;
	color: #111;
	font-size: clamp(1rem, 2.5vw, 2rem);
}

#add_location p {
	position: relative;
	z-index: 100;
	color: #111;
	font-size: clamp(1rem, 2.5vw, 2rem);
}

#add_location,
#add_location a {
	text-decoration: none;
}

#add_location button {
	align-items: center;
	justify-content: center;

	padding: 14px 14px;
	margin: 4px 6px;

	border-radius: 999px;
	border: 2px solid #111;

	text-decoration: none;
	color: #111;
	font-size: 18px;

	width: 150px;
	height: 48px;
	
	cursor: pointer;
	background: transparent;
}

#add_location button:hover {
	background: #5f6a72;
}

#add_location img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 20px;
}

#add_location input{
	color: #111;
	font-size: 16px;
	padding: 12px 14px;

	background: transparent;

	border-radius: 999px;
	border: 2px solid #111;
	box-sizing: border-box;

	margin-bottom: 50px;
}

#dropzone {
	border: 2px dashed #9a9a9a;
	padding: 200px;
	margin: auto;
	margin-bottom: 10%;
	text-align: center;
	cursor: pointer;
	border-radius: 10px;
}

#dropzone p {
	margin: 0;
	color: #9a9a9a;
}

#image_grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr); 
	gap: 10px;
	margin-top: 20px;
	max-height: 700px;
	overflow-y: auto;
	border-radius: 20px;
	transition: border 0.3s ease;

	border: none; 
}

#image_grid.with-border {
	border: 2px solid #111;
}

#image_grid img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	object-fit: cover;
	max-width: 100%;
	cursor: pointer;
}

@media (max-width: 768px) {
	#image_grid {
		grid-template-columns: repeat(2, 1fr); 
	}
}

@media (max-width: 480px) {
	#image_grid {
		grid-template-columns: 1fr; 
	}
}

.uploaded-image {
	max-width: 100%;
	max-height: 100%;
}

#drag_popup {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 20px;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	font-size: 18px;
	border-radius: 10px;
	z-index: 1001;
}

#image_popup {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	z-index: 1000;

	justify-content: center;
	align-items: center;
	flex-direction: column;
	
	overflow-y: auto;
}

#popup_image_container {
	position: relative;
	max-width: 80%;
	max-height: 80%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.popup-image {
	width: 100%;
	max-width: 700px;
	height: auto;
	max-height: 70%;
	border-radius: 10px;
}

#popup_image_info {
	margin-top: 10px;
	color: white;
	font-size: 18px;
	text-align: center;
}

.popup-nav-button {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);

	width: 54px;
	height: 54px;
	border-radius: 50%;

	border: 2px solid #111;
	background: rgba(255, 255, 255, 0.75);
	color: #111;

	font-size: 28px;
	cursor: pointer;

	display: flex;
	align-items: center;
	justify-content: center;

	z-index: 10;
	user-select: none;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#prev_image { left: 10px; }
#next_image { right: 10px; }

.popup-nav-button:hover {
	background: rgba(0,0,0,0.7);
}

#popup_close {
	position: absolute;
	top: 10px;
	right: 20px;
	color: white;
	font-size: 30px;
	cursor: pointer;
	z-index: 1001;
	user-select: none;
}

#search_page {
	position: relative;
	width: 100%;
	min-height: 100vh;
	background: #f7f7f7;
	z-index: 3;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;

	margin-top: calc(-1 * var(--nav-h));
	padding: var(--nav-h) 5%;
	box-sizing: border-box;
}

#search_page_search_section {
	width: 100%;
	max-width: 1100px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

#search_page_search_bar_container {
	width: 100%;
	max-width: 700px;
}

.search_page_search_bar {
	color: #111;
	font-size: 16px;
	padding: 20px 14px;
	width: 100%;
	background: transparent;
	border-radius: 999px;
	border: 2px solid #111;
	box-sizing: border-box;
}

.search_page_search_bar::placeholder {
	color: #9a9a9a;
}

.search_page_search_bar:focus {
	border-color: #5f6a72;
	outline: 2px solid #5f6a72;
	outline-offset: 2px;
}

#location_grid {
	width: 100%;
	max-width: 1100px;

	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;

	margin-top: 20px;
}

@media (max-width: 768px) {
	#location_grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	#location_grid { grid-template-columns: 1fr; }
}

.location-card {
	border-radius: 16px;
	border: 2px solid #111;
	overflow: hidden;
	text-align: left;
	cursor: pointer;
}

.location-name {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	display: block;
	text-align: center;
	margin: 0;
	font-size: 30px;
	font-weight: 600;
	color: #111;
}

#pagination_section {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
}

.pagination-btn {
	background: transparent;
	color: #111;
	padding: 10px 20px;
	border-radius: 999px;
	border: 2px solid #111;
	cursor: pointer;
}

.pagination-btn:hover {
	background: #5f6a72;
	color: #fff;
	border-color: #5f6a72;
}

.page-number {
	font-size: 18px;
	color: #111;
}

#add_location {
	position: relative;
	width: 100%;
	min-height: 100vh;
	background: #f7f7f7;
	z-index: 3;

	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 5%;

	margin-top: calc(-1 * var(--nav-h));
	padding: var(--nav-h) 5%;
	box-sizing: border-box;
}

#add_location_left { padding-right: 0; width: 100%; }
#add_location_right { width: 100%; border-radius: 20px; }

#add_location input{
	color: #111;
	font-size: 16px;
	padding: 12px 14px;
	width: 100%;
	background: transparent;
	border-radius: 999px;
	border: 2px solid #111;
	box-sizing: border-box;
	margin-bottom: 50px;
}

#add_location textarea{
	color: #111;
	font-size: 16px;
	padding: 12px 14px;
	width: 100%;
	height: 200px;
	background: transparent;
	border-radius: 20px;
	border: 2px solid #111;
	box-sizing: border-box;
	margin-bottom: 50px;
}

#add_location input:focus,
#add_location textarea:focus{
	border-color: #5f6a72;
	outline: 2px solid #5f6a72;
	outline-offset: 2px;
}

@media (max-width: 768px){
	#add_location {
		flex-direction: column;
		align-items: center;
		padding: var(--nav-h) 5%;
	}

	#add_location_left,
	#add_location_right {
		max-width: 520px;
	}
}

#file_list_container {
	margin-top: 20px;
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid #333;
	padding: 10px;
}

.file_row {
	display: flex;
	justify-content: space-between;
	padding: 6px;
	border-bottom: 1px solid #222;
	font-family: monospace;
	font-size: 14px;
}

.file_path {
	word-break: break-all;
}

.file_size {
	color: #999;
	margin-left: 20px;
	white-space: nowrap;
}

#upload_status {
	margin-top: 15px;
	font-weight: bold;
}