Segunda ola de implementaciones masivas con agentes paralelos para funcionalidades avanzadas de SEO, accesibilidad y contenido especializado. **Issue #17 - Imágenes responsive con srcset/WebP/AVIF:** - inc/image-optimization.php: 8 nuevas funciones para optimización - Soporte WebP/AVIF con detección de servidor - Srcset y sizes automáticos contextuales - Lazy loading inteligente (excluye LCP) - Threshold 2560px para big images - Picture element con fallbacks - Preload de featured images - Calidad JPEG optimizada (85%) - Dimensiones explícitas (previene CLS) - 14 filtros WordPress implementados - Beneficios: 30-50% reducción con WebP, 50-70% con AVIF - Core Web Vitals: Mejora LCP y CLS **Issue #18 - Accesibilidad WCAG 2.1 AA:** - assets/css/accessibility.css: +461 líneas - Focus styles visibles (3px outline) - Screen reader utilities - Touch targets ≥44px - High contrast mode support - Reduced motion support - Color contrast AA (4.5:1, 3:1) - assets/js/accessibility.js: 19KB nuevo - Skip links con smooth scroll - Navegación por teclado en dropdowns - Arrow keys en menús WordPress - Modal keyboard support - Focus management y trap - ARIA live regions - Announcements para screen readers - header.php: ARIA labels en navbar - Actualizaciones JS: Respeto prefers-reduced-motion en main.js, toc.js, header.js - Cumplimiento completo WCAG 2.1 Level AA **Issue #30 - Tablas APU (Análisis Precios Unitarios):** - assets/css/tables-apu.css: 560 líneas - Diseño sin bordes, moderno - Zebra striping (#f8f9fa/#ffffff) - Headers sticky con degradado azul - 4 tipos de filas: normal, section-header, subtotal, total - Fuente monospace para columnas monetarias - Responsive (scroll horizontal móvil) - Print styles con color-adjust: exact - inc/apu-tables.php: 330 líneas, 6 funciones - apus_process_apu_tables() - Procesamiento automático - Shortcodes: [apu_table], [apu_row type=""] - apus_generate_apu_table($data) - Generación programática - 4 métodos de uso: data-apu, shortcode, clase manual, PHP - docs/APU-TABLES-GUIDE.md: Guía completa de usuario - docs/APU-TABLE-EXAMPLE.html: Ejemplo funcional - 6 columnas: Clave, Descripción, Unidad, Cantidad, Costo, Importe - CRÍTICO: Contenido principal del sitio de construcción **Issue #31 - Botones de compartir en redes sociales:** - inc/social-share.php: 127 líneas - apus_get_social_share_buttons() - Genera HTML - apus_display_social_share() - Template tag - 5 redes: Facebook, X/Twitter, LinkedIn, WhatsApp, Email - URLs nativas sin JavaScript de terceros - Encoding seguro, ARIA labels - assets/css/social-share.css: 137 líneas - Animaciones hover (translateY, scale) - Colores específicos por red - Responsive (576px, 360px) - Focus styles accesibles - single.php: Integración después del contenido - Bootstrap Icons CDN (v1.11.3) - Panel de opciones con configuración **Issue #33 - Schema.org completo (5 tipos):** - inc/schema-org.php: 468 líneas, 7 funciones - Organization schema con logo y redes sociales - WebSite schema con SearchAction - Article schema (posts) con autor, imagen, categorías, wordCount - WebPage schema (páginas) con featured image - BreadcrumbList schema (8 contextos diferentes) - JSON-LD format en <head> - Referencias cruzadas con @id - Google Rich Results compliant - Deshabilita schemas Rank Math/Yoast (evita duplicación) - Locale: es-MX - Hook: wp_head (prioridad 5) **Archivos Modificados:** - functions.php: Includes de nuevos módulos (schema-org, apu-tables, social-share) - inc/enqueue-scripts.php: Enqueue de nuevos CSS/JS, Bootstrap Icons CDN - inc/image-optimization.php: 8 funciones nuevas WebP/AVIF - assets/css/accessibility.css: +461 líneas - assets/js/main.js, toc.js, header.js: Reduced motion support - single.php: Social share buttons - header.php: ARIA labels - inc/admin/options-api.php: Social share settings **Archivos Creados:** - 3 archivos PHP funcionales (apu-tables, social-share, schema-org) - 1 archivo JavaScript (accessibility.js - 19KB) - 3 archivos CSS (tables-apu, social-share) - 2 archivos docs/ (APU guide y example) - 5 reportes .md de documentación **Estadísticas:** - Total funciones nuevas: 30+ - Líneas de código nuevas: 2,500+ - Archivos nuevos: 13 - Archivos modificados: 10 - Mejoras de accesibilidad: WCAG 2.1 AA compliant - Mejoras SEO: 5 schemas JSON-LD - Mejoras performance: WebP/AVIF, lazy loading, srcset 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
423 lines
10 KiB
CSS
423 lines
10 KiB
CSS
/**
|
|
* Tablas APU - Análisis de Precios Unitarios
|
|
* Estilos específicos para tablas de construcción
|
|
*
|
|
* @package Apus_Theme
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
/* ========================================
|
|
CONTENEDOR PRINCIPAL DE TABLA APU
|
|
======================================== */
|
|
.analisis {
|
|
margin: 2rem 0;
|
|
overflow-x: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
/* ========================================
|
|
TABLA BASE
|
|
======================================== */
|
|
.analisis table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: #ffffff;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
border-radius: 8px;
|
|
border: none;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
/* Eliminar todos los bordes */
|
|
.analisis table td,
|
|
.analisis table tbody,
|
|
.analisis table tr {
|
|
border: none;
|
|
}
|
|
|
|
/* ========================================
|
|
ANCHOS DE COLUMNAS
|
|
======================================== */
|
|
.analisis table td:nth-child(1),
|
|
.analisis table th:nth-child(1) {
|
|
width: 150px;
|
|
min-width: 100px;
|
|
}
|
|
|
|
.analisis table td:nth-child(2),
|
|
.analisis table th:nth-child(2) {
|
|
width: auto;
|
|
min-width: 300px;
|
|
}
|
|
|
|
.analisis table td:nth-child(3),
|
|
.analisis table th:nth-child(3) {
|
|
width: 80px;
|
|
min-width: 60px;
|
|
}
|
|
|
|
.analisis table td:nth-child(4),
|
|
.analisis table th:nth-child(4) {
|
|
width: 110px;
|
|
min-width: 90px;
|
|
}
|
|
|
|
.analisis table td:nth-child(5),
|
|
.analisis table th:nth-child(5) {
|
|
width: 120px;
|
|
min-width: 100px;
|
|
}
|
|
|
|
.analisis table td:nth-child(6),
|
|
.analisis table th:nth-child(6) {
|
|
width: 120px;
|
|
min-width: 100px;
|
|
}
|
|
|
|
/* ========================================
|
|
ENCABEZADOS DE TABLA (THEAD)
|
|
======================================== */
|
|
.analisis table thead tr th {
|
|
background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
|
|
color: #ffffff;
|
|
font-weight: 600;
|
|
text-align: center !important;
|
|
padding: 1rem;
|
|
border: none;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
/* ========================================
|
|
FILAS NORMALES
|
|
======================================== */
|
|
.analisis table tbody td {
|
|
padding: 0.75rem 1rem;
|
|
border: none;
|
|
}
|
|
|
|
/* ========================================
|
|
ZEBRA STRIPING - Filas alternadas
|
|
======================================== */
|
|
.analisis table tbody tr:nth-child(even):not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.analisis table tbody tr:nth-child(odd):not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
/* ========================================
|
|
ALINEACIÓN DE COLUMNAS
|
|
======================================== */
|
|
|
|
/* Columnas 1 y 2: Clave y Descripción - izquierda */
|
|
.analisis table td:nth-child(1),
|
|
.analisis table td:nth-child(2) {
|
|
text-align: left;
|
|
}
|
|
|
|
/* Columna 3: Unidad - centrada */
|
|
.analisis table td:nth-child(3),
|
|
.analisis table td.c3 {
|
|
text-align: center !important;
|
|
color: #6c757d;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
/* Columnas 4, 5, 6: Cantidad, Costo, Importe - derecha con fuente monospace */
|
|
.analisis table td:nth-child(4),
|
|
.analisis table td.c4,
|
|
.analisis table td:nth-child(5),
|
|
.analisis table td.c5,
|
|
.analisis table td:nth-child(6),
|
|
.analisis table td.c6 {
|
|
text-align: right !important;
|
|
font-family: 'Courier New', Courier, monospace;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ========================================
|
|
HOVER EN FILAS DE DATOS
|
|
======================================== */
|
|
.analisis table tbody tr:not(.section-header):not(.subtotal-row):not(.total-row):hover {
|
|
background-color: #fff3cd !important;
|
|
transition: background-color 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ========================================
|
|
ENCABEZADOS DE SECCIÓN
|
|
(Material, Mano de Obra, Herramienta, Equipo)
|
|
======================================== */
|
|
.analisis table tr.section-header {
|
|
background-color: #e9ecef !important;
|
|
}
|
|
|
|
.analisis table tr.section-header td {
|
|
font-weight: 600;
|
|
color: #1e3a5f;
|
|
padding: 0.75rem 1rem;
|
|
border: none !important;
|
|
text-transform: uppercase;
|
|
font-size: 0.95em;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
/* ========================================
|
|
FILAS DE SUBTOTALES
|
|
(Suma de Material, Suma de Mano de Obra, etc)
|
|
======================================== */
|
|
.analisis table tr.subtotal-row {
|
|
background-color: #d1e7fd !important;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td {
|
|
font-weight: 700;
|
|
color: #0d47a1;
|
|
padding: 0.875rem 1rem;
|
|
border: none !important;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td:nth-child(2) {
|
|
font-style: italic;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td.c6,
|
|
.analisis table tr.subtotal-row td:nth-child(6) {
|
|
font-size: 1.05rem;
|
|
}
|
|
|
|
/* ========================================
|
|
FILA DE TOTAL FINAL
|
|
(Costo Directo)
|
|
======================================== */
|
|
.analisis table tr.total-row {
|
|
background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%) !important;
|
|
}
|
|
|
|
.analisis table tr.total-row td {
|
|
color: #ffffff !important;
|
|
font-weight: 700;
|
|
font-size: 1.1rem;
|
|
padding: 1.125rem 1rem !important;
|
|
border: none !important;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.analisis table tr.total-row td.c6,
|
|
.analisis table tr.total-row td:nth-child(6) {
|
|
font-size: 1.25rem;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
/* ========================================
|
|
ESTILOS PARA IMPRESIÓN
|
|
======================================== */
|
|
@media print {
|
|
.analisis {
|
|
margin: 1rem 0;
|
|
overflow: visible;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.analisis table {
|
|
box-shadow: none;
|
|
border: 1px solid #dee2e6;
|
|
}
|
|
|
|
.analisis table thead tr th {
|
|
background: #1e3a5f !important;
|
|
color: #ffffff !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
position: static;
|
|
}
|
|
|
|
.analisis table tr.section-header {
|
|
background-color: #e9ecef !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row {
|
|
background-color: #d1e7fd !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.analisis table tr.total-row {
|
|
background: #1e3a5f !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.analisis table tbody tr:nth-child(even):not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #f8f9fa !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
/* Evitar saltos de página dentro de las tablas */
|
|
.analisis table {
|
|
page-break-inside: avoid;
|
|
}
|
|
|
|
.analisis table tr {
|
|
page-break-inside: avoid;
|
|
page-break-after: auto;
|
|
}
|
|
|
|
/* No mostrar hover en impresión */
|
|
.analisis table tbody tr:hover {
|
|
background-color: inherit !important;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
RESPONSIVE - TABLETS (768px - 991px)
|
|
======================================== */
|
|
@media (max-width: 991px) {
|
|
.analisis {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.analisis table td {
|
|
padding: 0.6rem 0.8rem !important;
|
|
}
|
|
|
|
.analisis table thead tr th {
|
|
padding: 0.8rem 0.6rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.analisis table tr.total-row td {
|
|
font-size: 1rem !important;
|
|
padding: 1rem 0.8rem !important;
|
|
}
|
|
|
|
.analisis table tr.total-row td.c6,
|
|
.analisis table tr.total-row td:nth-child(6) {
|
|
font-size: 1.15rem !important;
|
|
}
|
|
|
|
/* Ajustar anchos mínimos en tablets */
|
|
.analisis table td:nth-child(1),
|
|
.analisis table th:nth-child(1) {
|
|
min-width: 80px;
|
|
}
|
|
|
|
.analisis table td:nth-child(2),
|
|
.analisis table th:nth-child(2) {
|
|
min-width: 200px;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
RESPONSIVE - MÓVILES (max 767px)
|
|
======================================== */
|
|
@media (max-width: 767px) {
|
|
.analisis {
|
|
font-size: 0.85rem;
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
.analisis table td {
|
|
padding: 0.5rem !important;
|
|
}
|
|
|
|
.analisis table thead tr th {
|
|
padding: 0.7rem 0.5rem;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.analisis table tr.section-header td {
|
|
font-size: 0.85em;
|
|
padding: 0.6rem 0.5rem;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td {
|
|
padding: 0.7rem 0.5rem;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td.c6,
|
|
.analisis table tr.subtotal-row td:nth-child(6) {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.analisis table tr.total-row td {
|
|
font-size: 0.95rem !important;
|
|
padding: 0.875rem 0.5rem !important;
|
|
}
|
|
|
|
.analisis table tr.total-row td.c6,
|
|
.analisis table tr.total-row td:nth-child(6) {
|
|
font-size: 1.1rem !important;
|
|
}
|
|
|
|
/* Ajustar anchos mínimos en móviles */
|
|
.analisis table td:nth-child(1),
|
|
.analisis table th:nth-child(1) {
|
|
width: 80px;
|
|
min-width: 60px;
|
|
}
|
|
|
|
.analisis table td:nth-child(2),
|
|
.analisis table th:nth-child(2) {
|
|
min-width: 150px;
|
|
}
|
|
|
|
.analisis table td:nth-child(3),
|
|
.analisis table th:nth-child(3),
|
|
.analisis table td:nth-child(4),
|
|
.analisis table th:nth-child(4),
|
|
.analisis table td:nth-child(5),
|
|
.analisis table th:nth-child(5),
|
|
.analisis table td:nth-child(6),
|
|
.analisis table th:nth-child(6) {
|
|
min-width: 70px;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
ACCESIBILIDAD
|
|
======================================== */
|
|
|
|
/* Mejorar contraste para lectores de pantalla */
|
|
.analisis table thead tr th {
|
|
outline: none;
|
|
}
|
|
|
|
/* Focus visible para navegación por teclado */
|
|
.analisis table tbody tr:focus-within {
|
|
outline: 2px solid #0d6efd;
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
/* ========================================
|
|
COMPATIBILIDAD CON BOOTSTRAP
|
|
======================================== */
|
|
|
|
/* Anular estilos de Bootstrap que puedan interferir */
|
|
.analisis table.table {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.analisis table.table > :not(caption) > * > * {
|
|
padding: inherit;
|
|
background-color: inherit;
|
|
border-bottom-width: 0;
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* Mantener compatibilidad con clases de Bootstrap si se usan */
|
|
.analisis table.table-striped > tbody > tr:nth-of-type(odd) > *:not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.analisis table.table-striped > tbody > tr:nth-of-type(even) > *:not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #f8f9fa;
|
|
}
|