/**
 * Directorio - Compatibilidad sin Bootstrap (ej. Newspaper 12)
 * Estilos solo dentro de .det-wrap para no afectar el tema
 */
.det-wrap {
	box-sizing: border-box;
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
	padding: 1rem;
}
.det-wrap *,
.det-wrap *::before,
.det-wrap *::after { box-sizing: border-box; }

/* Container (cuando .container va en el mismo elemento que .det-wrap o dentro) */
.det-wrap.container,
.det-wrap .container {
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* Grid */
.det-wrap .row { display: flex; flex-wrap: wrap; margin-left: -0.5rem; margin-right: -0.5rem; }
.det-wrap .row.g-2 { gap: 0.5rem; }
.det-wrap .row.g-4 { gap: 1rem; }
.det-wrap [class*="col-"] { padding-left: 0.5rem; padding-right: 0.5rem; }
.det-wrap .col-sm-6 { width: 50%; }
.det-wrap .col-md-2 { width: 16.666%; }
.det-wrap .col-md-4 { width: 33.333%; }
.det-wrap .col-md-5 { width: 41.666%; }
.det-wrap .col-md-6 { width: 50%; }
.det-wrap .col-lg-4 { width: 33.333%; }
.det-wrap .col-lg-8 { width: 66.666%; }
.det-wrap .col-4 { width: 33.333%; }
@media (max-width: 768px) {
	.det-wrap .col-sm-6,
	.det-wrap .col-md-2,
	.det-wrap .col-md-4,
	.det-wrap .col-md-5,
	.det-wrap .col-md-6,
	.det-wrap .col-lg-4,
	.det-wrap .col-lg-8,
	.det-wrap .col-4 { width: 100%; }
}

/* Utilidades */
.det-wrap .mb-2 { margin-bottom: 0.5rem; }
.det-wrap .mb-3 { margin-bottom: 1rem; }
.det-wrap .mb-4 { margin-bottom: 1.5rem; }
.det-wrap .mt-1 { margin-top: 0.25rem; }
.det-wrap .mt-2 { margin-top: 0.5rem; }
.det-wrap .mt-3 { margin-top: 1rem; }
.det-wrap .mt-4 { margin-top: 1.5rem; }
.det-wrap .ms-2 { margin-left: 0.5rem; }
.det-wrap .me-1 { margin-right: 0.25rem; }
.det-wrap .m-2 { margin: 0.5rem; }
.det-wrap .py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.det-wrap .text-muted { color: #6c757d; }
.det-wrap .text-center { text-align: center; }
.det-wrap .text-dark { color: #212529; }
.det-wrap .text-decoration-none { text-decoration: none; }
.det-wrap .small { font-size: 0.875em; }
.det-wrap .position-absolute { position: absolute; }
.det-wrap .top-0 { top: 0; }
.det-wrap .end-0 { right: 0; }
.det-wrap .w-100 { width: 100%; }
.det-wrap .h-100 { height: 100%; }
.det-wrap .d-flex { display: flex; }
.det-wrap .align-items-end { align-items: flex-end; }
.det-wrap .align-items-center { align-items: center; }
.det-wrap .justify-content-center { justify-content: center; }
.det-wrap .sticky-top { position: sticky; top: 1rem; }
.det-wrap .bg-light { background-color: #f8f9fa; }
.det-wrap .border-warning { border-color: #ffc107; border-width: 1px; border-style: solid; }
/* Banda diagonal Destacado (listado y ficha) */
.det-wrap .det-card-wrap,
.det-wrap.det-single { position: relative; }
.det-wrap .det-ribbon-destacado {
	position: absolute; top: 0; right: 0;
	width: 120px; height: 26px;
	background: #ffc107; color: #000;
	font-size: 11px; font-weight: 700; line-height: 26px;
	text-align: center; text-transform: uppercase;
	transform: translate(25%, -5%) rotate(45deg);
	box-shadow: 0 2px 6px rgba(0,0,0,0.2);
	z-index: 5;
}
.det-wrap .det-ribbon-destacado.det-ribbon-single {
	width: 140px; height: 28px; font-size: 12px; line-height: 28px;
	transform: translate(30%, -10%) rotate(45deg);
}
.det-wrap .lead { font-size: 1.25rem; font-weight: 300; line-height: 1.4; }
.det-wrap .h6 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.det-wrap .mb-0 { margin-bottom: 0; }
.det-wrap .mb-1 { margin-bottom: 0.25rem; }

/* Formulario */
.det-wrap .form-label { display: block; margin-bottom: 0.25rem; font-weight: 600; }
.det-wrap .form-control,
.det-wrap .form-select {
	display: block;
	width: 100%;
	padding: 0.375rem 0.75rem;
	border: 1px solid #ced4da;
	border-radius: 4px;
	font-size: 1rem;
}
.det-wrap .form-select[multiple] { min-height: 80px; }
.det-wrap .form-control:focus,
.det-wrap .form-select:focus { outline: none; border-color: #86b7fe; box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15); }

/* Botones */
.det-wrap .btn {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	border: 1px solid transparent;
	border-radius: 4px;
	font-size: 1rem;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.det-wrap .btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.det-wrap .btn-primary { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.det-wrap .btn-primary:hover { background: #0b5ed7; color: #fff; }
.det-wrap .btn-secondary { background: #6c757d; color: #fff; }
.det-wrap .btn-success { background: #198754; color: #fff; border-color: #198754; }
.det-wrap .btn-success:hover { color: #fff; background: #157347; }
.det-wrap .btn-outline-primary { background: transparent; color: #0d6efd; border-color: #0d6efd; }
.det-wrap .btn-outline-primary:hover { background: #0d6efd; color: #fff; }
.det-wrap .btn-outline-secondary { background: transparent; color: #6c757d; border-color: #6c757d; }
.det-wrap .btn-outline-success { background: transparent; color: #198754; border-color: #198754; }
.det-wrap .btn-outline-success:hover { background: #198754; color: #fff; }

/* Card */
.det-wrap .card {
	background: #fff;
	border: 1px solid rgba(0,0,0,0.125);
	border-radius: 10px;
	overflow: hidden;
}
/* Listado: tarjetas con esquinas redondeadas */
.det-wrap.det-listado .card { border-radius: 10px; }
.det-wrap.det-listado .card.det-destacado { overflow: visible; }
.det-wrap.det-listado .card-img-top { border-radius: 10px 10px 0 0; }
.det-wrap .card-body { padding: 1rem; }
.det-wrap .card-header { padding: 0.5rem 1rem; background: #f8f9fa; border-bottom: 1px solid rgba(0,0,0,0.125); font-weight: 600; }
.det-wrap .card-title { margin-bottom: 0.5rem; font-size: 1.25rem; }
.det-wrap .card-text { margin-bottom: 0.5rem; }

/* Alert */
.det-wrap .alert {
	padding: 1rem 1.25rem;
	border-radius: 4px;
	border: 1px solid transparent;
}
.det-wrap .alert-danger { background: #f8d7da; border-color: #f5c2c7; color: #842029; }
.det-wrap .alert-success { background: #d1e7dd; border-color: #badbcc; color: #0f5132; }

/* Badge */
.det-wrap .badge {
	display: inline-block;
	padding: 0.35em 0.65em;
	font-size: 0.75em;
	font-weight: 600;
	line-height: 1;
	border-radius: 4px;
}
.det-wrap .bg-warning { background: #ffc107; }
.det-wrap .bg-warning.text-dark { color: #000; }
.det-wrap .bg-success { background: #198754; color: #fff; }
.det-wrap .bg-secondary { background: #6c757d; color: #fff; }

/* Table */
.det-wrap .table { width: 100%; border-collapse: collapse; }
.det-wrap .table th,
.det-wrap .table td { padding: 0.75rem; border-bottom: 1px solid #dee2e6; text-align: left; }
.det-wrap .table-striped tbody tr:nth-child(odd) { background: #f8f9fa; }
.det-wrap .table-responsive { overflow-x: auto; }

/* Pagination */
.det-wrap .pagination { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; padding: 0; margin: 0; justify-content: center; }
.det-wrap .pagination a,
.det-wrap .pagination span {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	text-decoration: none;
	color: #0d6efd;
}
.det-wrap .pagination .current { background: #0d6efd; color: #fff; border-color: #0d6efd; }

/* Imagen */
.det-wrap .img-fluid { max-width: 100%; height: auto; }
.det-wrap .rounded { border-radius: 6px; }

/* Preview logo y galería (formulario) */
.det-wrap .det-preview { min-height: 24px; }
.det-wrap .det-preview-galeria { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.det-wrap .det-preview-item { position: relative; display: inline-block; }
.det-wrap .det-preview-img { display: block; width: 100px; height: 100px; object-fit: cover; border-radius: 6px; border: 1px solid #dee2e6; }
.det-wrap .det-preview-logo .det-preview-img { width: 120px; height: 120px; }
.det-wrap .det-preview-remove { display: block; width: 100%; margin-top: 4px; padding: 4px 8px; font-size: 0.8rem; background: #dc3545; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.det-wrap .det-preview-remove:hover { background: #bb2d3b; color: #fff; }
.det-wrap .det-uploading { color: #0d6efd; }
.det-wrap .det-upload-error { color: #dc3545; }

/* ——— Single ficha: estilos encapsulados (desacoplados del tema) ——— */
.det-wrap.det-single {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: #212529;
}
/* Espaciados */
.det-wrap.det-single > .row { margin-left: -0.75rem; margin-right: -0.75rem; }
.det-wrap.det-single > .row > [class*="col-"] { padding-left: 0.75rem; padding-right: 0.75rem; }
.det-wrap.det-single header { margin-bottom: 1.5rem; }
.det-wrap.det-single header h1 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.75rem; font-weight: 600; line-height: 1.3; }
.det-wrap.det-single header .lead { margin-bottom: 0; color: #6c757d; }
.det-wrap.det-single header + div img { max-width: 100%; height: auto; display: block; }
.det-wrap.det-single .det-contenido { margin-bottom: 1.5rem; line-height: 1.6; }
.det-wrap.det-single .det-contenido img { max-width: 100%; height: auto; }
.det-wrap.det-single .det-contenido p { margin-bottom: 0.75rem; }
.det-wrap.det-single .det-contenido p:last-child { margin-bottom: 0; }
.det-wrap.det-single .det-galeria-slider { margin-bottom: 1.5rem; }
.det-wrap.det-single .det-contacto { margin-bottom: 1.5rem; }
.det-wrap.det-single .det-mapa { margin-bottom: 1.5rem; }
.det-wrap.det-single .det-mapa .h6 { margin-top: 0; margin-bottom: 0.5rem; }
.det-wrap.det-single .det-map-container { border-radius: 8px; border: 1px solid #dee2e6; }
/* Bloque contacto */
.det-wrap.det-single .det-contacto .card-header { font-size: 1rem; padding: 0.6rem 1rem; }
.det-wrap.det-single .det-contacto .card-body { padding: 1rem; }
.det-wrap.det-single .det-contacto p { margin-bottom: 0.5rem; font-size: 0.95rem; }
.det-wrap.det-single .det-contacto p:last-child { margin-bottom: 0; }
.det-wrap.det-single .det-contacto a { color: #0d6efd; text-decoration: none; }
.det-wrap.det-single .det-contacto a:hover { text-decoration: underline; }
/* Galería slider (single): imagen principal + miniaturas */
.det-wrap.det-single .det-galeria-slider .det-galeria-main { border-radius: 8px; background: #f0f0f0; }
.det-wrap.det-single .det-galeria-slider .det-galeria-main-img { border-radius: 8px; }
.det-wrap.det-single .det-galeria-slider .det-galeria-thumb-active { border-color: #0d6efd; }
/* Aside sticky (compartir / QR) */
.det-wrap.det-single aside { margin-top: 0; }
.det-wrap.det-single aside .card { position: sticky; top: 1rem; }
.det-wrap.det-single aside .card-body { padding: 1.25rem; }
.det-wrap.det-single aside .card-body .small { margin-bottom: 0.5rem; display: block; }
.det-wrap.det-single aside .card-body .mt-2 { margin-top: 0.5rem; }
.det-wrap.det-single aside .card-body .mt-3 { margin-top: 1rem; }
.det-wrap.det-single aside .card-body .btn { margin-bottom: 0.25rem; }
.det-wrap.det-single aside img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.det-wrap.det-single .det-aside-contacto .card-header { font-size: 0.95rem; padding: 0.5rem 0.75rem; }
.det-wrap.det-single .det-aside-contacto-body { padding: 0.75rem; }
.det-wrap.det-single .det-aside-contacto-body p { margin-bottom: 0.5rem; line-height: 1.35; }
.det-wrap.det-single .det-aside-contacto-body a { word-break: break-all; }
@media (max-width: 991px) {
	.det-wrap.det-single aside .card { position: static; }
}
