/* Banner and Typography */
.banner {
  font-size: 7rem;
  color: #ae031d;
  font-family: Arvo, Slabo;
  padding: 0;
  line-height: 92%;
}

.course-banner {
  background-image: url("img/Vanya Cover Bg-lt.jpg");
  background-size: auto;
  background-position: left top;
  width: 100%vw;
  min-width: 992px;
}

.subbanner {
  font-size: 1.6rem;
  font-weight: 600;
  color: #074525;
}

.content-container {
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  padding: 1rem 1rem;
}

/* Responsive Banner */
@media only screen and (max-width: 1200px) {
  .banner {
    font-size: 6rem;
  }
}

@media only screen and (max-width: 770px) {
  .banner {
    font-size: 5rem;
  }
}

/* Border Utilities */
.brownborder {
  border: solid 2px #42260e;
}

.redtop {
  border-top: solid 5px #ab1128;
}

.yellowtop {
  border-top: solid 5px #fdbe35;
}

.greentop {
  border-top: solid 5px #074525 !important;
}

/* Dropdown Styles - Consolidated */
.dropdown-menu {
  max-height: none !important;
  overflow: visible !important;
}

.dropdown-menu.dropdown-menu-end, 
.dropdown-menu[data-bs-popper="none"] {
  transform-origin: top center;
  margin-top: 0 !important;
}

.dropdown-toggle::after {
  display: none !important;
}

.dropdown-toggle-arrow::after {
  display: inline-block;
  margin-left: 0.255em;
  vertical-align: 0.255em;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
}

.dropdown-item:hover, 
.dropdown-item:focus {
  background-color: rgba(171, 17, 40, .2) !important;
}

.dropdown-item.active, 
.dropdown-item:active {
  background-color: rgba(171, 17, 40, 0.1) !important;
  color: #212529 !important;
}

.dropdown button {
  height: auto !important;
  min-height: 38px;
  white-space: normal;
}

.dropdown-item {
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  padding: 0.5rem 1rem !important;
  line-height: 1.2 !important;
}

/* Animations */
@keyframes fadeSlideIn {
  0% {
      opacity: 0;
      transform: translateY(-10px);
  }
  100% {
      opacity: 1;
      transform: translateY(0);
  }
}

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

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

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

@keyframes circular-expand {
  0% {
    transform: scale(1);
    border-color: rgba(174, 3, 29, 1);
  }
  50% {
    transform: scale(1.5);
    border-color: rgba(174, 3, 29, 0.3);
  }
  100% {
    transform: scale(1);
    border-color: rgba(174, 3, 29, 1);
  }
}

@keyframes photo-circle {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes windowglow {
  0%   {background-color: rgba(245, 194, 40, 0.65);}
  20%  {background-color: rgba(233, 185, 10, 0.723);}
  40%  {background-color: rgba(240, 194, 67, 0.623);}
  60%  {background-color: rgba(255, 206, 31, 0.624);}
  80%  {background-color: rgba(247, 174, 38, 0.809);}
  100% {background-color: rgba(245, 189, 93, 0.69);}
}

@keyframes highlight-pulse {
  0% { box-shadow: 0 0 0 0 rgba(174, 3, 29, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(174, 3, 29, 0); }
  100% { box-shadow: 0 0 0 0 rgba(174, 3, 29, 0); }
}

@keyframes rotate-y-180 {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(180deg);
  }
}

/* Content Cards and Layout */
.content-card {
  position: relative;
  background-color: #fffefa;
  padding: 1.8rem 3rem;
  margin-bottom: 1rem;
  border: solid 1px #ddd;
}

.content-card.d-flex {
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.content-card .row {
  margin: 0;
}

.divider {
  border-bottom: solid 1px #ae031d;
  width: 20%;
  margin-bottom: 1rem auto;
}

/* Typography Styles */
.header {
  text-align: left;
  line-height: 1;
  padding: .2rem;
  margin: 1.7rem 0rem 1rem 0rem;
  line-height: 2rem;
}

.header-text {
  font-family: 'Arvo', serif;
  font-weight: 900;
  font-size: 2.8rem;
  margin-bottom: 1.8rem;
}

.subhead-1 {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Arvo', serif;
  margin-bottom: .8rem;
}

.subhead-2 {
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 1.4rem;
}

.question {
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
}

.nextslide {
  margin-bottom: -5px;
  font-size: 4rem;
  color: #e5a400;
  padding-bottom: 0;
  line-height: 70%;
}

.label {
  font-size: .8rem;
  text-align: right;
}

/* Play-specific Styles */
.speaker {
  font-weight: 800;
  color: #000;
}

.stagedirection {
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 0;
  text-align: left;
  margin-left: .6rem;
  color: #333;
}

.inlinedirection {
  font-style: italic;
  font-size: 1.1rem;
  color: #333;
}

.playrow {
  margin-top: -1.5rem !important;
  min-height: 80px;
}

/* Bullet Styles */
.bullet {
  text-indent: -1.7em;
  padding-top: .25em;
  padding-left: 2em;
}

.bullet:before {
  content: "\F1A2";
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  margin-right: 15px;
}

.bullet2 {
  margin: 0 0 1rem 1rem;
  font-size: 1.2rem;
}

.bullet2:before {
  content: "\F4CA";
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  margin-right: 15px;
  font-size: 1.4rem;
}

/* Letters and Document Styles */
.letter {
  font-family: 'Antic Slab', serif;
  font-size: 1.4rem;
  padding: 2rem;
  border: solid 1px #dedede;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  margin-bottom: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Flip Card Styles */
.flip-card {
  perspective: 1000px;
  background-color: transparent;
  min-height: 300px;
  width: 100%;
  position: relative;
  transition: height 0.3s ease-in-out;
}

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

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background-color: transparent;
  transition: height 0.3s ease-in-out;
}

.flip-card-front {
  z-index: 1;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Safari fix for flip cards */
@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance:none) {
    .flip-card-front, .flip-card-back {
      -webkit-transform-style: preserve-3d;
    }
    
    .flip-card-back {
      transform: rotateY(180deg) translateZ(1px);
    }
  }
}

/* Video and Media Styles */
.videoplaybutton {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.videoplaybutton i {
  font-size: 3rem;
  color: #e4e4e4 !important;
}

.windowview {
  animation-name: windowglow;
  animation-iteration-count: infinite;
}

#videoplayer {
  position: absolute;
  z-index: 1000;
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
}

.photowidth {
  width: 108%;
}

.photohotspot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background-color: #42260e;
  border: 3px solid #fff;
  cursor: pointer;
}

.phototeaser {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 3px solid #fbfbfb;
  cursor: pointer;
  animation: photo-circle 2s ease-in-out infinite;
}

.pulsing-dot {
  width: 12px;
  height: 12px;
  border: solid 2px #ae031d;
  border-radius: 50%;
  animation: circular-expand 1.5s infinite;
  z-index: 13;
}

/* Navigation Styles */
#act1narration {
  position: sticky;
  top: 0;
  margin-right: -2rem;
  width: 10%;
  height: 20px;
}

.right-column {
  padding-top: 5rem;
  top: 0;
  margin-left: 0rem;
  margin-right: 1vw;
  display: flex;
  flex-direction: row;
  height: auto;
  align-self: stretch;
}

.min-width-fit {
  min-width: fit-content;
}

.bg-translucent {
  background-color: rgba(242, 242, 242, 0.8);
}

/* Tab Navigation Styles */
.horiztext {
  border-top: solid 5px #fdbe35;
  padding: 0 0 .4rem 1rem;
  color: #42260e !important;
  font-size: 23px;
  font-weight: bold;
  cursor: pointer;
  white-space: normal;
  display: block !important;
  text-align: left;
}

button.horiztext {
  font-weight: 800 !important;
  font-size: 1.3rem !important;
}

.horiztext:hover {
  border-color: #ab1128;
}

.verticaltext {
  writing-mode: vertical-rl;
  position: relative;
  padding: 15px 0px;
  margin: .2em .14em;
  color: #42260e;
  font-size: 28px;
  font-weight: bold;
  border-top: solid 4px #42260e;
  height: auto;
  white-space: nowrap;
  background-image: url("img/bullet.jpg");
  background-size: auto;
  background-position: top;
  opacity: 0;
  transform: translateY(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1500px) {
  .verticaltext {
    font-size: 32px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

.verticaltext.active {
  transform: translateY(-1.5rem) !important;
  background-color: #e5a400 !important;
}

.verticaltext.slide-up {
  animation: slideDown 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.verticaltext:nth-child(1).slide-up {
  animation-delay: 0s;
}

.verticaltext:nth-child(2).slide-up {
  animation-delay: 0s;
}

.verticaltext:nth-child(3).slide-up {
  animation-delay: .9s;
}

.verticaltext:nth-child(4).slide-up {
  animation-delay: .3s;
}

.verticaltext:nth-child(5).slide-up {
  animation-delay: .6s;
}

/* Hint System Styles */
.hint-circle-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hint-circle {
  width: 30px;
  height: 30px;
  background-color: white;
  border: 2px solid #ae031d;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: circular-expand 2s infinite;
}

.hint-circle.expanded {
  width: 35px;
  height: 35px;
  background-color: #ae031d;
  animation: none;
}

.col-6:first-child .hint-circle-container {
  flex-direction: row-reverse;
  justify-content: center;
}

.col-6:first-child .hint-content {
  text-align: right;
  margin-right: 20px;
  transform: translateX(20px);
}

.col-6:last-child .hint-circle-container {
  flex-direction: row;
  justify-content: center;
}

.col-6:last-child .hint-content {
  text-align: left;
  margin-left: 20px;
  transform: translateX(-20px);
}

.hint-content {
  opacity: 0;
  font-size: 1.15rem;
  color: #074525;
  font-style: italic;
  max-width: 70%;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  border-bottom: solid 2px #8b0217;
  border-top: solid 2px #8b0217;
  padding: 15px 0;
}

.hint-circle-container.expanded .hint-content {
  opacity: 1;
  transform: translateX(0);
}

/* Writer Tab Styles */
.writer-content {
  transition: opacity 0.3s ease-out;
  opacity: 1;
}

.writer-content.fade-out {
  opacity: 0;
}

.writer-content.fade-in {
  opacity: 1;
}

.writer-nav-button {
  color: #42260e;
  transition: color 0.3s ease;
}

.writer-nav-button:hover {
  color: #ae031d;
}

/* Character Matching Styles */
.character-match-select {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  background-position: right 1rem center;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-color: #ced4da;
}

.character-match-select:hover {
  border-color: #b8bfc4;
}

.character-match-select:focus {
  border-color: #42260e;
  box-shadow: 0 0 0 0.25rem rgba(66, 38, 14, 0.25);
}

.character-match-select:focus-visible {
  outline: 0;
}

/* Utilities */
.disabled {
  color: #cdcdcd;
  cursor: auto;
}

.object-cover {
  object-fit: cover;
}

.rotate-y-180 {
  transform: rotateY(180deg) !important;
}

.progressbtn:hover {
  border-color: #ab1128 !important;
}

.bonus-challenge-animation {
  animation: fadeSlideIn 0.4s ease-out forwards;
  transform-origin: top center;
}

.highlight-element {
  animation: highlight-pulse 2s 1;
  border-radius: 4px;
  position: relative;
}

/* Button and Link Styles - Consolidated */
.btn:disabled {
  border: none !important;
}

/* Consolidated link styles */
a {
  color: #8b0217 !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #e5bf00;
  text-decoration: underline;
}

a:active {
  color: #42260e;
}

/* Remove white backgrounds - Consolidated */
.verticaltext,
#backToIntro,
#rightnav button,
#rightnav .nav-link,
button.verticaltext,
.btn,
button,
#rightnav *,
.nav,
.nav-pills,
.nav button,
.nav .nav-link,
button:not(.btn-close) {
  background-color: transparent !important;
}

#backToIntro {
  border: none !important;
}

button:not(.btn-close) {
  text-align: start !important;
}

.verticaltext,
#backToIntro,
#rightnav button,
#rightnav .nav-link,
button.verticaltext {
     border-left: none !important;
   border-right: none !important;
}

/* Accessibility Styles - Consolidated */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 9999;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

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

/* Focus Styles - Consolidated */
*:focus-visible {
  outline: 3px solid #42260e;
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

button:focus,
.btn:focus,
[role="button"]:focus,
.horiztext:focus,
.verticaltext:focus {
  outline: 3px solid #42260e;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(66, 38, 14, 0.3);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #42260e;
  outline-offset: 2px;
  border-color: #42260e;
  box-shadow: 0 0 0 3px rgba(66, 38, 14, 0.25);
}

a:focus {
  outline: 3px solid #42260e;
  outline-offset: 2px;
  text-decoration: underline;
}

.photohotspot:focus,
.hint-circle:focus {
  outline: 3px solid #42260e;
  outline-offset: 2px;
  transform: scale(1.1);
}

.dropdown-item:focus {
  background-color: rgba(171, 17, 40, .3) !important;
  outline: 2px solid #42260e;
  outline-offset: -2px;
}

.modal:focus {
  outline: none;
}

.modal-content:focus-within {
  outline: 3px solid #42260e;
  outline-offset: -3px;
}

/* Remove focus outline on click for all interactive elements */
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
.verticaltext:focus:not(:focus-visible),
.horiztext:focus:not(:focus-visible),
#rightnav button:focus:not(:focus-visible),
#backToIntro:focus:not(:focus-visible),
#rightnav .nav-link:focus:not(:focus-visible),
button.verticaltext:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

/* Enhanced focus for specific components */
.content-container a:focus-visible,
.knowledge-btn:focus-visible,
[role="button"]:focus-visible,
.form-control:focus-visible,
.position-absolute[role="button"]:focus-visible,
[data-video-index]:focus-visible,
[aria-label*="interview"]:focus-visible,
.rounded-circle[role="button"]:focus-visible,
[data-custom-audio] button:focus,
#video-grid-root [style*="cursor: pointer"]:focus,
[data-bs-toggle="tooltip"]:focus {
  outline: 3px solid #42260e !important;
  outline-offset: 2px !important;
}

/* Enhanced interactive states */
.btn:hover,
.btn:focus {
  color: #000;
  background-color: rgba(66, 38, 14, 0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .banner,
  .subbanner,
  .verticaltext,
  .horiztext {
    color: #000;
  }
  
  .content-container {
    background-color: #fff;
    color: #000;
  }
  
  .verticaltext,
  .horiztext {
    background-color: #fff;
    border-color: #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .windowview,
  .phototeaser,
  .pulsing-dot {
    animation: none;
  }
}

/* Ensure navigation elements can receive focus */
#rightnav button,
.verticaltext,
.horiztext {
  outline: none;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

#rightnav button:focus,
.verticaltext:focus,
.horiztext:focus {
  outline: 3px solid #42260e !important;
  outline-offset: 2px !important;
  z-index: 20 !important;
}

#rightnav {
  pointer-events: auto;
}

#rightnav * {
  pointer-events: auto;
}