/* Mystic Twilight Architecture Studio - Custom Styles */

:root {
  --primary-color: #2D1B3D;
  --secondary-color: #9B59B6;
  --accent-color: #C39BD3;
  --light-purple: #E8DAEF;
  --dark-purple: #1A0F25;
  --text-light: #F8F9FA;
  --text-dark: #2D1B3D;
  --transition-speed: 0.4s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
  background: linear-gradient(135deg, var(--dark-purple) 0%, var(--primary-color) 100%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: 1px;
}

.display-1, .display-3, .display-4 {
  font-weight: 800;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-container {
  position: relative !important;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--dark-purple) 100%);
}

.hero-image {
  object-fit: cover !important;
  opacity: 0.4;
  filter: brightness(0.6) contrast(1.2);
}

.fog-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(45, 27, 61, 0.7) 100%);
  z-index: 1;
  animation: fogMove 20s ease-in-out infinite;
}

@keyframes fogMove {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(-20px); }
}

.hero-gradient {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(45, 27, 61, 0.3) 0%, 
    rgba(155, 89, 182, 0.2) 50%, 
    rgba(45, 27, 61, 0.8) 100%);
  z-index: 1;
}

.hero-content {
  z-index: 2 !important;
  animation: fadeInUp 1.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.ethereal-text {
  color: var(--text-light) !important;
  text-shadow: 0 0 20px rgba(155, 89, 182, 0.8),
               0 0 40px rgba(155, 89, 182, 0.5);
  animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(155, 89, 182, 0.8), 0 0 40px rgba(155, 89, 182, 0.5); }
  50% { text-shadow: 0 0 30px rgba(155, 89, 182, 1), 0 0 60px rgba(155, 89, 182, 0.7); }
}

.ethereal-glow {
  color: var(--text-light) !important;
  text-shadow: 0 0 10px rgba(155, 89, 182, 0.8);
  transition: all var(--transition-speed);
}

.ethereal-glow:hover {
  text-shadow: 0 0 20px rgba(155, 89, 182, 1);
  transform: scale(1.05);
}

/* Navigation */
.navbar {
  background: rgba(45, 27, 61, 0.95) !important;
  backdrop-filter: blur(10px);
  transition: all var(--transition-speed);
  border-bottom: 1px solid rgba(155, 89, 182, 0.3);
}

.navbar.scrolled {
  background: rgba(45, 27, 61, 1) !important;
  box-shadow: 0 4px 20px rgba(155, 89, 182, 0.3);
}

.navbar-brand {
  color: var(--text-light) !important;
  font-size: 1.8rem;
  font-weight: 800 !important;
  transition: all var(--transition-speed);
}

.navbar-brand:hover {
  color: var(--secondary-color) !important;
  transform: translateY(-2px);
}

.navbar-toggler {
  border-color: var(--secondary-color) !important;
  color: var(--text-light) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(155, 89, 182, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.nav-link {
  color: var(--light-purple) !important;
  font-weight: 600;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: 8px;
  transition: all var(--transition-speed);
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: all var(--transition-speed);
  transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-light) !important;
  background: rgba(155, 89, 182, 0.2);
  transform: translateY(-2px);
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 80%;
}

/* Buttons */
.btn {
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-speed);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--text-light) !important;
}

.btn-primary:hover {
  background: var(--primary-color) !important;
  border-color: var(--accent-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(155, 89, 182, 0.4) !important;
}

.btn-outline-light {
  border-color: var(--text-light) !important;
  color: var(--text-light) !important;
  background: transparent !important;
}

.btn-outline-light:hover {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--text-light) !important;
  transform: translateY(-3px);
}

.btn-outline-secondary {
  border-color: var(--secondary-color) !important;
  color: var(--secondary-color) !important;
  background: transparent !important;
}

.btn-outline-secondary:hover {
  background: var(--secondary-color) !important;
  color: var(--text-light) !important;
  border-color: var(--secondary-color) !important;
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(155, 89, 182, 0.5),
              0 0 40px rgba(155, 89, 182, 0.3) !important;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(155, 89, 182, 0.5), 0 0 40px rgba(155, 89, 182, 0.3); }
  50% { box-shadow: 0 0 30px rgba(155, 89, 182, 0.7), 0 0 60px rgba(155, 89, 182, 0.5); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute !important;
  bottom: 2rem !important;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text-light) !important;
  cursor: pointer;
}

.pulse-animation {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.5; }
}

/* Sections */
section {
  padding: 5rem 0;
  background: linear-gradient(180deg, #F8F9FA 0%, #E8DAEF 100%);
  position: relative;
}

section:nth-child(even) {
  background: linear-gradient(180deg, #E8DAEF 0%, #D5B8E0 100%);
}

.constellation-bg {
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--dark-purple) 100%);
  position: relative;
  overflow: hidden;
}

.constellation-bg::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent),
    radial-gradient(1px 1px at 15% 75%, white, transparent);
  background-size: 200% 200%;
  animation: twinkle 8s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

/* Cards */
.service-card,
.testimonial-card,
.mood-card,
.arrangement-card,
.card {
  border-radius: 20px;
  border: 2px solid rgba(155, 89, 182, 0.2);
  background: rgba(255, 255, 255, 0.95) !important;
  transition: all var(--transition-speed);
  overflow: hidden;
  position: relative;
}

.service-card::before,
.mood-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: all var(--transition-speed);
}

.service-card:hover,
.testimonial-card:hover,
.mood-card:hover,
.arrangement-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(155, 89, 182, 0.3) !important;
  border-color: var(--secondary-color);
}

.service-card:hover::before,
.mood-card:hover::before {
  opacity: 1;
}

.service-image,
.card-img-top {
  border-radius: 15px;
  transition: all var(--transition-speed);
  filter: brightness(0.9);
}

.service-card:hover .service-image,
.arrangement-card:hover .card-img-top {
  transform: scale(1.05);
  filter: brightness(1) contrast(1.1);
}

.card-body {
  padding: 2rem;
  background: transparent !important;
}

.card-title,
.h3,
.h4,
.h5 {
  color: var(--primary-color) !important;
  font-weight: 700;
}

.card-text {
  color: var(--text-dark) !important;
}

/* Mood Cards */
.mood-card {
  height: 300px;
  cursor: pointer;
  background-size: cover !important;
  background-position: center !important;
  position: relative;
}

.mood-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(45, 27, 61, 0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  transition: all var(--transition-speed);
}

.mood-card:hover .mood-overlay {
  background: linear-gradient(180deg, rgba(155, 89, 182, 0.3) 0%, rgba(45, 27, 61, 0.95) 100%);
}

.mood-card h3 {
  color: var(--text-light) !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.gallery-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  height: 350px;
  transition: all var(--transition-speed);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--transition-speed);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(45, 27, 61, 0.9) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: all var(--transition-speed);
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(155, 89, 182, 0.4);
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(0.7);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Filter Controls */
.filter-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.75rem 2rem;
  border-radius: 50px;
  border: 2px solid var(--secondary-color);
  background: transparent;
  color: var(--secondary-color) !important;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary-color) !important;
  color: var(--text-light) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(155, 89, 182, 0.3);
}

/* Progress Steps */
.progress-line {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(155, 89, 182, 0.2);
  border-radius: 2px;
  margin: 2rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
  border-radius: 2px;
  transition: width 0.8s ease;
}

.step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: var(--text-light) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
  transition: all var(--transition-speed);
  border: 3px solid var(--text-light);
}

.step-circle.active {
  background: var(--accent-color);
  transform: scale(1.2);
  box-shadow: 0 8px 25px rgba(155, 89, 182, 0.6);
}

.step-circle.completed {
  background: var(--primary-color);
}

/* Wizard Steps */
.wizard-step {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

.wizard-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.form-control,
.form-select {
  border: 2px solid rgba(155, 89, 182, 0.3);
  border-radius: 15px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-speed);
  color: var(--text-dark) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 20px rgba(155, 89, 182, 0.3) !important;
  background: white;
  outline: none;
}

.form-label {
  color: var(--primary-color) !important;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-floating > label {
  color: rgba(45, 27, 61, 0.6) !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--secondary-color) !important;
}

.form-check-input {
  border: 2px solid var(--secondary-color);
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
}

.form-check-label {
  color: var(--text-dark) !important;
  cursor: pointer;
}

/* Accordion */
.accordion-item {
  border: 2px solid rgba(155, 89, 182, 0.2);
  border-radius: 15px !important;
  margin-bottom: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
}

.accordion-button {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.1) 0%, transparent 100%) !important;
  color: var(--primary-color) !important;
  font-weight: 600;
  padding: 1.5rem;
  border: none;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%) !important;
  color: var(--text-light) !important;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(155, 89, 182, 0.25);
  border-color: var(--secondary-color);
}

.accordion-body {
  padding: 1.5rem;
  color: var(--text-dark) !important;
  background: rgba(255, 255, 255, 0.95);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light) !important;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cta-section h2,
.cta-section p {
  color: var(--text-light) !important;
  position: relative;
  z-index: 1;
}

/* Footer */
footer {
  background: var(--dark-purple);
  color: var(--text-light) !important;
  padding: 4rem 0 2rem;
  border-top: 3px solid var(--secondary-color);
}

footer h5 {
  color: var(--accent-color) !important;
  margin-bottom: 1.5rem;
}

footer a {
  color: var(--light-purple) !important;
  text-decoration: none;
  transition: all var(--transition-speed);
}

footer a:hover {
  color: var(--text-light) !important;
  padding-left: 10px;
}

footer .list-unstyled li {
  margin-bottom: 0.75rem;
}

/* Icons */
.bi {
  transition: all var(--transition-speed);
}

a:hover .bi,
button:hover .bi {
  transform: translateX(5px);
}

.bi-star-fill {
  color: #FFC107 !important;
  filter: drop-shadow(0 0 3px rgba(255, 193, 7, 0.6));
}

/* Utilities */
.text-primary {
  color: var(--primary-color) !important;
}

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

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

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

.shadow-lg {
  box-shadow: 0 15px 35px rgba(155, 89, 182, 0.3) !important;
}

.shadow-sm {
  box-shadow: 0 5px 15px rgba(155, 89, 182, 0.2) !important;
}

.rounded {
  border-radius: 20px !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

.text-warning {
  color: #FFC107 !important;
}

.text-danger {
  color: #DC3545 !important;
}

.text-muted {
  color: rgba(45, 27, 61, 0.6) !important;
}

.text-white {
  color: var(--text-light) !important;
}

.text-light {
  color: var(--text-light) !important;
}

/* Sticky Elements */
.sticky-top {
  position: sticky !important;
  top: 80px;
  z-index: 10;
}

/* Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Button Groups */
.btn-group .btn-check:checked + .btn {
  background: var(--secondary-color) !important;
  color: var(--text-light) !important;
  border-color: var(--secondary-color) !important;
}

/* Addon Checkboxes */
.addon-card {
  transition: all var(--transition-speed);
}

.addon-check:checked ~ .addon-card {
  border-color: var(--secondary-color) !important;
  background: rgba(155, 89, 182, 0.1) !important;
  transform: scale(1.02);
}

/* Responsive Design */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(45, 27, 61, 0.98);
    padding: 1rem;
    border-radius: 15px;
    margin-top: 1rem;
    border: 1px solid rgba(155, 89, 182, 0.3);
  }
  
  .nav-link {
    margin: 0.5rem 0;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .display-1 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .display-4 {
    font-size: 1.75rem !important;
  }
}

@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-controls {
    flex-direction: column;
  }
  
  .filter-btn {
    width: 100%;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .lead {
    font-size: 1rem !important;
  }
  
  .btn-lg {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
  
  .px-5 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* Loading Animation */
.loading {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(155, 89, 182, 0.3);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Print Styles */
@media print {
  .navbar,
  .scroll-indicator,
  .btn,
  footer {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
*:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 3px;
}

/* Selection Styles */
::selection {
  background: var(--secondary-color);
  color: var(--text-light);
}

::-moz-selection {
  background: var(--secondary-color);
  color: var(--text-light);
}