/* ====================================== GERAL E VARIÁVEIS ============================================= */
:root {
  --biavatti-dark-blue: #002147;
  --biavatti-accent-blue: #059cee;
  --biavatti-light-blue: #e6f0fa;
  --biavatti-light-bg: #f4f6f8;
  --biavatti-white: #ffffff;
  --biavatti-text: #333;
}

body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--biavatti-light-bg);
  color: var(--biavatti-text);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--biavatti-dark-blue);
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 1px solid #d0ddee;
}

.card {
  padding: 25px;
  border-radius: 16px;
  background-color: var(--biavatti-white);
  box-shadow: 0 8px 25px rgba(0, 33, 71, 0.05);
  display: flex;
  flex-direction: column;
}

/* ====================================== SEÇÃO HERO E NAVEGAÇÃO ========================================= */
.hero-section {
  position: relative;
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--biavatti-white);
  background: url("https://clinicabiavatti.com.br/wp-content/uploads/2023/10/AdobeStock_561334005-scaled.jpeg")
    no-repeat center center/cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 33, 71, 0.7),
    rgba(5, 156, 238, 0.5)
  );
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-logo {
  height: 160px;
  filter: brightness(0) invert(1);
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0 0 15px;
}
.hero-content p {
  font-size: 1.2rem;
  font-weight: 300;
  max-width: 600px;
  margin: 15px auto 30px;
}
.hero-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  align-items: center;
}
.hero-navigation a {
  padding: 12px 30px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  color: var(--biavatti-white);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-navigation a:hover {
  background-color: rgba(255, 255, 255, 0.3);
}
.hero-navigation a.hero-button-main {
  background-color: var(--biavatti-white);
  color: var(--biavatti-accent-blue);
  font-weight: 600;
}
.hero-navigation a.hero-button-main:hover {
  background-color: var(--biavatti-light-bg);
}

/* =================== ESTILOS PARA OS MENUS SUSPENSOS (DROPDOWNS) =================== */
.hero-dropdown {
  position: relative;
  display: inline-block;
}
.hero-dropdown-trigger {
  padding: 12px 30px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  color: var(--biavatti-white);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}
.hero-dropdown-trigger:hover {
  background-color: rgba(255, 255, 255, 0.3);
}
.dropdown-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease-in-out;
  position: absolute;
  z-index: 100;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--biavatti-white);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 10px;
  min-width: 240px;
  text-align: left;
}
.hero-dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-content a {
  display: block;
  padding: 12px;
  background-color: var(--biavatti-light-blue);
  color: var(--biavatti-dark-blue);
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 5px;
}
.dropdown-content a:last-child {
  margin-bottom: 0;
}
.dropdown-content a:hover {
  background-color: #d0ddee;
  color: var(--biavatti-accent-blue);
}

/* ============================ LAYOUT PRINCIPAL =========================== */
.main-container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.top-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: stretch;
}
.communication-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
}

/* =============================== COMPONENTES =============================== */
#birthdays-section {
  height: 450px;
}
#birthdays-container .birthday-image-wrapper,
#birthdays-container .birthday-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#news-container {
  max-height: 800px;
  overflow-y: auto;
  padding-right: 10px;
}
#news-container article:not(:last-child) {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid #e0eaf3;
}
.birthday-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}
.birthday-image-wrapper img {
  display: block;
  width: 100%;
  border-radius: 12px;
  transition: transform 0.4s ease-out;
}
.birthday-image-wrapper:hover img {
  transform: scale(1.1);
}
.birthday-image-wrapper::before,
.birthday-image-wrapper::after {
  position: absolute;
  top: -50px;
  font-size: 2rem;
  opacity: 0;
  transform: rotate(20deg);
}
.birthday-image-wrapper::before {
  content: "🎉";
  left: 10%;
  transition: all 0.5s ease-out 0.1s;
  transform: rotate(-20deg);
}
.birthday-image-wrapper::after {
  content: "🎊";
  right: 10%;
  transition: all 0.5s ease-out 0.2s;
}
.birthday-image-wrapper:hover::before,
.birthday-image-wrapper:hover::after {
  opacity: 1;
  top: 10px;
}

/* =============================== MURAL DE NOTÍCIAS =============================== */
.news-item {
  display: flow-root;
}
.news-layout-image-left .news-image {
  float: left;
  margin-right: 20px;
  margin-bottom: 10px;
}
.news-layout-image-right .news-image {
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
}
.news-layout-image-center-top,
.news-layout-image-full,
.news-layout-image-full-bottom {
  display: flex;
  flex-direction: column;
}
.news-layout-image-center-top {
  align-items: center;
}
.news-layout-image-center-top .news-image {
  width: 70%;
  max-width: 500px;
  margin-bottom: 15px;
}
.news-layout-image-center-top h4,
.news-layout-image-center-top p {
  width: 100%;
}
.news-layout-image-full .news-image {
  margin-bottom: 15px;
}
.news-layout-image-full-bottom .news-image {
  margin-top: 15px;
}
.news-layout-image-full .news-image,
.news-layout-image-full-bottom .news-image {
  width: 100%;
}
.news-item .news-image {
  display: block;
  border-radius: 8px;
  object-fit: cover;
  max-width: 100%;
}
.news-item h4,
.news-item p {
  margin-top: 0;
}

/* ====================================== CARROSSÉIS ====================================== */
.carousel-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background-color: #ffffff;
  margin-top: auto;
}
.carousel-container,
.carousel-track,
.carousel-item {
  height: 100%;
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.carousel-item {
  min-width: 100%;
  position: relative;
}
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.carousel-indicators button {
  width: 25px;
  height: 4px;
  background-color: #0084ff;
  border: none;
  border-radius: 2px;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.carousel-indicators button.active {
  background-color: #005f87;
}
.carousel-wrapper .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--biavatti-dark-blue);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}
.carousel-wrapper .carousel-btn:hover {
  background-color: var(--biavatti-white);
  transform: translateY(-50%) scale(1.1);
}
.carousel-wrapper .prev-btn,
.carousel-wrapper .prev-video-btn,
.carousel-wrapper .prev-ranking-btn {
  left: 20px;
}
.carousel-wrapper .next-btn,
.carousel-wrapper .next-video-btn,
.carousel-wrapper .next-ranking-btn {
  right: 20px;
}
#image-carousel-section .carousel-item {
  background-size: cover;
  background-position: center;
}
#image-carousel-section .carousel-caption {
  position: absolute;
  inset: 0;
  color: white;
  text-align: left;
  padding: 25px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
#image-carousel-section .carousel-caption h3 {
  font-size: 1.5rem;
  font-weight: 600;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
  margin: 0 0 5px;
  border: none;
  padding: 0;
  color: white;
}
#image-carousel-section .carousel-caption p {
  font-size: 1rem;
  font-weight: 300;
  margin: 0;
}
#video-carousel-section iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.video-title-container {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--biavatti-dark-blue);
  margin-top: 15px;
}
.video-item .video-preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-item .video-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.video-item .video-preview-container:hover .video-preview-img {
  transform: scale(1.05);
  filter: brightness(0.8);
}
.video-item .play-button-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.3s ease;
}
.video-item .video-preview-container:hover .play-button-overlay {
  transform: translate(-50%, -50%) scale(1.1);
}

/* ====================================== SEÇÃO DE RANKINGS (CARROSSEL DE PÓDIO) ====================================== */
#rankings-section .carousel-wrapper {
  background-color: transparent;
  box-shadow: none;
  padding: 20px 0;
}
#rankings-section h2.ranking-title-display {
  text-align: center;
  font-size: 1.8rem;
  color: var(--biavatti-dark-blue);
  margin-bottom: 0;
  border-bottom: none;
  transition: all 0.3s ease;
}
.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  min-height: 350px;
  padding: 0 20px;
}
.podium-card {
  background: linear-gradient(145deg, #f7f7f7, #e0e0e0); /* Padrão Prata */
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 33, 71, 0.1);
  text-align: center;
  flex-basis: 250px;
  flex-grow: 1;
  max-width: 280px;
  transition: all 0.3s ease;
  border: none;
}
.podium-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 35px rgba(0, 33, 71, 0.15);
}
.podium-position {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
  position: relative;
}
.podium-card.position-1 .podium-position::after {
  content: "\f521";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
}
.podium-image {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 15px auto;
  overflow: hidden;
  border: 3px solid #eee;
}
.podium-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.placeholder-icon {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f0f4f8;
  color: #bdc3c7;
  font-size: 40px;
}
.podium-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--biavatti-dark-blue);
  margin: 0 0 5px 0;
}
.podium-score {
  font-size: 1rem;
  color: #777;
  margin: 0;
}
.podium-card.position-1 {
  order: 2;
  transform: translateY(-20px);
  background: linear-gradient(145deg, #ffde59, #ffc800);
  color: white;
}
.podium-card.position-1 .podium-position {
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}
.podium-card.position-1 .podium-name {
  color: white;
}
.podium-card.position-1 .podium-score {
  color: rgba(255, 255, 255, 0.8);
}
.podium-card.position-1:hover {
  transform: translateY(-30px);
}
.podium-card.position-2 {
  order: 1;
}
.podium-card.position-2 .podium-position {
  color: #a0a0a0;
}
.podium-card.position-3 {
  order: 3;
  background: linear-gradient(145deg, #f0c9a6, #e6bf98);
}
.podium-card.position-3 .podium-position {
  color: #b97237;
}

@media (max-width: 850px) {
  .podium {
    flex-direction: column;
    align-items: center;
    min-height: auto;
    gap: 25px;
  }
  .podium-card {
    max-width: 320px;
  }
  .podium-card.position-1,
  .podium-card.position-2,
  .podium-card.position-3 {
    order: initial;
    transform: none;
  }
  .podium-card:hover {
    transform: translateY(-5px) !important;
  }
}
@media (max-width: 768px) {
  .top-section-grid,
  .communication-section-grid {
    grid-template-columns: 1fr;
  }
  .news-layout-image-left .news-image,
  .news-layout-image-right .news-image {
    float: none;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 15px 0;
  }
}

/* ============================================= RODAPÉ (DESIGN FINAL) ========================================*/
footer {
  position: relative;
  background: linear-gradient(
    to right,
    var(--biavatti-dark-blue),
    var(--biavatti-accent-blue)
  );
  color: var(--biavatti-white);
  text-align: center;
  padding: 20px;
}
.social-icons {
  margin-bottom: 15px;
}
.social-icons img {
  width: 28px;
  margin: 0 10px;
  transition: transform 0.3s ease;
}
.social-icons img:hover {
  transform: scale(1.1);
  filter: none;
}
.admin-link-container {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.admin-link-container a {
  display: block;
  padding: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.admin-link-container a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
.admin-link-container svg {
  color: #fff;
  width: 20px;
  height: 20px;
  display: block;
}
@media (max-width: 850px) {
  .podium {
    flex-direction: column;
    align-items: center;
    min-height: auto;
    gap: 25px;
  }
  .podium-card {
    max-width: 320px;
  }
  .podium-card.position-1,
  .podium-card.position-2,
  .podium-card.position-3 {
    order: initial;
    transform: none;
  }
  .podium-card:hover {
    transform: translateY(-5px) !important;
  }
}
@media (max-width: 768px) {
  .top-section-grid,
  .communication-section-grid {
    grid-template-columns: 1fr;
  }
  .news-layout-image-left .news-image,
  .news-layout-image-right .news-image {
    float: none;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 15px 0;
  }
}

/* Efeito de hover sutil para os cards principais */
.main-container > .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.main-container > .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 33, 71, 0.08);
}

/* Animação para os cards aparecerem suavemente */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.main-container > .card {
  /* Adiciona a animação a todos os cards */
  animation: fadeIn 0.6s ease-out forwards;
}
