/* Service Modal Styles */

/* Modal Overlay */
.service-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-modal-overlay.active {
  display: block;
  opacity: 1;
}

/* Modal Container */
.service-modal {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  background: white;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.service-modal.active {
  bottom: 0;
  pointer-events: auto;
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-icon {
  font-size: 32px;
}

.modal-title-text h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: rgb(15, 23, 42);
  margin: 0;
}

.modal-title-text p {
  font-size: 12px;
  color: rgb(42, 47, 54);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 4px 0 0 0;
  font-weight: 600;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: rgb(100, 116, 139);
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.close-modal-btn:hover {
  background: rgb(122, 157, 193);
  color: rgb(38, 50, 81);
}

/* Modal Content */
.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgb(203, 213, 225);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgb(148, 163, 184);
}

/* Image Gallery */
.gallery-container {
  margin-bottom: 32px;
}

.gallery-wrapper {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgb(248, 252, 248);
  aspect-ratio: 16 / 10;
  margin-bottom: 12px;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  display: none;
}

.gallery-image.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Gallery Controls */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.gallery-nav-btn {
  background: linear-gradient(135deg, rgb(59, 130, 246), #f28c38);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gallery-nav-btn:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.gallery-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gallery-nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.gallery-counter {
  font-size: 12px;
  font-weight: 600;
  color: rgb(100, 116, 139);
  min-width: 60px;
  text-align: center;
}

/* Modal Text Content */
.modal-description {
  margin-bottom: 24px;
}

.modal-description h3 {
  font-size: 16px;
  font-weight: 900;
  color: #000000;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 14px;
  color: #f28c38;
}

.modal-description p {
  color: #000000;
  line-height: 1.6;
  margin: 0;
  font-size: 14px;
}

/* Features List */
.features-section {
  margin-bottom: 24px;
}

.features-title {
  font-size: 14px;
  font-weight: 850;
  color: #030000;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  color: #f28c38;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: rgb(241, 245, 249);
  border-radius: 8px;
  border-left: 4px solid rgb(59, 130, 246);
}

.feature-item::before {
  content: '✓';
  color: rgb(59, 130, 246);
  font-weight: 700;
  flex-shrink: 0;
}

.feature-item-text {
  font-size: 13px;
  color: rgb(35, 41, 51);
  font-weight: 500;
}

/* Additional Info */
.additional-info {
  padding: 16px;
  background: linear-gradient(135deg, rgb(239, 246, 255) 0%, rgb(254, 226, 226) 100%);
  border-left: 4px solid rgb(59, 130, 246);
  border-radius: 15px;
  margin-bottom: 24px;
}

.additional-info-title {
  font-size: 14px;
  font-weight: 800;
  color: rgb(0, 0, 0);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px 0;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
}

.additional-info-text {
  font-size: 13px;
  color: rgb(31, 44, 63);
  line-height: 1.5;
  margin: 0;
}

/* CTA Button */
.modal-cta {
  padding: 24px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
  background: white;
}

.modal-cta-btn {
  width: 100%;
  background: linear-gradient(135deg, rgb(59, 130, 246), #f28c38);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-cta-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.modal-cta-btn:active {
  transform: translateY(0);
}

/* Service Card Interactive States */
.service-card-interactive {
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.service-card-interactive:hover {
  transform: translateY(-15px);
}

.service-card-interactive.active {
  border-color: rgb(59, 130, 246);
  background: linear-gradient(135deg, rgb(59, 130, 246, 0.15), rgb(239, 68, 68, 0.1));
}

/* Responsive Design */
@media (max-width: 768px) {
  .service-modal {
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-content {
    padding: 16px;
  }

  .modal-title-text h2 {
    font-size: 18px;
  }

  .gallery-wrapper {
    aspect-ratio: 4 / 3;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  .modal-cta {
    padding: 16px;
  }
}

/* Drag Handle Indicator */
.modal-drag-handle {
  width: 40px;
  height: 4px;
  background: rgb(203, 213, 225);
  border-radius: 2px;
  margin: 8px auto 0 auto;
}

/* Animation Classes */
@keyframes slideUp {
  from {
    bottom: -100%;
    opacity: 0;
  }
  to {
    bottom: 0;
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    bottom: 0;
    opacity: 1;
  }
  to {
    bottom: -100%;
    opacity: 0;
  }
}

.service-modal.entering {
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.service-modal.exiting {
  animation: slideDown 0.3s ease forwards;
}

/* Touch-friendly adjustments */
@media (hover: none) {
  .service-card-interactive {
    border-color: rgb(59, 130, 246);
  }

  .gallery-nav-btn:active {
    background: linear-gradient(135deg, rgb(37, 99, 235), #f28c38);
  }
}
