/* Root container */
.nova-servicios-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

/* Overlay */
.nova-servicios-root .nova-servicios-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Main panel */
.nova-servicios-root .nova-servicios-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1200px, 95vw);
  height: 98vh;
  max-height: 98vh;
  background: #fff;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Open states */
.nova-servicios-root.is-open {
  pointer-events: auto;
}

.nova-servicios-root.is-open .nova-servicios-overlay {
  opacity: 1;
}

.nova-servicios-root.is-open .nova-servicios-panel {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Header with close button */
.nova-servicios-header {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.nova-servicios-close {
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #ff7b00;
  padding: 0;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nova-servicios-close:hover {
  background: #fff;
  transform: scale(1.1);
}

/* Content container */
.nova-servicios-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Main image container */
.nova-servicios-main-image-container {
  position: relative;
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.nova-servicios-main-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  object-position: center;
}

/* Navigation arrows */
.nova-servicios-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  color: #ff7b00;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.nova-servicios-nav-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.nova-servicios-nav-btn.prev {
  left: 1rem;
}

.nova-servicios-nav-btn.next {
  right: 1rem;
}

/* Text content overlay */
.nova-servicios-text-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
  padding: 2rem 2rem 1.5rem;
  color: #fff;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.nova-servicios-text-content.collapsed {
  transform: translateY(calc(100% - 60px));
}

.nova-servicios-text-toggle {
  position: absolute;
  top: -40px;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  border: 0;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px 20px 0 0;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.nova-servicios-text-toggle:hover {
  background: rgba(0, 0, 0, 0.9);
}

.nova-servicios-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  color: #fff;
  font-weight: 600;
}

.nova-servicios-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  font-size: 1rem;
}

/* Thumbnails container */
.nova-servicios-thumbnails-container {
  flex: 0 0 110px;
  background: #f5f5f5;
  padding: 0.5rem 1rem;
  border-top: 1px solid #e0e0e0;
}

.nova-servicios-thumbnails {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.15rem 0;
}

.nova-servicios-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.nova-servicios-thumbnails::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 3px;
}

.nova-servicios-thumbnails::-webkit-scrollbar-thumb {
  background: #ff7b00;
  border-radius: 3px;
}

.nova-servicios-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 80px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.nova-servicios-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nova-servicios-thumb.active {
  border-color: #ff7b00;
  box-shadow: 0 4px 16px rgba(255, 123, 0, 0.4);
}

.nova-servicios-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Image counter */
.nova-servicios-counter {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 5;
}

/* Responsive */
@media (max-width: 767px) {
  .nova-servicios-root .nova-servicios-panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .nova-servicios-main-image-container {
    min-height: 0;
    max-height: 100%;
  }
  
  .nova-servicios-thumbnails-container {
    flex: 0 0 90px;
    padding: 0.4rem 0.75rem;
  }
  
  .nova-servicios-main-image {
    max-width: 100%;
  }

  .nova-servicios-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .nova-servicios-nav-btn.prev {
    left: 0.5rem;
  }

  .nova-servicios-nav-btn.next {
    right: 0.5rem;
  }

  .nova-servicios-text-content {
    padding: 1.5rem 1rem 1rem;
  }

  .nova-servicios-title {
    font-size: 1.4rem;
  }

  .nova-servicios-desc {
    font-size: 0.9rem;
  }

  .nova-servicios-thumb {
    width: 80px;
    height: 64px;
  }
}

/* Listener cursor */
.servicio-listener {
  cursor: pointer;
}