/* styles.css */

/* ==========================================================================
   Variables Globales
========================================================================== */
:root {
  --primary-color: #dc3545;
  --secondary-color: #1a2e4a;
  --text-color: #444444; /* Cambiado de #333 a #444444 */
  --light-text-color: #666;
  --background-light: #f8f9fa;
  --white: #fff;
  --font-size-h1: 2.75rem;
  --header-height: 100px; /* Nueva variable para la altura del header */
}

/* ==========================================================================
   Tipografía
========================================================================== */

/* Ajuste del body para compensar el header fijo */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  padding-top: var(--header-height); /* Espacio para el header fijo */
}

/* Ajuste general para todas las secciones con anclas */
[id] {
  scroll-margin-top: var(--header-height); /* Compensación exacta de 100px */
}

/* Ajuste para pantallas pequeñas si el header cambia de tamaño */
@media (max-width: 576px) {
  [id] {
    scroll-margin-top: var(--header-height); /* Mantiene la compensación */
  }
}

/* ==========================================================================
   Header Moderno con Efecto Dinámico
========================================================================== */
.header-modern {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  padding: 15px 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  box-sizing: border-box;
}

.header-modern.scrolled {
  background: rgba(26, 46, 74, 0.99);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-modern .navbar-brand {
  color: var(--white);
  font-weight: 600;
  font-size: 1.5rem;
  transition: color 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.header-modern.scrolled .navbar-brand {
  color: var(--white);
}

.header-modern .logo-nittrans {
  color: var(--primary-color) !important;
  font-weight: 700;
  margin-right: 5px;
  transition: color 0.3s ease;
}

.header-modern .logo-transporte {
  color: var(--secondary-color);
  font-weight: 600;
  transition: color 0.3s ease;
}

.header-modern.scrolled .logo-transporte {
  color: var(--white) !important;
}

/* Widgets de Contacto en Columna Vertical a la Izquierda */
.header-widgets {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.header-widgets p {
  color: var(--light-text-color); /* #666 por defecto */
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.header-widgets i {
  font-size: 1rem;
}

.header-modern.scrolled .header-widgets p {
  color: var(--white) !important; /* Asegura que el color blanco se aplique */
}

.header-modern.scrolled .header-widgets p {
  color: var(--white); /* Respaldo sin !important */
}

.header-widgets {
  display: none;
}

@media (max-width: 393px) {
  .custom-menu {
    background-color: #f8f9fa; /* Cambia a un color de fondo deseado */
    padding: 15px;
  }

  .custom-nav-link {
    font-size: 1rem; /* Ajusta el tamaño de texto */
  }

  .custom-toggler-icon::before,
  .custom-toggler-icon::after,
  .custom-toggler-icon span {
    background-color: #000; /* Cambia el color del ícono */
  }
}

@media (min-width: 768px) {
  .header-widgets {
    display: flex;
  }
}

/* Estilos del Menú Hamburguesa Personalizado */
.custom-nav {
  position: relative;
}

.custom-toggler {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

.custom-toggler-icon {
  background-image: none;
  width: 30px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.custom-toggler-icon::before,
.custom-toggler-icon::after,
.custom-toggler-icon span {
  content: '';
  background-color: var(--text-color); /* #444444 por defecto */
  height: 3px;
  width: 100%;
  display: block;
  transition: all 0.3s ease;
}

.header-modern.scrolled .custom-toggler-icon::before,
.header-modern.scrolled .custom-toggler-icon::after,
.header-modern.scrolled .custom-toggler-icon span {
  background-color: var(--white); /* #fff cuando scrolled */
}

.custom-toggler[aria-expanded="true"] .custom-toggler-icon::before {
  transform: rotate(45deg);
  position: absolute;
  top: 8px;
}

.custom-toggler[aria-expanded="true"] .custom-toggler-icon::after {
  transform: rotate(-45deg);
  position: absolute;
  bottom: 8px;
}

.custom-toggler[aria-expanded="true"] .custom-toggler-icon span {
  opacity: 0;
}

.custom-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: var(--white);
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  flex-direction: column;
  align-items: center;
}

.custom-menu.show {
  display: flex;
}

.custom-nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 10px 0;
  text-align: center;
  font-size: 1.1rem;
  text-decoration: none;
  display: block;
  width: 100%;
}

.custom-nav-link:hover,
.custom-nav-link.active {
  color: var(--primary-color);
}

/* Ajustes específicos para pantallas pequeñas (basado en tu media query) */
@media (max-width: 414px) { /* Ampliamos a 414px para más compatibilidad */
  .custom-menu {
    background-color: #f8f9fa; /* Fondo gris claro como ajustaste */
    padding: 15px; /* Reducimos padding como ajustaste */
  }

  .custom-nav-link {
    font-size: 1rem; /* Tamaño de texto ajustado */
  }

  .custom-toggler-icon::before,
  .custom-toggler-icon::after,
  .custom-toggler-icon span {
    background-color: #000; /* Negro por defecto en pantallas pequeñas */
  }

  .col-6.d-flex.justify-content-center {
    padding-right: 5px;
  }

  .custom-toggler {
    margin-right: 10px;
  }
}

@media (min-width: 577px) {
  .custom-menu {
    display: flex;
    position: static;
    width: auto;
    background: none;
    box-shadow: none;
    padding: 0;
    max-height: none;
    overflow-y: visible;
    z-index: auto;
    flex-direction: row;
    justify-content: center;
  }

  .custom-nav-link {
    margin: 0 15px;
    padding: 0;
    text-align: left;
    font-size: 1rem;
    width: auto;
  }

  .header-modern.scrolled .custom-nav-link {
    color: var(--white);
  }

  .custom-toggler {
    display: none;
  }
}

/* ==========================================================================
   Hero Section
========================================================================== */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/ninera17.jpeg');
  background-size: cover;
  background-position: center;
  height: calc(100vh - var(--header-height));
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  color: var(--white);
  padding: 0 15px;
  position: relative;
}

.hero-section h1 {
  font-size: var(--font-size-h1);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--white); /* Mantengo blanco para contraste */
}

.hero-section p {
  font-size: 1.2rem;
  margin: 20px 0;
  font-weight: 300;
  color: var(--white); /* Mantengo blanco para contraste */
}

.hero-section .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 10px 20px;
  font-weight: 500;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.hero-section .btn-primary:hover {
  background-color: #c82333;
  border-color: #c82333;
}

.hero-section .btn-outline-light {
  padding: 10px 20px;
  font-weight: 500;
  border-radius: 3px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-section .btn-outline-light:hover {
  background-color: var(--white);
  color: var(--text-color); /* Cambiado a #444444 */
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 576px) {
  .hero-section {
    height: calc(100vh - var(--header-height));
    min-height: 600px; /* Altura mínima para evitar que el contenido se corte */
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .hero-section .btn-primary,
  .hero-section .btn-outline-light {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
}

@media (min-width: 577px) and (max-width: 767px) {
  .hero-section h1 {
    font-size: 2.25rem; /* Ajuste específico para tablets pequeñas */
  }
}

/* ==========================================================================
   Sección Nosotros
========================================================================== */
.about-section {
  background-color: var(--white);
}

.about-section h2 {
  color: var(--text-color); /* Cambiado a #444444 */
  font-weight: bold;
}

.about-section h3 {
  color: var(--text-color); /* Cambiado a #444444 */
  font-weight: bold;
  font-size: 1.5rem;
}

.about-section h4 {
  color: var(--text-color); /* Cambiado a #444444 */
  font-weight: bold;
  font-size: 1.2rem;
}

.about-section p {
  color: var(--light-text-color);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.about-section i {
  color: var(--primary-color);
}

.about-section .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 10px 20px;
  font-weight: bold;
}

.about-section .btn-primary:hover {
  background-color: #c82333;
  border-color: #c82333;
}

/* Estilo para el bloque de visión y misión */
.vision-mission-block {
  background-color: var(--background-light);
  padding: 30px 0;
  border-radius: 8px;
}

.vision-mission-card {
  background-color: var(--white);
  border: 1px solid #ddd;
  transition: transform 0.3s ease;
}

.vision-mission-card:hover {
  transform: translateY(-5px);
}

/* Estilo para los puntos destacados */
.highlight-item {
  background-color: var(--white);
  border: 1px solid #ddd;
  flex: 1 1 300px;
  text-align: left;
  font-size: 1rem;
  color: var(--light-text-color);
}

.about-section .highlight-item {
  flex: 0 0 auto;
  max-width: 300px;
}

@media (max-width: 767px) {
  .about-section .d-flex.justify-content-center {
    flex-direction: column;
    align-items: center;
  }

  .about-section .highlight-item {
    max-width: 100%;
  }
}

.about-section .col-lg-6 .btn-primary {
  margin-top: 1rem;
}

/* ==========================================================================
   Sección de Galería
========================================================================== */
.gallery-section {
  background-color: var(--background-light);
}

.gallery-section h2 {
  color: var(--text-color); /* Cambiado a #444444 */
  font-weight: bold;
}

.gallery-section h3 {
  color: var(--text-color); /* Cambiado a #444444 */
  font-weight: bold;
  font-size: 1.5rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

@media (max-width: 767px) {
  .gallery-item img {
    height: 150px;
  }
}

/* ==========================================================================
   Sección de Contacto
========================================================================== */
.contact-section {
  background-color: var(--background-light);
}

.contact-section h2 {
  color: var(--text-color); /* Cambiado a #444444 */
  font-weight: bold;
}

.contact-section .form-control {
  border-radius: 0;
  border-color: #ddd;
  padding: 10px;
}

.contact-section .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#form-message .alert {
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  margin-bottom: 0;
}

#form-message .alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

#form-message .alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.contact-section .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 10px;
  font-weight: bold;
}

.contact-section .btn-primary:hover {
  background-color: #c82333;
  border-color: #c82333;
}

.contact-section .contact-info p {
  margin-bottom: 15px;
  color: var(--light-text-color);
}

.contact-section .contact-info a {
  color: var(--text-color); /* Cambiado a #444444 */
  text-decoration: none;
}

.contact-section .contact-info a:hover {
  color: var(--primary-color);
}

.contact-section .social-links a {
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.contact-section .social-links a i {
  color: var(--text-color); /* Cambiado a #444444 */
}

.contact-section .social-links a:hover i {
  color: var(--primary-color);
}

/* Estilo para el contenedor del logo */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 10px;
}

.logo-container img {
  max-width: 100%; /* Asegura que el logo no exceda el contenedor */
  height: auto; /* Mantiene la proporción */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Sombra suave */
}

/* Ajustes responsivos */
@media (max-width: 767px) {
  .contact-info .row {
      flex-direction: column;
      text-align: center;
  }

  .logo-container {
      margin-top: 20px; /* Espacio encima del logo en móviles */
  }

  .logo-container img {
      max-height: 150px; /* Límite de altura en pantallas pequeñas */
  }
}

.contact-section .col-lg-6 form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-section .col-lg-6 .btn-primary {
  margin-top: auto;
}

@media (max-width: 767px) {
  .contact-section .col-lg-6 form {
    height: auto;
  }

  .contact-section .col-lg-6 .btn-primary {
    margin-top: 1rem;
  }

  .contact-section .map-container {
    height: 150px;
  }
}

/* ==========================================================================
   Pestaña de Cotización
========================================================================== */
.quote-tab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1500; /* Cambiado de 1000 a 1500 para estar por encima del header (1000) pero por debajo del modal (2000) */
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-tab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.quote-tab-toggle {
  color: var(--white);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.quote-tab-toggle i {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.quote-tab-toggle::after {
  content: 'Cotizar Servicio';
  position: absolute;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.6rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  bottom: 100%;
  right: 50%;
  transform: translateX(50%);
  margin-bottom: 10px;
  z-index: 1001;
}

.quote-tab:hover .quote-tab-toggle::after {
  opacity: 1;
}

@media (max-width: 576px) {
  .quote-tab {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .quote-tab-toggle {
    font-size: 1.2rem;
  }

  .quote-tab-toggle::after {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}

/* ==========================================================================
   Modal de Cotización
========================================================================== */
.quote-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.quote-modal.active {
  display: flex;
}

.quote-modal-content {
  background-color: var(--white);
  width: 90%;
  max-width: 500px;
  padding: 30px;
  border-radius: 5px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.quote-modal.active .quote-modal-content {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.quote-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color); /* Cambiado a #444444 */
}

.quote-modal-close:hover {
  color: var(--primary-color);
}

.quote-modal-content h3 {
  color: var(--text-color); /* Cambiado a #444444 */
  font-weight: bold;
}

.quote-modal-content .form-control,
.quote-modal-content .form-select {
  border-radius: 0;
  border-color: #ddd;
  padding: 10px;
}

.quote-modal-content .form-control:focus,
.quote-modal-content .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.quote-modal-content .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 10px;
  font-weight: bold;
}

.quote-modal-content .btn-primary:hover {
  background-color: #c82333;
  border-color: #c82333;
}

/* Media Queries para Quote Modal */
@media (max-width: 576px) {
  .quote-modal-content {
    width: 95%;
    padding: 20px;
  }

  .quote-modal.active .quote-modal-content {
    right: 2.5%;
  }

  .quote-modal h3 {
    font-size: 24px;
  }
}

/* ==========================================================================
   Footer
========================================================================== */
.footer-section {
  background-color: var(--secondary-color);
  color: #9eb7cb;
  padding: 40px 0;
}

.footer-section h5 {
  color: var(--white);
  font-weight: bold;
  font-size: 1.1rem;
}

.footer-section p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.footer-section ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-section i {
  color: var(--primary-color);
  margin-right: 8px;
}

.footer-section .map-container {
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.footer-section .map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.footer-section .text-center {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section .text-center p {
  font-size: 0.85rem;
  color: #577186;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 767px) {
  .footer-section .col-md-3 {
    margin-bottom: 30px;
  }

  .footer-section .text-center {
    margin-top: 20px;
  }

  .footer-section .map-container {
    height: 200px;
  }
}

/* ==========================================================================
   Botón de WhatsApp Flotante
========================================================================== */

/* Botón de WhatsApp flotante (solo ícono) */
.whatsapp-button-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 1001;
}

.whatsapp-button {
  position: relative; /* Necesario para posicionar la onda */
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #25D366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  overflow: hidden; /* Para que la onda no se desborde del círculo */
}

.whatsapp-button:hover {
  background-color: #1da851;
  transform: scale(1.05);
}

.whatsapp-button i {
  font-size: 28px; /* Tamaño por defecto del ícono */
  z-index: 1; /* Asegura que el ícono esté por encima de la onda */
}

/* Efecto de ondas */
.whatsapp-ripple {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3); /* Color de la onda (blanco semitransparente) */
  border-radius: 50%;
  transform: scale(0); /* Inicia en 0 para expandirse */
  animation: ripple 1.5s infinite ease-out; /* Animación infinita */
  z-index: 0; /* Detrás del ícono */
}

/* Animación de la onda */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2); /* Se expande al doble del tamaño del botón */
    opacity: 0; /* Desaparece al final */
  }
}

/* Ajustes para pantallas pequeñas (responsive) */
@media (max-width: 414px) {
  .whatsapp-button {
    width: 50px;
    height: 50px;
  }

  .whatsapp-button i {
    font-size: 24px;
  }

  .quote-tab {
    width: 50px;
    height: 50px;
  }

  .quote-tab i {
    font-size: 20px;
  }
}

/* Botón de Cotización */
.quote-tab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px; /* Tamaño por defecto */
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.quote-tab:hover {
  transform: scale(1.05);
}

/* Ajustes para pantallas pequeñas (responsive) */
@media (max-width: 414px) {
  .whatsapp-button {
    width: 50px; /* Reducido a 50px */
    height: 50px;
  }

  .whatsapp-button i {
    font-size: 24px; /* Reducimos el ícono para que sea proporcional */
  }

  .quote-tab {
    width: 50px; /* Reducido a 50px */
    height: 50px;
  }

  .quote-tab i {
    font-size: 20px; /* Ajustamos el ícono de cotización para que sea proporcional */
  }
}