/* ==========================================================
	Inalab Japan — Clean Rebuild Stylesheet
	Includes:
	- Full page wrapper
	- Fixed header + hero
	- Category bar
	- Scrollable panel area
	- 2×2 grid enforced
	- Morph expansion panel
========================================================== */


/* ----------------------------------------------------------
	ROOT VARIABLES
---------------------------------------------------------- */
:root {
	--green-main: #2a6f36;
	--green-dark: #1f5229;

	--panel-bg: #f8f8f8;
	--panel-border: rgba(0,0,0,0.15);

	--radius: 12px;

	--transition: 0.28s ease;
}


/* ----------------------------------------------------------
	GLOBAL RESET
---------------------------------------------------------- */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	color: #222;
	background: #f4f4f4;
	overflow: hidden;
	height: 100vh;
}

button {
	cursor: pointer;
	font-family: inherit;
}


/* ----------------------------------------------------------
	SITE WRAPPER (NEW)
---------------------------------------------------------- */

#site-wrapper {
	max-width: 1300px;
	margin: 10px auto;
	border: 10px solid #ffffff;
	border-radius: 10px;
	background: white;
	box-shadow: 0 3px 8px rgba(0,0,0,0.08);
	height: calc(100vh - 20px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}


/* ----------------------------------------------------------
	TOP HEADER
---------------------------------------------------------- */
#top-header {
	height: 60px;
	background: var(--green-main);
	color: white;

	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;

	flex-shrink: 0;
}

#site-logo {
	height: 100%;
	max-height: 48px;
	object-fit: contain;
	display: block;
}


#header-nav {
	display: flex;
	gap: 24px;
}

.nav-btn {
	background: none;
	border: none;
	color: white;
	font-size: 16px;
	padding: 6px 10px;
	transition: opacity 0.2s ease;
}

.nav-btn:hover {
	opacity: 0.75;
}

.nav-btn.active {
	border-bottom: 2px solid white;
	padding-bottom: 4px;
}

#lang-toggle {
	background: rgba(255,255,255,0.2);
	border: 1px solid rgba(255,255,255,0.35);
	color: white;
	padding: 6px 14px;
	border-radius: 6px;
	font-size: 15px;
	transition: background 0.2s ease;
}

#lang-toggle:hover {
	background: rgba(255,255,255,0.3);
}


/* ----------------------------------------------------------
	HERO SECTION
---------------------------------------------------------- */
#hero {
	height: 240px;
	background: url('../img/hero.jpg') center/cover no-repeat;
	position: relative;

	display: flex;
	justify-content: center;
	align-items: center;

	flex-shrink: 0;
}

#hero-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.0);
}

#hero-text {
	position: relative;
	color: white;
	text-align: center;
	text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

#hero-title {
	font-size: clamp(24px, 4vw, 40px);
	margin-bottom: 8px;
}

#hero-sub {
	font-size: clamp(14px, 2vw, 20px);
	opacity: 0.9;
}


/* ----------------------------------------------------------
	CATEGORY BAR (lower green strip)
---------------------------------------------------------- */
#category-bar {
	height: 45px;
	background: var(--green-main);
	color: white;

	display: flex;
	align-items: center;
	justify-content: center;       /* ★ center the buttons */
	gap: 20px;
	padding: 0 20px;

	flex-shrink: 0;
	overflow-x: auto;
	white-space: nowrap;
}


.category-btn {
	background: rgba(255,255,255,0.18);
	border: none;
	color: white;
	padding: 6px 16px;
	border-radius: 6px;
	font-size: 15px;
	transition: background var(--transition);
	white-space: nowrap;
}

.category-btn:hover {
	background: rgba(255,255,255,0.28);
}

.category-btn.active {
	background: var(--green-dark);
}


/* ----------------------------------------------------------
	PANEL WRAPPER + PANEL AREA (NEW)
---------------------------------------------------------- */
#panel-wrapper {
	flex: 1;
	background: white;
	position: relative;
	overflow-y: auto;	/* enable scrolling */
	overflow-x: hidden;
	padding: 20px;
	scroll-behavior: smooth;
}

#panel-area {
	position: relative;
	padding: 0;          /* padding moved up to wrapper */
	height: 100%;        /* let it fill the wrapper height */
}



/* ----------------------------------------------------------
	2×2 PANEL GRID
---------------------------------------------------------- */
#panel-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	padding-bottom: 40px;
}


/* ----------------------------------------------------------
	NORMAL PANEL
---------------------------------------------------------- */
.panel {
	background: var(--panel-bg);
	border: 1px solid var(--panel-border);
	border-radius: var(--radius);
	padding: 18px;
	min-height: 120px;

	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.panel-title {
	font-size: 20px;
	font-weight: 600;
}


/* ----------------------------------------------------------
	DIM OTHER PANELS DURING EXPANSION
---------------------------------------------------------- */
#panel-grid.dimmed .panel:not(.expanded):not(.expanding) {
	opacity: 0.2;
	pointer-events: none;
}


/* ----------------------------------------------------------
	EXPANDED / EXPANDING PANEL (MORPH)
---------------------------------------------------------- */
/* Expanded panel fills wrapper minus 20px gutter */
/* Expanded panel fills wrapper minus a 20px gutter */
.panel.expanded {
	position: absolute;
	left: 0;
	right: 0;

	top: 0;                 /* overwritten by JS */
	height: calc(100% - 40px);

	margin: 20px;
	z-index: 50;

	background: white;
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.25);
	padding: 30px;
	overflow-y: auto;
}


.panel.expanded h2 {
	margin-bottom: 14px;
}

.panel.expanded p {
	margin-bottom: 12px;
	font-size: 16px;
	line-height: 1.6;
}

.panel.expanded ul {
	margin-left: 20px;
	margin-bottom: 20px;
}

.expanded-img {
	float: right;
	margin: 0 0 12px 20px; /* top right bottom left spacing */
	max-width: 180px;      /* adjust */
	border-radius: 8px;
	object-fit: cover;
}


/* ----------------------------------------------------------
	CLOSE BUTTON FOR EXPANDED PANEL
---------------------------------------------------------- */
.expanded-close-btn {
	position: absolute;
	top: 12px;
	right: 12px;

	background: #f0f0f0;
	border-radius: 50%;
	border: 1px solid #ccc;

	width: 32px;
	height: 32px;
	font-size: 22px;
	line-height: 22px;

	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;

	z-index: 999;
	transition: 0.2s ease;
}

.expanded-close-btn:hover {
	background: #e0e0e0;
}


/* ----------------------------------------------------------
	RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 900px) {
	#hero {
		height: 180px;
	}

	#panel-grid {
		grid-template-columns: 1fr;
	}

	.panel {
		padding: 14px;
	}
}

#panel-area {
	position: relative;
}

/* ----------------------------------------------------------
	THUMBNAILS
---------------------------------------------------------- */

.panel-thumb {
	float: right;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
	margin-left: 12px;
	margin-bottom: 6px;
}

.expanded-img {
	float: right;
	max-width: 220px;
	width: 100%;
	border-radius: 8px;
	margin: 0 0 12px 20px;
	object-fit: cover;
}

/* ----------------------------------------------------------
   MOBILE HEADER FIX (logo above menu)
---------------------------------------------------------- */
@media (max-width: 600px) {
	#top-header {
		flex-direction: column;
		height: auto;
		padding: 10px 20px;
		gap: 10px;
	}

	#header-left {
		width: 100%;
		display: flex;
		justify-content: center;
	}

	#site-logo {
		max-height: 40px;
	}

	#header-nav {
		width: 100%;
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
		gap: 16px;
	}

	#header-right {
		display: flex;
		justify-content: center;
		width: 100%;
	}
}
