/* 
 * Zeitgeist Commercial Real Estate - Spencer Holbert
 * Animations and Interactive Elements Stylesheet
 * Created: May 30, 2025
 */

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  position: relative;
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  position: relative;
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  position: relative;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s ease;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Delay classes for staggered animations */
.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

.delay-400 {
  transition-delay: 0.4s;
}

.delay-500 {
  transition-delay: 0.5s;
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hover-zoom {
  overflow: hidden;
}

.hover-zoom img {
  transition: transform 0.5s ease;
}

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

.hover-overlay {
  position: relative;
  overflow: hidden;
}

.hover-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 54, 93, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hover-overlay:hover::after {
  opacity: 1;
}

.hover-overlay-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hover-overlay:hover .hover-overlay-content {
  opacity: 1;
}

/* ===== INTERACTIVE ELEMENTS ===== */

/* Property Filters */
.filter-button {
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-button:hover {
  background-color: #edf2f7;
}

.filter-button.active {
  background-color: #1a365d;
  color: white;
  border-color: #1a365d;
}

/* Property Map */
.map-container {
  height: 500px;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
}

.map-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.map-marker {
  width: 30px;
  height: 30px;
  background-color: #1a365d;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.map-marker:hover {
  transform: rotate(-45deg) scale(1.2);
}

.map-marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  background-color: white;
  border-radius: 50%;
}

/* Property Carousel */
.property-carousel {
  position: relative;
  overflow: hidden;
}

.property-carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.property-carousel-item {
  flex: 0 0 100%;
}

.property-carousel-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.property-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.property-carousel-dot.active {
  background-color: white;
}

.property-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.property-carousel-arrow:hover {
  background-color: white;
}

.property-carousel-arrow.prev {
  left: 1rem;
}

.property-carousel-arrow.next {
  right: 1rem;
}

/* Testimonial Slider */
.testimonial-slider {
  position: relative;
  overflow: hidden;
}

.testimonial-slider-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial-slide {
  flex: 0 0 100%;
  padding: 0 1rem;
}

.testimonial-controls {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 0.5rem;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #e2e8f0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.testimonial-dot.active {
  background-color: #1a365d;
}

.testimonial-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: background-color 0.3s ease;
}

.testimonial-arrow:hover {
  background-color: #f7fafc;
}

.testimonial-arrow.prev {
  left: 0;
}

.testimonial-arrow.next {
  right: 0;
}

/* Counter Animation */
.counter {
  font-size: 3rem;
  font-weight: 700;
  color: #1a365d;
}

/* Parallax Effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Accordion */
.accordion {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid #e2e8f0;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: 1rem;
  background-color: #f7fafc;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.accordion-header:hover {
  background-color: #edf2f7;
}

.accordion-header.active {
  background-color: #1a365d;
  color: white;
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1rem;
}

.accordion-content.active {
  max-height: 500px;
  padding: 1rem;
}

/* Tabs */
.tabs {
  display: flex;
  flex-direction: column;
}

.tab-headers {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
}

.tab-header {
  padding: 1rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.tab-header:hover {
  background-color: #f7fafc;
}

.tab-header.active {
  border-bottom-color: #1a365d;
  color: #1a365d;
  font-weight: 600;
}

.tab-content {
  padding: 2rem 0;
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* Form Animations */
.form-control:focus {
  transform: translateY(-2px);
}

.form-label {
  transition: all 0.3s ease;
}

.form-floating {
  position: relative;
}

.form-floating .form-control {
  height: calc(3.5rem + 2px);
  padding: 1rem 0.75rem;
}

.form-floating .form-label {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  padding: 1rem 0.75rem;
  pointer-events: none;
  border: 1px solid transparent;
  transform-origin: 0 0;
  transition: opacity .1s ease-in-out, transform .1s ease-in-out;
}

.form-floating .form-control:focus ~ .form-label,
.form-floating .form-control:not(:placeholder-shown) ~ .form-label {
  opacity: .65;
  transform: scale(.85) translateY(-0.5rem) translateX(0.15rem);
}

/* ROI Calculator */
.calculator {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.calculator-result {
  font-size: 2rem;
  font-weight: 700;
  color: #1a365d;
  text-align: center;
  margin: 1rem 0;
  transition: all 0.3s ease;
}

.calculator-slider {
  width: 100%;
  height: 5px;
  background-color: #e2e8f0;
  border-radius: 5px;
  position: relative;
  margin: 2rem 0;
}

.calculator-slider-handle {
  width: 20px;
  height: 20px;
  background-color: #1a365d;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.calculator-slider-handle:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.calculator-slider-progress {
  height: 100%;
  background-color: #1a365d;
  border-radius: 5px;
  position: absolute;
  left: 0;
}

.calculator-value {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: #e2e8f0;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  right: -12px;
  background-color: white;
  border: 4px solid #1a365d;
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.right::after {
  left: -12px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: white;
  position: relative;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timeline-content::after {
  content: '';
  position: absolute;
  border-width: 10px;
  border-style: solid;
  top: 15px;
}

.timeline-item.left .timeline-content::after {
  border-color: transparent white transparent transparent;
  right: -20px;
}

.timeline-item.right .timeline-content::after {
  border-color: transparent transparent transparent white;
  left: -20px;
}

@media screen and (max-width: 768px) {
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item.right {
    left: 0;
  }
  
  .timeline-item.left::after, 
  .timeline-item.right::after {
    left: 19px;
  }
  
  .timeline-item.left .timeline-content::after,
  .timeline-item.right .timeline-content::after {
    left: -20px;
    border-color: transparent white transparent transparent;
  }
}

/* Before/After Image Comparison */
.image-comparison {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.image-comparison img {
  width: 100%;
  display: block;
}

.image-comparison .before-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.image-comparison .before-image img {
  width: 200%;
}

.image-comparison .comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: white;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.image-comparison .comparison-slider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.image-comparison .comparison-slider::after {
  content: '↔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #1a365d;
  font-size: 20px;
  font-weight: bold;
}

/* 3D Card Effect */
.card-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.card-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
  transform: rotateY(180deg);
}

.card-3d-front, .card-3d-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0.5rem;
  overflow: hidden;
}

.card-3d-front {
  background-color: white;
}

.card-3d-back {
  background-color: #1a365d;
  color: white;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

/* Typing Animation */
.typing {
  overflow: hidden;
  border-right: 0.15em solid #1a365d;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #1a365d }
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Floating Animation */
.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Shake Animation */
.shake {
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }

  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 1s ease-in;
}

/* Slide In Animation */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-left {
  animation: slideInLeft 1s ease-in-out;
}

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

.slide-in-right {
  animation: slideInRight 1s ease-in-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slide-in-up {
  animation: slideInUp 1s ease-in-out;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slide-in-down {
  animation: slideInDown 1s ease-in-out;
}