/* ==============================================================================
   MXLOGISTIC — components.css
   ============================================================================== */

/* ------------------------------------------------------------------------------
   1. WIDGET OFICIAL FOOTER PONCIANO STUDIO (Desde Prompt Forge API)
   ------------------------------------------------------------------------------ */
.ps-footer {
  background: #0d0e14;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 64px 0 24px;
  color: #a1a7b5;
  font-family: var(--font-sans);
  margin-top: auto;
}

.ps-footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .ps-footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.ps-footer-col h3 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.ps-footer-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.ps-footer-desc {
  margin: 14px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #8b92a0;
}

.ps-footer-enlaces ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-footer-enlaces a {
  color: #cbd1dc;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.ps-footer-enlaces a:hover {
  color: var(--accent-green-bright);
}

.ps-footer-contacto p {
  font-size: 0.88rem;
  color: #8b92a0;
  margin-bottom: 8px;
}

.ps-footer-tel {
  font-family: var(--font-mono);
  color: #ffffff !important;
  font-weight: 600;
}

.ps-footer-bottom {
  max-width: var(--container-max);
  margin: 48px auto 0;
  padding: 24px var(--container-pad) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: #646a78;
}

.ps-footer-credito {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-size: 0.82rem;
}

.ps-footer-credito-label {
  color: #646a78;
}

.ps-footer-credito-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 3px 8px;
  color: #e2e8f0;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.ps-footer-credito:hover .ps-footer-credito-badge {
  background: rgba(76, 145, 2, 0.15);
  border-color: var(--accent-green-border);
  color: #ffffff;
}

.ps-footer-credito-accent {
  color: var(--accent-green-bright);
  font-weight: 700;
}

/* Redes Sociales (Footer) */
.ps-footer-social {
  margin-top: 24px;
}

.ps-footer-social-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ps-footer-social-list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #cbd1dc;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.ps-footer-social-list a:hover {
  color: var(--accent-green-bright);
}

.ps-footer-social-list svg {
  flex-shrink: 0;
}

/* ------------------------------------------------------------------------------
   2. PRE-COTIZADOR INTELIGENTE WHATSAPP (Modal / Wizard)
   ------------------------------------------------------------------------------ */
.quote-wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.quote-wizard-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.quote-wizard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 32px);
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  transform: translateY(16px);
  transition: transform var(--transition-normal);
}

.quote-wizard-overlay.is-active .quote-wizard-card {
  transform: translateY(0);
}

.wizard-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
}

.wizard-close-btn:hover {
  color: #ffffff;
}

.wizard-progress {
  display: flex;
  gap: 8px;
  margin: 16px 0 24px;
}

.wizard-step-bar {
  flex: 1;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  transition: background-color var(--transition-normal);
}

.wizard-step-bar.is-active {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green-glow);
}

.wizard-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.wizard-option-btn {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: left;
  color: var(--text-steel);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
}

.wizard-option-btn:hover,
.wizard-option-btn.is-selected {
  border-color: var(--accent-green);
  background: var(--bg-surface-active);
  color: #ffffff;
}

.wizard-option-btn.is-selected {
  box-shadow: 0 0 0 1px var(--accent-green);
}

.wizard-option-btn small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wizard-escape-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: underline;
}

.wizard-escape-link:hover {
  color: var(--whatsapp-color);
}

/* ------------------------------------------------------------------------------
   3. FILMSTRIP OPERACIONAL (Tira Editorial de Equipos Reales)
   ------------------------------------------------------------------------------ */
.filmstrip-section {
  padding: 60px 0;
  overflow: hidden;
  background: rgba(18, 20, 26, 0.4);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.filmstrip-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.filmstrip-controls {
  display: flex;
  gap: 8px;
}

.filmstrip-arrow-btn {
  width: 44px;
  height: 44px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.filmstrip-arrow-btn:hover {
  background: var(--bg-surface-active);
  border-color: var(--accent-green);
}

.filmstrip-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

.filmstrip-track::-webkit-scrollbar {
  height: 6px;
}

.filmstrip-track::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

.filmstrip-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.filmstrip-thumb {
  width: 100%;
  position: relative;
  background: #000;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.filmstrip-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.filmstrip-card:hover .filmstrip-thumb img {
  transform: none;
}

.filmstrip-body {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.filmstrip-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

/* ------------------------------------------------------------------------------
   4. GALERÍA MASONRY Y LIGHTBOX ACCESIBLE (/operaciones/)
   ------------------------------------------------------------------------------ */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 24px;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-steel);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--bg-surface-raised);
  border-color: var(--accent-green);
  color: #ffffff;
}

.filter-btn.is-active {
  box-shadow: 0 0 8px var(--accent-green-glow);
}

.gallery-grid {
  columns: 1;
  column-gap: 20px;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    columns: 3;
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}

.gallery-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.gallery-item-media {
  position: relative;
  background: #000;
  display: block;
}

.gallery-item-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

.gallery-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 11, 14, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-green-bright);
}

.gallery-item-caption {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Lightbox Dialog */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 8, 0.94);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.is-open {
  display: flex;
}

.lightbox-content {
  max-width: 1000px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.lightbox-media-container {
  width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lightbox-media-container img,
.lightbox-media-container video {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 14px;
  color: #ffffff;
  font-size: 0.95rem;
  text-align: center;
  max-width: 700px;
}

.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-btn-close {
  top: clamp(10px, 2vw, 24px);
  right: clamp(10px, 2vw, 24px);
}

.lightbox-btn-prev {
  left: clamp(10px, 2vw, 24px);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-btn-next {
  right: clamp(10px, 2vw, 24px);
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 1140px) {
  .lightbox-btn-prev { left: 10px; }
  .lightbox-btn-next { right: 10px; }
  .lightbox-btn-close { top: 10px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .filmstrip-card,
  .gallery-item,
  .floating-whatsapp,
  .floating-whatsapp--secondary,
  .filter-btn,
  .lightbox-btn {
    transition: none;
  }
}

/* ------------------------------------------------------------------------------
   5. BOTÓN FLOTANTE DE WHATSAPP
   ------------------------------------------------------------------------------ */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--whatsapp-color);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.floating-whatsapp:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

.floating-whatsapp--secondary {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #128c7e;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(18, 140, 126, 0.4);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.floating-whatsapp--secondary:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(18, 140, 126, 0.6);
  color: #ffffff;
}

.floating-whatsapp--secondary svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.floating-whatsapp svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
