:root {
  --cor-principal: #121212;
  --cor-secundaria: #121212;
  --cor-hover: #F5E3E0;
  --cor-link: #121212;
  --cor-fundo: #F0C9C4;
  --cor-texto: #121212;
  --cor-fundo-dark: #121212;
  --cor-texto-dark: #efeff0;
}

* {
  box-sizing: border-box;
}

/* ===== Body ===== */
body {
  font-family: 'Ancizar Serif', serif;
  margin: 0;
  background-color: var(--cor-fundo);
  color: var(--cor-texto);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

/* ===== Navegação ===== */
#navigation {
  background-color: #ffff;
  margin-bottom: 0;
  padding: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-top: 5px solid var(--cor-fundo); 
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 100px;
  margin-left: 1rem;
}

#nav-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--cor-secundaria);
  cursor: pointer;
  display: none;
  margin-left: 1.5rem;
}

#dark-mode-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--cor-principal);
  cursor: pointer;
  margin-right: 1rem;
}

#navigation ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

#navigation ul li a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--cor-secundaria);
  font-weight: bold;
  transition: color 0.3s;
}

#navigation ul li a:hover {
  color: var(--cor-hover);
}

/* ===== Responsividade Navegação ===== */
@media (max-width: 768px) {
  #nav-menu {
    flex-direction: column;
    display: none;
    width: 100%;
    align-items: center;
  }

  #nav-menu.show {
    display: flex;
  }
}

@media (max-width: 768px) {
  #nav-toggle {
  display: block;
  }

  #navigation ul {
    flex-direction: column;
    gap: 0;

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
  }

  #navigation ul.show {
    max-height: 300px;
  }

  #navigation ul li {
    margin: 0.5rem 0;
  }

  .profile-section {
    flex-direction: column;
    align-items: center;
  }

  .main h1 {
    font-size: 1.5rem;
  }
}


/* ===== Carrossel Perfil ===== */
.carousel-profile {
  width: 100%;
  margin: auto;
  overflow: hidden;
  position: relative;
}

.carousel-pro {
  position: relative;
  width: 100%;
}

.carousel-pro .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.carousel-pro .slide img {
  width: 100%;      /* sempre ocupa toda a largura */
  height: auto;     /* altura proporcional */
  max-height: 450px; /* limite opcional, ajuste como quiser */
  object-fit: cover; /* cobre toda a largura sem distorcer */
  display: block;
  border-radius: 8px;
}

.carousel-pro .slide.active {
  opacity: 1;
  z-index: 1;
  position: relative;
}

/* ===== Legenda ===== */
.carousel-pro .caption {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 1.8rem;
  font-weight: bold;
  color: #121212;
  text-align: center;
  max-width: 80%;
  border-top: 5px solid var(--cor-fundo); /* cor e espessura do contorno */
}

/* Telas médias (tablets) */
@media (max-width: 992px) {
  .carousel-pro .caption {
    font-size: 1.2rem;
    padding: 8px 14px;
  }
}

/* Telas pequenas (celulares) */
@media (max-width: 768px) {
  .carousel-pro .caption {
    font-size: 1rem;
    padding: 6px 10px;
    max-width: 60%; /* mais espaço em telas pequenas */
  }
}

/* ===== Main / Perfil ===== */
.main {
  max-width: 960px;
  margin: 2rem auto 4rem auto;
  padding: 0 1rem;
}

.main h1 {
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--cor-texto);
  text-align: center;
  margin-bottom: 1rem;
}

.main h2 {
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--cor-texto);
  text-align: center;
  margin-bottom: 1rem;
}

.profile-text h2 {
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--cor-principal);
  text-align: left;
  margin-bottom: 1rem;
}

.profile-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
  animation: fadeIn 0.8s ease-in-out;
}

.profile-image img {
  width: 100%;
  max-width: 28rem;
  border-radius: 10rem;
  margin-top: 7rem;
}

.profile-text {
  flex: 1;
}

.profile-text p {
  margin-bottom: 1rem;
  text-align: justify;
  text-indent: 1.5rem;
  font-size: 1.02rem;
}

.especialista {
  margin-bottom: 0rem;
}

.especialista h3 {
  font-size: 1.15rem;
  margin-bottom: 0rem;
}

.especialista .crm {
  font-size: 0.9rem;
  font-weight: normal;
  margin-left: 8px;
  color: #2a2a2a;
}

.especialidades strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 3rem;
}

.especialidades ul {
  list-style-type: disc;
  margin: 0rem 0rem 2.5rem 0rem;
}



/* ===== Rodapé ===== */
#rodape {
  background-color: #ffff;
  padding: 1rem;
  text-align: center;
  color: var(--cor-secundaria);
  font-size: 0.9rem;
}

#rodape a {
  color: #FF90BB;
  text-decoration: none;
  font-weight: bold;
}

#rodape a:hover {
  text-decoration: underline;
}

/* ===== Lista Quadrado ===== */
ul.lista-quadrado {
  list-style: none;
  padding-left: 0;
  margin: 0;
  text-align: justify;
}

ul.lista-quadrado li {
  position: relative;
  padding-left: 28px;
  margin: 1.75rem 0;
  line-height: 1.5;
  color: var(--cor-texto);
}

ul.lista-quadrado li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0.2em;
  color: var(--cor-principal);
  font-size: 0.8em;
  line-height: 1;
}

/* ===== Items (Cards) ===== */
.items {
  display: flex;
  gap: 3rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.item {
  background: var(--cor-fundo);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  padding-bottom: 1rem;
  align-items: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
  flex: 0 0 auto;
  scroll-snap-align: start;
  text-align: center;
}

.item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.item img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  margin: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.item h3 {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: var(--cor-principal);
}

/* ===== Overlay e Popup ===== */
.overlay,
.popup {
  display: none;
}

.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 900;
  overflow-y: auto;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  width: 95%;
  max-width: 600px;
  max-height: 90vh;
  background: #A2AF9B;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
}

.popup-content h3 {
  margin-top: 0;
  color: var(--cor-principal);
  text-align: center;
}

.popup-content ul {
  text-align: left;
  color: var(--cor-texto);
  padding-left: 1.25rem;
  margin-top: 1rem;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.8rem;
  color: var(--cor-principal);
  cursor: pointer;
}

/* ===== Pesquisar / Artigos ===== */
#search-articles {
  display: block;
  width: 90%;
  max-width: 400px;
  margin: 1rem auto 2rem auto;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--cor-principal);
  border-radius: 8px;
}

.year-toggle {
  font-size: 1.25rem;
  color: var(--cor-link);
  margin: 1rem 0 0.25rem 0;
  border-left: 4px solid var(--cor-link);
  padding-left: 0.5rem;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s;
}

.year-toggle:hover {
  color: var(--cor-hover);
}

.year-toggle .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.year-toggle.open .arrow {
  transform: rotate(180deg);
}

.article-list {
  color: var(--cor-link);
  margin: 0 0 1rem 0;
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.article-list li {
  margin: 0.5rem 0;
}

.article-list li a {
  text-decoration: none;
  color: var(--cor-principal);
  transition: color 0.3s;
}

.article-list li a:hover {
  color: var(--cor-hover);
  text-decoration: underline;
}

/* ===== Carrossel Geral ===== */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.carousel-item {
  flex: 0 0 100%; /* 1 item por vez */
  box-sizing: border-box;
  padding: 0; /* remove padding extra */
}

.carousel-item img {
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
}


.carousel-item img:hover {
  transform: scale(1.05);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--cor-principal);
  color: var(--cor-hover);
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
}

.carousel-btn.left {
  left: 0;
}

.carousel-btn.right {
  right: 0;
}

/* Em telas grandes: 2 itens lado a lado */
@media (min-width: 992px) {
  .carousel-item {
    flex: 0 0 50%; /* largura exata de metade da tela */
    padding-right: 10px; /* espaço entre os itens */
  }

  .carousel-item:last-child {
    padding-right: 0; /* remove o padding do último item */
  }
}

/* ===== Modal ===== */
#modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#modal img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

#modal:target {
  display: flex;
}

/* ===== Telefones clicáveis ===== */
a[href^="tel:"] {
  color: inherit;             /* herda a cor do texto */
  text-decoration: none; /* mantém só o grifado */
}

/* ===== Redes sociais ===== */
.social-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-block;
  background-color: #ffff;
  color: var(--cor-secundaria);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.social-links a:hover {
  background-color: var(--cor-hover);
}

/* ===== Mapa ===== */
.map-container {
  margin-top: 2rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.map-container iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

/* ===== Animações ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============ DARK MODE ============ */
body.dark {
  background-color: var(--cor-fundo-dark);
  color: var(--cor-texto-dark);
}

body.dark #navigation {
  background-color: var(--cor-fundo-dark);
}

body.dark #nav-toggle{
  color: var(--cor-texto-dark);
}

body.dark #navigation ul li a {
  color: var(--cor-texto-dark);
}

body.dark  .main h1 {
  color: var(--cor-texto-dark);
}

body.dark .especialista .crm{
  color: var(--cor-texto-dark);
}

body.dark .especialidades ul ul{
  color: var(--cor-texto-dark);
}

body.dark #rodape {
  background-color: var(--cor-fundo-dark);
}

body.dark ul.lista-quadrado li {
  color: var(--cor-texto-dark);
}

body.dark ul.lista-quadrado li::before {
  color: var(--cor-secundaria);
}

body.dark .main h2 {
  color: var(--cor-texto-dark);
}

body.dark .item {
  background: #2a2a2a;
}

body.dark .item h3 {
  color: var(--cor-texto-dark);
}

body.dark .popup {
  background: var(--cor-fundo-dark);
}

body.dark .popup-content h3 {
  color: var(--cor-texto-dark);
}

body.dark .popup-content ul {
  color: var(--cor-texto-dark);
}

body.dark .close-btn {
  color: var(--cor-texto-dark);
}

body.dark #rodape {
  color: var(--cor-texto-dark)
}
