/* ***********   RESET CSS   *********** */
:root {
  --main-font: sans-serif;
  --font-size: 16px;
  --main-color: #962125;
  --second-color: #222;
  --main-modal-color: rgba(150, 33, 37, 0.85);
  --second-modal-color: rgba(34, 34, 34, 0.85);
  --dark-color: #1c1c1c;
  --container-width: 1200px;
}

html {
  box-sizing: border-box;
  font-family: var(--main-font);
  font-size: var(--font-size);
  scroll-behavior: smooth;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/*Menu hamburguesa*/
header {
  position: sticky;
  top: 0;
  padding: 1rem;
  background-color: var(--main-color);
  color: var(--second-color);
  z-index: 999;
}

header h1 {
  margin: 0 auto;
  text-align: center;
}

.section {
  padding: 2rem;
  padding-top: 4rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: var(--container-width);
  min-height: 100vh;
  text-align: center;
}

.panel {
  position: fixed;
  z-index: 998;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 30%;
  overflow-y: auto;
  background-color: var(--second-modal-color);
  visibility: hidden;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.5s ease;
  /*Para que salga de arriba*/
  /*transform: translate(0, -100%);
  /*Para que salga de abajo*/
  /*transform: translate(0, 100%);
  /*Para que salga de la derecha*/
  /*transform: translate(100%, 0);
  /*Para que salga de la izquierda*/
  transform: translate(-100%, 0);
}

.panel.is-active {
  transform: translate(0, 0);
  opacity: 1;
  visibility: visible;
  z-index: 999;
}

.panel-btn {
  position: fixed;
  z-index: 999;
  bottom: 1vh;
  right: 1vw;
  width: 4rem;
  height: 4rem;
  border-radius: 40%;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--main-color);
}

.menu {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  text-align: center;
  padding-top: 5rem;
}

.menu a {
  padding: 1rem;
  display: block;
  font-size: 1rem;
  text-decoration: none;
  color: palevioletred;
  transition: all 0.3s ease;
}

.menu a:hover {
  font-weight: bold;
  color: var(--second-color);
  background-color: var(--main-modal-color);
  width: 100%;
}

/* ***********Eventod del teclado************** */

.stage {
  display: flex;
  min-height: 50vh;
  background-color: var(--second-color);
  z-index: 1;
}

.ball {
  margin: auto;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: var(--main-color);
}

/* ***********Scroll************* */

.scroll-top {
  position: fixed;
  z-index: 999;
  bottom: 1vh;
  right: calc(4.25rem + 1vw);
  width: 4rem;
  height: 4rem;
  border-radius: 40%;
  font-size: 2rem;
  font-weight: bold;
  background-color: var(--main-color);
  color: var(--second-color);
  cursor: pointer;
  outline: 0;
  border: 0;
  transition: all 0.3s ease-out;
}

.scroll-top:hover {
  background-color: var(--second-color);
  color: var(--main-color);
}

.hidden {
  visibility: hidden;
  opacity: 0;
}

/* ************* Dark theme button ************ */

.dark-theme {
  position: fixed;
  z-index: 999;
  bottom: 1vh;
  left: 1vw;
  width: 4rem;
  height: 4rem;
  border-radius: 40%;
  font-size: 2rem;
  font-weight: bold;
  background-color: var(--main-color);
  color: var(--second-color);
  cursor: pointer;
  outline: 0;
  border: 0;
  transition: all 0.3s ease-out;
}

.dark-theme:hover {
  background-color: var(--second-color);
  color: var(--main-color);
}

.dark-mode {
  background-color: var(--dark-color);
  color: var(--main-color);
}

/*Network status*/

.online,
.offline {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  background-color: #1b5e20;
  color: #fff;
}

.offline {
  background-color: #b71c1c;
}

/*Search Filters*/

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background-color: var(--second-color);
  color: var(--main-color);
  transition: all 0.3s ease-out;
}

.card img {
  width: 100%;
  height: auto;
}

.card figcaption {
  padding: 1rem;
}

.filter {
  visibility: hidden;
  opacity: 0;
  order: 1;
}

/*RESPONSIVE SLIDER*/

.slider {
  position: relative;
  width: 80%;
  margin: 1rem auto;
  text-align: center;
}

.slider-slides {
  position: relative;
  height: 400px;
}

.slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease;
}

.slider-slider img {
  height: inherit;
  width: inherit;
  object-fit: cover;
  object-position: 50% 0%;
}

.slider-slide.active {
  opacity: 1;
  visibility: visible;
}

.slider-btns {
  position: absolute;
  width: 100%;
  top: 50%;
  display: flex;
  justify-content: space-between;
  font-size: 3rem;
  font-weight: bold;
}

.slider a {
  display: block;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: thin solid #000;
  text-decoration: none;
  background-color: #fff;
  color: #000;
  transition: all 0.3s ease;
}

.slider a:hover {
  color: #4d4d4d;
}

video {
  width: 100%;
}

/* ********ContactForm Validations******************* */

.contact-form {
  --form-ok-color: #4caf50;
  --form-error-color: #f44336;
  margin-left: auto;
  margin-right: auto;
  width: 80%;
}

.contact-form > * {
  padding: 0.5rem;
  margin: 1rem auto;
  display: block;
  width: 100%;
}

.contact-form textarea {
  resize: none;
}

.contact-form legend,
.contact-form-response {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
}

.contact-form input,
.contact-form textarea {
  font-size: 1rem;
  font-size: sans-serif;
}

.contact-form input[type="submit"] {
  width: 50%;
  font-weight: bold;
  cursor: pointer;
}

.contact-form *::placeholder {
  color: #000;
}

.contact-form [required]:valid {
  border: thin solid var(--form-ok-color);
}
.contact-form [required]:invalid {
  border: thin solid var(--form-error-color);
}

.contact-form-error {
  margin-top: -1rem;
  font-size: 80%;
  background-color: var(--form-error-color);
  color: #fff;
  transition: all 800ms ease;
}

.contact-form-error.is-active {
  display: block;
  animation: show-message 1s 1 normal 0s ease-out both;
}

.none {
  display: none;
}

@keyframes show-message {
  0% {
    visibility: hidden;
    opacity: 0;
  }
  100% {
    visibility: visible;
    opacity: 1;
  }
}
