/* Office Modal Popup Styles */
.office-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.office-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.office-modal-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  padding: 0;
  border-radius: 20px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: modalAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalAppear {
  0% {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.office-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
  font-weight: 300;
}

.office-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.office-announcement {
  padding: 2rem 2rem 1.5rem;
  position: relative;
}

/* Carousel Styles */
.office-carousel {
  position: relative;
  width: 100%;
  padding: 0 2rem 2rem;
}

.office-carousel-track {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.office-slide {
  display: none;
  width: 100%;
  height: 100%;
  animation: slideTransition 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
}

.office-slide.active {
  display: block;
}

@keyframes slideTransition {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.office-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* Loading state for carousel images */
.office-slide.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: carousel-spinner 0.8s linear infinite;
  z-index: 5;
}

.office-slide.loading::after {
  content: 'Loading...';
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.9rem;
  margin-top: 1rem;
  z-index: 5;
}

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

.office-slide img.loaded {
  animation: imageReveal 0.4s ease-out;
}

@keyframes imageReveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Carousel Navigation Buttons */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 1.5rem;
}

.carousel-next {
  right: 1.5rem;
}

/* Carousel Dots */
.carousel-dots {
  text-align: center;
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
}

.carousel-dots .dot {
  height: 8px;
  width: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.carousel-dots .dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .office-modal-content {
    width: 95%;
    border-radius: 16px;
  }

  .office-announcement {
    padding: 1.5rem 1.5rem 1rem;
  }

  .office-announcement h2 {
    font-size: 1.4rem !important;
  }

  .office-carousel {
    padding: 0 1.5rem 1.5rem;
  }

  .office-carousel-track {
    height: 240px;
  }

  .carousel-prev,
  .carousel-next {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .carousel-prev {
    left: 1rem;
  }

  .carousel-next {
    right: 1rem;
  }

  .carousel-dots {
    margin-top: 1.2rem;
  }

  .carousel-dots .dot.active {
    width: 18px;
  }
}

@media (max-width: 480px) {
  .office-announcement h2 {
    font-size: 1.2rem !important;
  }

  .office-announcement p {
    font-size: 0.9rem !important;
  }

  .office-carousel-track {
    height: 200px;
  }
}
