:root {
  --brand-azul: #032666;
  --brand-verde: #159641;
  --brand-rojo: #ed1c24;
  --brand-blanco: #ffffff;
  
  /* Nuevas variables de acento para las tarjetas creativas */
  --brand-rojo-principal: #ed1c24;
  --brand-verde-principal: #159641;
  --brand-azul-principal: #032666;
  --accent-teal: #17a2b8;
  --accent-orange: #fd7e14;
  --accent-purple: #6f42c1;
  --accent-pink: #e83e8c;
  --accent-yellow: #ffc107;
  --accent-brown: #795548;

  --bg-body: #f4f6f9;
  --text-main: #343a40;
  --text-muted: #6c757d;
  --metric-bg: #ffffff;
  --metric-hover: #e9ecef;
}

body {
  font-family:
    "Source Sans Pro",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background-color: var(--bg-body);
}

.metrics-menu-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  background: transparent;
}

.metric-item {
  flex: 1;
  min-width: 250px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  padding: 10px 15px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.metric-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.metric-catastro {
  border-left-color: #6f42c1;
}
.metric-catastro .metric-icon-box {
  color: #6f42c1;
  background: rgba(111, 66, 193, 0.1);
}

.metric-oficial {
  border-left-color: #17a2b8;
}
.metric-oficial .metric-icon-box {
  color: #17a2b8;
  background: rgba(23, 162, 184, 0.1);
}

.metric-visitas {
  border-left-color: #159641;
}
.metric-visitas .metric-icon-box {
  color: #159641;
  background: rgba(21, 150, 65, 0.1);
}

.metric-icon-box {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  margin-right: 15px;
}

.metric-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.metric-arrow {
  margin-left: auto;
  color: #ccc;
  font-size: 0.9rem;
  transition: margin-right 0.2s;
}
.metric-item:hover .metric-arrow {
  color: var(--text-main);
  margin-right: -5px;
}

.card-welcome {
  border-top: 3px solid #159641;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.welcome-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #444;
  text-align: justify;
}

.welcome-text strong {
  color: #032666;
  font-weight: 700;
}

.link-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.link-card-img-wrapper {
  height: 140px;
  overflow: hidden;
  position: relative;
}
.link-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.link-card:hover .link-card-img {
  transform: scale(1.1);
}
.link-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 10px;
}

.card-body-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.btn-card-action {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: 4px;
}

.section-title {
  position: relative;
  padding-left: 15px;
  margin: 30px 0 20px 0;
  font-weight: 700;
  color: #032666;
  border-left: 5px solid #159641;
}

/* =========================================================
   NUEVOS ESTILOS CREATIVOS PARA OBSERVATORIOS Y SECTORES
   ========================================================= */

.themed-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none !important;
  color: var(--text-main);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 4px solid var(--accent-color);
  z-index: 1;
}

.themed-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,0.1) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.themed-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
  border-color: transparent;
}

.themed-card:hover::before {
  opacity: 1;
  background: var(--accent-color);
}

.themed-card .card-body {
  padding: 25px;
  flex-grow: 1;
  z-index: 2;
  transition: color 0.3s ease;
}

.themed-card:hover .card-body {
  color: #ffffff;
}

.themed-card .card-icon-wrapper {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.themed-card:hover .card-icon-wrapper {
  transform: scale(1.15) rotate(10deg);
  background: #ffffff;
  color: var(--accent-color);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.themed-card .card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #333;
  transition: color 0.3s ease;
}

.themed-card:hover .card-title {
  color: #ffffff;
}

.themed-card .card-text {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
  transition: color 0.3s ease;
}

.themed-card:hover .card-text {
  color: rgba(255,255,255,0.9);
}

.themed-card .card-footer-custom {
  background: transparent;
  border-top: 1px solid #f0f0f0;
  padding: 15px 25px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-color);
  transition: all 0.3s ease;
  z-index: 2;
}

.themed-card:hover .card-footer-custom {
  border-top-color: rgba(255,255,255,0.2);
  color: #ffffff;
}

.themed-card .card-footer-custom i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.themed-card:hover .card-footer-custom i {
  transform: translateX(5px);
}

@media (max-width: 768px) {
  .metrics-menu-bar {
    flex-direction: column;
    gap: 10px;
  }
  .metric-item {
    width: 100%;
  }
}