/* Estilos personalizados para el sitio */
:root {
  --primary-color: #012964;
  --secondary-color: #6c757d;
  --accent-color: #ffc107;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --green-municipal: #00843d; /* Verde municipal para portal web */
}

/* Enfoque directo para fondo global - sin pseudo-elementos */
body {
  font-family: 'Roboto', sans-serif;
  color: #333;
  line-height: 1.6;
  background: url('../img/fondo-web.png') no-repeat center center fixed;
  background-size: cover;
}

/* Contenedor principal con fondo semitransparente */
main {
  background-color: rgba(255, 255, 255, 0.92);
  position: relative;
  min-height: 100vh;
}

/* Asegurando que el footer quede por encima del fondo */
footer {
  background-color: var(--dark-color) !important;
  position: relative;
}

/* ===================================
   HEADER ESTILO AGUACATÁN
   =================================== */

/* Header Compacto */
.header-aguacatan-compacto {
  background-color: #f2f2f2;
  border-bottom: 2px solid var(--green-municipal);
  padding: 8px 0;
}

/* Logo */
.header-logo {
  max-height: 65px;
}

/* Título del portal */
.portal-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-text {
  color: var(--green-municipal);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.5px;
}

.subtitle-text {
  color: var(--green-municipal);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.2;
}

/* Información de contacto */
.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.phone-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-municipal);
  line-height: 1;
  margin-bottom: 5px;
}

.phone-icon {
  background-color: var(--green-municipal);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 5px;
  font-size: 0.9rem;
  vertical-align: middle;
}

.schedule-info {
  font-size: 0.8rem;
  color: #444;
}

/* Botones de acción en header */
.action-buttons-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.action-buttons-header .btn {
  border-radius: 4px;
  font-size: 0.8rem;
  padding: 0.25rem 0.8rem;
  transition: all 0.2s ease;
}

.action-buttons-header .btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.action-buttons-header .btn-outline-primary:hover {
  background-color: rgba(1, 56, 139, 0.1);
  color: var(--primary-color);
}

.action-buttons-header .btn-success {
  background-color: var(--green-municipal);
  border-color: var(--green-municipal);
}

/* Barra de navegación */
.navbar-dark {
  background-color: #212529 !important;
  padding: 0;
}

.navbar-dark .navbar-nav .nav-link {
  padding: 0.8rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Responsive */
@media (max-width: 991px) {
  .header-logo {
    max-height: 60px;
  }
  
  .title-text {
    font-size: 1.3rem;
  }
  
  .subtitle-text {
    font-size: 1rem;
  }
  
  .phone-number {
    font-size: 1.3rem;
  }
  
  .phone-icon {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }
  
  .action-buttons-header {
    margin-top: 8px;
  }
}

@media (max-width: 767px) {
  .header-aguacatan-compacto .row > div {
    margin-bottom: 8px;
  }
  
  .contact-info {
    align-items: center;
  }
  
  .action-buttons-header {
    justify-content: center;
  }
  
  .header-logo {
    max-height: 55px;
  }
}

@media (max-width: 575px) {
  .title-text {
    font-size: 1.1rem;
  }
  
  .subtitle-text {
    font-size: 0.9rem;
  }
  
  .phone-number {
    font-size: 1.1rem;
  }
  
  .action-buttons-header .btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
  
  .schedule-info {
    font-size: 0.7rem;
  }
}

/* ===================================
   RESTO DE ESTILOS EXISTENTES
   =================================== */

/* Estilos mejorados para secciones específicas */
.hero-section {
  position: relative;
  padding: 0;
}

section.bg-light {
  background: rgba(248, 249, 250, 0.8) !important;
  position: relative;
  overflow: hidden;
}

section.bg-light::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/pattern-light.png');
  opacity: 0.1;
  z-index: -1;
}

.py-4.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), #085ac1) !important;
  position: relative;
  overflow: hidden;
}

.py-4.bg-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/wave-pattern.svg');
  opacity: 0.1;
  z-index: 0;
}

.py-4.bg-primary .container {
  position: relative;
  z-index: 1;
}

/* Pre-header */
.pre-header {
  font-size: 0.85rem;
  position: relative;
  z-index: 10;
}

.pre-header .info-item {
  padding: 4px 0;
}

/* Secciones */
section {
  padding: 60px 0;
}

/* Cards */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Botones */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Animaciones */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Dropdown menu */
.dropdown-menu {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--light-color);
  transform: translateX(5px);
}

/* Estilos para el indicador de evaluación PDH - versión compacta */
.pdh-gauge-container {
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.pdh-gauge-container:hover {
  transform: translateY(-3px);
}

.pdh-gauge circle {
  transition: stroke-dasharray 1.5s ease-in-out;
}

.rating-scale {
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  position: relative;
}

.rating-scale::before {
  content: "";
  position: absolute;
  height: 4px;
  width: 100%;
  background: linear-gradient(to right, #dc3545, #ffc107, #198754);
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  border-radius: 4px;
}

.rating-scale span {
  position: relative;
  z-index: 1;
  background-color: white;
  padding: 0 5px;
}

/* Estilos comunes para imágenes en tarjetas */
.card-img-top {
  height: 200px !important;           
  object-fit: cover !important;       
  object-position: center !important; 
}

/* Más estilos responsivos */
@media (max-width: 991px) {
  .navbar-dark .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
  }
  
  .dropdown-menu {
    border: none;
    box-shadow: none;
    padding: 0 0 0 1rem;
    margin: 0;
  }
  
  .dropdown-item {
    padding: 0.5rem 1rem;
  }
  
  .pdh-gauge-container {
    margin-top: 1.5rem;
  }
  
  .pdh-gauge-container .row {
    flex-direction: column;
    align-items: center;
  }
  
  .pdh-gauge-container .col-5,
  .pdh-gauge-container .col-7 {
    width: 100%;
    text-align: center;
  }
  
  .pdh-gauge-container .col-7 .rating-info {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
  }
  
  .pdh-gauge-container .col-7 .rating-info .d-flex {
    margin: 0 0.5rem;
  }
}

@media (max-width: 767px) {
  .pre-header .info-items {
    flex-direction: column;
  }
  
  .pre-header .info-item {
    margin-bottom: 4px;
  }
  
  section {
    padding: 40px 0;
  }
  
  .pdh-gauge-container .col-7 .rating-info {
    flex-direction: column;
  }
  
  .pdh-gauge-container .col-7 .rating-info .d-flex {
    margin: 0.25rem 0;
  }
  
  .card-img-top {
    height: 160px !important; /* Altura más pequeña en móviles */
  }
}

/* ===================================
   ESTILOS PARA LA PÁGINA DEL ALCALDE
   =================================== */

.alcalde-img {
    width: 250px;
    max-width: 100%;
    border-radius: 10px;
    border: 5px solid white;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mensaje-alcalde {
    line-height: 1.8;
}

.mensaje-alcalde .lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: #01388b;
}

/* Estilos para el carrusel de proyectos */
.proyectos-carousel {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px 0;
}

.proyectos-carousel .carousel-item {
    padding: 5px 25px;
}

.proyectos-carousel .carousel-control-prev,
.proyectos-carousel .carousel-control-next {
    width: 40px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.proyectos-carousel .carousel-indicators {
    position: relative;
    margin-top: 20px;
    margin-bottom: 0;
}

.proyectos-carousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
}

.proyectos-carousel .carousel-indicators button.active {
    background-color: #01388b;
}

/* Estilos más pequeños y uniformes para las tarjetas de proyectos */
.proyecto-card {
    margin: 5px;
    border-radius: 8px;
    max-width: 95%;
    /* Mayor reducción de tamaño */
    transform: scale(0.85);
    transform-origin: center top;
    height: 250px !important; /* Altura fija para todas las tarjetas */
    overflow: hidden;
}

.proyecto-img {
    height: 120px !important; /* Altura aún más reducida */
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.proyecto-placeholder {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.proyecto-card .card-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: 130px; /* Altura fija para el contenido */
    overflow: hidden;
}

.proyecto-card .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    line-height: 1.2;
    /* Limitar a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4em;
}

.proyecto-card .card-text.small {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}

.proyecto-card .card-text {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    color: #666;
    /* Limitar a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.proyecto-card .btn {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    margin-top: auto; /* Empujar el botón hasta abajo */
    align-self: flex-start;
}

/* Ajustes para el carrusel */
.proyectos-carousel .row {
    margin: 0 -5px;
}

.proyectos-carousel .col-md-3 {
    padding: 0 5px;
}

/* Estilos responsivos para la página del alcalde */
@media (max-width: 767.98px) {
    .alcalde-img {
        width: 200px;
        margin-bottom: 1rem;
    }
    
    .proyectos-carousel .carousel-item {
        padding: 10px 20px;
    }
    
    .proyecto-img,
    .proyecto-placeholder {
        height: 100px !important;
    }
    
    .proyecto-card {
        height: 220px !important;
    }
    
    .proyecto-card .card-body {
        height: 120px;
    }
    
    .proyecto-card .card-title {
        font-size: 0.8rem;
    }
    
    .proyecto-card .card-text {
        font-size: 0.7rem;
    }
}

/* ===================================
   NUEVOS ESTILOS PARA MENÚ DESPLEGABLE CON HOVER
   =================================== */

/* Menú desplegable con hover */
.navbar-dark .nav-item.dropdown:hover .dropdown-menu {
  display: block;
  margin-top: 0;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para botón de login */
.login-btn {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white !important;
  transition: all 0.3s ease;
}

.login-btn:hover {
  background-color: #002d73;
  border-color: #002d73;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===================================
   NUEVOS ESTILOS PARA MENÚ DESPLEGABLE CON HOVER
   =================================== */

/* Menú desplegable con hover */
.navbar-dark .nav-item.dropdown:hover .dropdown-menu {
  display: block;
  margin-top: 0;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ===================================
   ESTILOS PARA IMÁGENES COMPLETAS EN ENLACES RÁPIDOS
   (SIN FILTROS - MOSTRANDO TUS IMÁGENES TAL COMO SON)
   =================================== */

/* Contenedor de los enlaces rápidos */
.enlace-rapido-imagen {
  transition: all 0.3s ease;
  border-radius: 8px;
  text-decoration: none !important;
  color: #333 !important;
}

.enlace-rapido-imagen:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
  text-decoration: none !important;
  color: var(--primary-color) !important;
}

/* Contenedor de la imagen completa */
.contenedor-imagen-completa {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto;
  transition: all 0.3s ease;
  /* SIN border-radius para mostrar imagen completa */
  /* SIN background-color para no interferir con tu diseño */
}

.enlace-rapido-imagen:hover .contenedor-imagen-completa {
  transform: scale(1.1);
}

/* Estilos para mostrar TUS imágenes completas */
.imagen-completa {
  width: 80px;
  height: 80px;
  object-fit: contain; /* Mantiene proporciones sin recortar */
  /* SIN FILTROS - Muestra tu imagen tal como la diseñaste */
  transition: all 0.3s ease;
  border-radius: 8px; /* Bordes redondeados suaves */
}

.enlace-rapido-imagen:hover .imagen-completa {
  /* Solo un efecto sutil de escala, sin cambiar colores */
  transform: scale(1.05);
}

/* Título de los enlaces */
.enlace-rapido-imagen h5 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  transition: color 0.3s ease;
}

.enlace-rapido-imagen:hover h5 {
  color: var(--primary-color) !important;
}

/* ===================================
   RESPONSIVE PARA IMÁGENES COMPLETAS
   =================================== */

/* Tablets */
@media (max-width: 991px) {
  .contenedor-imagen-completa {
    width: 70px;
    height: 70px;
  }
  
  .imagen-completa {
    width: 70px;
    height: 70px;
  }
  
  .enlace-rapido-imagen h5 {
    font-size: 0.95rem;
  }
  
  .enlace-rapido-imagen {
    padding: 1.5rem !important;
  }
}

/* Móviles */
@media (max-width: 767px) {
  .contenedor-imagen-completa {
    width: 60px;
    height: 60px;
  }
  
  .imagen-completa {
    width: 60px;
    height: 60px;
  }
  
  .enlace-rapido-imagen h5 {
    font-size: 0.9rem;
    line-height: 1.2;
  }
  
  .enlace-rapido-imagen {
    padding: 1.2rem 0.8rem !important;
  }
}

/* Móviles pequeños */
@media (max-width: 575px) {
  .contenedor-imagen-completa {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem !important;
  }
  
  .imagen-completa {
    width: 50px;
    height: 50px;
  }
  
  .enlace-rapido-imagen h5 {
    font-size: 0.85rem;
    margin-bottom: 0 !important;
  }
  
  .enlace-rapido-imagen {
    padding: 1rem 0.5rem !important;
  }
  
  /* 2 columnas en móviles pequeños */
  .enlaces-rapidos-container .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* ===================================
   MEJORAS ADICIONALES PARA UX
   =================================== */

/* Accesibilidad mejorada */
.enlace-rapido-imagen:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Hover effects solo en dispositivos no táctiles */
@media (hover: hover) and (pointer: fine) {
  .enlace-rapido-imagen:hover {
    transform: translateY(-5px);
  }
}

/* Eliminar hover en dispositivos táctiles */
@media (hover: none) {
  .enlace-rapido-imagen:hover {
    transform: none;
  }
  
  .enlace-rapido-imagen:hover .contenedor-imagen-completa {
    transform: none;
  }
  
  .enlace-rapido-imagen:hover .imagen-completa {
    transform: none;
  }
}