@font-face { font-family: Inter; src: url('https://colchagua.org/wp-content/themes/twentytwentyfour/assets/fonts/inter/Inter-VariableFont_slnt,wght.woff2') format('woff2'); }
@font-face { font-family: Cardo; font-weight: 700; src: url('https://colchagua.org/wp-content/themes/twentytwentyfour/assets/fonts/cardo/cardo_normal_700.woff2') format('woff2'); }

body { background: var(--b); color: #333; font-family: 'Inter', sans-serif; margin: 0; padding: 0; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
h1, h2, h3 { font-family: 'Cardo', serif; color: var(--c); margin-top: 0; }

/* Navegación y Cabecera */
.top-nav { background: #fff; padding: 15px 40px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--c); flex-wrap: wrap; gap: 15px; }
.top-nav img { max-height: 50px; }
.menu-links a { color: #333; text-decoration: none; margin-left: 20px; font-weight: 600; font-size: 0.95rem; }
.menu-links a:hover { color: var(--c); }
.header-central { text-align: center; padding: 40px 20px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.03); margin-bottom: 30px; }
.header-central h1 { font-size: clamp(2rem, 4vw, 2.5rem); margin: 0 0 10px; }
.header-central p { font-size: 1.1rem; max-width: 800px; margin: 0 auto; color: #555; }

/* Botones y Estructura */
.btn { background: var(--c); color: #fff; padding: 12px 24px; text-decoration: none; border-radius: 6px; font-weight: bold; display: inline-block; transition: 0.2s; border: none; cursor: pointer; text-align: center; }
.btn:hover { opacity: 0.9; }
.main-content { flex-grow: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.footer { text-align: center; padding: 30px; font-size: 0.9rem; color: #666; border-top: 1px solid rgba(0,0,0,0.1); margin-top: 40px; }

/* Páginas Estáticas y Ficha de Sitio */
.box-blanca { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-top: 20px; }
.volver-link { color: var(--c); text-decoration: none; font-weight: bold; margin-top: 20px; display: inline-block; }
.ficha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.ficha-img { width: 100%; border-radius: 8px; border-bottom: 4px solid var(--c); object-fit: cover; object-position: top; }
.ficha-no-img { width: 100%; height: 300px; background: #ddd; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.meta-item { margin-bottom: 10px; font-size: 1.1rem; }
.meta-item strong { color: #555; }

/* Herramientas (Buscador y Categorías) */
.tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 30px; }
.buscador { display: flex; flex-grow: 1; max-width: 500px; }
.buscador input { padding: 12px; border: 1px solid #ccc; border-radius: 4px 0 0 4px; flex-grow: 1; outline: none; font-family: 'Inter', sans-serif;}
.buscador button { border-radius: 0 4px 4px 0; }
.cat-tag { text-decoration: none; color: #555; background: #e0ddd0; padding: 8px 15px; border-radius: 20px; font-size: 0.9em; font-weight: bold; }
.cat-tag.activa, .cat-tag:hover { background: var(--c); color: #fff; }

/* Grilla de Tarjetas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); text-decoration: none; color: inherit; transition: 0.3s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.card img { width: 100%; height: 180px; object-fit: cover; object-position: top; border-bottom: 3px solid var(--c); }
.card-no-img { height: 180px; background: #eee; display: flex; align-items: center; justify-content: center; color: #aaa; border-bottom: 3px solid var(--c); }
.card-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-cat { color: var(--c); font-size: 0.8em; font-weight: bold; text-transform: uppercase; margin-bottom: 5px; }

/* Sitio Destacado */
.destacado { background: var(--c); color: #fff; border-radius: 12px; display: flex; overflow: hidden; margin-bottom: 40px; }
.destacado img { width: 50%; object-fit: cover; object-position: top; }
.destacado-no-img { width: 50%; background: rgba(0,0,0,0.2); }
.destacado-info { padding: 40px; width: 50%; display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 768px) {
    .destacado { flex-direction: column; }
    .destacado img, .destacado-info, .destacado-no-img { width: 100%; }
    .ficha-grid { grid-template-columns: 1fr; }
}

/* --- FICHA TIPO ARCHIVO (ESPAÑOL) --- */
.loc-ficha { max-width: 1100px; margin: 40px auto; background: #fff; padding: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-radius: 8px;}
.loc-header { border-bottom: 2px solid #eee; padding-bottom: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px;}
.loc-title { margin: 0; font-size: 2.2rem; word-break: break-word;}
.loc-view-btn { background: var(--c); color: #fff; padding: 12px 30px; text-decoration: none; font-weight: bold; border-radius: 4px; display: inline-block; white-space: nowrap;}
.loc-view-btn:hover { opacity: 0.9; }

/* Contenedor dividido para Portada y Metadatos */
.loc-content-grid { display: grid; grid-template-columns: 350px 1fr; gap: 40px; margin-bottom: 30px; }
.loc-cover-img { width: 100%; border-radius: 8px; border-bottom: 4px solid var(--c); object-fit: cover; object-position: top; }
.loc-cover-empty { width: 100%; height: 350px; background: #eee; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #aaa; border-bottom: 4px solid var(--c); }

.loc-metadata { display: grid; grid-template-columns: 200px 1fr; gap: 15px 30px; border-bottom: 1px solid #eee; padding-bottom: 30px; }
.loc-label { font-weight: 600; color: #555; text-align: right; }
.loc-value { color: #222; }
.loc-value ul { margin: 0; padding-left: 20px; }

.loc-rights { background: #f9f9f9; border-left: 4px solid #ccc; padding: 20px; font-size: 0.95rem; color: #555; margin-bottom: 30px; }
.loc-citations { margin-top: 40px; }
.loc-citation-box { background: #fdfdfd; border: 1px solid #eee; padding: 15px; margin-bottom: 15px; border-radius: 4px; }
.loc-citation-box h4 { margin: 0 0 10px 0; font-family: 'Inter', sans-serif; font-size: 0.9rem; color: #777; text-transform: uppercase; letter-spacing: 1px;}

@media (max-width: 768px) {
    .loc-content-grid { grid-template-columns: 1fr; }
    .loc-metadata { grid-template-columns: 1fr; gap: 5px; }
    .loc-label { text-align: left; color: var(--c); margin-top: 15px;}
}