/* ============================================================
   Archivo Guillermo Núñez — estilos de marca (tema agn)
   Recupera la identidad del sitio antiguo: Josefin Sans + Merriweather,
   paleta monocromática (negro #1e1f1d / grises / blanco), color vía "manchas".
   ============================================================ */
@import url('https://fonts.googleapis.com/css?family=Josefin+Sans:300,400,600|Merriweather:300,400,700&display=swap');

body {
	font-family: 'Merriweather', Georgia, serif;
	color: #1e1f1d;
}

h1, h2, h3, h4, h5, h6,
.navbar, .nav, .btn, button,
.navbar-nav > li > a {
	font-family: 'Josefin Sans', 'Helvetica Neue', Arial, sans-serif;
}

h1 { font-weight: 600; letter-spacing: 0.02em; }
.lead { color: #555; font-weight: 300; }

/* Barra superior clara y minimal */
.navbar-default {
	background: #ffffff;
	border: none;
	border-bottom: 1px solid #ececec;
}
.navbar-default .navbar-nav > li > a { color: #1e1f1d; text-transform: uppercase; letter-spacing: 0.04em; font-size: 13px; }
.navbar-default .navbar-nav > li > a:hover { color: #000; }

/* Logo: respetar proporción (el original es apaisado) */
.navbar-brand { height: auto; padding: 12px 15px; }
.navbar-brand img { width: auto !important; height: auto !important; max-width: 240px; }

a { color: #1e1f1d; }
a:hover { color: #000; }

/* Acentos */
.btn-primary { background: #1e1f1d; border-color: #1e1f1d; }
.btn-primary:hover { background: #000; border-color: #000; }

/* --- Portada: hero editorial --- */
.agn-hero {
	background: #1e1f1d;
	color: #fff;
	padding: 72px 0 60px;
	margin-bottom: 42px;
	text-align: center;
}
.agn-hero h1 { color: #fff; font-size: 46px; font-weight: 600; margin-bottom: 22px; letter-spacing: 0.03em; }
.agn-hero .lead {
	color: #e8e8e8;
	max-width: 760px;
	margin: 0 auto 30px;
	font-family: 'Merriweather', Georgia, serif;
	font-weight: 300;
	line-height: 1.7;
}
.agn-hero .btn-primary {
	background: #fff; color: #1e1f1d; border: none;
	font-family: 'Josefin Sans', sans-serif;
	text-transform: uppercase; letter-spacing: 0.1em; padding: 12px 30px;
}
.agn-hero .btn-primary:hover { background: #d8d8d8; color: #000; }

/* --- Manchas de pintura (acento visual, del sitio original) --- */
.agn-manchas { margin: 0 0 46px; text-align: center; }
.agn-mancha { padding: 10px; }
.agn-mancha img { width: 100%; height: auto; opacity: .92; transition: transform .25s ease, opacity .25s ease; }
.agn-mancha img:hover { transform: scale(1.08); opacity: 1; }

/* --- Biografía: línea de tiempo con año fijo (sticky) --- */
.agn-bio-intro { text-align: center; max-width: 720px; margin: 10px auto 55px; }
.agn-bio-intro h1 { margin-bottom: 16px; }

.agn-timeline { max-width: 1000px; margin: 0 auto 40px; }
.agn-tl-decade { display: flex; align-items: flex-start; gap: 40px; }
.agn-tl-year {
	flex: 0 0 120px;
	position: sticky; top: 24px;
	align-self: flex-start;
	text-align: right; padding-top: 4px;
}
.agn-tl-year span {
	font-family: 'Josefin Sans', sans-serif;
	font-size: 38px; font-weight: 600; color: #1e1f1d; line-height: 1;
	display: inline-block;
}
.agn-tl-body {
	flex: 1 1 auto; min-width: 0;
	border-left: 2px solid #e6e6e6;
	padding: 0 0 30px 40px;
	position: relative;
}
.agn-tl-body::before {
	content: ''; position: absolute; left: -8px; top: 9px;
	width: 13px; height: 13px; border-radius: 50%;
	background: #1e1f1d; border: 3px solid #fff;
}
.agn-tl-decade:last-child .agn-tl-body { padding-bottom: 10px; }
.agn-tl-body p { line-height: 1.8; margin-bottom: 16px; color: #333; }
.agn-tl-events { list-style: none; padding: 0; margin: 3px 0 0; }
.agn-tl-events li {
	position: relative; padding-left: 18px; margin-bottom: 9px;
	line-height: 1.6; color: #333;
}
.agn-tl-events li::before { content: '—'; position: absolute; left: 0; top: 0; color: #c4c4c4; }

@media (max-width: 768px) {
	.agn-tl-decade { flex-direction: column; gap: 6px; }
	.agn-tl-year { position: static; text-align: left; flex-basis: auto; padding-top: 0; }
	.agn-tl-year span { font-size: 40px; }
	.agn-tl-body { border-left: none; padding-left: 0; padding-bottom: 34px; }
	.agn-tl-body::before { display: none; }
}

/* --- Portada: carrusel de obras destacadas (Swiper) --- */
.agn-featured { margin: 6px 0 55px; }
.agn-section-title {
	font-family: 'Josefin Sans', sans-serif; text-transform: uppercase;
	letter-spacing: 0.1em; font-size: 20px; color: #1e1f1d;
	text-align: center; margin-bottom: 30px;
}
.agn-swiper { --swiper-theme-color: #1e1f1d; --swiper-navigation-size: 24px; padding: 0 44px 46px; }
.agn-swiper .swiper-slide { height: auto; }
.agn-swiper .swiper-slide a { display: block; text-align: center; color: #1e1f1d; text-decoration: none; }
.agn-featured-img { display: block; height: 230px; overflow: hidden; background: #f2f2f3; }
.agn-featured-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.agn-swiper .swiper-slide a:hover .agn-featured-img img { transform: scale(1.06); }
.agn-featured-cap { display: block; margin-top: 12px; font-family: 'Josefin Sans', sans-serif; font-size: 13px; letter-spacing: 0.03em; }
.agn-swiper .swiper-button-prev, .agn-swiper .swiper-button-next { color: #1e1f1d; }
.agn-swiper .swiper-pagination { bottom: 8px; }

/* --- Footer --- */
#footer { background: #1e1f1d; color: #cfcfcf; padding: 50px 0 26px; margin-top: 60px; }
#footer h3 { color: #fff; font-family: 'Josefin Sans', sans-serif; font-size: 22px; margin: 0 0 14px; }
#footer h4 { color: #fff; font-family: 'Josefin Sans', sans-serif; text-transform: uppercase; font-size: 13px; letter-spacing: 0.08em; margin: 0 0 14px; }
#footer p { color: #b7b7b7; line-height: 1.7; font-size: 14px; }
#footer a { color: #cfcfcf; }
#footer a:hover { color: #fff; text-decoration: none; }
#footer .list-unstyled li { margin-bottom: 8px; }
.agn-footer-bottom { border-top: 1px solid #333; margin-top: 34px; padding-top: 20px; }
.agn-footer-bottom small { color: #8f8f8f; }

/* --- #3 Ergonomía táctil + tipografía fluida --- */
.navbar-default .navbar-nav > li > a { padding-top: 14px; padding-bottom: 14px; }
.agn-swiper .swiper-button-prev, .agn-swiper .swiper-button-next { width: 44px; height: 44px; }
.swiper-pagination-bullet { width: 11px; height: 11px; }
.agn-hero h1 { font-size: clamp(30px, 7vw, 46px); }
.agn-hero .lead { font-size: clamp(15px, 2.4vw, 19px); }
h1 { font-size: clamp(26px, 5vw, 34px); }
.agn-section-title { font-size: clamp(16px, 3.4vw, 20px); }
.agn-tl-year span { font-size: clamp(28px, 8vw, 38px); }
@media (max-width: 767px) {
	body { font-size: 16px; }
	.agn-hero { padding: 46px 0 38px; }
	.navbar-brand img { max-width: 180px !important; }
	.agn-footer-top [class^="col-"] { margin-bottom: 22px; }
}

/* --- #6 Migas de pan (jerarquía del archivo) --- */
.agn-breadcrumb { font-family: 'Josefin Sans', sans-serif; font-size: 13px; letter-spacing: 0.02em; padding: 14px 0 4px; color: #888; }
.agn-breadcrumb a { color: #666; text-decoration: none; }
.agn-breadcrumb a:hover { color: #1e1f1d; }
.agn-breadcrumb .sep { margin: 0 8px; color: #bbb; }
.agn-breadcrumb .current { color: #1e1f1d; }

/* --- Menú superior centrado verticalmente con el logo (desktop) --- */
@media (min-width: 1011px) {
	.navbar-default .container.menuBar { display: flex; align-items: center; }   /* 'center' = medio; 'flex-end' = abajo */
	.navbar-default .container.menuBar > .navbar-header { float: none; }
	.navbar-default .container.menuBar > .navbar-collapse { float: none; flex: 1 1 auto; }
}

/* --- Biografía: TimelineJS (Knight Lab) --- */
.agn-timelinejs { width: 100%; height: 640px; margin: 0 0 44px; }
@media (max-width: 767px) { .agn-timelinejs { height: 500px; } }

/* --- Panel de filtros (facetas como selects compactos) --- */
#bRefine h2 { font-family: 'Josefin Sans', sans-serif; font-size: 16px; text-transform: uppercase; letter-spacing: 0.06em; color: #1e1f1d; margin-bottom: 10px; }
#bRefine h3 { font-family: 'Josefin Sans', sans-serif; text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; color: #777; margin: 16px 0 5px; }
.bFacetSelect { width: 100%; margin-bottom: 4px; }

/* --- Fix: el visor pdf.js inyecta viewer.css en la ficha y oscurece el body en modo oscuro del SO. Forzamos claro. --- */
body { background-color: #ffffff !important; }

/* --- Ficha de objeto enriquecida --- */
.agn-ficha-sub { font-family: 'Josefin Sans', sans-serif; color: #8a8a8a; font-size: 13px; letter-spacing: 0.04em; margin: 2px 0 0; }
#detailText .unit, .detailText .unit, .unit { margin-bottom: 15px; }
.unit label { display: block; font-family: 'Josefin Sans', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; color: #a0a0a0; margin-bottom: 3px; }
.agn-rol { color: #999; }

/* --- Fix: el #pageArea no contenía las columnas flotadas de la ficha larga y el footer se montaba encima. flow-root lo contiene. --- */
#pageArea { display: flow-root; }

/* --- Fix footer: el tema usa position:absolute + html/body height fijo (sticky footer) que se rompe con fichas largas. Lo pasamos a flujo normal. --- */
html, body { height: auto !important; min-height: 100%; }
#footer { position: static !important; clear: both; }

/* --- Chips clickeables en la ficha --- */
.agn-chip { display: inline-block; padding: 3px 12px; margin: 2px 0; background: #f0f0f1; border: 1px solid #e2e2e3; border-radius: 14px; font-family: 'Josefin Sans', sans-serif; font-size: 12.5px; color: #1e1f1d; text-decoration: none; transition: background .15s, color .15s; }
.agn-chip:hover, .agn-chip:focus { background: #1e1f1d; color: #fff; border-color: #1e1f1d; text-decoration: none; }
.agn-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

/* --- Personas/organizaciones como chips agrupados por rol --- */
.agn-ent-group { margin-bottom: 9px; }
.agn-ent-role { display: block; font-family: 'Josefin Sans', sans-serif; text-transform: uppercase; font-size: 10px; letter-spacing: 0.06em; color: #b2b2b2; margin-bottom: 3px; }

/* --- Chips de criterios aplicados (filtros activos arriba de los resultados) --- */
.bCriteria { margin-bottom: 18px; line-height: 2.1; }
.bCriteria strong { font-family: 'Josefin Sans', sans-serif; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; color: #999; margin: 0 4px 0 10px; font-weight: 400; }
.bCriteria strong:first-child { margin-left: 0; }
.bCriteria .btn { background: #1e1f1d; color: #fff; border: none; border-radius: 14px; font-family: 'Josefin Sans', sans-serif; font-size: 12.5px; padding: 3px 12px; margin: 0 2px; }
.bCriteria .btn:hover, .bCriteria .btn:focus { background: #444; color: #fff; }
.bCriteria .glyphicon-remove-circle { margin-left: 6px; opacity: .65; font-size: 11px; }
/* Select con valor activo resaltado */
.bFacetSelect option:checked { font-weight: 600; }

/* --- Mapa de ubicación (Leaflet/OSM) en la ficha --- */
.agn-map { margin-top: 4px; }
.agn-map .leafletMap, .agn-map > div { width: 100% !important; height: 240px !important; border-radius: 4px; }

/* --- Mapa: popup con lista larga scrolleable (ubicaciones con muchos documentos) --- */
.leaflet-popup-content { max-height: 280px; overflow-y: auto; margin: 12px 14px; }
.leaflet-popup-content p { margin: 4px 0; }
