/* GENERAL */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  overflow-x: hidden; /* Prevenir desplazamiento horizontal */
  width: 100%;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevenir desplazamiento horizontal */
  width: 100%;
}

p {
  color: rgb(85, 85, 85);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

.visible {
  opacity: 1;  /* Para la animación final de opacidad */
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
  position: relative; /* Asegura que el nav no se vea afectado por cambios en el contenido */
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: black;
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: rgb(181, 181, 181);
}

.logo {
  font-size: 2rem;
  white-space: nowrap;  /* Evita que el texto salte a la siguiente línea */
  display: inline-block;
  min-width: 180px; /* Ajusta este valor según el tamaño del texto completo */
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: black;
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: black;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:first-child {
  opacity: 1;
}

.hamburger-icon span:first-child {
  transform: none;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh; /* Restaurado a 96vh como estaba originalmente */
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}

.btn-color-1,
.btn-color-2 {
  border: rgb(53, 53, 53) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: rgb(53, 53, 53);
  color: white;
}

.btn-color-1:hover {
  background: rgb(0, 0, 0);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}



.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: white;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  text-align: center;
}

.section-container {
  gap: 4rem;
  height: 80%;
}

.section__pic-container {
  height: 400px;
  width: 400px;
  margin: auto 0;
  border-radius: 50%;
  overflow: hidden;
}

.text-container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* EXPERIENCE SECTION */

#experience {
  position: relative;
}

.experience-sub-title {
  color: rgb(85, 85, 85);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  width: 100%;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  width: 10rem;
  justify-content: space-around;
  gap: 0.5rem;
}

article .icon {
  cursor: default;
}

/* PROJECTS SECTION */

#projects {
  position: relative;
}

/* Nuevas clases específicas para proyectos */
.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  width: 100%;
}

.project-card {
  width: calc(25% - 15px);
  box-sizing: border-box;
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 2rem;
}

.project-card-solo {
  width: 25%;
  margin: 0 auto;
  box-sizing: border-box;
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 2rem;
}

/* Mantener compatibilidad con clases existentes */
.color-container {
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 2rem;
}

.project-img {
  border-radius: 2rem;
  width: 90%;
  height: auto;
  margin-bottom: 1rem;
  max-width: 100%;
}

.project-title {
  margin: 1rem 0;
  color: black;
  font-size: 1.75rem;
  font-weight: 600;
}

.color-container p {
  font-size: 1rem;
  line-height: 1.5;
  color: rgb(85, 85, 85);
  margin-bottom: 1.5rem;
}

.project-btn {
  color: black;
  border-color: rgb(163, 163, 163);
}

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  background: (250, 250, 250);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER SECTION */

footer {
  height: 26vh;
  margin: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

footer p {
  text-align: center;
}


/* boton dark y light */

.toggle-switch {
  position: relative;
  width: 60px; /* Reduced width */
  height: 30px; /* Reduced height */
  --light: #d8dbe0;
  --dark: #28292c;
  --link: rgb(27, 129, 112);
  --link-hover: rgb(24, 94, 82);
  margin: 20px auto; /* Center the button and add margin to lower it */
}

.switch-label {
  position: absolute;
  width: 100%;
  height: 100%; /* Adjusted to match the new height */
  background-color: var(--dark);
  border-radius: 15px; /* Adjusted to match the new height */
  cursor: pointer;
  border: 3px solid var(--dark);
}

.checkbox {
  position: absolute;
  display: none;
}

.slider {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px; /* Adjusted to match the new height */
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.checkbox:checked ~ .slider {
  background-color: var(--light);
}

.slider::before {
  content: "";
  position: absolute;
  top: 3px; /* Ajustado para centrar verticalmente la luna */
  left: 5px; /* Adjusted to match the new height */
  width: 20px; /* Reduced width */
  height: 20px; /* Reduced height */
  border-radius: 50%;
  -webkit-box-shadow: inset 12px -4px 0px 0px var(--light);
  box-shadow: inset 12px -4px 0px 0px var(--light);
  background-color: var(--dark);
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.checkbox:checked ~ .slider::before {
  -webkit-transform: translateX(30px); /* Adjusted to match the new width */
  -ms-transform: translateX(30px); /* Adjusted to match the new width */
  transform: translateX(30px); /* Adjusted to match the new width */
  background-color: var(--dark);
  -webkit-box-shadow: none;
  box-shadow: none;
}


/* Dark mode styles */
body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

body.dark-mode a {
  color: #bb86fc;
}

body.dark-mode .nav-links a:hover {
  color: #bb86fc;
}

body.dark-mode .btn {
  background-color: #bb86fc;
  color: #121212;
}

body.dark-mode .btn:hover {
  background-color: #3700b3;
  color: #ffffff;
}

/* Ensure all text elements are visible in dark mode */
body.dark-mode p,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode span,
body.dark-mode div,
body.dark-mode li {
  color: #ffffff;
}

/* Keep specific container text black in dark mode */
body.dark-mode .details-container.color-container p,
body.dark-mode .experience-sub-title.project-title,
body.dark-mode .experience-sub-title.project-title h2,
body.dark-mode .experience-sub-title,
body.dark-mode .article-container article h3,
body.dark-mode .article-container article p,
body.dark-mode .details-container h3,
body.dark-mode .details-container p,
body.dark-mode .details-container .icon,
body.dark-mode .project-card p,
body.dark-mode .project-card h2,
body.dark-mode .project-card h3,
body.dark-mode .project-card-solo p,
body.dark-mode .project-card-solo h2,
body.dark-mode .project-card-solo h3 {
  color: #000000 !important;
  fill: #000000 !important;
}

/* Ensure specific logos remain white in dark mode */
body.dark-mode .contact-icon.email-icon,
body.dark-mode .contact-icon,
body.dark-mode .arrow,
body.dark-mode .icon[alt="My LinkedIn profile"],
body.dark-mode .icon[alt="My Github profile"] {
  filter: invert(1) !important;
}

/* Dark mode styles for hamburger menu */
body.dark-mode .hamburger-icon span {
  background-color: white;
}

/* Contenedor principal para evitar desbordamiento horizontal */
.container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Estilos para el carrusel de imágenes */
.image-carousel {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
}

.carousel-container {
  position: relative;
  width: 90%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 2rem;
}

.carousel-images {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-images img, 
.carousel-images video {
  width: 100%;
  height: auto;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.carousel-arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ccc;
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.carousel-dot.active {
  background-color: #333;
}

/* Estilos para dark mode en el carrusel */
body.dark-mode .carousel-arrow {
  background-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

body.dark-mode .carousel-arrow:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .carousel-dot {
  background-color: #555;
}

body.dark-mode .carousel-dot.active {
  background-color: #fff;
}

/* Media query for responsive design */
@media (max-width: 768px) {
  #desktop-nav {
    display: none;
  }

  #hamburger-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
  }
  
  .project-card, .project-card-solo {
    width: 100%;
  }
  
  section {
    margin: 0 1rem;
  }
  
  .arrow {
    right: 1rem;
  }
  
  .carousel-arrow {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .project-card {
    width: calc(50% - 10px);
  }
  
  .project-card-solo {
    width: 50%;
  }
  
  section {
    margin: 0 5rem;
  }
}



/* Estilos para botones deshabilitados */
.btn-disabled {
  opacity: 0.7;
  cursor: not-allowed !important;
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0 !important;
  color: #888 !important;
  border-color: #ccc !important;
}

.btn-disabled:hover {
  background-color: #f0f0f0 !important;
  color: #888 !important;
  border-color: #ccc !important;
  transform: none !important;
}

/* Animación de construcción */
.btn-disabled::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: construction-shine 2s infinite;
}

.btn-disabled::after {
  content: "🚧";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

@keyframes construction-shine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* Tooltip para botones deshabilitados */
.tooltip {
  position: relative;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 160px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -80px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  pointer-events: none;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Estilos para dark mode en botones deshabilitados */
body.dark-mode .btn-disabled {
  background-color: #333 !important;
  color: #aaa !important;
  border-color: #555 !important;
}

body.dark-mode .btn-disabled::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

body.dark-mode .tooltip .tooltip-text {
  background-color: #222;
  color: #ddd;
}

body.dark-mode .tooltip .tooltip-text::after {
  border-color: #222 transparent transparent transparent;
}



/* Estilos para el efecto de zoom/lupa */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
}

/* Contenedor para la imagen con zoom */
.zoomable-image {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

/* Estilo para la lupa */
.magnifier {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 0 10px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none !important;
  background-repeat: no-repeat;
  transition: opacity 0.2s;
}

/* Estilo para la lupa en modo oscuro */
body.dark-mode .magnifier {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5), 0 0 10px 5px rgba(255, 255, 255, 0.2);
}

/* Clase para imágenes que pueden tener zoom */
.carousel-images img:not(video) {
  transition: transform 0.3s ease;
}

/* Añadir un borde sutil cuando se pasa el cursor */
.carousel-images img:hover:not(video) {
  outline: 2px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .carousel-images img:hover:not(video) {
  outline: 2px solid rgba(255, 255, 255, 0.1);
}

/* Cursor personalizado para imágenes */
.carousel-images img {
  transition: transform 0.1s ease-out;
  cursor: crosshair;
}

/* Añadir al final de tu archivo CSS */

/* Estilos para el efecto de zoom/lupa */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
}

/* Contenedor para la imagen con zoom */
.zoomable-image {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

/* Estilo para la lupa */
.magnifier {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 0 10px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none !important;
  background-repeat: no-repeat;
  transition: opacity 0.2s;
}

/* Estilo para la lupa en modo oscuro */
body.dark-mode .magnifier {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5), 0 0 10px 5px rgba(255, 255, 255, 0.2);
}

/* Clase para imágenes que pueden tener zoom */
.carousel-images img:not(video) {
  transition: transform 0.3s ease;
}

/* Añadir un borde sutil cuando se pasa el cursor */
.carousel-images img:hover:not(video) {
  outline: 2px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .carousel-images img:hover:not(video) {
  outline: 2px solid rgba(255, 255, 255, 0.1);
}

/* Cursor personalizado para imágenes */
.carousel-images img {
  transition: transform 0.1s ease-out;
  cursor: crosshair;
}

/* Corregir el color de las flechas del carrusel en modo oscuro */
body.dark-mode .carousel-arrow {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
}

body.dark-mode .carousel-arrow:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

/* Corregir el color del texto de LinkedIn en modo oscuro */
body.dark-mode .contact-info-container a {
  color: #ffffff;
}

