/* styles_gobierno.css - Versión Completa Mejorada (Footer Izquierda y Bandera Alineada) */

/* Reset y configuración básica */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Work Sans', sans-serif;
    background-color: #F5F5F5; /* Gris Claro (Fondo General) */
    color: #333333; /* Gris Oscuro (Texto Principal) */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', serif;
}

.container {
    max-width: 1200px;
}

/* Header mejorado con navegación minimalista */
.gob-header {
    background-color: #0070D1; /* Azul Gobierno */
    color: white;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gob-header-title a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.gob-header-title a:hover {
    opacity: 0.9;
}

/* Navegación principal minimalista */
header nav {
    position: relative;
}

header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    position: relative;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Líneas divisorias sutiles entre elementos de navegación */
header nav a:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s ease;
}

/* Efecto hover minimalista */
header nav a:hover {
    color: #CCE5FF;
}

header nav a:hover::after {
    background-color: rgba(255, 255, 255, 0.6);
}

/* Indicador activo minimalista - línea inferior */
header nav a.active-main-nav-link {
    color: white;
    font-weight: 500;
    position: relative;
}

header nav a.active-main-nav-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background-color: #CCE5FF;
    border-radius: 1px;
}

/* Hacer que el main tome el espacio disponible */
main {
    flex: 1;
    padding-bottom: 2rem;
}

/* --- FOOTER IZQUIERDA (BASADO EN DIRECTRICES) --- */
footer {
    background-color: #001c41;
    color: #fff;
    position: relative;
    padding: 40px 20px 40px; /* Ajuste padding (aumentado bottom para bandera) */
    margin-top: auto;
    min-height: 260px; /* Altura mínima */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrar verticalmente */
}

footer .footer-container {
    max-width: 1200px; /* O el ancho deseado */
    margin: 5px; /* Alinear a la izquierda */
    padding: 0 180px; /* Padding interno */
    text-align: left; /* Alinear texto a la izquierda */
    width: 100%;
}

footer h2.footer-title,
footer h3 {
    font-family: 'Roboto Slab', serif; /* Usar fuente existente */
    font-size: 1.875rem; /* 30px */
    margin: 10 0 20px 0; /* Margen inferior, sin auto */
    text-align: left;
    font-weight: 300; /* Asimilando gobcllight */
    color: #fff;
}

footer h3 {
    font-size: 1rem; /* 16px */
    font-weight: 600; /* Asimilando gobclregular */
    margin-bottom: 15px;
}

footer .footer-info p,
footer .footer-transparency {
    font-family: 'Work Sans', sans-serif; /* Usar fuente existente */
    font-size: 1rem; /* 16px */
    color: #fff;
    line-height: 1.6;
    margin-bottom: 8px;
    font-weight: 300; /* Asimilando gobcllight */
    text-align: left;
}

footer .footer-info a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer .footer-info a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

footer .footer-transparency {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #ccc;
    padding-bottom: 20px; /* Espacio antes de la bandera */
}

/* Ocultar la barra de decoración anterior */
footer .footer-decoration {
    display: none;
}

/* Agregamos una barra inferior (Bandera) */
footer::after {
    content: '';
    position: absolute;
    bottom: 20px; /* Posición desde abajo */
    left: 40px;   /* Margen izquierdo para alinear con el texto (20px footer + 20px container) */
    width: 110px; /* Ancho de la barra de colores */
    height: 8px;  /* Alto de la barra de colores */
    background: linear-gradient(to right, #0F69C4 0%, #0F69C4 37.27%, #FF4731 37.27%, #FF4731 100%);
}

/* Ocultar elementos antiguos/irrelevantes */
.footer-flag, .footer-bottom, .government-bar {
    display: none;
}
.footer-me-rs, .footer-logo-gob, .footer-me .second .footer-me-content {
    display: none; /* Ocultar si no se usa */
}
/* --- FIN FOOTER IZQUIERDA --- */

/* Navegación secundaria mejorada */
.gob-nav {
    background-color: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gob-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
}

.gob-nav ul li {
    position: relative;
}

.gob-nav a {
    color: #0070D1;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    display: block;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
}

.gob-nav ul li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 1px;
    background-color: rgba(0, 112, 209, 0.2);
}

.gob-nav a:hover {
    background-color: #E6F2FF;
    color: #0050B3;
}

.gob-nav a.active-nav-link {
    background-color: #0070D1;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 112, 209, 0.3);
}

/* Cards mejoradas */
.card {
    background-color: white;
    border: 1px solid #E9ECEF;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 112, 209, 0.15);
    transform: translateY(-2px);
    border-color: #CCE5FF;
}

/* Botones mejorados */
.btn-primary {
    background-color: #0070D1;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 112, 209, 0.2);
}

.btn-primary:hover {
    background-color: #0050B3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 112, 209, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Contenedores de gráficos mejorados */
.chart-container {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #E9ECEF;
    margin-bottom: 1.5rem;
    min-height: 450px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Selectores de filtro mejorados */
.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    background-color: white;
    color: #333333;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #0070D1;
    box-shadow: 0 0 0 3px rgba(0, 112, 209, 0.1);
}

/* Tabla de datos mejorada */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E9ECEF;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.data-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333333;
    border-bottom: 2px solid #DDDDDD;
    font-size: 0.9rem;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #F8F9FA;
    color: #333333;
    transition: background-color 0.2s ease;
}

.data-table tr:hover {
    background-color: #F8F9FA;
}

/* Tarjetas de estadísticas mejoradas */
.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #E9ECEF;
    text-align: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card h4 {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0070D1;
}

/* Selector de gráficos mejorado */
.chart-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.chart-selector button {
    padding: 0.5rem 1rem;
    border: 1px solid #E9ECEF;
    background-color: white;
    color: #333333;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chart-selector button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 112, 209, 0.1), transparent);
    transition: left 0.5s;
}

.chart-selector button:hover::before {
    left: 100%;
}

.chart-selector button:hover {
    border-color: #0070D1;
    color: #0070D1;
    transform: translateY(-1px);
}

.chart-selector button.active {
    background-color: #0070D1;
    color: white;
    border-color: #0070D1;
    box-shadow: 0 2px 8px rgba(0, 112, 209, 0.3);
}

/* Grid de calculadora mejorado */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.calc-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333333;
    font-size: 0.9rem;
}

.calc-input select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.calc-input select:focus {
    outline: none;
    border-color: #0070D1;
    box-shadow: 0 0 0 3px rgba(0, 112, 209, 0.1);
}

/* Tarjetas ROI y tecnología mejoradas */
.roi-card, .tech-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #E9ECEF;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.roi-card:hover, .tech-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.roi-card.accent {
    background: linear-gradient(135deg, #CCE5FF 0%, #E6F2FF 100%);
    border-color: #0070D1;
}

.roi-card h4, .tech-card h5 {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.roi-card p, .tech-card .cost {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0050B3;
}

.tech-card .detail {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Mensaje de carga mejorado */
.loading-message-class {
    display: none;
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: #0070D1;
    font-weight: 500;
    background-color: white;
    border-radius: 12px;
    border: 1px solid #E9ECEF;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Animación sutil para elementos interactivos */
@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.loading-message-class {
    animation: subtle-pulse 2s infinite;
}

/* Responsividad mejorada */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: column;
        gap: 0;
    }

    header nav a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    header nav a::after {
        display: none;
    }

    .calculator-grid {
        grid-template-columns: 1fr;
    }

    .chart-selector {
        justify-content: center;
    }

    .gob-nav ul {
        justify-content: center;
    }

    /* Footer responsive */
    footer {
        height: auto; /* Altura auto en móvil */
        padding: 30px 15px 40px; /* Ajuste padding */
    }

     footer .footer-container {
        padding: 0 15px; /* Padding interno reducido */
     }


     footer h2.footer-title,
     footer h3 {
        font-size: 1.5rem; /* Ajustar tamaño */
        border-top: none; /* Quitar borde */
        padding-top: 0;
     }

     footer h3 {
        font-size: 0.9rem;
     }

     footer .footer-info p,
     footer .footer-transparency {
        font-size: 0.9rem;
     }

     footer::after {
        left: 30px; /* Margen izquierdo móvil (15px + 15px) */
     }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.boton-descarga {
  background-color: #1976d2;
  color: #fff;
  border: 2px solid #1565c0;
  padding: 5px 24px;
  border-radius: 2px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.1s, border 0.1s;
}
.boton-descarga:hover {
  background-color: #1565c0;
  border-color: #1976d2;
}

/* Estilos generales para la barra de navegación */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #1976d2;
  color: #fff;
}

/* Oculta el menú hamburguesa y panel lateral en escritorio */
.menu-hamburguesa, .panel-lateral { display: none; }

/* Estilos para móviles */
@media (max-width: 700px) {
  .navbar, .breadcrumb { display: none; }
  .menu-hamburguesa {
    display: block;
    font-size: 32px;
    cursor: pointer;
    padding: 16px;
    color: #1976d2;
    background: #e3f2fd;
    border-radius: 6px;
    margin: 8px;
    width: fit-content;
  }
  .panel-lateral {
    display: block;
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: #1976d2;
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 60px;
    color: #fff;
  }
  .panel-lateral a {
    padding: 12px 24px;
    text-decoration: none;
    color: #fff;
    display: block;
    font-size: 18px;
    transition: 0.2s;
  }
  .panel-lateral a:hover {
    background: #1565c0;
  }
  .panel-lateral .cerrar {
    position: absolute;
    top: 10px;
    right: 24px;
    font-size: 40px;
    color: #fff;
    text-decoration: none;
  }
}