/* Загальні стилі */
body {
	margin: 0;
	padding: 0;
	font-family: 'Titillium Web', sans-serif;
	background: linear-gradient(145deg, #2f2f2f, #1a1a1a);
	color: #f1f1f1;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
}

.dashboard {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	width: 90%;
	max-width: 1200px;
	padding: 40px;
}

.grid-item {
	background: #3b3b3b;
	border: 1px solid #555;
	border-radius: 12px;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
	padding: 30px;
	text-align: center;
	font-size: 1.2rem;
	font-weight: 600;
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.grid-item:hover {
	transform: scale(1.03);
	outline: 2px solid #f3c622; /* жовтий акцент */
	box-shadow: 0 0 15px #f3c622;
}

.grid-item::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.03);
	pointer-events: none;
}

/* ----------------------------------------- */

form.form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 10px;
	font-size: 0.9rem;
}

form input {
	padding: 8px;
	border-radius: 6px;
	border: 1px solid #777;
	background-color: #1e1e1e;
	color: #f1f1f1;
}

.password-wrap {
	display: flex;
	align-items: center;
	position: relative;
}

.password-wrap input {
	flex: 1;
}

.toggle-btn {
	position: absolute;
	right: 8px;
	background: none;
	border: none;
	cursor: pointer;
	color: #ccc;
	font-size: 1rem;
}

.checklist {
	list-style: none;
	padding-left: 0;
	font-size: 0.8rem;
	color: #9fd69f;
}

.progress-bar {
	height: 6px;
	width: 100%;
	background: #333;
	border-radius: 5px;
	overflow: hidden;
}

.progress {
	height: 100%;
	background-color: #f3c622;
	width: 0%;
	transition: width 0.3s;
}

.submit-btn {
	background: #f3c622;
	border: none;
	padding: 10px;
	font-weight: bold;
	border-radius: 8px;
	cursor: pointer;
	color: #000;
}
/* ----------------------------------------- */
.tabs {
	display: flex;
	flex-direction: column;
	padding-top: 20px;
	gap: 10px;
}

.tab-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tab-btn {
	flex: 1;
	padding: 8px 12px;
	background: #444;
	color: #f1f1f1;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	transition: background 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
	background: #f3c622;
	color: #000;
}

.tab-content {
	display: none;
	background: #2a2a2a;
	padding: 15px;
	border-radius: 8px;
	border: 1px solid #555;
}

.tab-content.active {
	display: block;
}

.tab-content ul {
	padding-left: 20px;
	list-style: square;
}

.tab-content li {
	margin-bottom: 8px;
}
/* ------------------------------------------------- */
.accordion {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 20px;
}

.accordion-header {
	background-color: #444;
	color: #f1f1f1;
	padding: 12px;
	font-size: 1rem;
	border: none;
	border-radius: 6px;
	text-align: left;
	cursor: pointer;
	transition: background 0.3s;
}

.accordion-header:hover {
	background-color: #f3c622;
	color: #000;
}

.accordion-content {
	background: #2a2a2a;
	color: #ccc;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease;
	padding: 0 12px;
	border-left: 3px solid #f3c622;
	border-radius: 0 0 6px 6px;
}

.accordion-content p {
	margin: 10px 0;
}
/* ---------------------------------------------- */

.grid-item_gallery {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	margin-bottom: 25px;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 10px;
	max-width: 1000px;
	aspect-ratio: 2 / 1; /* прямокутник */
	margin: 0 auto;
}

.gallery-grid .item {
	overflow: hidden;
	border-radius: 8px;
	position: relative;
}

.gallery-grid .item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.gallery-grid .item:hover img {
	transform: scale(1.1);
}

/* Розміщення картинок */
.item-1 {
	grid-column: 1 / 3;
	grid-row: 1 / 3;
}

.item-2 {
	grid-column: 3 / 4;
	grid-row: 1 / 2;
}

.item-3 {
	grid-column: 4 / 5;
	grid-row: 1 / 2;
}

.item-4 {
	grid-column: 3 / 4;
	grid-row: 2 / 3;
}

.item-5 {
	grid-column: 4 / 5;
	grid-row: 2 / 3;
}

.item-6 {
	grid-column: 3 / 5;
	grid-row: 3 / 4;
}

.item-7 {
	grid-column: 1 / 2;
	grid-row: 3 / 4;
}

.item-8 {
	grid-column: 2 / 3;
	grid-row: 3 / 4;
}

.item-9 {
	grid-column: 3 / 4;
	grid-row: 3 / 4;
}

/* ---------------------------------------------- */

.tooltip-container {
	display: flex;
	gap: 20px;
	justify-content: center;
	padding-top: 10px;
}

.tooltip-item {
	font-size: 2rem;
	cursor: pointer;
	position: relative;
}

.tooltip-item::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 120%;
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 6px 10px;
	font-size: 0.8rem;
	white-space: nowrap;
	border-radius: 6px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
}

.tooltip-item:hover::after {
	opacity: 1;
}

/* --------------------------------------------- */
.char-counter {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.char-counter textarea {
	resize: none;
	height: 80px;
	padding: 8px;
	border: 2px solid #777;
	border-radius: 6px;
	background-color: #1e1e1e;
	color: #f1f1f1;
	font-size: 0.9rem;
	transition: border-color 0.3s;
}

.char-counter textarea.limit-reached {
	border-color: red;
}

.counter {
	font-size: 0.85rem;
	text-align: right;
	color: #aaa;
}

/* ------------------------------------ */
.site-header,
.site-footer {
	text-align: center;
	padding: 15px 10px;
	background-color: #333;
	border-radius: 8px;
	margin-bottom: 20px;
}

.theme-toggle {
	text-align: center;
	margin-bottom: 20px;
}

.theme-toggle input[type='checkbox'] {
	margin-right: 8px;
}

body.light-theme {
	background: #f7f7f7;
	color: #222;
}

body.light-theme .site-header,
body.light-theme .site-footer {
	background-color: #e0e0e0;
	color: #111;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
	color: #777;
	opacity: 1;
}

body.light-theme input,
body.light-theme textarea,
body.light-theme .tab-content,
body.light-theme .accordion-content {
	background-color: #fff;
	color: #000;
}

body.light-theme .tab-btn {
	background: #f1f1f1;
	color: #333;
}

body.light-theme .tab-btn:hover,
body.light-theme .tab-btn.active {
	background: #f3c622;
	color: #000;
}

body.light-theme .tab-btn.active,
body.light-theme .accordion-header:hover {
	background: #ffc107;
	color: #000;
}

body.light-theme .accordion-header {
	background-color: #f1f1f1;
	color: #333;
}

body.light-theme .accordion-header:hover {
	background-color: #f3c622;
	color: #000;
}
body.light-theme .accordion-content {
	background: #ebeaea;
	color: #333;
}

body.light-theme .grid-item {
	background: #fff;
	border: 1px solid #ccc;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
	color: #111;
}

body.light-theme .grid-item h3 {
	color: #111;
}

body.light-theme .grid-item:hover {
	outline: 2px solid #f3c622;
	box-shadow: 0 0 15px #f3c622;
}

/* ========== АДАПТИВНІСТЬ ========== */
@media (max-width: 1024px) {
	.dashboard {
		grid-template-columns: repeat(3, 1fr);
		padding: 30px;
		margin: 0 20px;
	}
	.grid-item {
		font-size: 1.1rem;
		padding: 25px;
	}
	.gallery-grid {
		margin: 0 20px;
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: auto;
	}
}

@media (max-width: 768px) {
	.dashboard {
		grid-template-columns: repeat(2, 1fr);
		padding: 20px;
		margin: 0 20px;
	}
	.grid-item {
		font-size: 1rem;
		padding: 20px;
	}
	.tab-buttons {
		flex-direction: column;
	}
	.tab-btn {
		width: 100%;
	}
	.gallery-grid {
		margin: 0 20px;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 200px;
		aspect-ratio: auto;
		gap: 10px;
	}
	.gallery-grid .item {
		grid-column: auto !important;
		grid-row: auto !important;
	}
	.tooltip-container {
		flex-direction: column;
		align-items: center;
	}
	.accordion-header {
		font-size: 0.95rem;
		padding: 10px;
	}
}

@media (max-width: 480px) {
	.dashboard {
		grid-template-columns: 1fr;
		padding: 20px;
		margin: 5px;
	}
	.grid-item {
		font-size: 0.95rem;
		padding: 16px;
	}
	form input,
	textarea,
	.tab-btn,
	.accordion-header {
		font-size: 0.85rem;
	}
	.gallery-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: 180px;
	}
	.char-counter textarea {
		height: 70px;
	}
	.site-header,
	.site-footer {
		padding: 10px 5px;
	}
}
