:root {
  --red: #bd040f;
  --lightgray: #c1c1c1;
  --darkgray: #393939;
}

@font-face {
  font-family: "MontSerratVariable";
  src: url("assets/Montserrat-VariableFont_wght.ttf");
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  font-family: "MontSerratVariable", sans-serif;
  background: white;
  color: var(--darkgray);
  scroll-behavior: smooth;s
  overflow: auto;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 30;
  padding: 0 16px;
}

header.desktop {
  display: none;
}

header * {
  color: white;
}

a {
  text-decoration: none;
}

button {
  border: none;
  background: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  background: var(--red);
  color: white;
  font-size: 12px;
  padding: 0 16px;
  border-radius: 8px;
  font-family: "MontSerratVariable", sans-serif;
  font-weight: 700;
  cursor: pointer;
  width: max-content;
}

.button span {
  margin: 8px 0;
}

.inverted-color {
  background: white;
  color: var(--red);
  font-size: 12px;
}

.inverted-color span {
  color: inherit;
}

.inverted-color i {
  color: inherit;
  font-size: 20px;
  font-weight: 800;
}

#toggleButton {
  font-size: 20px;
}

.side-menu {
  position: fixed;
  top: -100%;
  right: 12px;
  width: 200px;
  background: var(--red);
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  transition: top 0.3s ease;
  z-index: 20;
  border-radius: 0 0 10px 10px;
}

.side-menu a {
  color: white;
}

.side-menu.active {
  top: 60px;
}

.side-menu ul {
  list-style: none;
  padding: 0;
}

.side-menu li {
  padding: 4px 32px;
  font-size: 14px;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
}

.overlay.active {
  display: block;
}

main {
  padding: 16px;
  padding-bottom: 0px;
}

.hero-content {
  height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 10%;
}

.hero-title {
  display: flex;
  flex-direction: column;
  justify-content: start;
}

.hero-content p {
  font-size: 16px;
}

.hero-content img {
  width: 250px;
}

.fa-calendar-days {
  font-size: 20px;
  font-weight: 400;
}

.hero-slideshow {
  position: relative;
  margin-left: -16px;
  margin-right: -16px;
  border-radius: 16px;
}

.slide {
  display: none;
  padding: 20% 15% 10% 15%;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.slide-1 {
  background-image: url("assets/Foto Hero Banner.jpg");
}

.slide-2 {
  background-image: url("assets/Foto\ Hero\ Banner\ 2.png");
}

.slide-3 {
  background-image: url("assets/Foto\ Hero\ Banner\ 3.png");
}

.slide.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fade 1s ease-in-out;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.clinica-slideshow {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 32px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  aspect-ratio: 3 / 4;
}

.clinica-slideshow .clinica-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
  z-index: 1;
  object-fit: cover;
}

.clinica-slideshow .clinica-slide.active {
  transform: translateX(0);
  opacity: 1;
  z-index: 2;
}

.clinica-slideshow .clinica-slide.exit-left {
  transform: translateX(-100%);
  opacity: 0;
  z-index: 1;
}

.clinica-slideshow .clinica-slide.exit-right {
  transform: translateX(100%);
  opacity: 0;
  z-index: 1;
}

.clinica-slideshow .prev,
.clinica-slideshow .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  color: var(--red);
  border: none;
  font-size: 20px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
  z-index: 10;
}

.clinica-slideshow .prev:hover,
.clinica-slideshow .next:hover {
  background: rgba(255, 255, 255, 0.9);
}

.clinica-slideshow .prev {
  left: 12px;
}

.clinica-slideshow .next {
  right: 12px;
}

.video-slideshow {
  position: relative;
  width: 100vw;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  aspect-ratio: 16 / 9;
  height: 100%;
  padding-bottom: 60px;
}

.video-slideshow iframe.video-slide {
  position: absolute;
  top: 15%;
  bottom: 15%;
  left: 15%;
  right: 15%;
  width: 70%;
  height: 70%;
  opacity: 0;
  pointer-events: none; /* desabilita interação no que não está ativo */
  transition: opacity 0.6s ease-in-out;
  border-radius: 12px;
  z-index: 1;
}

.video-slideshow iframe.video-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.video-slideshow button.prev,
.video-slideshow button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  color: var(--red);
  border: none;
  font-size: 24px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
  z-index: 10;
}

.video-slideshow button.prev:hover,
.video-slideshow button.next:hover {
  background: rgba(255, 255, 255, 1);
}

.video-slideshow button.prev {
  left: 12px;
}

.video-slideshow button.next {
  right: 12px;
}

.slideshow-dots {
  position: absolute;
  bottom: 16px;
  left: 50vw;
  right: 50vw;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.slideshow-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  cursor: pointer;
  transition: background 0.3s ease;
  box-sizing: border-box;
}

.slideshow-dots button.active {
  outline: 2px solid var(--red);
}

.section-title {
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  padding: 20px;
  padding-bottom: 0;
}

.section-title img {
  height: 80px;
  margin-bottom: 16px;
}

.section-title h2 {
  font-weight: 500;
  line-height: 1;
  margin: 0;
}

.section-title hr {
  width: 60px;
  height: 6px;
  background-color: var(--red);
  border: none;
  border-radius: 3px;
  margin: 16px auto;
}

.section-title hr.white {
  background-color: white;
}

.section-title strong {
  color: black;
}

.sobre-description {
  margin: 0 10% 10% 10%;
}

.sobre-description p {
  font-style: italic;
  margin: 0;
  text-align: center;
}

.gray-section {
  background: var(--lightgray);
  border-radius: 0;
}

.red-section {
  background: var(--red);
  border-radius: 0;
}

.padded-section {
  padding: 0 16px;
}

#exames,
#contatos {
  padding-bottom: 16px;
}

.unpadded-section {
  margin: 0 -16px;
}

.team-slideshow {
  padding: 10%;
  padding-top: 0;
}

.team-slide {
  text-align: center;
  display: none;
}

.team-slide.active {
  display: block;
  animation: fade 0.5s ease-in-out;
}

.doctor-images {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.doctor-pic {
  width: 120px;
  height: 120px;
  background-image: url("assets/Dr\ Daniel\ Lago.png");
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.doctor-name {
  color: var(--red);
  font-weight: bolder;
  font-size: 24px;
  margin: 0;
  margin-top: 4px;
}

.doctor-specialty {
  color: var(--red);
  font-weight: 300 !important;
  font-size: 16px;
  margin: 0;
  font-style: italic;
}

.doctor-description p {
  font-style: italic;
  margin: 0;
  text-align: center;
}

.slide-button {
  color: var(--red);
  font-size: 20px;
}

.expansible-text {
  max-width: 600px;
  width: 100%;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.expansible-text .title {
  width: 100%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  background: var(--red);
  color: white;
  border-radius: 8px;
  user-select: none;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.expansible-text .content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  background: var(--lightgray);
  border-radius: 0 0 8px 8px;
  padding: 0 20px;
  font-size: 12px;
  width: 80%;
  text-align: justify;
  display: flex;
  flex-direction: column;
  align-items: end;
}

.expansible-text .content.expanded {
  padding: 12px 20px;
  max-height: 300px;
}

.content p {
  margin: 0;
}

.content .button {
  font-weight: 500;
  margin-top: 20px;
}

.content p.content-subtitle {
  color: var(--red);
  font-weight: 700;
  margin-top: 12px;
  width: 100%;
}

.contatos {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--red);
  color: white;
  padding: 20px 0;
}

.contatos p {
  margin: 0;
}

.contact .telefones {
  margin-top: 12px;
}

.contatos hr {
  width: 90%;
  height: 4px;
  background-color: white;
  border: none;
  border-radius: 3px;
  margin: 16px auto;
}

footer {
  padding: 16px;
  display: flex;
  background-color: darkred;
  justify-content: space-between;
  font-size: 8px;
  color: white;
}

footer img {
  width: 50%;
}

@media screen and (min-width: 920px) {
  body {
    margin-bottom: 0;
  }

  main {
    padding-bottom: 0;
  }

  header.mobile,
  .overlay,
  .side-menu {
    display: none;
  }

  header.desktop {
    display: flex;
  }

  header.desktop ul {
    display: flex;
    list-style: none;
    gap: 8px;
  }

  header.desktop li:hover {
    cursor: pointer;
    font-weight: bold;
  }

  .slide {
    padding: 0;
    padding-top: 60px;
  }

  .hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .sobre-description {
    margin-bottom: 5%;
  }

  .team-slideshow {
    padding-bottom: 5%;
  }

  footer img {
    height: 20px;
    max-width: fit-content;
  }
}
