@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800&display=swap');

/* Texto base */
html, body,
.legal-page {
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Títulos */
h1, h2, h3, h4, h5, h6,
.features-main-title,
.pillar-title,
.section-title,
.hero-title {
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}
/* Variables de color por tema */
:root {
  
  --bg-color: #ffffff;
  --text-color: #111111;
  --muted-text: #444444;
  --text-light: #4b5563; /* gris oscuro para modo claro */
  --primary-color: #64b8c0; /* celeste */
  --secondary-color: #64b8c0;
  --accent-color: #64b8c0;
  --border-color: #e5e7eb;
  /* Footer variables para claro */
  --bg-dark: #ffffff;
  --bg-darker: #ffffff;
  --text-white: #111111;
  /* Para los pilares */
  --pillar2-bg: #72b4bb;
  --pillar1-bg: #8dbcc7; 
  --pillar3-bg: #a4ccd9; 

    --pillar-title-color: #111111; /* títulos principales */

}

[data-theme="dark"] {
  --bg-color: #0a0a0a;
  --text-color: #ffffff;
  --muted-text: #cccccc;
  --text-light: #cccccc; /* gris claro para modo oscuro */
  --primary-color: #c60074; /* fucsia */
  --secondary-color: #c60074;
  --accent-color: #c60074;
  --border-color: #333333;
  /* Footer variables para oscuro */
  --bg-dark: #1a1a1a;
  --bg-darker: #0f0f0f;
  --text-white: #ffffff;
  
  --pillar1-bg: #c60074; 
  --pillar2-bg: #cd398f; 
  --pillar3-bg: #ed53ad; 

  --pillar-title-color: #ffffff; /* títulos principales */
  --pillar-text-color: #ffffff;  /* texto dentro de los bloques */
}

html, body {
  background: var(--bg-color) !important;
  color: var(--text-color) !important;
  transition: background-color 0.35s ease, color 0.35s ease;
}
a.bg-dark, .bg-dark { background-color: var(--bg-color) !important; }

a { color: inherit; }

/* ===== Reglas globales para medios responsivos ===== */
img, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* Iframes y videos en contenedor con ratio para evitar desbordes */
.responsive-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
}
.responsive-embed::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 por defecto */
}
.responsive-embed > iframe,
.responsive-embed > video,
.responsive-embed > embed,
.responsive-embed > object {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* (Eliminado) estilos antiguos del botón de tema para evitar conflicto */
.u-header, header.u-header {
  background-color: rgba(0,0,0,0.0);
  background: transparent;
}
[data-theme="dark"] .u-header, [data-theme="dark"] header.u-header {
  background-color: rgba(0, 0, 0, 0.8) !important;
}
[data-theme="light"] .u-header, [data-theme="light"] header.u-header {
  background-color: rgba(255, 255, 255, 0.85) !important;
}
.u-nav a {
  color: var(--text-color) !important;
}
[data-theme="light"] .u-nav a { color: #111111 !important; }
[data-theme="light"] .u-menu .u-hamburger-link svg rect { fill: #111111 !important; }
[data-theme="dark"] .u-menu .u-hamburger-link svg rect { fill: #ffffff !important; }
.footer, .footer-bottom, .footer-newsletter { color: var(--text-white) !important; }
.footer { background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%) !important; }
.footer-bottom { background: var(--bg-darker) !important; }
/* Tema claro: sección inferior del footer en gris */
[data-theme="light"] .footer-bottom { background: #3a3a3a !important; color: #ffffff !important; }
[data-theme="light"] .footer-bottom .footer-legal a { color: rgba(255, 255, 255, 0.9) !important; }
[data-theme="light"] .footer-bottom .footer-legal a:hover { color: var(--primary-color) !important; }
[data-theme="light"] .footer-bottom .company-info,
[data-theme="light"] .footer-bottom .copyright p { color: rgba(255, 255, 255, 0.9) !important; }
/* Tema claro: sección superior del footer en gris claro */
[data-theme="light"] .footer-top { background: #eeeeee !important; }
.footer-title, .brand-name { color: var(--text-white) !important; }
.footer-links li a { color: var(--text-white) !important; }
.footer-links li a:hover { color: var(--primary-color) !important; }
.footer-separator { background: var(--primary-color) !important; }
.btn-subscribe { background: var(--primary-color) !important; }
.brand-description, .company-info { color: var(--text-white) !important; }

/* ===== GALERÍA (vista portfolio) ===== */
.sidebar {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  border-right-color: var(--border-color) !important;
}
.sidebar-header { background-color: var(--bg-color) !important; color: var(--text-color) !important; }
.sidebar-title { color: var(--text-color) !important; }
.category-tabs { background-color: var(--bg-color) !important; }
.category-tab { color: var(--text-color) !important; }
.category-tab.active { background-color: var(--primary-color) !important; }
.projects-container { color: var(--text-color) !important; }
.project-card { background: var(--bg-color) !important; color: var(--text-color) !important; border: 1px solid var(--border-color) !important; }
.project-title { color: var(--text-color) !important; }
.project-location { color: var(--text-light) !important; }
.project-description { color: var(--text-light) !important; }
[data-theme="light"] .project-location,
[data-theme="light"] .project-description { color: var(--text-color) !important; }
.project-civil { border-left: 4px solid var(--civil-color) !important; }
.project-network { border-left: 4px solid var(--network-color) !important; }
.project-infrastructure { border-left: 4px solid var(--infrastructure-color) !important; }
.projects-container *, .project-card *, .sidebar * { color: inherit !important; }
/* Fondo general de la galería por tema */
[data-theme="light"] #galeria-section { background-color: #ffffff !important; }
[data-theme="dark"] #galeria-section { background-color: #0a0a0a !important; }
.custom-popup .popup-title { 
  color: var(--text-color) !important; 
  font-size: 0.95rem;
  text-decoration: none;
}
.custom-popup .popup-description { display:none !important; }
.custom-popup .popup-location { display:none !important; }
/* Popup: variantes de posición/estilo específicas */
.custom-popup .popup-category.popup-category--tl {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 3;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-color) !important;
  border-bottom: 2px solid;
  padding-bottom: 2px !important;
}
.custom-popup .popup-category.popup-category--tl.popup-redes { border-bottom-color: #e74c3c; }
.custom-popup .popup-category.popup-category--tl.popup-civil { border-bottom-color: #3498db; }
.custom-popup .popup-category.popup-category--tl.popup-infraestructura { border-bottom-color: #f39c12; }
.custom-popup .popup-title.popup-title--center { text-align: center; margin-top: 8px; }

/* Contenedor de imagen con overlay y CTA al hover - MEJORADO */
.custom-popup .popup-thumb-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 12px auto 8px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.custom-popup .popup-thumb-container .popup-thumb {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform .35s ease;
}
.custom-popup .popup-thumb-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background .35s ease;
  z-index: 1;
}
.custom-popup .popup-thumb-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.9);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff !important;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  opacity: 0;
  z-index: 2;
  transition: opacity .3s ease, transform .3s ease;
  text-decoration: none !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.custom-popup .popup-thumb-container:hover .popup-thumb { 
  transform: scale(1.05); 
}
.custom-popup .popup-thumb-container:hover::before { 
  background: rgba(0,0,0,.3); 
}
.custom-popup .popup-thumb-container:hover .popup-thumb-cta { 
  opacity: 1; 
  transform: translate(-50%, -50%) scale(1); 
}
/* Título del popup: centrado visual con margin auto */
[data-theme="light"] .custom-popup .popup-title,
[data-theme="dark"] .custom-popup .popup-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 8px auto 10px;
  display: block;
}
/* Ajustes de popup Leaflet: centrado y límites para evitar desbordes */
/* Contenido del popup: centrado y con margen interno consistente */
[data-theme="light"] .custom-popup .leaflet-popup-content,
[data-theme="dark"] .custom-popup .leaflet-popup-content {
  text-align: center;
  min-width: 260px;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  margin: 10px 12px !important;
}
.custom-popup .cta-button {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 12px 16px !important;
  font-size: 1.02rem !important;
  font-weight: 600;
  border-radius: 10px;
  background: var(--primary-color) !important;
  color: #ffffff !important;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Botón de popup según categoría */
.custom-popup .cta-button.popup-civil { background-color: var(--civil-color) !important; }
.custom-popup .cta-button.popup-network { background-color: var(--network-color) !important; }
.custom-popup .cta-button.popup-infrastructure { background-color: var(--infrastructure-color) !important; }
[data-theme="light"] .custom-popup .popup-title a,
[data-theme="dark"] .custom-popup .popup-title a { color: var(--text-color) !important; }
.custom-popup .popup-title a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 800;
  padding-bottom: 2px;
  text-decoration: none !important;
  transition: color 0.25s ease, letter-spacing 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease;
  transform-origin: center;
}
.custom-popup .popup-title a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
  opacity: 0.85;
}
.custom-popup .popup-title a:hover,
.custom-popup .popup-title a:focus-visible {
  color: var(--primary-color) !important;
  letter-spacing: 0.04em;
  transform: scale(1.12);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.custom-popup .popup-title a:hover::after,
.custom-popup .popup-title a:focus-visible::after {
  transform: scaleX(1);
}
/* Chip de categoría: más grande, sin negrita y centrado */
.custom-popup .popup-category {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 400 !important;
  margin: 0 auto 6px;
  color: #fff !important;
}
.custom-popup .popup-category.popup-civil { background-color: var(--civil-color) !important; }
.custom-popup .popup-category.popup-network { background-color: var(--network-color) !important; }
.custom-popup .popup-category.popup-infrastructure { background-color: var(--infrastructure-color) !important; }
[data-theme="light"] .custom-popup .popup-title a,
[data-theme="dark"] .custom-popup .popup-title a { color: var(--text-color) !important; }
.custom-popup .leaflet-popup-content { color: var(--text-color) !important; }
[data-theme="light"] .custom-popup .popup-inner,
[data-theme="dark"] .custom-popup .popup-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  width: 100%;
}
.custom-popup .popup-actions { width: 100%; display: flex; align-items: center; justify-content: center; }
[data-theme="light"] .custom-popup .leaflet-popup-content * { color: #111111 !important; }
[data-theme="dark"] .custom-popup .leaflet-popup-content * { color: #ffffff !important; }
[data-theme="light"] .custom-popup .popup-description,
[data-theme="light"] .custom-popup .popup-location { color: var(--text-color) !important; }

/* Enlaces generales al pasar a claro/oscuro */
a { color: var(--text-color); }
[data-theme="dark"] a:hover { color: var(--primary-color); }
[data-theme="light"] a:hover { color: var(--primary-color); }

/* ===== Obras (páginas de detalle) ===== */
.section-title { color: var(--text-white) !important; }
.section-description { color: var(--text-white) !important; }
.text-content { color: var(--text-color) !important; }
.cta-button { background: var(--primary-color) !important; color: #fff !important; }
/* El color del hero en obras se controla en su hoja específica */

/* ===== Leaflet Popups por tema (manteniendo colores de categorías) ===== */
/* Contenedor del popup */
[data-theme="dark"] .leaflet-popup.custom-popup .leaflet-popup-content-wrapper {
  background: #0f0f10 !important;
  color: #ffffff !important;
  border: 1px solid var(--border-color) !important;
}
[data-theme="dark"] .leaflet-popup.custom-popup .leaflet-popup-tip {
  background: #0f0f10 !important;
  border: 1px solid var(--border-color) !important;
}
[data-theme="light"] .leaflet-popup.custom-popup .leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: #111111 !important;
  border: 1px solid var(--border-color) !important;
}
[data-theme="light"] .leaflet-popup.custom-popup .leaflet-popup-tip {
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
}

/* Título, descripción y etiquetas dentro del popup usan variables ya definidas */
.custom-popup .popup-title { color: var(--text-color) !important; }
.custom-popup .popup-description { color: var(--text-light) !important; }
.custom-popup .popup-location { color: var(--text-light) !important; }

/* Mantener colores de categoría (ya vienen de galeria.css) */
.popup-civil { background-color: var(--civil-color) !important; }
.popup-network { background-color: var(--network-color) !important; }
.popup-infrastructure { background-color: var(--infrastructure-color) !important; }

/* Controles Leaflet (zoom, attribution) legibles en ambos temas */
.leaflet-container { color: var(--text-color) !important; }
.leaflet-container a { color: var(--text-color) !important; }
.leaflet-control-zoom a {
  background: var(--bg-color) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--border-color) !important;
}
.leaflet-control-zoom a:hover {
  filter: brightness(0.96);
}
.leaflet-control-attribution {
  background: rgba(255,255,255,0.8) !important;
  color: #111111 !important;
  border: 1px solid var(--border-color) !important;
}
[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(0,0,0,0.6) !important;
  color: #ffffff !important;
}
/* (Eliminado) hover y decoración previos del botón de tema */

/* Toggle animado (Uiverse.io by JkHuger) */
.l {
  display: block;
  margin-bottom: 1.5em;
  font-size: 1em;
  cursor: pointer;
}

.l {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 0.75em;
  box-shadow: 0.125em 0.125em 0 0.125em rgba(0, 0, 0, 0.3) inset;
  color: #fdea7b;
  display: inline-flex;
  align-items: center;
  margin: auto;
  padding: 0.15em;
  width: 3em;
  height: 1.5em;
  transition:
    background-color 0.1s 0.3s ease-out,
    box-shadow 0.1s 0.3s ease-out;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.l:before,
.l:after {
  content: "";
  display: block;
}

.l:before {
  background-color: #d7d7d7;
  border-radius: 50%;
  width: 1.2em;
  height: 1.2em;
  transition:
    background-color 0.1s 0.3s ease-out,
    transform 0.3s ease-out;
  z-index: 1;
}

.l:after {
  background:
    linear-gradient(transparent 50%, rgba(0, 0, 0, 0.15) 0) 0 50% / 50% 100%,
    repeating-linear-gradient(90deg, #bbb 0, #bbb, #bbb 20%, #999 20%, #999 40%)
      0 50% / 50% 100%,
    radial-gradient(circle at 50% 50%, #888 25%, transparent 26%);
  background-repeat: no-repeat;
  border: 0.25em solid transparent;
  border-left: 0.4em solid #d8d8d8;
  border-right: 0 solid transparent;
  transition:
    border-left-color 0.1s 0.3s ease-out,
    transform 0.3s ease-out;
  transform: translateX(-22.5%);
  transform-origin: 25% 50%;
  width: 1.2em;
  height: 1em;
  box-sizing: border-box;
}

/* Checked */
.l:checked {
  background-color: rgba(0, 0, 0, 0.45);
  box-shadow: 0.125em 0.125em 0 0.125em rgba(0, 0, 0, 0.1) inset;
}

.l:checked:before {
  background-color: currentColor;
  transform: translateX(125%);
}

.l:checked:after {
  border-left-color: currentColor;
  transform: translateX(-2.5%) rotateY(180deg);
}

/* Other States */
.l:focus {
  /* Usually an anti-A11Y practice but set to remove an annoyance just for this demo */
  outline: 0;
}

/* Centrado estricto del contenido del popup */
.custom-popup .leaflet-popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Asegurar centrado visual de cada elemento */
.custom-popup .popup-title { text-align: center; }
.custom-popup .popup-category { text-align: center; }
.custom-popup .cta-button { text-align: center; }

/* Popup: normalizar alineación y tamaños sin desbordes */
.leaflet-popup.custom-popup .leaflet-popup-content-wrapper { text-align: center; }
.leaflet-popup.custom-popup .leaflet-popup-content {
  display: block !important;
  text-align: center !important;
  padding: 12px 14px !important;
}

/* Título centrado, sin forzar width completo */
.leaflet-popup.custom-popup .popup-title {
  display: block;
  margin: 8px auto 10px;
  text-align: center;
}

/* Chip: ancho automático, centrado y sin ocupar todo el ancho */
.leaflet-popup.custom-popup .popup-category {
  display: inline-block !important;
  width: auto !important;
  max-width: 90%;
  margin: 0 auto 6px;
  text-align: center;
}

/* Acciones: flex centrado para contener el botón */
.leaflet-popup.custom-popup .popup-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
}

/* Botón: bloque centrado, con ancho máximo fijo, sin desbordar */
.leaflet-popup.custom-popup .popup-actions .cta-button {
  display: block !important;
  width: 100%;
  max-width: 240px;
  margin: 12px auto 0 !important;
  padding: 12px 16px !important;
  font-size: 1.02rem !important;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Evitar herencias previas que forzaban width:100% a todo */
.leaflet-popup.custom-popup .popup-inner { display: block; width: auto; }

/* Corrección final de centrado y desbordes en popups Leaflet */
.leaflet-popup.custom-popup .leaflet-popup-content-wrapper {
  text-align: center;
}

.leaflet-popup.custom-popup .leaflet-popup-content {
  margin: 0 !important;            /* quitar margen por defecto que desplaza a la derecha */
  padding: 12px 12px !important; /* padding simétrico */
  width: 100% !important;
  box-sizing: border-box;
  text-align: center !important;
}

/* Forzar centrado de los tres elementos clave */
.leaflet-popup.custom-popup .popup-category,
.leaflet-popup.custom-popup .popup-title,
.leaflet-popup.custom-popup .popup-actions {
  display: block;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center !important;
}

/* Chip de categoría: auto ancho, centrado y con wrapping si es necesario */
.leaflet-popup.custom-popup .popup-category {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

/* Contenedor de botón centrado */
.leaflet-popup.custom-popup .popup-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Botón: centrado, sin desbordar, con wrapping permitido */
.leaflet-popup.custom-popup .popup-actions .cta-button {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 12px auto 0 !important;
  padding: 12px 16px !important;
  font-size: 1.02rem !important;
  box-sizing: border-box;
  white-space: normal;           /* permitir saltos de línea para evitar desbordes */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Miniatura centrada entre título y chip */
.custom-popup .popup-thumb {
  display: block;
  width: 100%;
  max-width: 264px;
  height: 144px;
  object-fit: cover;
  border-radius: 8px;
  margin: 4px auto 6px;
}

/* Centrado fiable del contenido del popup */
.leaflet-popup.custom-popup .leaflet-popup-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  width: auto !important;
  box-sizing: border-box;
  text-align: center !important;
}

/* Quitar widths forzados y centrar los elementos clave */
.leaflet-popup.custom-popup .popup-category,
.leaflet-popup.custom-popup .popup-title,
.leaflet-popup.custom-popup .popup-actions {
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: center !important;
}

/* Chip: inline-block centrado, sin desbordes */
.leaflet-popup.custom-popup .popup-category {
  display: inline-block !important;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

/* Botón: inline-block, límite de ancho y wrap si hace falta */
.leaflet-popup.custom-popup .popup-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.leaflet-popup.custom-popup .popup-actions .cta-button {
  display: inline-block !important;
  width: auto !important;
  max-width: 240px !important;
  margin: 12px auto 0 !important;
  padding: 12px 16px !important;
  font-size: 1.02rem !important;
  box-sizing: border-box !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Forzar simetría de márgenes y centrado en todos los hijos del popup */
.leaflet-popup.custom-popup .leaflet-popup-content * {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

/* Asegurar auto-centrado de elementos clave */
.leaflet-popup.custom-popup .popup-title,
.leaflet-popup.custom-popup .popup-category,
.leaflet-popup.custom-popup .popup-actions,
.leaflet-popup.custom-popup .popup-thumb {
  align-self: center !important;
}

/* Compensar asimetría: aumentar padding derecho del contenido del popup */
.leaflet-popup.custom-popup .leaflet-popup-content {
  padding: 12px 20px 12px 12px !important; /* top right bottom left */
}

/* ===== JUSTIFICACIÓN DE TEXTOS Y BORDES DE IMÁGENES ===== */
/* Justificar todos los textos de párrafos */
p, .text-content, .section-description, .article-summary, .article-content p, 
.about-text, .project-description, .timeline-info-block p, .proceso-popup-body p {
  text-align: justify !important;
  text-justify: inter-word;
}

/* Bordes y sombras para imágenes */
img, .content-image, .project-image, .about-image, .cycle-image, .timeline-image,
.popup-thumb, .featured-image img, .grid-image img, .imagen-contenido {
  border: 2px solid var(--border-color) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

/* Efecto hover mejorado para imágenes */
img:hover, .content-image:hover, .project-image:hover, .about-image:hover, 
.cycle-image:hover, .timeline-image:hover, .popup-thumb:hover, 
.featured-image img:hover, .grid-image img:hover, .imagen-contenido:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
  transform: translateY(-2px) !important;
}

/* Bordes específicos para imágenes de fondo */
.about-image, .cycle-image, .timeline-image {
  border: 3px solid var(--border-color) !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Ajustes para imágenes en modo oscuro */
[data-theme="dark"] img, [data-theme="dark"] .content-image, 
[data-theme="dark"] .project-image, [data-theme="dark"] .about-image, 
[data-theme="dark"] .cycle-image, [data-theme="dark"] .timeline-image,
[data-theme="dark"] .popup-thumb, [data-theme="dark"] .featured-image img, 
[data-theme="dark"] .grid-image img, [data-theme="dark"] .imagen-contenido {
  border-color: #444444 !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] img:hover, [data-theme="dark"] .content-image:hover, 
[data-theme="dark"] .project-image:hover, [data-theme="dark"] .about-image:hover, 
[data-theme="dark"] .cycle-image:hover, [data-theme="dark"] .timeline-image:hover, 
[data-theme="dark"] .popup-thumb:hover, [data-theme="dark"] .featured-image img:hover, 
[data-theme="dark"] .grid-image img:hover, [data-theme="dark"] .imagen-contenido:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4) !important;
}

/* Excepciones para logos y elementos que no necesitan bordes */
.u-logo img, .logo img, .brand-logo img, .footer-logo img {
  border: none !important;
  box-shadow: none !important;
}

/* Excepciones para iconos de redes sociales y WhatsApp - sin subrayado */
.social-link, .whatsapp-float, .social-link i, .whatsapp-float i {
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Excepción para el mapa de Leaflet - sin bordes */
#map, .map-container, .leaflet-container, .leaflet-control-zoom, .leaflet-control-attribution {
  border: none !important;
  box-shadow: none !important;
}
.leaflet-tile {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Excepción para imagen semicircular del about */
.about-image {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 50% 50% 0 / 0 50% 50% 0 !important; /* Mantener semicírculo */
}

/* Ajustes para textos en títulos (no justificar) */
h1, h2, h3, h4, h5, h6, .section-title, .article-title, .project-title, 
.timeline-info-block h3 {
  text-align: left !important;
}

/* Centrar títulos específicos que deben estar centrados */
.about-title, .proceso-popup-header h2, .features-main-title, .pillar-title,
.sidebar-title, .sitemap-title, .section-title, .titulo-contacto, .titulo-derecha {
  text-align: center !important;
}

/* Centrar textos de formularios y suscripción */
.formulario-header, .newsletter-content, .subscribe-form {
  text-align: center !important;
}

