/* style.css */
/* Archivo de estilos principal para Construcciones García & Pérez */

/* --- ESTILOS GENERALES DEL SITIO --- */
body {
  background-color: #f8f9fa;
}

/* --- HEADER Y NAVBAR --- */
header.bg-primary {
  background: linear-gradient(120deg, #007bff 60%, #0056b3 100%);
}

/* --- TARJETAS Y CONTENEDORES --- */
.card-img-top {
  height: 220px;
  object-fit: cover;
}

.card {
  border-radius: 1rem;
}

section {
  scroll-margin-top: 80px;
}

/* --- FORMULARIOS --- */
#form-contacto {
  max-width: 500px;
  margin: auto;
}

/* --- FOOTER --- */
footer {
  letter-spacing: 1px;
}

/* --- BOTÓN FLOTANTE DE WHATSAPP --- */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1050;
  background: #25d366;
  text-decoration: none;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  padding: 0.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.whatsapp-float:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transform: scale(1.08);
}

/* --- MODALES Y ANIMACIONES --- */
.modal-content {
  border-radius: 1rem;
}

@media (max-width: 767px) {
  .card-img-top {
    height: 160px;
  }
  header.bg-primary {
    padding: 2rem 0;
  }
  .whatsapp-float {
    right: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
  }
}

/* --- FOOTER PERSONALIZADO --- */
.footer-bg {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.footer-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #ffc107 50%, transparent 100%);
}

.footer {
  padding: 3rem 0 1.5rem 0;
  position: relative;
  z-index: 2;
}

.footer img {
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.footer img:hover {
  transform: scale(1.05);
}

/* --- TÍTULOS Y LÍNEAS EN EL FOOTER --- */
.footer-contato h3,
.footer-informacoes h3 {
  color: #ffc107;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-contato h3::after,
.footer-informacoes h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #ffc107, #ff8c00);
  border-radius: 2px;
}

/* --- ENLACES Y REDES SOCIALES EN EL FOOTER --- */
.footer-contato ul li {
  margin-bottom: 0.75rem;
  transition: transform 0.2s ease;
}

.footer-contato ul li:hover {
  transform: translateX(5px);
}

.footer-contato ul li a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.footer-contato ul li a:hover {
  color: #ffc107;
  text-decoration: none;
}

.footer-contato ul li a[href^="tel:"]::before {
  content: '📞 ';
  margin-right: 0.5rem;
}

.footer-contato ul li a[href^="mailto:"]::before {
  content: '✉️ ';
  margin-right: 0.5rem;
}

.footer-redes {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  text-decoration: none;
}

.footer-redes a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-redes a:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.2);
}

.footer-redes a i {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.footer-contato ul li i,
.footer-redes a i,
.footer-informacoes nav ul li i,
.footer-informacoes nav ul li span,
.footer-contato ul li span {
  text-decoration: none !important;
}

.footer-informacoes nav ul li {
  margin-bottom: 0.75rem;
  transition: transform 0.2s ease;
}

.footer-informacoes nav ul li:hover {
  transform: translateX(5px);
}

.footer-informacoes nav ul li a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  padding-left: 1rem;
}

.footer-informacoes nav ul li a::before {
  content: '→';
  position: absolute;
  left: 0;
  opacity: 0;
  transition: all 0.3s ease;
}

.footer-informacoes nav ul li a:hover {
  color: #ffc107;
  padding-left: 1.5rem;
}

.footer-informacoes nav ul li a:hover::before {
  opacity: 1;
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #999999;
  font-size: 0.9rem;
}

.footer-copy a {
  color: #25d366 !important;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-copy a:hover {
  color: #128c7e !important;
  text-decoration: underline;
}

/* Responsive para el footer */
@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem 0;
    text-align: center;
  }
  
  .footer-contato h3::after,
  .footer-informacoes h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-redes {
    justify-content: center;
  }
  
  .footer-contato ul li:hover,
  .footer-informacoes nav ul li:hover {
    transform: none;
  }
  
  .footer-informacoes nav ul li a:hover {
    padding-left: 1rem;
  }
  
  .footer-informacoes nav ul li a::before {
    display: none;
  }
}

/* Animación de entrada para el footer */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer > * {
  animation: fadeInUp 0.6s ease forwards;
}

.footer-contato {
  animation-delay: 0.1s;
}

.footer-informacoes {
  animation-delay: 0.2s;
}

.footer-copy {
  animation-delay: 0.3s;
}

/* Mejoras para el logo en el footer */
.footer .d-flex img {
  max-height: 40px;
  width: auto;
}

/* Estilos para el texto descriptivo */
.footer p.text-muted {
  color: #b0b0b0 !important;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Mejoras para la línea divisoria */
.footer hr {
  opacity: 0.3;
  margin: 2rem 0;
}

/* Efecto hover mejorado para los enlaces */
.footer-contato ul li a:hover,
.footer-informacoes nav ul li a:hover {
  text-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}

/* Animación para los iconos de redes sociales */
.footer-redes a:hover i {
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

/* Mejoras para dispositivos móviles */
@media (max-width: 576px) {
  .footer {
    padding: 2rem 0 1rem 0;
  }
  
  .footer-redes {
    justify-content: center;
    margin-top: 1rem;
  }
  
  .footer-redes a {
    width: 40px;
    height: 40px;
  }
  
  .footer-copy {
    font-size: 0.85rem;
  }
}

/* Estilos para el Modal de Cotización */
.bg-gradient-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.modal-content {
  border-radius: 1rem;
  overflow: hidden;
}

.modal-header {
  padding: 1.5rem;
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffc107, #ff8c00);
}

.modal-title {
  font-weight: 700;
  font-size: 1.25rem;
}

.modal-body {
  background: #f8f9fa;
}

.form-label {
  color: #495057;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border: 2px solid #e9ecef;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #ffc107;
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.form-control-lg,
.form-select-lg {
  padding: 0.75rem 1rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
  border: none;
  color: #000;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  border: none;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
  transform: translateY(-2px);
}

/* Animación de entrada del modal */
.modal.fade .modal-dialog {
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal.show .modal-dialog {
  transform: scale(1);
}

/* Efectos hover para los campos */
.form-control:hover,
.form-select:hover {
  border-color: #ffc107;
}

/* Estilos para el campo personalizado */
#campoPersonalizado {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive para el modal */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 1rem;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Estilos para SweetAlert2 personalizados */
.swal2-popup {
  border-radius: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.swal2-title {
  color: #007bff;
  font-weight: 700;
}

.swal2-html-container {
  color: #6c757d;
}

.swal2-confirm {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
  border-radius: 0.75rem !important;
  font-weight: 600 !important;
}

.swal2-confirm:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
}

/* Estilos para el enlace activo de la navegación */
.navbar-nav .nav-link.active {
  color: #ffc107 !important;
  font-weight: 600;
  position: relative;
  background: rgba(255, 193, 7, 0.1);
  border-radius: 8px;
  padding: 8px 16px;
  margin: 0 4px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, #ffc107, #ff8c00);
  border-radius: 2px;
  animation: slideIn 0.3s ease;
}

.navbar-nav .nav-link.active:hover {
  color: #ff8c00 !important;
  background: rgba(255, 193, 7, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

/* Animación para el indicador del enlace activo */
@keyframes slideIn {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 80%;
    opacity: 1;
  }
}

/* Efecto hover para enlaces no activos */
.navbar-nav .nav-link:not(.active):hover {
  color: #ffc107 !important;
  background: rgba(255, 193, 7, 0.05);
  border-radius: 8px;
  padding: 8px 16px;
  margin: 0 4px;
  transition: all 0.3s ease;
}

/* Responsive para navegación */
@media (max-width: 991px) {
  .navbar-nav .nav-link.active,
  .navbar-nav .nav-link:not(.active):hover {
    margin: 4px 0;
    text-align: center;
  }
  
  .navbar-nav .nav-link.active::before {
    width: 60%;
  }
}

/* Estilos para el menú flotante de WhatsApp */
.whatsapp-menu {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1050;
}

.whatsapp-main {
  background: linear-gradient(135deg, #25d366 60%, #128c7e 100%);
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,211,102,0.25);
}

.whatsapp-main:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,0.4);
}

.whatsapp-main i {
  color: #fff;
  transition: transform 0.3s ease;
}

.whatsapp-options {
  position: absolute;
  bottom: 80px;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.whatsapp-option {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 0.9rem;
}

.whatsapp-option.whatsapp-direct {
  background: linear-gradient(135deg, #25d366 60%, #128c7e 100%);
  box-shadow: 0 4px 16px rgba(37,211,102,0.25);
}

.whatsapp-option.cotizacion-option {
  background: linear-gradient(135deg, #ffc107 60%, #e0a800 100%);
  box-shadow: 0 4px 16px rgba(255,193,7,0.25);
}

.whatsapp-option:hover {
  transform: translateX(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.whatsapp-option.whatsapp-direct:hover {
  box-shadow: 0 6px 20px rgba(37,211,102,0.4);
}

.whatsapp-option.cotizacion-option:hover {
  box-shadow: 0 6px 20px rgba(255,193,7,0.4);
}

/* Responsive para menú flotante */
@media (max-width: 767px) {
  .whatsapp-menu {
    right: 16px;
    bottom: 16px;
  }
  
  .whatsapp-main {
    width: 56px;
    height: 56px;
  }
  
  .whatsapp-main i {
    font-size: 2rem !important;
  }
  
  .whatsapp-options {
    bottom: 70px;
    min-width: 180px;
  }
  
  .whatsapp-option {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

.footer-redes a,
.footer-redes a:visited,
.footer-redes a:active,
.footer-redes a:focus {
  text-decoration: none !important;
  outline: none;
  box-shadow: none;
}