/* Galeria Coppermine îmbrăcată în tema Vernisaje: tabelele vechi devin grile de lucrări */

.cpg .gal-head { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.cpg .gal-head__inner { position: relative; padding-block: clamp(40px, 6vw, 84px) clamp(22px, 3vw, 36px); }
.cpg .gal-head__title { font: 400 clamp(64px, 11vw, 168px)/.86 var(--serif); letter-spacing: -.05em; margin: 0 0 24px; }
.cpg .gal-head__title a { text-decoration: none; }
.cpg .gal-head__title a:hover { color: var(--ink); font-style: italic; }
.cpg .gal-head .hero__blobs i { opacity: .38; }

/* meniul galeriei: pastile */
.gal-menu { display: flex; flex-wrap: wrap; gap: 8px 6px; align-items: center; font: 600 14px/1 var(--sans); }
.gal-menu ul { list-style: none; margin: 0; padding: 0; display: contents; }
.gal-menu li { display: inline-flex; }
.gal-menu a { display: inline-block; padding: 10px 15px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; background: color-mix(in srgb, var(--card) 70%, transparent); transition: background .2s, color .2s, border-color .2s; }
.gal-menu a:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.gal-menu br, .gal-menu img, .gal-menu .icon { display: none; }

.gal-body { padding-block: clamp(36px, 5vw, 70px); }
.cpg .gal-body img[src*="spacer.gif"] { display: none !important; }
.cpg .gal-body br { line-height: 0; }

/* tabele de bază */
.cpg table { border-collapse: collapse; border-spacing: 0; }
.cpg .maintable { width: 100% !important; background: transparent; margin: 0 0 clamp(40px, 6vw, 80px); border: 0; }
.cpg .maintable td { padding: 0; border: 0; background: transparent; vertical-align: top; }
.cpg .tableh1 {
	padding: 0 0 16px !important;
	border-bottom: 2px solid var(--ink) !important;
	font: 400 clamp(30px, 3.6vw, 52px)/1.05 var(--serif);
	letter-spacing: -.03em;
	color: var(--ink);
	text-align: left;
}
.cpg .tableh1 a { text-decoration: none; }
.cpg .tableh1 .statlink, .cpg .tableh1 h2 { font: inherit; margin: 0; }
.cpg td.tableh1 + td.tableh1 { font: 700 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; text-align: center; }
.cpg .tableh2 { padding: 0 !important; }
.cpg .tableb { padding: 18px 0 !important; border-bottom: 1px solid var(--line) !important; }
.cpg .footer, .cpg .tablef { padding: 18px 0 !important; color: var(--muted); font-size: 14px; }
.cpg .tablef a, .cpg .navmenu a { text-decoration: none; }

/* lista de colecții (index) */
.cpg .catrow td, .cpg .catrow_noalb td { padding: 20px 0 !important; border-bottom: 1px solid var(--line); }
.cpg .catlink a, .cpg .maintable td > a[href*="cat="], .cpg .maintable td > span.catlink a {
	font: 400 clamp(22px, 2vw, 30px)/1.15 var(--serif); letter-spacing: -.02em; text-decoration: none;
}
.cpg .maintable td a[href*="cat="]:hover { color: var(--accent); font-style: italic; }
.cpg td[align="center"].tableb { font: 400 22px/1 var(--serif); color: var(--ink-2); }
.cpg .maintable .tableb img.image { width: 96px !important; height: 72px !important; object-fit: cover; margin-right: 16px; float: left; box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .5); }
.cpg .album_stat, .cpg .thumb_caption, .cpg .thumb_num { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* grile: albume și miniaturi */
.cpg .maintable:has(.alblink) > tbody,
.cpg .maintable:has(td.thumbnails a > img.thumbnail):not(:has(.filmstrip_background)) > tbody {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: clamp(26px, 3vw, 46px) clamp(20px, 2.4vw, 36px);
}
.cpg .maintable:has(.alblink) > tbody > tr,
.cpg .maintable:has(td.thumbnails a > img.thumbnail):not(:has(.filmstrip_background)) > tbody > tr { display: contents; }
.cpg .maintable:has(.alblink) > tbody > tr > td,
.cpg .maintable:has(td.thumbnails a > img.thumbnail):not(:has(.filmstrip_background)) > tbody > tr > td { display: block; width: auto !important; border: 0 !important; padding: 0 !important; }
.cpg .maintable > tbody > tr > td.tableh1,
.cpg .maintable > tbody > tr > td[colspan],
.cpg .maintable > tbody > tr > td.tablef,
.cpg .maintable > tbody > tr > td.footer { grid-column: 1 / -1; }
.cpg .maintable > tbody > tr > td.thumbnails:not(:has(img)),
.cpg .maintable > tbody > tr > td:empty { display: none !important; }

/* card de album */
.cpg td:has(> table .alblink) > table, .cpg td:has(> table .alblink) > table > tbody { display: flex; flex-direction: column; width: 100%; }
.cpg td:has(> table .alblink) > table > tbody > tr { display: contents; }
.cpg td:has(> table .alblink) > table > tbody > tr > td { display: block; width: auto !important; padding: 0 !important; border: 0 !important; text-align: left; }
.cpg td:has(> table .alblink) > table > tbody > tr:nth-child(3) { order: -1; }
.cpg td:has(> table .alblink) > table > tbody > tr:nth-child(3) > td:not(.thumbnails):not(.tableb) { display: none; }
.cpg .alblink { display: block; margin-top: 14px; }
.cpg .alblink a { font: 500 21px/1.2 var(--serif); letter-spacing: -.01em; text-decoration: none; }

/* paspartu pentru lucrări */
.cpg td.thumbnails { text-align: left !important; }
.cpg td.thumbnails a { display: block; background: #fff; padding: 10px; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 22px 40px -22px rgba(40, 25, 10, .45); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.cpg td.thumbnails a:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 0 30px 50px -24px rgba(40, 25, 10, .55); }
.cpg td.thumbnails img.thumbnail, .cpg td.thumbnails img.image {
	display: block; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; border: 0; margin: 0; float: none;
	background: var(--paper-2);
}
.cpg .thumb_title { display: block; margin-top: 12px; font: 500 17px/1.25 var(--serif); }
.cpg .thumb_title_views { font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.cpg .thumb_caption { display: block; }

/* navigare / paginare */
.cpg .navmenu { padding: 0 !important; }
.cpg .navmenu a, .cpg td.navmenu a, .cpg .tablef a[href*="page="] {
	display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
	border: 1.5px solid var(--line); border-radius: 999px; font: 700 14px/1 var(--sans);
}
.cpg .navmenu a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* pagina unei lucrări */
.cpg .display_media { padding: clamp(10px, 3vw, 40px) 0 !important; text-align: center; }
.cpg .display_media img.image, .cpg #thumb img, .cpg .display_media img {
	max-width: 100% !important; height: auto !important; background: #fff;
	padding: clamp(10px, 1.6vw, 22px);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 40px 70px -30px rgba(40, 25, 10, .5);
}
.cpg .pic_title, .cpg .img_caption_table th { font: 400 clamp(28px, 3vw, 44px)/1.1 var(--serif); letter-spacing: -.02em; }
.cpg .navmenu_pic a { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); }
.cpg .navmenu_pic a:hover { background: var(--ink); border-color: var(--ink); }
.cpg .navmenu_pic img { filter: grayscale(1); }
.cpg .navmenu_pic a:hover img { filter: invert(1); }
.cpg .filmstrip_background { background: transparent !important; }
.cpg .strip_image img, .cpg .thumb img { border: 0; box-shadow: 0 8px 16px -10px rgba(0, 0, 0, .5); opacity: .75; transition: opacity .2s; }
.cpg .strip_image img:hover, .cpg .middlethumb img { opacity: 1; }
.cpg .tape { display: none; }
.cpg #picinfo td, .cpg .maintable td.tableb_alternate { font-size: 15px; }
.cpg #picinfo .tableb { padding: 10px 0 !important; }

/* formulare (căutare, login) */
.cpg input[type="text"], .cpg input[type="password"], .cpg input[type="email"], .cpg select, .cpg textarea {
	padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; font: inherit; max-width: 100%;
}
.cpg input[type="submit"], .cpg button.button, .cpg .button {
	padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 700 14px/1 var(--sans); cursor: pointer;
}
.cpg input[type="submit"]:hover, .cpg .button:hover { background: var(--accent); border-color: var(--accent); }
.cpg #cpgChooseLanguageWrapper, .cpg .listbox_lang { display: none; }
.cpg .gal-powered, .cpg .gal-powered a { color: rgba(243, 239, 230, .4); font-size: 12px; }

@media (max-width: 640px) {
	.cpg .maintable:has(.alblink) > tbody,
	.cpg .maintable:has(td.thumbnails a > img.thumbnail):not(:has(.filmstrip_background)) > tbody { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
	.cpg td.thumbnails a { padding: 6px; }
	.cpg .alblink a { font-size: 17px; }
	.cpg .maintable td[align="center"].tableb { font-size: 16px; padding: 18px 6px !important; }
	.cpg .maintable .tableb img.image { width: 64px !important; height: 52px !important; }
}

/* --- ajustări v2 --- */
.gal-menu { font-size: 0; }
.gal-menu a { font-size: 14px; }
.cpg .catlink { display: block; margin-bottom: 4px; }
.cpg td.catrow { padding: 18px 0 !important; border-bottom: 1px solid var(--line); vertical-align: middle !important; color: var(--muted); font-size: 15px; }
.cpg td.catrow[align="center"] { font: 400 24px/1 var(--serif); color: var(--ink-2); }
.cpg td.catrow table td { padding: 0 !important; vertical-align: middle; }
.cpg td.catrow img.thumbnail { width: 88px !important; height: 66px !important; object-fit: cover; margin-right: 18px; box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .5); border: 0; }
.cpg .maintable .tableb img.image { width: auto !important; height: auto !important; float: none; margin: 0; }
.cpg td.thumbnails a { line-height: 0; }
.cpg td.thumbnails img.thumbnail, .cpg td.thumbnails img.image { width: 100% !important; }
.cpg .maintable td.tableb[colspan="3"]:empty { display: none; }
.cpg .maintable:has(td.catrow) td.tableh1:only-child, .cpg .statlink { font: 600 13px/1.4 var(--sans) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 0 !important; }
.cpg .statlink b { color: var(--ink); }
.cpg table:has(> tbody > tr > td.filmstrip_background), .cpg .filmstrip_background { display: none !important; }
.cpg td.tableh2, .cpg td.tableh2[height] { height: auto !important; line-height: 1.2; }
.cpg .alblink { margin: 14px 0 12px; }
.cpg #picinfo td, .cpg .maintable:has(#picinfo) td, .cpg table#picinfo td { padding: 9px 12px 9px 0 !important; vertical-align: top; }
.cpg #picinfo td a, .cpg #picinfo td { font: 400 15px/1.45 var(--sans) !important; overflow-wrap: anywhere; }
