/* styles_modern.css (rev2)
   PC(761px+)  : 기존 760px 레이아웃 그대로 — 지휘자 배경·메뉴·뉴스 위치 불변.
   모바일(≤760): 세로 스택 + 유동 폭.
   갤러리 카드 그리드는 공통. */

/* ---------- 상단 우측 보조 링크 (contatti · links) ---------- */
#toplinks {
	height: 16px;               /* 구 #menutop과 동일 높이 → 메뉴가 붉은 띠 위에 정확히 */
	box-sizing: border-box;
	text-align: right;
	padding: 2px 8px 0 0;
	font: 10px/12px Arial, Helvetica, sans-serif;
	letter-spacing: 1px;
	overflow: hidden;
}

#toplinks a {
	color: #c99c6d;
	text-decoration: none;
	text-transform: uppercase;
	padding: 2px 3px;
}

#toplinks a:hover { color: #fefdb8; background-color: #580002; }
#toplinks span { color: #790000; padding: 0 2px; }

/* ---------- 메인 메뉴 보정: 볼드 + 붉은 띠 세로 중앙 ---------- */
#menu { height: 25px; padding-top: 15px; }
#menu li a { font-weight: bold; }

/* ---------- 갤러리 카드 그리드 (공통) ---------- */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	padding: 10px;
}

.gallery-card {
	position: relative;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	background: #0d0202;
	border: 1px solid rgba(121, 0, 0, 0.45);
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

.gallery-card:hover { border-color: #790000; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35); }

.gallery-card a { display: block; aspect-ratio: 4 / 3; overflow: hidden; }

.gallery-card img.gallery_img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	object-fit: cover;
	transition: transform 300ms ease;
}

.gallery-card a:hover img.gallery_img,
.gallery-card a:focus img.gallery_img { transform: scale(1.05); }

/* caption: dark gradient overlay revealed on hover */
.gallery-card figcaption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 26px 10px 9px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
	color: #f4f2ce;
	font: 12px/1.4 Georgia, "Times New Roman", serif;
	text-align: left;
	opacity: 0;
	transition: opacity 250ms ease;
	pointer-events: none;
}

.gallery-card:hover figcaption { opacity: 1; }

/* ---------- 모바일 전용 ---------- */
@media (max-width: 760px) {
	* { box-sizing: border-box; }
	img { max-width: 100%; height: auto; }
	html, body { min-width: 0; overflow-x: hidden; }

	/* 히어로: 로고 아래에서 지휘자 사진 시작 (지휘봉이 로고에 안 가리게) */
	#big_box { position: relative; width: 100%; background-position: right top 84px; background-size: auto 340px; }

	/* 상단 보조 링크: 히어로를 밀지 않게 우상단에 얹기 */
	#toplinks { position: absolute; top: 0; right: 8px; z-index: 5; height: auto; padding: 3px 2px; font-size: 9px; overflow: visible; }

	#testa {
		position: relative;
		width: 100%;
		height: auto;
		min-height: 0;
		padding: 428px 8px 8px;   /* 위 428px = 히어로(로고+지휘자) 영역 */
		display: flex;             /* 그 아래 사진 3장 가로 스트립 */
		gap: 8px;
	}
	/* 로고: 히어로 최상단에 절대 고정 (밀림 원천 차단) */
	#logo {
		position: absolute;
		top: 24px;   /* 붉은 띠 아래 + 여유 공간 */
		left: 10px;
		width: min(80%, 330px);
		height: auto;
		margin: 0;
	}
	#logo img { width: 100%; height: auto; }
	/* 헤더 사진 3장: 히어로 아래 가로 스트립으로 복원 */
	.img_testa {
		display: block;
		position: static;
		float: none;
		flex: 1 1 0;
		height: auto;
		aspect-ratio: 1;
		margin: 0;
		border: 3px solid #580002;
		overflow: hidden;
	}
	.img_testa img { width: 100%; height: 100%; object-fit: cover; display: block; }

	/* 메뉴: 2줄 이내로 컴팩트하게 */
	#menu { width: 100%; height: auto; min-height: 40px; padding: 8px 6px; }
	#menu ul { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
	#menu li { float: none; border-right: 0; }
	#menu li a { display: block; font-size: 13px; padding: 8px 7px; }

	#contenuti { display: block; width: 100%; }
	#box_sx, #box_dx { float: none; width: auto; margin: 12px 0 0; padding: 0 10px; }
	#box_dx { margin-top: 12px; }
	#pagina, #post, #news, #footer { width: 100%; }
	#pagina, #box_dx { padding: 8px; }

	#post p {
		padding: 12px 14px;
		font-size: 16px;
		line-height: 1.58;
		text-align: left;
	}
	#post ul { padding: 10px 18px 10px 28px; font-size: 15px; }
	#news { margin-bottom: 12px; }

	.gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 8px; }
	.gallery-card figcaption { font-size: 12px; }
}

@media (max-width: 420px) {
	.gallery-grid { grid-template-columns: 1fr; }
	.gallery-card a { aspect-ratio: 4 / 3; }
}

/* ===== Media (video) 페이지 ===== */
.media-vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 6px; }
.media-vcard { background: #fffdf5; border: 1px solid #d9c9a8; border-radius: 4px; overflow: hidden; }
.media-vthumb { position: relative; aspect-ratio: 16/9; background: #000; cursor: pointer; }
.media-vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-vthumb iframe { width: 100%; height: 100%; border: 0; display: block; }
.media-vthumb .vplay {
	position: absolute; top: 50%; left: 50%;
	width: 46px; height: 46px; margin: -23px 0 0 -23px;
	background: rgba(121, 0, 0, .88);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
}
.media-vthumb:hover .vplay { background: #9d1010; }
.vplay b { display: block; width: 0; height: 0; border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.vplay.vbig { width: 66px; height: 66px; margin: -33px 0 0 -33px; }
.vplay.vbig b { border-left-width: 22px; border-top-width: 13px; border-bottom-width: 13px; margin-left: 6px; }
.media-vtitle { margin: 8px 10px 10px; font-size: 12px; color: #3d2b1f; line-height: 1.45; }
.media-vcard.vplaying .vplay { display: none; }
@media (max-width: 760px) { .media-vgrid { grid-template-columns: 1fr; } }


/* Media 상세 */
.media-player-cp { position: relative; aspect-ratio: 16/9; background: #000; border: 1px solid #d9c9a8; border-radius: 4px; overflow: hidden; cursor: pointer; margin: 6px; }
.media-player-cp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-player-cp iframe { width: 100%; height: 100%; border: 0; display: block; }
.media-player-cp.on { cursor: default; }
.media-descr { margin: 14px 6px; padding: 14px 16px; background: #fffdf5; border: 1px solid #d9c9a8; border-radius: 4px; font-size: 12.5px; line-height: 1.7; color: #3d2b1f; }
.media-back { color: #790000; font-weight: bold; }
.media-vtitle { display: block; margin: 8px 10px 10px; font-size: 12px; color: #3d2b1f; line-height: 1.45; text-decoration: none; }
.media-vtitle:hover { color: #790000; text-decoration: underline; }

/* 갤러리 카테고리 드롭다운 */
.gal-select { margin: 4px 6px 12px; }
.gal-select select { padding: 6px 10px; font: 13px Georgia, serif; color: #3d2b1f; background: #fffdf5; border: 1px solid #b59b74; border-radius: 3px; }

/* Media 요소 폰트를 본문(Georgia)과 통일 */
.media-vtitle, .media-descr, .media-back, .media-vcard { font-family: Georgia, "Times New Roman", Times, serif; }

/* Leggi tutte le news — 필 라운드 버튼 (브론즈 골드) */
#news .btn-news {
	display: inline-block;
	padding: 9px 20px 10px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: #2e2014 !important;
	background: #b3924a;
	border-radius: 999px;
	text-decoration: none !important;
	box-shadow: 0 2px 5px rgba(0, 0, 0, .16);
	transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
#news .btn-news .arr { display: inline-block; margin-left: 6px; transition: transform .25s ease; }
#news .btn-news:hover {
	color: #1d1105 !important;
	background: #c6a458;
	transform: scale(1.03);
	box-shadow: 0 4px 10px rgba(0, 0, 0, .24);
	text-decoration: none !important;
}
#news .btn-news:hover .arr { transform: translateX(4px); }
#news .destra { text-align: center; }   /* 버튼 중앙 정렬 */

/* ============================================================
   News — 기사 목록 (pagine/archive.php, cat=1)
   ============================================================ */
#post .news-item {
	padding: 4px 20px 22px;
	margin: 0 0 22px;
	border-bottom: 1px solid #e0d3bb;
	text-align: left;            /* #post 의 중앙정렬 상속 해제 */
}
#post .news-item:last-of-type { border-bottom: 0; }

#post h2.news-h {
	margin: 0;
	padding: 0;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 17px;
	font-weight: normal;
	line-height: 1.35;
	color: #790000;
	background: none;
	text-align: left;
}
#post p.news-date {
	padding: 3px 0 0;
	margin: 0 0 12px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #9a8a72;
	text-align: left;
}

/* 사진 — 최대 3장, 가로로 나란히. 세로 포스터도 잘리지 않음 */
#post .news-pics {
	display: block;
	margin: 0 0 14px;
	font-size: 0;               /* inline-block 사이 공백 제거 */
	text-align: left;
}
#post .news-pics a {
	display: inline-block;
	vertical-align: top;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 8px 8px 0;
	line-height: 0;
	border: 4px solid #790000;
	background: #fff;
	transition: border-color .25s ease, box-shadow .25s ease;
}
#post .news-pics a:hover {
	border-color: #b3924a;
	box-shadow: 0 3px 9px rgba(0, 0, 0, .22);
}
#post .news-pics img {
	display: block;
	max-height: 230px;
	max-width: 100%;
	width: auto;
	height: auto;
	border: 0;                  /* #post p img 의 기존 테두리 무효화 */
	margin: 0;
}

#post .news-body {
	color: #000;
	text-align: justify;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	line-height: 1.75;
	clear: both;
}
#post .news-body a { color: #790000; text-decoration: none; }
#post .news-body a:hover { text-decoration: underline; }

/* 페이지 번호 */
#post .pagenav { display: inline-block; margin-top: 4px; }
#post .linkpag {
	display: inline-block;
	min-width: 24px;
	padding: 4px 6px;
	margin: 0 3px 4px 0;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	text-align: center;
	color: #790000;
	background: #f2ead9;
	border: 1px solid #ddcfb6;
	text-decoration: none;
	transition: background .2s ease, color .2s ease;
}
a.linkpag:hover { background: #790000; color: #fff; text-decoration: none; }
#post .linkpag.on { background: #790000; color: #fff; border-color: #790000; }

@media (max-width: 760px) {
	#post .news-item { padding: 4px 14px 20px; }
	#post h2.news-h { font-size: 16px; }
	#post .news-pics a { margin: 0 6px 6px 0; border-width: 3px; }
	#post .news-pics img { max-height: 190px; }
	#post .news-body { font-size: 15px; line-height: 1.62; text-align: left; }
}

/* Agenda · Repertorio · Biografia · Contact — 제목/날짜 없이 사진+본문만 */
#post .news-item.plain { border-bottom: 0; padding-top: 10px; }
