/* Base structure */
.wrapper {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Sidebar styling */
#sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 250px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 999;
  color: #c9d0d6;
  transition: all 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.23);
  background: linear-gradient(
    138.95deg,
    rgba(29, 113, 154, 1) 0%,
    rgba(34, 79, 127, 1) 36.09%,
    rgba(39, 47, 102, 1) 77.1%,
    rgba(41, 35, 92, 1) 99.75%
  );
}

#slidebar_topics a {
  color: #c9d0d6;
  display: block;
  margin: 10px;
  font-family: "Raleway", sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

#slidebar_topics a:hover {
  text-decoration: none;
  color: #ffffff;
  transform: translateX(5px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #d6dee1;
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a8bbbf;
}

/* Content area */
#content {
  width: calc(100% - 250px);
  transition: all 0.3s ease;
  position: absolute;
  top: 0;
  right: 0;
  padding: 0;
  height: 100vh;
  overflow-x: hidden;
}



/* Logo */
#logo {
  width: 120px;
  max-width: 80%;
  margin: 40px auto 30px;
}

.sidebar-header {
  text-align: center;
}

/* Sidebar sections */
#slidebar_topics {
  text-align: center;
  display: block;
}

#slidebar_topics hr {
  width: 35px;
  margin: 10px auto;
  border-top: 2px solid #fff;
}

#slidebar_social_icons img {
  width: 20px;
  margin: 5px;
  transition: all 0.2s ease;
}

#slidebar_social_icons img:hover {
  transform: scale(1.2);
}

#slidebar_social_icons {
  text-align: center;
  display: block;
  margin: 20px 0;
}

#slidebar_extrainfo {
  color: #c9d0d6;
  margin: 0 10px 20px;
  text-align: center;
  font-family: "Raleway", sans-serif;
}

#slidebar_extrainfo :nth-child(1) {
  margin: 0;
  font-weight: bold;
  font-size: 16px;
}

#slidebar_extrainfo :nth-child(2) {
  margin: 0;
  font-weight: normal;
  font-size: 14px;
}

#slidebar_extrainfo :nth-child(3) {
  margin: 0;
  font-weight: lighter;
  font-size: 12px;
}

/* Toggle button */
.toogle_button {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 15px;
  left: 15px;
}

.nav-toggle span,
.nav-toggle span:before,
.nav-toggle span:after {
  content: "";
  position: absolute;
  display: block;
  width: 30px;
  height: 3px;
  border-radius: 1px;
  background: #fff;
  cursor: pointer;
  transition: all 300ms ease-in-out;
}

.nav-toggle span:before {
  top: -8px;
}

.nav-toggle span:after {
  bottom: -8px;
}

.nav-toggle.active span {
  background-color: transparent;
}

.nav-toggle.active span:before,
.nav-toggle.active span:after {
  background: #fff;
  top: 0;
}

.nav-toggle.active span:before {
  transform: rotate(45deg);
}

.nav-toggle.active span:after {
  transform: translateY(-10px) rotate(-45deg);
  top: 10px;
}

/* Congress info styling */
#info_congreso {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#info_congreso p {
  color: black;
  text-align: right;
  margin-bottom: 15px;
  width: 100%;
}

#info_congreso p:first-child {
  font-family: 'Raleway', sans-serif;
  font-size: 4rem;
  line-height: 1em;
  margin-bottom: 10px;
  font-weight: 700;
}

#info_congreso p:nth-child(2) {
  font-family: 'Raleway', sans-serif;
  font-size: 3em;
  line-height: 1.2em;
  margin-bottom: 20px;
  font-weight: 500;
}

#info_congreso_p {
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 30px !important;
}

#info_congreso > p {
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.5em;
  margin-bottom: 15px;
  padding-left: 8%
}

/* Loading spinner */
.spinner-wrapper {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.spinner::before,
.spinner:after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.spinner:before {
  width: 100%;
  height: 100%;
  background-image: linear-gradient(90deg, #29235C 0%, #1D719A 100%);
  animation: spin 0.8s infinite linear;
}

.spinner:after {
  width: 85%;
  height: 85%;
  background-color: #ffffff;
  background-image: url("../img/favicon.ico");
  background-size: 50% 50%;
  background-position: center;
  background-repeat: no-repeat;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Animation */
.intermitente {
  box-shadow: 0px 0px 20px;
  animation: resplandorAnimation 2s infinite;
}

@keyframes resplandorAnimation {
  0%, 100% {
    box-shadow: 0px 0px 20px;
  }
  50% {
    box-shadow: 0px 0px 0px;
  }
}

/* Responsive styles */
@media screen and (max-width: 1180px) {
  #sidebar {
    margin-left: -250px;
    width: 250px !important;
  }

  #sidebar.active {
    margin-left: 0;
  }

  #content {
    width: 100% !important;
  }

  .toogle_button {
    display: block;
  }
}

@media screen and (max-width: 992px) {
  #info_congreso p:first-child {
    font-size: 3.5rem;
  }

  #info_congreso p:nth-child(2) {
    font-size: 1.8rem;
  }
}

@media screen and (max-width: 768px) {
  #info_congreso {
    align-items: center;
    padding: 0 15px;
  }
  
  #info_congreso p {
    text-align: center;
    padding-left: 0 !important;
  }
  
  #info_congreso p:first-child {
    font-size: 3rem;
  }
  
  #info_congreso p:nth-child(2) {
    font-size: 1.5rem;
  }
  
  #info_congreso_p {
    font-size: 1.1rem;
    margin: 10px 0 20px 0 !important;
  }
  
  #info_congreso > p {
    text-align: center;
    font-size: 1rem;
  }
}

@media screen and (max-width: 576px) {
  #info_congreso p:first-child {
    font-size: 2.5rem;
  }
  
  #info_congreso p:nth-child(2) {
    font-size: 1.2rem;
  }
  
  #info_congreso_p {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  #info_congreso p:first-child {
    font-size: 2rem;
  }
  
  #info_congreso p:nth-child(2) {
    font-size: 1rem;
    line-height: 1.3;
  }
  
  #info_congreso_p {
    font-size: 0.9rem;
  }
  
  #info_congreso > p {
    font-size: 0.85rem;
  }
  
  .toogle_button {
    top: 10px;
    left: 10px;
  }
  
  .nav-toggle span,
  .nav-toggle span:before,
  .nav-toggle span:after {
    width: 25px;
    height: 2px;
  }
  
  .spinner {
    width: 60px;
    height: 60px;
  }
}

/* Ensure sidebar is visible on large screens */
@media screen and (min-width: 1181px) {
  #sidebar {
    margin-left: 0 !important;
    width: 250px !important;
  }
  
  #content {
    width: calc(100% - 250px) !important;
  }
}

/* Fix for very small screens */
@media screen and (max-width: 320px) {
  #info_congreso p:first-child {
    font-size: 1.8rem;
  }
  
  #info_congreso p:nth-child(2) {
    font-size: 0.9rem;
  }
  
  #info_congreso > p {
    font-size: 0.8rem;
  }
}

/* Fix for short height screens */
@media screen and (max-height: 600px) {
  #info_congreso {
    padding-top: 60px;
  }
  
  #slidebar_extrainfo,
  #slidebar_social_icons {
    margin: 10px 0;
  }
  
  #logo {
    margin: 20px auto 15px;
  }
}