/* Additional CSS for static export */

/* Custom colors */
:root {
  --primary: hsl(209, 61%, 16%);
  --secondary: hsl(26, 94%, 54%);
  --accent: hsl(250, 45%, 37%);
  --slate-custom: hsl(215, 16%, 47%);
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.text-accent {
  color: var(--accent);
}

.text-slate-custom {
  color: var(--slate-custom);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-secondary {
  background-color: var(--secondary);
}

.bg-accent {
  background-color: var(--accent);
}

.border-secondary {
  border-color: var(--secondary);
}

/* Hero gradient */
.hero-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
}

/* Glass effect */
.glass-effect {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
}

/* Image hover effects */
.image-hover-effect img {
  transition: transform 0.3s ease;
}

.image-hover-effect:hover img {
  transform: scale(1.05);
}

/* Before/After Slider Styles */
.before-after-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  max-width: 100%;
}

.before-after-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  cursor: ew-resize;
  z-index: 10;
  transition: left 0.2s ease-out;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.before-after-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}

.before-after-handle::before,
.before-after-handle::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 6px solid transparent;
}

.before-after-handle::before {
  border-right: 8px solid #666;
  left: 8px;
}

.before-after-handle::after {
  border-left: 8px solid #666;
  right: 8px;
}

.after-image {
  transition: clip-path 0.2s ease-out;
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Scroll animations */
.animated-section {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animated-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.animated-section[data-animation="zoom"] {
  transform: scale(0.8);
}

.animated-section[data-animation="zoom"].visible {
  transform: scale(1);
}

.animated-section[data-animation="fadeLeft"] {
  transform: translateX(-60px);
}

.animated-section[data-animation="fadeLeft"].visible {
  transform: translateX(0);
}

.animated-section[data-animation="fadeRight"] {
  transform: translateX(60px);
}

.animated-section[data-animation="fadeRight"].visible {
  transform: translateX(0);
}

/* Modal styles */
.modal-open {
  overflow: hidden;
}

/* Button styles */
button {
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-1px);
}

/* Form styles */
input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--secondary);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Images always responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Project Modal Styles */
#project-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

#project-modal.hidden {
  display: none;
}

#project-modal>div {
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#project-modal .flex.justify-between {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  flex-shrink: 0;
}

#project-modal .flex-1 {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

#project-modal .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  #project-modal .grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Slider Styles */
#project-slider {
  position: relative;
  aspect-ratio: 16/9;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

#project-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

#prev-slide,
#next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

#prev-slide:hover,
#next-slide:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.05);
}

#prev-slide {
  left: 16px;
}

#next-slide {
  right: 16px;
}

/* Thumbnails */
#project-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

#project-thumbnails img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

#project-thumbnails img:hover,
#project-thumbnails img.active {
  border-color: var(--secondary);
  transform: scale(1.05);
}

/* Configuration Section */
.bg-gradient-to-br {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.config-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
}

.config-select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

/* Checkboxes */
.option-checkbox {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.option-checkbox:hover {
  background: #f8fafc;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  margin-right: 12px;
  position: relative;
  transition: all 0.2s ease;
}

.option-input:checked~.checkmark {
  background: var(--secondary);
  border-color: var(--secondary);
}

.option-input:checked~.checkmark::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg);
}

/* Price Display */
#total-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary);
  transition: all 0.3s ease;
}

/* Footer Button */
#project-modal .p-6 {
  padding: 24px;
  border-top: 1px solid #e5e7eb;
  background: white;
  flex-shrink: 0;
}

#project-modal button.bg-secondary {
  width: 100%;
  padding: 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

#project-modal button.bg-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.3);
}

/* Scrollbar styling */
#project-modal ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#project-modal ::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#project-modal ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

#project-modal ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Smooth animations */
.modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Loading state for images */
#project-slider .loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Fix for project modal navigation */
#prev-slide,
#next-slide {
  display: block !important;
  z-index: 100;
}

#project-thumbnails {
  display: flex !important;
}

/* Ensure project cards are clickable */
.project-card {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  #project-modal .grid {
    grid-template-columns: 1fr !important;
  }

  #project-slider {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .hero-gradient h1 {
    font-size: 2rem !important;
  }

  .hero-gradient p {
    font-size: 1rem !important;
  }

  .before-after-container {
    aspect-ratio: 4/3;
  }

  #photo-modal .flex {
    flex-direction: column;
  }

  #photo-modal .w-80 {
    width: 100% !important;
    max-height: 200px;
  }

  .h-96 {
    height: auto !important;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }

  #project-modal {
    padding: 10px;
    margin: 1rem;
    max-height: 95vh;
  }

  #project-modal>div {
    max-height: 95vh;
    border-radius: 12px;
  }

  #project-modal .flex.justify-between,
  #project-modal .flex-1,
  #project-modal .p-6 {
    padding: 16px;
  }

  #project-slider {
    aspect-ratio: 4/3;
    min-height: 250px;
  }

  #prev-slide,
  #next-slide {
    width: 40px;
    height: 40px;
  }

  #project-thumbnails img {
    width: 60px;
    height: 45px;
  }

  .bg-gradient-to-br {
    padding: 16px;
  }

  .config-select {
    padding: 0.75rem;
    background-position: right 0.5rem center;
  }
}


/* ------------------------------------ */

/* Project Card Fixes */
.project-card {
  position: relative;
  padding: 1rem;
  transition: all 0.3s ease;
  border-radius: 12px;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-card>div:first-child {
  position: relative;
  overflow: hidden;
}

/* Fullscreen Image Viewer */
.fullscreen-image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.fullscreen-image-viewer.active {
  opacity: 1;
  visibility: visible;
}

.fullscreen-image-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.fullscreen-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.fullscreen-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.fullscreen-prev {
  left: 20px;
}

.fullscreen-next {
  right: 20px;
}

.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.fullscreen-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  backdrop-filter: blur(10px);
}

/* Project Modal Improvements */
#project-modal {
  z-index: 999;
}

#project-slider {
  cursor: pointer;
}

#project-slider img {
  transition: transform 0.3s ease;
}

#project-slider img:hover {
  transform: scale(1.02);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .fullscreen-nav {
    width: 40px;
    height: 40px;
  }

  .fullscreen-prev {
    left: 10px;
  }

  .fullscreen-next {
    right: 10px;
  }

  .fullscreen-close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
  }
}



/* --------------------------------------- */

.calculator-step {
  transition: opacity 0.3s ease;
}

.calc-option>div {
  border: 2px solid transparent;
}

.calc-option.selected>div {
  border-color: var(--secondary);
  background-color: var(--secondary) !important;
  color: white;
}

.progress-bar {
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}




/* -------------------------------- */


/* Анимация появления новых карточек */
.project-card {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}