@font-face {
  font-family: 'Outfit';
  src: url('./font/Outfit-Regular.ttf') format('truetype'),
}

body,
html {
  margin: 0;
  padding: 0;

  font-family: "Outfit", sans-serif;
  background-color: rgb(242, 242, 242);
  box-sizing: border-box;
  overflow-x: clip;
}

#container {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
}


.screen {
  min-height: 50rem;
}


#persons-container {
  display: flex;
  margin-left: 12%;
  width: calc(100% - 12% - 12%);
  flex-wrap: wrap;
  gap: 1.5rem 1.5%;
}

.btn-volver-grid {
  width: calc((100% - 9%) / 7);
  height: 14rem;
  min-height: 14rem;
  margin: 0 !important;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  background-color: #f5f5f5;
}

.btn-volver-grid[style*="display: flex"] {
  display: flex !important;
}

.tema-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 12%;
  margin-bottom: 2rem;
  gap: 1rem;
}

.tema-breadcrumb {
  font-size: 1.5rem;
  color: #444444;
  font-weight: bold;
}

.tema-path {
  color: #444444;
}

.btn-volver-simple {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: grey;
  font-size: 20px;
  font-family: "Outfit", sans-serif;
  padding: 0;
  margin-left: 12%;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.btn-volver-simple:hover {
  color: black;
}

.btn-volver-simple svg {
  color: inherit;
}


.hidden {
  display: none;
}

.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}



b {
  font-size: 1.1rem;
}

@media (max-width: 1800px) {
  section .button-container {
    width: calc((100% - 7.5%) / 6);
    height: 14rem;
  }
  .btn-volver-grid {
    width: calc((100% - 7.5%) / 6);
    height: 14rem;
  }
}
@media (max-width:1600px){
  section .button-container {
    width: calc((100% - 7.5%) / 6);
    height: 12rem;
  }
  .btn-volver-grid {
    width: calc((100% - 7.5%) / 6);
    height: 12rem;
    min-height: 12rem;
  }
}
@media (max-width:1400px){
  section .button-container {
    width: calc((100% - 7.5%) / 6);
    height: 12rem;
  }
  .btn-volver-grid {
    width: calc((100% - 7.5%) / 6);
    height: 12rem;
    min-height: 12rem;
  }
}
@media (max-width:1200px){
  section .button-container {
    width: calc((100% - 6%) / 5);
    height: 12rem;
  }
  .btn-volver-grid {
    width: calc((100% - 6%) / 5);
    height: 12rem;
    min-height: 12rem;
  }
}
@media (max-width:1000px){
  section .button-container {
    width: calc((100% - 4.5%) / 4);
    height: 12rem;
  }
  .btn-volver-grid {
    width: calc((100% - 4.5%) / 4);
    height: 12rem;
    min-height: 12rem;
  }
}
@media (max-width:800px){
  section .button-container {
    width: calc((100% - 3%) / 3);
    height: 18vw;
  }
  .btn-volver-grid {
    width: calc((100% - 3%) / 3);
    height: 18vw;
    min-height: 18vw;
  }
}
@media (max-width: 1025px) {
  header .navigation-section {
    position: static !important;
    transform: none !important;
    flex: 0 0 100%;
    width: 100% !important;
    padding: 0.75rem 0 1rem !important;
    margin: 0 !important;
    order: 3;
  }

  header .nav-button {
    width: 140px !important;
    font-size: 14px !important;
    padding: 0.45rem 0.9rem !important;
  }

  section .button-container {
    width: calc((100% - 3%) / 3);
    height: 18vw;
  }
  .btn-volver-grid {
    width: calc((100% - 3%) / 3);
    height: 18vw;
    min-height: 18vw;
  }
}

@media (min-width: 391px) and (max-width: 768px) {
  .button-container .button-interior {
    font-size: 0.75rem;
  }

  .button-container:hover .button-interior {
    font-size: 0.85rem;
  }

  section .button-container {
    width: calc((100% - 1.5%) / 2);
    height: 28vw;
  }
  .btn-volver-grid {
    width: calc((100% - 1.5%) / 2);
    height: 28vw;
    min-height: 28vw;
  }

  .temas-navigation {
    margin-left: auto;
    margin-right: auto;
    width: 96%;
    padding: 1.5rem 0;
  }

  .navigation-section {
    width: 96% !important;
    padding: 2rem 0 !important;
    gap: 0.8rem !important;
  }

  .nav-button {
    font-size: 16px !important;
    padding: 0.8rem 2rem !important;
  }

  #temas-container {
    gap: 0.75rem 1.5rem;
  }

  #temas-container a {
    font-size: 15px;
    padding: 0.4rem 0;
  }
  .button-container:hover .button-interior{
    font-size:0.9rem !important;
  }
}
@media (max-width: 600px) {
  section .button-container {
    width: 100%;
    height: 65vw;
  }
  .btn-volver-grid {
    width: 100%;
    height: 65vw;
    min-height: 65vw;
  }

  .navigation-section {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    padding: 2rem 0 !important;
  }

  .nav-button {
    max-width: none !important;
    width: calc(40% - 0.3rem) !important;
    font-size: 11px !important;
    padding: 0.45rem 0.85rem !important;
    flex: 0 0 auto !important;
  }

  header .navigation-section {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    padding: 0.6rem 0 0.9rem !important;
    margin: 0 !important;
  }

  header .nav-button {
    width: 120px !important;
    font-size: 12px !important;
    padding: 0.35rem 0.7rem !important;
  }

  #temas-container {
    gap: 0.5rem 1rem !important;
  }

  #temas-container a {
    font-size: 12px !important;
    padding: 0.3rem 0 !important;
  }
}

@media (max-width: 470px) {
  section .button-container {
    height: 70vw;
  }

  .navigation-section {
    padding: 1.5rem 0 !important;
    gap: 0.5rem !important;
  }

  .nav-button {
    font-size: 8px !important;
    padding: 0.3rem 0.5rem !important;
  }

  header .navigation-section {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    padding: 0.5rem 0 0.8rem !important;
    margin: 0 !important;
  }

  header .nav-button {
    width: 100px !important;
    font-size: 10px !important;
    padding: 0.3rem 0.6rem !important;
  }

  #temas-container {
    gap: 0.4rem 0.8rem !important;
  }

  #temas-container a {
    font-size: 10px !important;
    padding: 0.25rem 0 !important;
  }
}
@media(max-width:390px){
  section .button-container {
    height: 70vw;
  }

  .navigation-section {
    padding: 1rem 0 !important;
    gap: 0.4rem !important;
  }

  .nav-button {
    font-size: 5px !important;
    padding: 0.2rem 0.35rem !important;
  }

  header .navigation-section {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    padding: 0.45rem 0 0.7rem !important;
    margin: 0 !important;
  }

  header .nav-button {
    width: 90px !important;
    font-size: 9px !important;
    padding: 0.25rem 0.5rem !important;
  }

  #temas-container {
    gap: 0.3rem 0.6rem !important;
  }

  #temas-container a {
    font-size: 8px !important;
    padding: 0.2rem 0 !important;
  }
}

.button-interior {
  color: #444444;
  font-weight: bold;
  position: absolute;
  opacity: 1;
  z-index: 5;
  font-size: 0.85rem;
  text-align: center;
  -webkit-animation: appear 0.5s ease-out forwards;
  animation: appear 0.5s ease-out forwards;
  left: 0;
  right: 0;
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 100%;
}

.button-container:hover .button-interior {
  opacity: 1;
  color: white;
  font-size: 0.95rem;
  -webkit-transition: color 0.3s ease-in-out, font-size 0.3s ease-in-out;
  transition: color 0.3s ease-in-out, font-size 0.3s ease-in-out;
}


#persons-container .button-interior {
  white-space: normal;
  word-break: keep-all;
}

.button-container:hover .buton-selector {
  opacity: 1;
  -webkit-transition: opacity 0.3s ease-in-out;
  transition: opacity 0.3s ease-in-out;
}

.button-container {
  padding-bottom: 0;
}

.buton-selector {
  opacity: 0.2;
  position: relative;
  border: none;
  cursor: pointer;
  -webkit-transition: opacity 0.3s ease-in-out;
  transition: opacity 0.3s ease-in-out;
  -webkit-animation: appear 0.5s ease-out forwards;
  animation: appear 0.5s ease-out forwards;
}

.button-container {
  cursor: pointer;
  border: none;
  width: calc((100% - 7.5%) / 6);
  height: 14rem;
}

@-webkit-keyframes appear {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  }
  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes appear {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  }
  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes letra {
  0% {
    font-size: 1.2rem;
  }

  100% {
    font-size: 1.4rem;
  }
}

.main-navigation-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  padding: 7rem 0;
  margin: 0 auto;
  width: 89.2%;
  max-width: 100%;
  min-height: 40vh;
  position: relative;
}

.main-navigation-section .home-hero-title{
  /* Dentro del section no queremos márgenes extra; el espaciado lo controla flex */
  margin: 0;
}

.main-navigation-buttons{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  width: 100%;
}

.home-hero-title{
  text-align: center;
  margin: 1.5rem 0 0.5rem;
  font-size: clamp(2rem, 3vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  font-family: inherit;
  /* En escritorio, igualamos el ancho del título al de los dos botones (14vw + gap). */
  width: auto;
  color: rgb(164 164 164);
}

@media (min-width: 769px) {
  .main-navigation-section .home-hero-title{
    /* Abarcar: botón izq + gap + botón der (incluye padding horizontal de los botones). */
    /* .main-nav-button: width: 14vw; padding-left/right: 3rem + 3rem => +6rem por botón */
    /* total: (14vw + 6rem) * 2 + gap(4rem) => 28vw + 16rem */
    width: min(100%, calc(28vw + 16rem));
  }
}

@media (max-width: 768px) {
  .home-hero-title{
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    margin: 1rem 0 0.5rem;
    width: auto;
  }
}

.main-navigation-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('img/MOSAICO.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
  z-index: 0;
}

.main-navigation-section > * {
  position: relative;
  z-index: 1;
}

.main-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14vw;
  height:2vw;
  padding: 2rem 3rem;
  font-size: 2vw;
  font-family: "Outfit", sans-serif;
  color: #444444;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.main-nav-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}



@media (max-width: 768px) {
  .main-navigation-section {
    flex-direction: column;
    gap: 2rem;
    padding: 4rem 0;
  }

  .main-navigation-buttons{
    flex-direction: column;
    gap: 2rem;
  }
  
  .main-nav-button {
    width: 70%;
    height: 75px;
    font-size: 1rem;
    padding: 1.2rem 2rem;
  }
}

@media (max-width: 470px) {
  .main-nav-button {
    width: 80%;
    height: 60px;
    font-size: 0.9rem;
    padding: 1rem 1.5rem;
  }
}

.navigation-section {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 5rem 0;
  margin: 0 auto;
  width: 89.2%;
  max-width: 100%;
}

header .navigation-section {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  width: auto;
  gap: 1rem;
}

header .nav-button {
  padding: 0.6rem 1.6rem;
  font-size: 16px;
  color: #ffffff;
  width: 160px;
}

.nav-button {
  flex: 0 0 auto;
  width: 160px;
  padding: 1rem 2rem;
  font-size: 18px;
  font-family: "Outfit", sans-serif;
  background-color: transparent;
  color: rgb(63, 63, 63);
  cursor: default;
  transition: color 0.3s ease, transform 0.2s ease;
  border-radius: 4px;
  border: none;
  white-space: nowrap;
}

.btn-orange {
  border-color: #dc9c64;
}

.btn-green {
  border-color: #6eab27;
}

.nav-button-text {
  display: inline-block;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

.nav-button-text:hover {
  transform: translateY(-2px);
}

.btn-orange .nav-button-text:hover {
  color: #dc9c64;
}

.btn-green .nav-button-text:hover {
  color: #6eab27;
}

.nav-button:active {
  transform: translateY(0);
}

.temas-navigation {
  margin-left: auto;
  margin-right: auto;
  width: 89.2%;
  padding: 0 0 2rem 0;
  background-color: rgb(242, 242, 242);
}

.temas-dropdown {
  position: sticky;
  top: 1rem;
  margin: 2rem 0 1.5rem calc(5% + 1%);
  width: calc(90% - 1%);
  box-sizing: border-box;
  z-index: 1000;
}

.temas-dropdown-toggle {
  background-color: #ffffff;
  color: #1d1d1b;
  border: 1px solid #dc9c64;
  border-radius: 6px;
  padding: 0.7rem 1.6rem;
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.temas-dropdown-toggle:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.temas-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 0.8rem 1rem;
  display: none;
  z-index: 1000;
}

.temas-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 16px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  transform: rotate(45deg);
}

.temas-dropdown-menu.is-open {
  display: block;
}

.temas-dropdown-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  justify-content: flex-start;
}

.temas-dropdown-items a {
  font-size: 16px;
  color: grey;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.7;
  -webkit-transition: color 0.3s ease, opacity 0.3s ease;
  transition: color 0.3s ease, opacity 0.3s ease;
  padding: 0.2rem 0;
}

.temas-dropdown-items a:hover {
  opacity: 1;
  cursor: pointer;
}

.temas-dropdown-items a.selected {
  color: #1a1a1a;
  opacity: 1;
  font-weight: 600;
}

#temas-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: center;
}

#temas-container a {
  font-size: 18px;
  color: grey;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.7;
  -webkit-transition: color 0.3s ease, opacity 0.3s ease;
  transition: color 0.3s ease, opacity 0.3s ease;
  padding: 0.5rem 0;
}

#temas-container a:hover {
  opacity: 1;
  cursor: pointer;
}

#temas-container a.selected {
  color: #1a1a1a;
  opacity: 1;
  font-weight: 600;
}

