
/* ==========================================================================
   EVENT INFO BOXES (DevDay/Emerge)
   ========================================================================== */
.event-box {
  display: flex;
  min-height: 140px;
  align-items: center;
  justify-content: space-between;
  background: var(--event-box-bg);
  color: var(--events-info-text);
  font-size: 1.6rem;
  box-shadow: 0px 3px 6px #00000029;
  border-radius: 12px;
  margin: 2rem 0 1.2rem;
  padding: 2rem;
  position: relative;
  z-index: 1;
}
.event-text {
  flex: 1;
  min-width: 0;
  min-height: 112px;
}
.event-logo {
  max-width: 180px;
  margin-bottom: 1rem;
  display: block;
}
.event-image {
  width: 260px;
  flex-shrink: 0;
  position: relative;
}
.event-image img {
  width: 210px;
  height: auto;
  display: block;
  position: absolute;
  bottom: -50px;
  z-index: 2;
}
.event-box.devday .event-image img {
  right: -20px;
}
.event-box.emerge .event-image img {
  left: -20px;
}
.event-box.devday .event-image {
  margin-left: 1rem;
}
.event-box.emerge .event-image {
  margin-right: 1rem;
}

/* ==========================================================================
   UPCOMING EVENTS CAROUSEL
   ========================================================================== */

.upcoming-events-title,
.past-events h2 {
  margin: 2rem 0;
  font-size: 2.8rem;
  color: var(--primary);
  text-align: center;
}
.current-position {
  color: var(--tertiary);
  font-size: 4.8rem;
  margin-left: 13px;
  min-width: 2.8rem;
  display: inline-block;
}
.carousel-container {
  position: relative;
  max-width: 1436px;
  margin: 0 auto;
}
.carousel-inner {
  width: 1200px;
  height: 627px;
  margin: 0 auto;
}
.event-details-right .carousel-inner {
  width: 100%;
  height: 100%;
}
.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
  cursor: pointer;
}
.carousel-item.active {
  opacity: 1;
}
.carousel-item-inner {
  height: 100%;
  width: 100%;
  background-size: cover;
  background-position: center;
}
.carousel-control-prev,
.carousel-control-next {
  width: 10%;
  opacity: 1;
}
.carousel-control-next-icon,
.carousel-control-prev-icon {
  display: flex;
  position: relative;
  width: 30px;
  height: 30px;
  vertical-align: middle;
  background-image: none;
}
.event-chevron::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 8px dotted var(--tertiary);
  border-width: 0 8px 8px 0;
}

/* ==========================================================================
   STAY TUNED PLACEHOLDER (No Upcoming Events)
   ========================================================================== */

.upcoming-events-placeholder {
  text-align: center;
  padding: 3rem 0;
}
.stay-tuned-text {
  margin: 2rem 0 1.5rem;
  font-size: 2.4rem;
}
/* Sparkle Stars with Color Transition */
.sparkle {
  display: inline-block;
  margin: 0 0.5rem;
  animation: sparkle-rotate 2s ease-in-out infinite;
}
.sparkle:last-child {
  animation-delay: 1s;
}
@keyframes sparkle-rotate {
  0%, 100% { 
    transform: scale(1) rotate(0deg); 
    opacity: 1;
    color: var(--tertiary);
  }
  50% { 
    transform: scale(1.3) rotate(180deg); 
    opacity: 0.8;
    color: var(--quaternary);
  }
}
/* Shimmer Gradient Effect */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--tertiary) 25%,
    var(--quaternary) 50%,
    var(--tertiary) 75%,
    var(--primary) 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

/* ==========================================================================
   PAST EVENTS SECTION & TABS
   ========================================================================== */

.past-events {
  width: 96%;
  margin: 0 auto;
}
.event-tabs-container {
  margin-bottom: 3rem;
}
.event-tabs {
  gap: 4rem;
}
.event-tab {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--neutral);
  padding: 0 0 5px 0;
  border-bottom: 2px solid var(--tabs-border);
  cursor: pointer;
  transition: all 0.3s ease;
}
.event-tab.active {
  color: var(--tertiary);
  border-bottom-color: var(--tertiary);
}
.event-tab:hover {
  color: var(--tertiary);
}
.event-type-container {
  transition: opacity 0.3s ease;
}
.no-past-events {
  font-size: 1.8rem;
  color: var(--neutral);
}
/* Emerge Loading Spinner */
.emerge-loading .spinner-border {
  color: var(--tertiary);
}

/* ==========================================================================
   EVENT DETAILS CARDS
   ========================================================================== */

.event-details {
  font-size: 1.7rem;
  display: flex;
  flex-direction: column;
  margin-bottom: 3rem;
  padding: 4rem 3.5rem;
  border: 2px solid var(--neutral-light);
  border-radius: 12px;
}
.event-item {
  display: flex;
  width: 100%;
}
.event-details-left,
.event-details-right {
  width: 100%;
}
.event-details-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  justify-content: center;
}
#emerge-events .event-details-right {
  margin-left: 2rem;
}
.event-type {
  position: relative;
  top: 0;
  font-family: "triple-dot-digital";
  font-size: 1.2rem;
  color: var(--primary);
}
.event-location {
  display: flex;
}
.event-title {
  font-size: 2.1rem;
  margin: 0 0 1rem;
  line-height: 1.43;
  color: var(--primary);
}
.event-speakers {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}
.event-date,
.emerge-event-date {
  font-family: "mulishextralight";
  font-size: 1.4rem;
  font-style: italic;
  margin-bottom: 1rem;
}
.event-date {
  margin: 0.6rem 0 1rem 1.5rem;
}
.event-abstract {
  font-size: 1.4rem;
}
.event-watch {
  width: 100%;
}
.event-watch .theme-btn {
  width: 120px;
  margin: 0 auto;
  height: 48px;
  padding: 0;
  font-family: "mulishsemibold";
  background: var(--secondary);
  text-align: center;
}
.event-watch .view-btn {
  position: absolute;
  right: 0;
  color: var(--tertiary);
  font-family: "mulishbold";
}

/* ==========================================================================
   EVENT SESSIONS (Multi-topic)
   ========================================================================== */

.event-sessions-container {
  margin: 3rem 0 0 3rem;
}
.event-session-item {
  display: flex;
  width: 100%;
  margin-bottom: 3rem;
}
.event-session-item:last-child {
  margin-bottom: 0;
}
.event-session-item .event-title {
  font-size: 1.8rem;
  color: var(--neutral);
}
.event-session-item .event-speakers {
  font-size: 1.4rem;
}

/* ==========================================================================
   VIDEO THUMBNAILS
   ========================================================================== */

.video-thumbnail-container {
  width: 320px;
  height: 180px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 4px;
}
.video-thumbnail-container:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}
.video-thumbnail-container:hover .play-button-overlay {
  background: var(--tertiary);
  border-color: var(--tertiary);
}
.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.play-button-overlay {
  display: flex;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #707070;
  background: #ffffff 0% 0% no-repeat padding-box;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* ==========================================================================
   SESSION SUMMARY & SLIDES LINKS
   ========================================================================== */
.session-summary-container,
.event-slides-container {
  cursor: pointer;
}
.session-summary-container {
  margin-top: 3rem;
}
.event-slides-container {
  margin-top: 1.5rem;
}
.session-summary-link,
.session-slides-link {
  font-size: 1.8rem;
  color: var(--quaternary);
  transition: color 0.4s ease;
}
.session-summary-container:hover .session-summary-link,
.event-slides-container:hover .session-slides-link {
  color: var(--tertiary);
}
.session-star-icon,
.session-slide-icon {
  display: inline-block;
  margin-left: 0.75rem;
  width: 27.595px;
  height: 31.115px;
  background-image: var(--star-icon-default-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  transition: background-image 0.4s ease, opacity 0.4s ease;
  opacity: 1;
}
.event-slides-container .session-slide-icon {
  width: 24.115px;
  height: 24px;
  background-image: var(--slides-icon-default-url);
}
.session-summary-container:hover .session-star-icon {
  background-image: var(--star-icon-hover-url);
}
.event-slides-container:hover .session-slide-icon {
  background-image: var(--slides-icon-hover-url);
}

/* ==========================================================================
   EMERGE GALLERY CAROUSEL
   ========================================================================== */

.image-carousel-thumbnail-container {
  width: 320px;
  height: 180px;
  position: relative;
  cursor: pointer;
  background-color: #f5f5f5;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 4px;
}
.image-carousel-thumbnail-container:hover {
  transform: scale(1.02);
}
.image-carousel-thumbnail {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: contain;
  display: block;
}
/* Thumbnail Carousel Indicators */
.thumbnail-carousel .carousel-indicators {
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  z-index: 10;
  justify-content: center;
  margin: 0;
  padding: 0;
}
.emerge-gallery-modal .carousel-indicators button,
.thumbnail-carousel .carousel-indicators button {
  width: 8px;
  height: 8px;
  background-color: var(--carousel-indicator-inactive);
  border-radius: 50%;
  opacity: 1;
  text-indent: 0;
  padding: 0;
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}
.emerge-gallery-modal .carousel-indicators button.active,
.emerge-gallery-modal .carousel-indicators button:hover,
.thumbnail-carousel .carousel-indicators button.active,
.thumbnail-carousel .carousel-indicators button:hover {
  background-color: var(--tertiary);
}

/* ==========================================================================
   MODALS (Video, Summary, Gallery)
   ========================================================================== */

/* Common Modal Styles */
.modal-backdrop.show {
  opacity: 0.7;
}
.custom-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-modal-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.custom-modal-close:hover img {
  transform: scale(1.1);
}
.custom-modal-close:focus {
  outline: none;
  box-shadow: none;
}
/* Event Modal (Video & Summary) */
.event-modal .modal-dialog {
  width: 80vw;
  max-width: 80vw;
  margin: 0 auto;
}
.event-modal .modal-content {
  max-height: 80vh;
  overflow: hidden;
  border: none;
  background: #fdfcfc 0% 0% no-repeat padding-box;
  box-shadow: 0px 3px 6px #00000029;
}
#videoModal .modal-content,
#sessionSummaryModal .modal-content {
  box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.15);
}
/* Video Modal */
#videoModal .modal-body {
  height: auto;
  align-items: center;
}
#video-player-container {
  width: 100%;
  height: 0;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  margin: 0 auto;
}
#video-player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
/* Session Summary Modal */
#sessionSummaryModal .modal-body {
  max-height: 80vh;
  overflow-y: auto;
  padding: 60px 80px 40px;
}
#sessionSummaryModal .summary-header {
  color: var(--tertiary);
}
.session-summary-content .session-title {
  font-size: 1.8rem;
  color: var(--primary);
}
.session-summary-content .session-speaker {
  font-size: 1.6rem;
  color: var(--neutral);
}
.session-summary-content .session-date {
  font-size: 1.4rem;
  color: var(--neutral);
}
.session-summary-content .session-summary-text {
  font-size: 1.6rem;
  line-height: 1.6;
}
.session-summary-content .ai-generated-note {
  font-size: 1.2rem;
  color: var(--neutral-text);
}
/* Session Summary Modal Scrollbar */
#sessionSummaryModal .modal-body::-webkit-scrollbar {
  width: 8px;
}
#sessionSummaryModal .modal-body::-webkit-scrollbar-track {
  background: var(--neutral-light);
  border-radius: 4px;
}
#sessionSummaryModal .modal-body::-webkit-scrollbar-thumb {
  background: var(--tertiary);
  border-radius: 4px;
}
#sessionSummaryModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--tertiary);
}
/* Emerge Gallery Modal */
.emerge-gallery-modal .modal-body {
  padding: 0;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emerge-gallery-modal .modal-image {
  max-height: 85vh;
  width: auto;
  object-fit: contain;
}
.emerge-gallery-modal .carousel-indicators {
  display: flex;
  position: absolute;
  bottom: -30px;
  align-items: center;
  justify-content: center;
  margin: 0;
}

/* ==========================================================================
   RESPONSIVE - MOBILE (≤768px)
   ========================================================================== */

@media (max-width: 768px) {
  /* Event Boxes */
  .event-box {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  .event-image {
    display: none;
  }
  .event-logo {
    margin: 0 auto 1rem;
  }
  /* Carousel */
  .carousel-inner {
    width: 280px;
    height: 146px;
  }
  /* Event Details */
  .event-details {
    padding: 2rem 1.5rem;
  }
  .event-item,
  .event-session-item {
    display: block;
  }
  .event-location {
    display: block;
  }
  .event-type {
    top: 3px;
  }
  .event-date {
    margin-left: 0;
  }
  .event-details-right {
    margin-top: 1.5rem;
  }
  .event-watch .view-btn {
    position: static;
  }
  .event-watch .theme-btn {
    height: 40px;
    font-size: 1.8rem;
  }
  /* Video Thumbnail */
  .video-thumbnail-container {
    width: 210px;
    height: 118px;
  }
  /* Modals */
  .event-modal .modal-dialog {
    margin: 0;
    max-width: 100%;
    width: 100%;
    min-height: 100vh;
  }
  .event-modal .modal-content {
    height: 100%;
    border-radius: 0;
  }
  #videoModal .modal-body {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  #sessionSummaryModal .modal-body {
    padding: 1rem;
  }
  /* Emerge Events */
  #emerge-events .event-item {
    flex-direction: column;
  }
  #emerge-events .event-details-left,
  #emerge-events .event-details-left.full-width {
    flex-basis: 100%;
    padding-right: 0;
    order: 2;
  }
  .image-carousel-thumbnail-container {
    width: 290px;
    height: 163px;
  }
}

/* ==========================================================================
   RESPONSIVE - TABLET (769px-1024px)
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
  /* Carousel */
  .carousel-inner {
    width: 575px;
    height: 300px;
  }
  /* Event Details */
  .event-details {
    padding: 1.5rem 1rem;
  }
  .event-details-left {
    flex-basis: 62%;
  }
  .event-details-right {
    flex-basis: 34%;
    flex-direction: row;
    align-items: center;
    margin-top: 0;
  }
  .event-type {
    top: 12px;
  }

  .event-watch .theme-btn {
    min-width: 120px;
  }
  /* Video Thumbnail */
  .video-thumbnail-container {
    width: 210px;
    height: 118px;
  }
  .video-thumbnail {
    width: 210px;
    height: 118px;
  }
  /* Tablet Gallery Modal */
  .emerge-gallery-modal .modal-dialog {
    --bs-modal-width: 80%;
    max-width: 80%;
    margin: 1.75rem auto;
  }
}
/* Tablet+ Gallery Indicators */
@media (min-width: 768px) {
  .thumbnail-carousel .carousel-indicators {
    position: absolute;
    bottom: -32px;
  }
  .emerge-gallery-modal .carousel-indicators button,
  .thumbnail-carousel .carousel-indicators button {
    width: 10px;
    height: 10px;
  }
}

/* ==========================================================================
   RESPONSIVE - DESKTOP (1025px-1600px)
   ========================================================================== */

@media (min-width: 1025px) and (max-width: 1600px) {
  /* Titles */
  .upcoming-events-title,
  .past-events h2 {
    font-size: 2.4rem;
  }
  .current-position {
    font-size: 3.6rem;
    min-width: 2rem;
  }
  /* Carousel */
  .carousel-inner {
    width: 950px;
    height: 500px;
  }
  /* Event Details */
  .event-details {
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
  }
  .event-details-left {
    flex-basis: 72%;
  }
  .event-details-right {
    flex-basis: 26%;
    flex-direction: row;
    align-items: center;
    margin-top: 0;
  }
  .event-type {
    top: 12px;
  }
  .event-watch .theme-btn {
    min-width: 120px;
  }
}

/* ==========================================================================
   RESPONSIVE - WIDE (≥1601px)
   ========================================================================== */

@media (min-width: 1601px), screen and (min-device-width: 1601px) {
  /* Text Sizes */
  .about-events {
    font-size: 2.4rem;
  }
  .events-description {
    font-size: 2rem;
  }
  /* Event Boxes */
  .event-image img {
    width: 218px;
  }
  /* Tabs */
  .event-tab {
    font-size: 2.2rem;
  }
  .stay-tuned-text {
    font-size: 2.8rem;
  }
  /* Event Details */
  .event-details {
    font-size: 2rem;
  }
  .event-title {
    margin: 0 0 1.5rem;
    font-size: 2.8rem;
  }
  .event-date,
  .emerge-event-date {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  .event-type {
    top: 10px;
    font-size: 1.6rem;
  }
  /* Sessions */
  .event-session-item .event-title {
    font-size: 2.4rem;
  }
  .event-session-item .event-speakers {
    font-size: 1.8rem;
  }
  /* Links */
  .session-summary-link,
  .session-slides-link {
    font-size: 2.4rem;
  }
  .event-slides-container {
    margin-top: 2rem;
  }
  /* Event Watch */
  .event-watch {
    width: 175px;
  }
  /* Gallery Indicators */
  .emerge-gallery-modal .carousel-indicators button,
  .thumbnail-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
  }
}