/* ==========================
   Стили страниц "Новости" и "Фотогалерея".
   Использует те же переменные, что и schedule-diary.css
   (--sch-accent, --sch-card-bg, --sch-shadow и т.п.) — подключайте
   evt.css ПОСЛЕ schedule-diary.css.
   ========================== */

/* ---------- Форма создания (только завуч) ---------- */

.evt-create-form {
	background: var(--sch-card-bg);
	border: 1px solid var(--sch-line);
	border-radius: 16px;
	box-shadow: var(--sch-shadow);
	padding: 22px;
	margin-bottom: 32px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.evt-create-form-title {
	font-family: 'Asap Sharp', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--sch-heading);
	margin: 0;
}

.evt-create-form textarea.sch-input {
	width: 100%;
	min-height: 80px;
	resize: vertical;
	box-sizing: border-box;
	font-family: 'Asap Sharp', sans-serif;
}

.evt-create-form input[type='text'].sch-input,
.evt-create-form input[type='file'].sch-input {
	width: 100%;
	box-sizing: border-box;
}

.evt-create-form-row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

@media (max-width: 640px) {
	.evt-create-form {
		padding: 16px;
	}
	.evt-create-form-row {
		flex-direction: column;
		align-items: stretch;
	}
	.evt-create-form-row .sch-btn {
		width: 100%;
	}
}

/* ---------- Карточки новостей ---------- */

.evt-news-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.evt-news-card {
	display: flex;
	gap: 20px;
	background: var(--sch-card-bg);
	border: 1px solid var(--sch-line);
	border-radius: 18px;
	box-shadow: var(--sch-shadow);
	padding: 18px;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.evt-news-card:hover {
	box-shadow: var(--sch-shadow-hover);
	transform: translateY(-2px);
}

.evt-news-photo {
	width: 220px;
	height: 160px;
	flex-shrink: 0;
	object-fit: cover;
	border-radius: 12px;
	background: var(--sch-accent-soft);
}

.evt-news-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.evt-news-title {
	font-family: 'Asap Sharp', sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: var(--sch-heading);
	margin: 0 0 4px;
}

.evt-news-date {
	font-size: 12px;
	color: var(--sch-accent-light);
	margin-bottom: 10px;
}

.evt-news-description {
	font-size: 14px;
	font-weight: 300;
	line-height: 1.6;
	color: var(--sch-text-muted);
	white-space: pre-wrap;
}

.evt-news-delete {
	align-self: flex-start;
	margin-top: auto;
	padding-top: 10px;
}

@media (max-width: 640px) {
	.evt-news-card {
		flex-direction: column;
	}
	.evt-news-photo {
		width: 100%;
		height: 200px;
	}
}

@media (max-width: 420px) {
	.evt-news-photo {
		height: 160px;
	}
	.evt-news-title {
		font-size: 16px;
	}
	.evt-news-description {
		font-size: 13px;
	}
}

/* ---------- Сетка альбомов галереи ---------- */

.evt-albums-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

@media (max-width: 560px) {
	.evt-albums-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
	.evt-album-card {
		padding: 10px;
	}
	.evt-album-title {
		font-size: 13px;
	}
}

@media (max-width: 360px) {
	.evt-albums-grid {
		grid-template-columns: 1fr;
	}
}

.evt-album-card {
	background: var(--sch-card-bg);
	border: 1px solid var(--sch-line);
	border-radius: 16px;
	box-shadow: var(--sch-shadow);
	padding: 14px;
	cursor: pointer;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.evt-album-card:hover {
	box-shadow: var(--sch-shadow-hover);
	transform: translateY(-3px);
}

.evt-album-thumbs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin-bottom: 12px;
}

.evt-album-thumb-wrap {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	background: var(--sch-accent-soft);
}

.evt-album-thumb-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.evt-album-thumb-more {
	position: absolute;
	inset: 0;
	background: rgba(31, 43, 58, 0.55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Asap Sharp', sans-serif;
	font-weight: 700;
	font-size: 15px;
}

.evt-album-title {
	font-family: 'Asap Sharp', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--sch-heading);
	margin: 0;
}

.evt-album-delete {
	margin-top: 10px;
}

/* ---------- Оверлей альбома (все фото) ---------- */

.evt-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 20, 30, 0.85);
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 60px 20px;
	overflow-y: auto;
	z-index: 200;
}

.evt-overlay.open {
	display: flex;
}

.evt-overlay-panel {
	background: var(--sch-page-bg);
	border-radius: 18px;
	max-width: 960px;
	width: 100%;
	padding: 28px;
	position: relative;
}

@media (max-width: 640px) {
	.evt-overlay {
		padding: 24px 10px;
	}
	.evt-overlay-panel {
		padding: 18px;
		border-radius: 14px;
	}
	.evt-overlay-title {
		font-size: 18px;
		margin-bottom: 14px;
	}
	.evt-overlay-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 6px;
	}
	.evt-overlay-add-row {
		flex-direction: column;
		align-items: stretch;
	}
	.evt-overlay-add-row .sch-btn {
		width: 100%;
	}
}

.evt-overlay-close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: none;
	background: var(--sch-card-bg);
	box-shadow: var(--sch-shadow);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--sch-heading);
}

.evt-overlay-close:hover {
	background: var(--sch-accent-soft);
}

.evt-overlay-title {
	font-family: 'Asap Sharp', sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: var(--sch-heading);
	margin: 0 0 20px;
	padding-right: 40px;
}

.evt-overlay-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}

.evt-overlay-photo-wrap {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
}

.evt-overlay-photo-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.evt-overlay-photo-wrap:hover img {
	transform: scale(1.05);
}

.evt-overlay-photo-delete {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	border: none;
	background: rgba(15, 20, 30, 0.65);
	color: #fff;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}

.evt-overlay-photo-delete:hover {
	background: #e0523f;
}

.evt-overlay-add-row {
	margin-top: 20px;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

/* ---------- Лайтбокс одного фото (поверх оверлея альбома) ---------- */

.evt-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 40px;
	z-index: 300;
}

.evt-lightbox.open {
	display: flex;
}

.evt-lightbox img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 8px;
	object-fit: contain;
}

.evt-lightbox-close {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: none;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.evt-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 640px) {
	.evt-lightbox {
		padding: 16px;
	}
	.evt-lightbox-close {
		top: 12px;
		right: 12px;
		width: 36px;
		height: 36px;
	}
}