/**
 * Casa Pere Llibre — Passeig de Gràcia Architectural Gallery & Editorial Stylesheet (v1.0.0)
 *
 * Distinct from José Roger Balet (dark vertical sidebar) and Edificio Alhambra (yellow pill chapter bar):
 * - Warm Alabaster & Ivory canvas (#FAF7F0 / #FFFFFF / #F4EFE4)
 * - Exact Golden-Yellow Palette extracted from the Casa Pere Llibre logo:
 *   #DCB86F (Principal Champagne Gold), #E0C280 (Luminous Gold), #C19D2B (150 Anniversary Gold), #9E7B1C (Deep Architectural Gold)
 * - High-contrast Editorial Serif (Cormorant Garamond) + Geometric Sans (Outfit)
 * - Glassmorphism Header with ES / EN / CA pill language selector
 * - Split Magazine Hero with CSS-injected 4-cell Golden Bento Technical Grid on the front page
 * - Floating Bottom Glassmorphism Command Bar & Section Drawer
 * - Interactive WebP Lightbox with zoom (+, -, 1:1, wheel, pan)
 */

:root {
	--bg-ivory: #FAF7F0;
	--bg-surface: #FFFFFF;
	--bg-cream: #F5EFE2;
	--bg-gold-tint: #FBF6EA;
	--gold-light: #E0C280;
	--gold-primary: #DCB86F;
	--gold-rich: #C19D2B;
	--gold-deep: #9E7B1C;
	--gold-dark: #7A5C10;
	--ink-primary: #1C1915;
	--ink-secondary: #4A4339;
	--ink-muted: #786E60;
	--border-gold: rgba(193, 157, 43, 0.28);
	--border-gold-strong: rgba(193, 157, 43, 0.55);
	--border-subtle: rgba(28, 25, 21, 0.08);
	--shadow-editorial: 0 18px 42px -12px rgba(28, 25, 21, 0.07), 0 4px 14px -2px rgba(193, 157, 43, 0.08);
	--shadow-card-hover: 0 24px 52px -12px rgba(158, 123, 28, 0.16), 0 6px 20px -4px rgba(28, 25, 21, 0.08);
	--radius-lg: 22px;
	--radius-md: 14px;
	--radius-sm: 10px;
	--font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--container-max: 1180px;
}

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
	background-color: var(--bg-ivory);
	color: var(--ink-primary);
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-weight: 400;
	line-height: 1.72;
	color: var(--ink-primary);
	background-color: var(--bg-ivory);
	background-image:
		radial-gradient(circle at 12% 8%, rgba(224, 194, 128, 0.14) 0%, transparent 38%),
		radial-gradient(circle at 88% 22%, rgba(220, 184, 111, 0.11) 0%, transparent 42%);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* Top Golden Reading Progress Bar */
.reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3.5px;
	background: rgba(220, 184, 111, 0.18);
	z-index: 1200;
	pointer-events: none;
}

.reading-progress-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--gold-deep) 0%, var(--gold-rich) 45%, var(--gold-primary) 80%, var(--gold-light) 100%);
	box-shadow: 0 0 12px rgba(193, 157, 43, 0.55);
	transition: width 0.12s ease-out;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	background: var(--ink-primary);
	color: var(--bg-surface);
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	z-index: 1300;
	text-decoration: none;
	font-weight: 600;
}
.skip-link:focus {
	left: 16px;
}

/* Crystalline Glassmorphism Passeig de Gràcia Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(250, 247, 240, 0.86);
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	border-bottom: 1px solid var(--border-gold);
	transition: box-shadow 0.25s ease, background 0.25s ease;
}

.header-inner {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 12px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: var(--ink-primary);
	group: logo;
}

.logo-emblem-ring {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--bg-surface);
	border: 1.5px solid var(--gold-primary);
	box-shadow: 0 4px 14px rgba(193, 157, 43, 0.22);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover .logo-emblem-ring {
	transform: rotate(12deg) scale(1.04);
	box-shadow: 0 6px 18px rgba(193, 157, 43, 0.38);
}

.site-logo-img {
	width: 38px;
	height: 38px;
	object-fit: contain;
	display: block;
}

.logo-text-group {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.site-logo-text {
	font-family: var(--font-display);
	font-size: 1.48rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: var(--ink-primary);
}

.site-logo-sub {
	font-family: var(--font-sans);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold-deep);
	margin-top: 2px;
}

.header-nav-group {
	display: flex;
	align-items: center;
	gap: 18px;
}

.primary-menu {
	list-style: none;
	margin: 0;
	padding: 4px;
	display: flex;
	align-items: center;
	gap: 4px;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid var(--border-gold);
	border-radius: 999px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.primary-menu li {
	margin: 0;
}

.primary-menu a {
	display: inline-block;
	padding: 7px 16px;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--ink-secondary);
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: all 0.22s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
	background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%);
	color: var(--ink-primary);
	font-weight: 600;
	box-shadow: 0 3px 10px rgba(193, 157, 43, 0.28);
}

/* Integrated ES / EN / CA Language Switcher */
.lang-switcher {
	display: inline-flex;
	align-items: center;
	background: var(--bg-surface);
	border: 1px solid var(--border-gold-strong);
	border-radius: 999px;
	padding: 3px;
	gap: 2px;
	box-shadow: 0 2px 8px rgba(193, 157, 43, 0.12);
}

.lang-pill {
	font-family: var(--font-sans);
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: var(--ink-muted);
	padding: 5px 10px;
	border-radius: 999px;
	transition: all 0.2s ease;
}

.lang-pill:hover {
	color: var(--ink-primary);
	background: var(--bg-gold-tint);
}

.lang-pill.is-active {
	background: var(--ink-primary);
	color: var(--gold-light);
	box-shadow: 0 2px 6px rgba(28, 25, 21, 0.22);
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	background: var(--bg-surface);
	border: 1px solid var(--border-gold-strong);
	border-radius: 999px;
	padding: 8px 14px;
	font-family: var(--font-sans);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink-primary);
	cursor: pointer;
}

.nav-toggle-bars {
	width: 16px;
	height: 2px;
	background: var(--gold-deep);
	position: relative;
	display: inline-block;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 16px;
	height: 2px;
	background: var(--gold-deep);
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

/* Architectural Split Magazine Hero (Front Page) */
.cpl-hero-home {
	max-width: var(--container-max);
	margin: 28px auto 18px;
	padding: 0 24px;
}

.cpl-hero-inner {
	display: grid;
	grid-template-columns: 1.12fr 0.88fr;
	gap: 36px;
	align-items: stretch;
	background: linear-gradient(145deg, #FFFFFF 0%, #FDFBF5 58%, #F8F1E0 100%);
	border: 1px solid var(--border-gold-strong);
	border-radius: var(--radius-lg);
	padding: 44px 46px;
	box-shadow: var(--shadow-editorial);
	position: relative;
	overflow: hidden;
}

/* Subtle Neo-Mudéjar Geometric Ornament Watermark in Hero Corner */
.cpl-hero-inner::before {
	content: "";
	position: absolute;
	top: -80px;
	right: -80px;
	width: 280px;
	height: 280px;
	border-radius: 50%;
	border: 24px solid rgba(220, 184, 111, 0.12);
	pointer-events: none;
}

.cpl-hero-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	position: relative;
	z-index: 1;
}

.cpl-hero-copy::before {
	content: "PASEO DE GRACIA, 24 · BARCELONA · PATRIMONIO NEOMUDÉJAR (1872)";
	display: inline-block;
	align-self: flex-start;
	font-family: var(--font-sans);
	font-size: 0.73rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--gold-dark);
	background: linear-gradient(90deg, rgba(224, 194, 128, 0.28), rgba(220, 184, 111, 0.14));
	border: 1px solid var(--border-gold-strong);
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 20px;
}

.cpl-hero-copy h1 {
	font-family: var(--font-display);
	font-size: clamp(2.25rem, 3.8vw, 3.35rem);
	font-weight: 700;
	line-height: 1.12;
	color: var(--ink-primary);
	margin: 0 0 26px;
	letter-spacing: -0.01em;
}

/* Golden Bento Architectural Spec Grid via CSS ::after on .cpl-hero-copy (0 extra DOM text nodes) */
.cpl-hero-copy::after {
	content: "ARQUITECTO: Domènec Balet i Nadal (1871–1872)   ·   ESTILO: Neomudéjar / Orientalista   ·   UBICACIÓN: Pg. de Gràcia, 24 (Pasaje Maria Canals)   ·   USO ACTUAL: Hotel Praktik Èssens";
	display: block;
	font-family: var(--font-sans);
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.65;
	color: var(--ink-secondary);
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid var(--border-gold);
	border-left: 4px solid var(--gold-rich);
	border-radius: var(--radius-md);
	padding: 14px 18px;
	box-shadow: 0 6px 18px rgba(193, 157, 43, 0.08);
}

.cpl-hero-media {
	display: flex;
	align-items: center;
	justify-content: center;
}

.cpl-hero-media .figure-block {
	margin: 0;
	width: 100%;
	max-width: 390px;
}

.cpl-hero-media .figure-img-wrap {
	border-radius: 180px 180px 18px 18px; /* Subtle Neo-Mudéjar arch crown silhouette */
	overflow: hidden;
	border: 3px solid var(--gold-primary);
	box-shadow: 0 18px 40px rgba(28, 25, 21, 0.16);
}

.cpl-hero-media img {
	width: 100%;
	height: 410px;
	object-fit: cover;
	display: block;
}

/* Subpage Editorial Banner Hero */
.page-hero {
	max-width: var(--container-max);
	margin: 26px auto 22px;
	padding: 0 24px;
}

.page-hero-inner {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 32px;
	background: linear-gradient(135deg, #FFFFFF 0%, #FCF8EE 60%, #F6ECD6 100%);
	border: 1px solid var(--border-gold-strong);
	border-radius: var(--radius-lg);
	padding: 32px 42px;
	box-shadow: var(--shadow-editorial);
	position: relative;
	overflow: hidden;
}

.page-hero-text::before {
	content: "CASA PERE LLIBRE · PASSEIG DE GRÀCIA, 24";
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.15em;
	color: var(--gold-dark);
	margin-bottom: 8px;
}

.page-hero-text h1 {
	font-family: var(--font-display);
	font-size: clamp(2.1rem, 3.4vw, 3rem);
	font-weight: 700;
	line-height: 1.12;
	margin: 0;
	color: var(--ink-primary);
}

.page-hero-thumb .figure-block {
	margin: 0;
}

.page-hero-thumb .figure-img-wrap {
	width: 190px;
	height: 136px;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 2px solid var(--gold-primary);
	box-shadow: 0 10px 24px rgba(28, 25, 21, 0.12);
}

.page-hero-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Main Container & Editorial Rhythm */
.container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 8px 24px 72px;
}

article {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

/* Editorial Table of Contents Card on Historia */
.toc {
	background: linear-gradient(145deg, #FFFFFF 0%, #FDF9EE 100%);
	border: 1px solid var(--border-gold-strong);
	border-left: 5px solid var(--gold-rich);
	border-radius: var(--radius-lg);
	padding: 26px 34px;
	margin-bottom: 26px;
	box-shadow: var(--shadow-editorial);
}

.toc h2,
.toc .toc-heading {
	font-family: var(--font-display);
	font-size: 1.65rem;
	font-weight: 700;
	color: var(--ink-primary);
	margin: 0 0 10px;
}

.toc-body p {
	margin: 0 0 12px;
	color: var(--ink-secondary);
	font-weight: 500;
}

.toc-body ol,
.toc-body ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 10px 18px;
	counter-reset: toc-counter;
}

.toc-body li {
	counter-increment: toc-counter;
	background: var(--bg-surface);
	border: 1px solid var(--border-gold);
	border-radius: var(--radius-sm);
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: all 0.2s ease;
}

.toc-body li::before {
	content: counter(toc-counter, decimal-leading-zero);
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--gold-dark);
	background: rgba(224, 194, 128, 0.25);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.toc-body li:hover {
	border-color: var(--gold-rich);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(193, 157, 43, 0.16);
}

.toc-body a {
	color: var(--ink-primary);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.94rem;
}

.toc-body a:hover {
	color: var(--gold-dark);
}

/* Sections & Cards */
.cpl-section {
	background: var(--bg-surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: 28px 34px;
	box-shadow: 0 8px 26px -10px rgba(28, 25, 21, 0.05);
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.cpl-section:hover {
	border-color: var(--border-gold);
}

/* Chapter Heading Band (Gold-Accented Architectural Divider) */
.cpl-section-heading {
	background: linear-gradient(90deg, #FDF9EE 0%, #FAF2DD 65%, #FDF9EE 100%);
	border: 1px solid var(--border-gold-strong);
	border-left: 6px solid var(--gold-rich);
	padding: 20px 30px;
	margin-top: 14px;
}

.cpl-section-heading h2 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.65rem, 2.5vw, 2.15rem);
	font-weight: 700;
	color: var(--ink-primary);
	letter-spacing: 0.01em;
}

.cpl-section-band {
	background: linear-gradient(145deg, #FFFFFF 0%, #FCF8EE 100%);
	border: 1px solid var(--border-gold);
}

.cpl-section-quote,
.cpl-highlight-box {
	background: linear-gradient(145deg, #FDF9EE 0%, #F9F1DC 100%);
	border: 1px solid var(--border-gold-strong);
	border-radius: var(--radius-md);
	padding: 22px 26px;
}

/* Typography inside sections */
.cpl-section h2 {
	font-family: var(--font-display);
	font-size: clamp(1.55rem, 2.3vw, 2rem);
	font-weight: 700;
	color: var(--ink-primary);
	margin: 0 0 12px;
	line-height: 1.2;
}

.cpl-section h2 a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.cpl-section h2 a:hover {
	color: var(--gold-dark);
	border-bottom-color: var(--gold-primary);
}

.cpl-section h3 {
	font-family: var(--font-display);
	font-size: 1.38rem;
	font-weight: 700;
	color: var(--gold-dark);
	margin: 0 0 10px;
	line-height: 1.25;
}

.cpl-section p {
	margin: 0 0 14px;
	color: var(--ink-secondary);
	font-size: 1.02rem;
	line-height: 1.76;
}
.cpl-section p:last-child {
	margin-bottom: 0;
}

.cpl-section a:not(.cpl-btn):not(.figure-link):not(.gmaps-review-link):not(.drive-file-badge) {
	color: var(--gold-dark);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--gold-primary);
	text-underline-offset: 3px;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.cpl-section a:not(.cpl-btn):not(.figure-link):not(.gmaps-review-link):not(.drive-file-badge):hover {
	color: var(--ink-primary);
	background-color: rgba(224, 194, 128, 0.22);
}

.source-note {
	font-size: 0.88rem !important;
	color: var(--ink-muted) !important;
	font-style: italic;
	border-top: 1px dashed var(--border-gold);
	padding-top: 10px;
	margin-top: 12px !important;
}

/* Golden Buttons */
.cpl-btn-wrap {
	margin-top: 16px;
}

.cpl-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 55%, var(--gold-rich) 100%);
	color: var(--ink-primary);
	font-family: var(--font-sans);
	font-size: 0.94rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 11px 24px;
	border-radius: 999px;
	border: 1px solid rgba(158, 123, 28, 0.45);
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(193, 157, 43, 0.28);
	transition: all 0.25s ease;
}

.cpl-btn::after {
	content: "→";
	font-weight: 700;
	transition: transform 0.22s ease;
}

.cpl-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(193, 157, 43, 0.42);
	background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-rich) 100%);
}

.cpl-btn:hover::after {
	transform: translateX(4px);
}

/* Multi-Column Grid Layouts */
.cpl-media-row,
.figure-row,
.cpl-cards-row,
.embed-row {
	display: grid;
	gap: 24px;
	align-items: center;
}

.cpl-media-row.cols-2,
.figure-row.cols-2,
.cpl-cards-row.cols-2,
.embed-row.cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cpl-media-row.cols-3,
.figure-row.cols-3,
.cpl-cards-row.cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cpl-media-row.cols-4,
.figure-row.cols-4,
.cpl-cards-row.cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Front page 3-column intro badge row (Logo | Intro Text | 150 Anniversary Emblem) */
.is-front #h\.1727939c32772679_55 .cpl-media-row.cols-3 {
	grid-template-columns: 200px 1fr 200px;
	background: linear-gradient(135deg, #FFFFFF 0%, #FDF9EF 100%);
}

/* Figures, Blueprints & Archival Photos */
.figure-block {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.figure-img-wrap,
.figure-link {
	position: relative;
	display: inline-block;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--border-gold);
	background: #FCFBF8;
	box-shadow: 0 8px 22px rgba(28, 25, 21, 0.08);
	transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
	max-width: 100%;
}

.figure-img-wrap {
	cursor: zoom-in;
}

.figure-img-wrap::after {
	content: "🔍 Ampliar";
	position: absolute;
	right: 10px;
	bottom: 10px;
	background: rgba(28, 25, 21, 0.82);
	color: var(--gold-light);
	font-family: var(--font-sans);
	font-size: 0.72rem;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid rgba(224, 194, 128, 0.45);
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.22s ease, transform 0.22s ease;
	pointer-events: none;
}

.figure-img-wrap:hover::after {
	opacity: 1;
	transform: translateY(0);
}

.figure-img-wrap:hover,
.figure-link:hover {
	transform: translateY(-3px);
	border-color: var(--gold-rich);
	box-shadow: var(--shadow-card-hover);
}

.figure-block img {
	display: block;
	max-width: 100%;
	height: auto;
	max-height: 360px;
	width: auto;
	object-fit: contain;
	margin: 0 auto;
}

.figure-block.is-icon img {
	max-height: 150px;
}

.figure-block.is-icon .figure-img-wrap,
.figure-block.is-icon .figure-link {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
}

.figure-block figcaption {
	margin-top: 10px;
	font-size: 0.88rem;
	color: var(--ink-muted);
	text-align: center;
	line-height: 1.45;
}

.figure-block figcaption p {
	margin: 0;
	font-size: 0.88rem;
	color: var(--ink-muted);
}

/* Video, Google Maps, Street View & Drive PDF Embeds */
.video-frame-wrap,
.map-embed-frame,
.drive-embed-card {
	width: 100%;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--border-gold-strong);
	background: var(--bg-surface);
	box-shadow: var(--shadow-editorial);
}

.video-frame {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
}

.video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.map-embed-frame iframe {
	width: 100%;
	height: 420px;
	border: 0;
	display: block;
}

.drive-preview-frame iframe {
	width: 100%;
	height: 460px;
	border: 0;
	display: block;
}

.drive-card-footer {
	padding: 12px 18px;
	background: var(--bg-gold-tint);
	border-top: 1px solid var(--border-gold);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.drive-file-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--ink-primary);
	font-weight: 600;
	font-size: 0.92rem;
}

.gmaps-review-card {
	display: flex;
	justify-content: center;
}

.gmaps-review-link {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	background: linear-gradient(135deg, #FFFFFF 0%, #FDF8EB 100%);
	border: 1.5px solid var(--gold-primary);
	border-radius: var(--radius-lg);
	padding: 16px 24px;
	text-decoration: none;
	color: var(--ink-primary);
	box-shadow: var(--shadow-editorial);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gmaps-review-link:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-card-hover);
}

.gmaps-review-img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--border-gold);
}

.gmaps-review-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.gmaps-review-title {
	font-family: var(--font-display);
	font-size: 1.22rem;
	font-weight: 700;
	color: var(--ink-primary);
}

.gmaps-review-stars {
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--gold-dark);
}

/* Floating Architectural Command Bar (Bottom Glassmorphism Dock) */
.cpl-command-bar {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	z-index: 1050;
	width: min(560px, calc(100vw - 32px));
	pointer-events: none;
}

.cpl-command-dock,
.cpl-command-drawer {
	pointer-events: auto;
}

.cpl-command-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(28, 25, 21, 0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	color: var(--bg-ivory);
	border: 1.5px solid var(--gold-primary);
	border-radius: 999px;
	padding: 10px 18px;
	font-family: var(--font-sans);
	font-size: 0.88rem;
	font-weight: 500;
	cursor: pointer;
	box-shadow: 0 14px 34px rgba(28, 25, 21, 0.32), 0 0 0 1px rgba(224, 194, 128, 0.16);
	transition: all 0.22s ease;
}

.cpl-command-trigger:hover {
	border-color: var(--gold-light);
	transform: translateY(-2px);
}

.cpl-command-badge {
	background: linear-gradient(135deg, var(--gold-light), var(--gold-rich));
	color: var(--ink-primary);
	font-weight: 700;
	font-size: 0.76rem;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cpl-command-current {
	flex: 1;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #FFFDF8;
}

.cpl-command-chevron {
	color: var(--gold-light);
	font-size: 0.85rem;
	transition: transform 0.22s ease;
}

.cpl-command-trigger[aria-expanded="true"] .cpl-command-chevron {
	transform: rotate(180deg);
}

.cpl-command-drawer {
	background: rgba(255, 253, 248, 0.97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1.5px solid var(--gold-primary);
	border-radius: var(--radius-lg);
	padding: 16px 18px;
	margin-bottom: 10px;
	box-shadow: 0 24px 48px rgba(28, 25, 21, 0.24);
	max-height: 60vh;
	overflow-y: auto;
}

.cpl-command-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 10px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--border-gold);
}

.cpl-command-drawer-title {
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--ink-primary);
}

.cpl-command-drawer-close {
	background: transparent;
	border: 0;
	font-size: 1.35rem;
	line-height: 1;
	color: var(--ink-muted);
	cursor: pointer;
}

.cpl-command-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
}

.cpl-command-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	text-decoration: none;
	color: var(--ink-primary);
	font-size: 0.9rem;
	font-weight: 500;
	transition: background 0.18s ease;
}

.cpl-command-link:hover,
.cpl-command-link.is-active {
	background: rgba(224, 194, 128, 0.25);
	color: var(--ink-primary);
	font-weight: 600;
}

.cpl-command-num {
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--gold-dark);
	min-width: 24px;
}

/* Footer */
.site-footer {
	background: linear-gradient(180deg, #F5EFE2 0%, #EDE3CE 100%);
	border-top: 1px solid var(--border-gold-strong);
	padding: 36px 24px 96px;
	text-align: center;
}

.footer-inner {
	max-width: var(--container-max);
	margin: 0 auto;
}

.footer-copy {
	margin: 0;
	font-size: 0.94rem;
	color: var(--ink-secondary);
}

.footer-copy a {
	color: var(--gold-dark);
	font-weight: 600;
	text-decoration: none;
}

.footer-copy a:hover {
	text-decoration: underline;
}

/* Back to Top Button */
.back-to-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--bg-surface);
	color: var(--ink-primary);
	border: 1.5px solid var(--gold-primary);
	box-shadow: 0 8px 22px rgba(28, 25, 21, 0.16);
	cursor: pointer;
	z-index: 1040;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	font-weight: 700;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.22s ease;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-to-top:hover {
	background: var(--gold-primary);
}

/* Interactive Blueprint & Photo Lightbox Modal */
.cpl-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cpl-lightbox[hidden] {
	display: none !important;
}

.cpl-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 17, 13, 0.92);
	backdrop-filter: blur(10px);
}

.cpl-lightbox-content {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 18px 24px;
}

.cpl-lightbox-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--bg-ivory);
	z-index: 2;
}

.cpl-lightbox-counter {
	font-family: var(--font-sans);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--gold-light);
}

.cpl-lightbox-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cpl-lightbox-btn,
.cpl-lightbox-close {
	background: rgba(255, 255, 255, 0.12);
	color: #FFFFFF;
	border: 1px solid rgba(224, 194, 128, 0.45);
	border-radius: 999px;
	padding: 7px 14px;
	font-family: var(--font-sans);
	font-size: 0.84rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.cpl-lightbox-btn:hover,
.cpl-lightbox-close:hover {
	background: var(--gold-primary);
	color: var(--ink-primary);
}

.cpl-lightbox-stage {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	min-height: 0;
}

.cpl-lightbox-figure {
	margin: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.cpl-lightbox-img-holder {
	flex: 1;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	cursor: grab;
}

.cpl-lightbox-img-holder.is-dragging {
	cursor: grabbing;
}

.cpl-lightbox-img-holder img {
	max-width: 88vw;
	max-height: 76vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
	transition: transform 0.12s ease-out;
	user-select: none;
	-webkit-user-drag: none;
}

.cpl-lightbox-caption {
	margin-top: 12px;
	color: var(--bg-ivory);
	font-size: 0.94rem;
	text-align: center;
	max-width: 780px;
}

.cpl-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(28, 25, 21, 0.78);
	color: var(--gold-light);
	border: 1px solid var(--gold-primary);
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cpl-lightbox-prev { left: 16px; }
.cpl-lightbox-next { right: 16px; }
.cpl-lightbox-nav:hover {
	background: var(--gold-primary);
	color: var(--ink-primary);
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
	.cpl-hero-inner,
	.page-hero-inner {
		grid-template-columns: 1fr;
		padding: 28px 24px;
	}
	.is-front #h\.1727939c32772679_55 .cpl-media-row.cols-3,
	.cpl-media-row.cols-2,
	.cpl-media-row.cols-3,
	.cpl-media-row.cols-4,
	.figure-row.cols-2,
	.figure-row.cols-3,
	.figure-row.cols-4 {
		grid-template-columns: 1fr;
	}
	.nav-toggle {
		display: inline-flex;
	}
	.header-nav-group {
		display: none;
		position: absolute;
		top: 100%;
		left: 16px;
		right: 16px;
		background: var(--bg-surface);
		border: 1px solid var(--border-gold-strong);
		border-radius: var(--radius-md);
		padding: 16px;
		flex-direction: column;
		align-items: stretch;
		box-shadow: var(--shadow-card-hover);
	}
	.header-nav-group.is-open {
		display: flex;
	}
	.primary-menu {
		flex-direction: column;
		border-radius: var(--radius-sm);
		align-items: stretch;
	}
	.lang-switcher {
		align-self: center;
	}
}


/* Multilingual Hero Badge & Golden Bento Spec Grid (CA, EN, FR) */
html[lang="ca"] .cpl-hero-copy::before {
	content: "PASSEIG DE GRÀCIA, 24 · BARCELONA · PATRIMONI NEOMUDÈJAR (1872)";
}
html[lang="en"] .cpl-hero-copy::before {
	content: "PASSEIG DE GRÀCIA, 24 · BARCELONA · NEO-MUDÉJAR HERITAGE (1872)";
}
html[lang="fr"] .cpl-hero-copy::before {
	content: "PASSEIG DE GRÀCIA, 24 · BARCELONE · PATRIMOINE NÉO-MUDÉJAR (1872)";
}

html[lang="ca"] .cpl-hero-copy::after {
	content: "ARQUITECTE: Domènec Balet i Nadal (1871–1872)   ·   ESTIL: Neomudèjar / Orientalista   ·   UBICACIÓ: Pg. de Gràcia, 24 (Passatge Maria Canals)   ·   ÚS ACTUAL: Hotel Praktik Èssens";
}
html[lang="en"] .cpl-hero-copy::after {
	content: "ARCHITECT: Domènec Balet i Nadal (1871–1872)   ·   STYLE: Neo-Mudéjar / Orientalist   ·   LOCATION: Pg. de Gràcia, 24 (Passatge Maria Canals)   ·   CURRENT USE: Hotel Praktik Èssens";
}
html[lang="fr"] .cpl-hero-copy::after {
	content: "ARCHITECTE : Domènec Balet i Nadal (1871–1872)   ·   STYLE : Néo-mudéjar / Orientaliste   ·   ADRESSE : Pg. de Gràcia, 24 (Passage Maria Canals)   ·   USAGE ACTUEL : Hôtel Praktik Èssens";
}

html[lang="fr"] .page-hero-text::before {
	content: "CASA PERE LLIBRE · PASSEIG DE GRÀCIA, 24 · BARCELONE";
}
