/** @format */

/* The env(safe-area-insert) item makes it so the notch 
in iPhone or the like will not pose a problem */
html {
  height: 100%;
  font-size: 15px;
  padding: env(safe-area-inset);
}

/* The body has a solid purple background so that if there is any
delay in loading the repeating tile, it will be okay. */
body {
  background-color: #04755c;
  height: 100%;
  margin: 0;
  background-repeat: repeat;
  background-image: url("images/DTYA-embossed.webp");
  background-size: 58vw;
}
/* Make the repeating background image a bit larger when narrower than 
100px display, to avoid havign it be so small. */
@media screen and (max-width: 1000px) {
  body {
    background-size: 85vw;
  }
}

/* This is the website header div. It has a transparent background, 
which makes the background almost white, for good visibility */
.header {
  width: 100vw;
  height: auto;
  vertical-align: center;
  padding-top: 10px;
  padding-bottom: calc(1.9 * 0.8vw);
  margin: 0;
  background: rgb(255, 255, 255, 0.8);
  z-index: 1;
}

/* This the theater program header image. With later media query, 
its width becomes dynamic for narrow than 1317 and 1177 */
#program-header {
  height: 135px;
  margin: auto;
  padding-bottom: calc(1.9 * 0.8vw);
  text-align: center;
  display: block;
  z-index: 1;
}

/* Everything after the page header is in hte "afterheader" div,with a continued gradient 
that starts with the same transparency as the header. The afterheader does not have a height value
so that it will be as tall as needed, to avoid having its gradient stop prematurely */
.after-header {
  width: 100vw;
  position: relative;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.8) 0px,
    rgba(255, 255, 255, 0.6) 10vw,
    rgba(255, 255, 255, 0.3) 20vw,
    rgba(255, 255, 255, 0) 40vw
  );
  z-index: 1;
}

/* The navigation bar scales with the page width, using the variable cw (content width) 
to avoid the need for small fractions.*/
#nav-bar {
  --cw: 0.8vw;
  width: calc(var(--cw) * 100);
  margin: auto;
  font-size: 25px;
  position: relative;
  padding: 0;
  left: 0;
  top: 0;
  height: calc(var(--cw) * 4.72);
  border-bottom: calc(var(--cw) * 0.25) solid rgb(120, 118, 118);
  border-top: calc(var(--cw) * 0.25) solid rgb(120, 118, 118);
  vertical-align: center;
  font: 550 calc(var(--cw) * 2.5) Arial, Helvetica, sans-serif;
  color: #0f8067;
  line-height: calc(var(--cw) * 4.72);
  margin-bottom: calc(var(--cw) * 0.72);
  display: flex;
  z-index: 2;
}

#nav-bar.sticky {
  position: fixed;
  background-color: #d6e3df;
  margin-bottom: calc(var(--cw) * 1.72);
  height: calc(var(--cw) * 5.72);
  line-height: calc(var(--cw) * 5.72);
  width: 100%;
  z-index: 1000; /* Ensure it's above other content */
}
#nav-bar-logo-container {
  display: none;
}

#nav-bar-logo {
  flex: 10;
  height: calc(var(--cw) * 4.5);
  padding-top: calc(var(--cw) * 0.45);
  padding-bottom: calc(var(--cw) * 0.3);
  margin-right: calc(var(--cw) * 4.5);
  left: 50%;
  transform: translateX(50%);
}

/* nav-btn is the class for all of the buttons in the nav-bar. The hover function changes color on hover. */
#nav-buttons {
  flex: 90;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-right: calc(var(--cw) * 4);
  margin-left: calc(var(--cw) * 4);
}
/* nav-btn is the class for all of the buttons in the nav-bar. The hover function changes color on hover. */
.nav-btn {
  /* display: inline-block; */
  text-align: center;
  cursor: default;
  height: 100%;
  /* border: solid green; */
}
.nav-btn a {
  color: inherit;
  text-decoration: none;
}
@media (hover: hover) {
  .nav-btn:hover {
    color: #d3ac51;
  }
}

/* This is the block of teh page, and its width scales with the page width per variable cw too. */
#main-page-content {
  --cw: 0.8vw;
  width: calc(var(--cw) * 100);
  margin: auto;
  font-size: 25px;
  z-index: 0;
  position: relative;
  padding: 0;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

.thank-you-text {
  font: 700 calc(var(--cw) * 5) Arial, Helvetica, sans-serif;
  color: #035341;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 1.2);
}
.thank-you-text2 {
  font: 600 calc(var(--cw) * 4) Arial, Helvetica, sans-serif;
  color: #efe4c7;
  vertical-align: top;
  margin: 0;
  margin-top: calc(var(--cw) * 2.5);
  margin-bottom: calc(var(--cw) * 1.2);
}
#showlogo2 {
  width: 80%;
  margin: auto;
  border-radius: calc(var(--cw) * 2.5);
}

/* Here's the stuff for the main page content (e.g., DFT show announcement), 
with pieces similarly scaling */
#show-announcement {
  width: 100%;
  height: auto;
  opacity: 1;
  display: none;
}
#info-text-wide {
  font: 700 calc(var(--cw) * 4) Arial, Helvetica, sans-serif;
  color: #035341;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 1.2);
}
#info-text-narrow {
  font: 800 calc(var(--cw) * 6) Arial, Helvetica, sans-serif;
  color: #035341;
  vertical-align: top;
  line-height: calc(var(--cw) * 6.5);
  margin: 0;
  margin-bottom: calc(var(--cw) * 1.2);
  display: none;
}
#logo-container {
  width: 100%;
  position: relative;
  display: inline-block;
}
#showlogo {
  margin: auto;
  vertical-align: top;
  width: 100%;
  border-radius: calc(var(--cw) * 2.5);
}
#show-info-wide {
  margin-top: calc(var(--cw) * 5);
  position: relative;
  width: 100%;
  font: 700 calc(var(--cw) * 4) Arial, Helvetica, sans-serif;
  color: #eee3c6;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}
#show-info-narrow {
  display: none;
  width: 100%;
  font: 600 calc(var(--cw) * 5) Arial, Helvetica, sans-serif;
  color: #eee3c6;
  padding-top: 0px;
  margin-top: calc(var(--cw) * 2);
}
@media screen and (max-width: 1317px) {
  #show-info-wide,
  #info-text-wide {
    display: none;
  }
  #show-info-narrow,
  #info-text-narrow {
    display: block;
    display: none;
  }
}
#auditions-coming {
  border-top: calc(var(--cw) * 0.25) solid #eee3c6;
  width: 95%;
  padding-top: calc(var(--cw) * 2);
  margin: auto;
  margin-top: calc(var(--cw) * 5);
  display: flex;
  flex-direction: column;
  font: 300 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
  color: #eee3c6;
}

#ticket-info {
  display: flex;
  padding-top: calc(var(--cw) * 3);
  padding-bottom: calc(var(--cw) * 2);
  margin: auto;
  margin-top: calc(var(--cw) * 5);
  flex-direction: row;
  border-top: calc(var(--cw) * 0.25) solid #eee3c6;
  width: 95%;
}
#tickets-coming {
  flex: 5;
  font: 700 calc(var(--cw) * 5) Arial, Helvetica, sans-serif;
  color: #eee3c6;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 1.9);
}
#ticket-sales {
  color: #eee3c6;
}

#credits {
  display: none;
  width: 75%;
  margin: auto;
  margin-top: calc(var(--cw) * 3);
  /* display: flex; */
  flex-direction: column;
  font: 300 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
  color: #eee3c6;
}
#first-credit-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
#second-credit-row {
  margin-top: calc(var(--cw) * 2);
  text-align: center;
  font: 300 calc(var(--cw) * 2) Arial, Helvetica, sans-serif;
}
#third-credit-row {
  margin-top: calc(var(--cw) * 2);
  text-align: center;
  font: 300 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
}
#performance-info,
#cast-info {
  border-top: calc(var(--cw) * 0.25) solid #eee3c6;
  width: 95%;
  padding-top: calc(var(--cw) * 2);
  margin: auto;
  margin-top: calc(var(--cw) * 5);
  display: flex;
  flex-direction: column;
  font: 300 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
  color: #eee3c6;
}
#performance-title,
#cast-title {
  font: 700 calc(var(--cw) * 5) Arial, Helvetica, sans-serif;
  color: #eee3c6;
  text-decoration: underline;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 1.9);
  padding-top: calc(var(--cw) * 2.2);
}
#performance-text-items {
  width: 95%;
  margin: auto;
}
.performance-text {
  font: 500 calc(var(--cw) * 4) Arial, Helvetica, sans-serif;
  color: #eee3c6;
  margin-bottom: calc(var(--cw) * 2);
}

#cast-list {
  font: 550 calc(var(--cw) * 3.5) Arial, Helvetica, sans-serif;
  color: #eee3c6;
  display: flex;
  flex-direction: column;
  /* margin: auto; */
}
.cast-item {
  display: flex;
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: calc(var(--cw) * 1);
}
.character-name {
  font-style: italic;
  text-align: right;
  margin-right: calc(var(--cw) * 4);
  flex: 1.1;
}
.actor-name {
  text-align: left;
  flex: 0.9;
}
#unformatted-cast {
  font: 550 calc(var(--cw) * 4) Arial, Helvetica, sans-serif;
}

/* Past shows page content */
#past-shows {
  height: auto;
  width: 100%;
  display: none;
}
#past-shows-title {
  font: 700 calc(var(--cw) * 7) Arial, Helvetica, sans-serif;
  color: #035341;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 4);
}
#show-blocks {
  display: flex;
  flex-direction: row;
  margin: auto;
  justify-content: center;
  flex-wrap: wrap;
}
.logo-block {
  flex: 0 0 31.5%;
  height: calc(var(--cw) * 25);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--cw) * 1);
  margin-bottom: calc(var(--cw) * 2);
  width: 27%;
  border: calc(var(--cw) * 0.25) solid white;
}
/* Center the last row's children */
/* May need to adjust the "n+2" to be n+1 if there is just 1 in the row at some point*/
/* And may need to get rid of this if there are actually 3 in the last row */
.logo-block:nth-last-child(-n + 2):nth-last-child(-n + 2) {
  margin-left: auto; /* Auto margin pushes the last row's children to the center */
  margin-right: auto; /* Auto margin pushes the last row's children to the center */
}
.past-show-logo {
  max-width: 90%;
  max-height: calc(var(--cw) * 20);
  margin: auto;
}
.past-show-year {
  font: 400 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
  color: #f4f4f4;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 1.2);
}

/* Donations page content */
#donations-page {
  height: auto;
  width: 100%;
  display: none;
  background: rgb(255, 255, 255, 0.4);
  margin-top: calc(var(--cw) * 2.5);
}
#donations-title {
  font: 700 calc(var(--cw) * 4) Arial, Helvetica, sans-serif;
  color: #035341;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 1.9);
  padding: calc(var(--cw) * 2.2);
}
#donations-page-text {
  width: 75%;
  margin: auto;
}
.donations-text {
  font: 500 calc(var(--cw) * 3.2) Arial, Helvetica, sans-serif;
  color: #035341;
  margin-bottom: calc(var(--cw) * 3);
}
.donations-text a {
  color: inherit;
}

/* About page content */
#about-page {
  height: auto;
  width: 100%;
  display: none;
  background: rgb(255, 255, 255, 0.4);
  margin-top: calc(var(--cw) * 2.5);
}
#about-page p {
  text-align: left;
}
.about-title {
  font: 700 calc(var(--cw) * 3.3) Arial, Helvetica, sans-serif;
  color: #035341;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 2.3);
  padding-top: calc(var(--cw) * 2.2);
}
#about-page-text {
  width: 80%;
  margin: auto;
}
.about-text {
  font: 520 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
  color: #035341;
  margin-bottom: calc(var(--cw) * 3);
  text-indent: calc(var(--cw) * 5);
}
#board-info,
#history-info {
  display: none;
}
.board-text {
  font: 520 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
  color: #035341;
  margin-bottom: calc(var(--cw) * 3);
  margin: auto;
}
.history-title {
  font: 700 calc(var(--cw) * 4) Arial, Helvetica, sans-serif;
  color: #035341;
  vertical-align: top;
  margin: 0;
  margin-bottom: calc(var(--cw) * 2.3);
  padding-top: calc(var(--cw) * 4.8);
}
#old-deerfield {
  width: 100%;
  margin-bottom: calc(var(--cw) * 2);
}
#history-image {
  width: 100%;
}
#ADA-title {
  font: 600 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
  color: #035341;
  vertical-align: top;
  margin: 0;
  padding-top: calc(var(--cw) * 8);
}
#ADA-notice {
  font: 400 calc(var(--cw) * 2.5) Arial, Helvetica, sans-serif;
  color: #035341;
  margin-bottom: calc(var(--cw) * 6);
  text-indent: calc(var(--cw) * 5);
}

/* The directions bar scales with the page width, using the variable cw (content width) 
to avoid the need for small fractions.*/
#direction-bar {
  --cw: 0.8vw;
  width: 95vw;
  position: relative;
  left: 0;
  top: 0;
  height: calc(var(--cw) * 4);
  border-bottom: calc(var(--cw) * 0.4) solid rgb(120, 118, 118);
  border-top: calc(var(--cw) * 0.4) solid rgb(120, 118, 118);
  background-image: url("images/map-graphic4.webp");
  background-repeat: no-repeat;
  background-size: cover; /* or contain, depending on your preference */
  background-position: center; /* This centers the background horizontally */
  margin: auto;
  margin-top: calc(var(--cw) * 7);
  margin-bottom: calc(var(--cw) * 1);
  z-index: 2;
  display: flex;
  display: none;
  flex-wrap: wrap;
  flex-direction: row;
}
#directions-intro {
  flex: 1.2;
  margin: auto;
  text-align: center;
  font: 900 calc(var(--cw) * 2.3) Arial, Helvetica, sans-serif;
  font-style: italic;
  color: #0f256d;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5); /* Subtle white text shadow */
}
.map-pin {
  height: calc(var(--cw) * 2.2);
}
.directions {
  flex: 1;
  margin: auto;
  text-align: center;
  font: 900 calc(var(--cw) * 2.3) Arial, Helvetica, sans-serif;
  color: #0f256d;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5); /* Subtle white text shadow */
}

/* The icon bar scales with the page width, using the variable cw (content width) 
to avoid the need for small fractions.*/
#icon-bar {
  --cw: 0.8vw;
  width: 95vw;
  position: relative;
  padding-top: calc(var(--cw) * 3);
  padding-bottom: calc(var(--cw) * 3);
  left: 0;
  top: 0;
  height: calc(var(--cw) * 15);
  border-bottom: calc(var(--cw) * 0.4) solid rgb(120, 118, 118);
  border-top: calc(var(--cw) * 0.4) solid rgb(120, 118, 118);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2) 0px,
    rgba(255, 255, 255, 0.1) 33%,
    rgba(255, 255, 255, 0.05) 66%,
    rgba(255, 255, 255, 0) 99%
  );
  margin: auto;
  /* Changed the following from 7 to 2 to accomodate directions bar */
  margin-top: calc(var(--cw) * 1.5);
  margin-bottom: calc(var(--cw) * 3.72);
  z-index: 2;
}

/* The icons div holds the icons within the icon bar, centered there and providin flex/space */
#icons {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  vertical-align: center;
  width: 90%;
  margin: auto;
  padding: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Here's the settings for the icons in the icon-bar, defining height and hover color */
.icon-item {
  height: calc(var(--cw) * 11.11);
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.icon-item:hover {
  box-shadow: 0 0 calc(var(--cw) * 0.37) calc(var(--cw) * 0.08) #888;
}
#NEA {
  filter: brightness(150%);
}
/* Next is the photo box, which also scales with the page width, 
using the variable cw (content width), to avoid the need for small fractions. */
#photo-box {
  --cw: 0.8vw;
  width: 95vw;
  margin: auto;
  margin-top: calc(var(--cw) * 7);
  position: relative;
  padding-top: calc(var(--cw) * 3);
  padding-bottom: calc(var(--cw) * 3);
  left: 0;
  top: 0;
  height: calc(var(--cw) * 50);
  vertical-align: center;
  overflow: hidden;
  margin-top: calc(var(--cw) * 7);
  margin-bottom: calc(var(--cw) * 3.72);
  /* border:solid white */
}

/* This is the photo in the photo box. Will want to have this change from photo to photo if possible */
.photo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  transition: opacity 1s ease-in-out;
}
.photo.active {
  opacity: 1;
}

#bottom-bar {
  --cw: 0.8vw;
  /* width: calc(var(--cw) * 100); */
  position: relative;
  margin: auto;
  bottom: 0px;
  /* width: 100%; */
  padding: 20px;
  padding-top: calc(var(--cw) * 3);
  padding-left: calc(var(--cw) * 3);
  margin-top: calc(var(--cw) * 15);
  color: #035341;
  background: rgb(255, 255, 255, 0.7);
}
#top-row {
  display: flex;
  flex-direction: row;
}
#address-name {
  display: flex;
  flex-direction: column;
  margin-right: calc(var(--cw) * 7);
}
#DFT-name {
  font: 700 calc(var(--cw) * 3.1) Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  line-height: calc(var(--cw) * 4);
}
#DFT-address {
  font: 600 calc(var(--cw) * 2.5) Arial, Helvetica, sans-serif;
}
#for-more-info {
  margin-top: calc(var(--cw) * 2.4);
  font: 500 calc(var(--cw) * 3) Arial, Helvetica, sans-serif;
}
#facebook {
  height: calc(var(--cw) * 7);
  margin-right: calc(var(--cw) * 1.5);
}
#instagram {
  height: calc(var(--cw) * 7);
}

/* Other media queries */
@media screen and (max-width: 1317px) {
  #program-header {
    /* --cw: 0.95vw; */
    --cw: calc((0.0015 * calc(1200px - 100vw)) + 0.8vw);
    width: calc(var(--cw) * 100);
    height: auto;
  }
  .after-header {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.8) 0px,
      rgba(255, 255, 255, 0.6) 15vw,
      rgba(255, 255, 255, 0.3) 30vw,
      rgba(255, 255, 255, 0) 60vw
    ); /* This helps keep the top brighter for text there, when narrower */
  }
}
@media screen and (max-width: 1177px) {
  #main-page-content,
  #nav-bar {
    --cw: calc((0.0015 * calc(1200px - 100vw)) + 0.8vw);
    width: calc(var(--cw) * 100);
    height: auto;
  }
}
@media screen and (max-width: 1177px) {
  #nav-bar.sticky {
    height: calc(var(--cw) * 8.72);
    line-height: calc(var(--cw) * 8.72);
  }
  #nav-bar-logo {
    height: calc(var(--cw) * 6.5);
    left: 50%;
    transform: translateX(50%);
  }
}
@media screen and (max-width: 1177px) {
  #direction-bar {
    height: calc(var(--cw) * 9);
    display: block;
    display: none;
  }
  #directions-intro {
    display: inline-block;
    width: 100%;
    flex: none;
    margin-top: calc(var(--cw) * 0.6);
    margin-bottom: calc(var(--cw) * 0.4);
  }
  .directions {
    flex: none;
    display: inline-block;
    width: 49%;
  }
  #directions-intro,
  .directions {
    font: 900 calc(var(--cw) * 3.1) Arial, Helvetica, sans-serif;
  }
  .map-pin {
    height: calc(var(--cw) * 2.6);
  }
}
@media screen and (max-width: 600px) {
  #direction-bar {
    height: calc(var(--cw) * 10);
  }
}

@media screen and (max-width: 600px) {
  #main-page-content,
  #program-header,
  #icon-bar {
    --cw: 0.95vw;
  }
  #direction-bar {
    height: calc(var(--cw) * 10);
  }
}
@media screen and (max-width: 600px) {
  #DFT-name,
  #DFT-address,
  #facebook,
  #instagram {
    --cw: 1.2vw;
  }
  #for-more-info {
    --cw: 0.88vw;
  }
}

@media screen and (max-width: 600px) {
  .donations-text,
  .about-text,
  .board-text {
    font: 520 calc(var(--cw) * 3.6) Arial, Helvetica, sans-serif;
  }
  .about-title,
  .history-title {
    font: 700 calc(var(--cw) * 5.5) Arial, Helvetica, sans-serif;
  }
  #about-page-text,
  #donations-page-text {
    width: 89%;
  }
}

@media screen and (max-width: 600px) {
  #nav-bar {
    --cw: 0.95vw;
    font: 575 calc(var(--cw) * 2.7) Arial, Helvetica, sans-serif;
    line-height: calc(var(--cw) * 4.92);
    height: calc(var(--cw) * 4.92);
    border-bottom: calc(var(--cw) * 0.4) solid rgb(120, 118, 118);
    border-top: calc(var(--cw) * 0.4) solid rgb(120, 118, 118);
  }
}
