@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
}

html {
  font-size: 62.5%;
}
#canvas-particulas {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    pointer-events: none; 
}
body {
  cursor: none;
  width: 100%;
  overflow-x: hidden;
  background-color: #F4F4F9; 
  color: #333333; 
}
#mi-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px; 
    height: 20px;
    background-color: white; 
    border-radius: 50%;     
    pointer-events: none;   
    z-index: 9999;         
    transform: translate(-50%, -50%); 
    mix-blend-mode: difference;      
    transition: transform 0.1s ease;  
}

a:hover ~ #mi-cursor, button:hover ~ #mi-cursor {
    transform: translate(-50%, -50%) scale(1.5);
}

a {
  color: #005A9C; 
}
.dark-mode a {
  color: #FFC300; 
}
h1 {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2rem;
  color: #2c3e50; 
}
h3 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #005A9C; 
}
p {
  font-size: 1.8rem;
  line-height: 1.6;
  color: #555; 
}

.energia-span {
  color: #005A9C;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 9%;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.logo {
  font-size: 2.5rem;
  color: #005A9C; 
  display: flex;
  align-items: center;
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease;
  line-height: 1.1;
}
.logo img{
  width: 60px;
  height: 60px;
  margin-right: 10px;
}
.logo:hover {
  transform: scale(1.05);
}

nav a {
  font-size: 1.8rem;
  color: #005A9C; 
  margin-left: 4rem;
  font-weight: 500;
  transition: 0.3s ease;
  border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
  color: #007BFF; 
  border-bottom: 3px solid #007BFF;
}

section {
  min-height: 100vh;
  padding: 10rem 9% 5rem;
}

.home {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6rem;
  flex-wrap: wrap;
}

.home-img {
  flex: 1;
  max-width: 400px;
  text-align: center;
}

.home-img img {
  position: relative;
  width: 400px;
  height: 400px;
  object-fit: cover;
  border-radius: 65% 35% 55% 45% / 40% 50% 50% 60%;
  box-shadow: 0 10px 30px rgba(0, 90, 156, 0.3);
  cursor: pointer;
  transition: 0.3s ease;
}
.home-img img:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 35px rgba(0, 123, 255, 0.5);
}

.home-content {
  flex: 1.5;
  max-width: 80rem;
  text-align: left;
}

.home-content h3 {
  font-size: 3.2rem;
  font-weight: 700;
  color: #333333; 
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 1.2rem 3rem;
  background-color: #005A9C; 
  border-radius: 4rem;
  font-size: 1.6rem;
  color: #FFFFFF; 
  letter-spacing: 0.1rem;
  font-weight: 600;
  border: 2px solid #005A9C;
  transition: 0.3s ease;
  cursor: pointer;
  margin: 2rem 1rem 0 0;
}

.btn:hover {
  transform: scale(1.05);
  background-color: #007BFF; 
  border-color: #007BFF;
  color: #FFFFFF;
  box-shadow: 0 0 25px rgba(0, 123, 255, 0.5); 
}

.typing-text span {
  position: relative;
}

.typing-text span::before {
  content: "Lectura";
  color: #007BFF;
  animation: words 10s infinite;

}

.typing-text span::after {
  content: "";
  position: absolute;
  width: calc(100% + 8px);
  height: 100%;
  border-left: 3px solid #007BFF;
  right: -8;
  animation: cursor 0.6s infinite;


}

@keyframes cursor {
  to {
    border-left: 3px solid #007BFF;
  }
}

@keyframes words {
  0%, 20% { content: "Soy, estudiante"; }
  21%, 40% { content: "Soy, programador"; }
  41%, 60% { content: "Soy, trabajador"; }
  61%, 80% { content: "Soy, entusiasta"; }
  81%, 100% { content: "Soy, innovador"; }
}

.seccion-general {
  text-align: center;
}
.search-container {
  margin: 0 auto 4rem auto;
  max-width: 70rem;
}

#search-bar {
  width: 100%;
  padding: 1.5rem 2rem;
  font-size: 1.8rem;
  border-radius: 4rem;
  border: 2px solid #ccc;
  background: #FFFFFF;
  color: #333;
}
#search-bar:focus {
  border-color: #005A9C;
  box-shadow: 0 0 10px rgba(0, 90, 156, 0.3);
}
.seccion-descripcion {
  font-size: 2rem;
  color: #555;
  margin-bottom: 5rem;
  max-width: 70rem;
  margin-left: auto;
  margin-right: auto;
}

.box-descripcion {
  position: relative;
  border-radius: 40px;
  backdrop-filter: blur(5px);
  color: white;
  margin-bottom: 5rem;
  max-width: 70rem;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  padding: 3rem;
  flex-direction: column; 
  text-align: justify;
  box-shadow: 0 0 25px #005A9C;

}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  text-align: left;
}
.producto-text {
  backdrop-filter: blur(5px);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 25px #005A9C;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  width: 200px;
  flex-direction: column;
  
}
.productos-text {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6rem;
  flex-wrap: wrap;
}
.producto-text:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 25px #005A9C;
}
.producto-card {
  background-color: #FFFFFF; 
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.producto-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 90, 156, 0.2); 
}

.producto-card img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 2rem 2rem 0.5rem 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content p {
  flex-grow: 1;
}

.producto-card .categoria {
  font-size: 1.4rem;
  font-weight: 500;
  color: #5F9EA0; 
  margin-bottom: 1rem;
  flex-grow: 0;
}

.producto-card p {
  font-size: 1.6rem;
  color: #444; 
}

.producto-precio {
  font-size: 2rem;
  font-weight: 600;
  color: #005A9C;
  margin: 1rem 0;
  flex-grow: 0;
}

.btn-comprar {
  width: 100%;        
  text-align: center; 
  margin: 1rem 0 1.5rem 0;
  padding: 1rem 0;     
  font-size: 1.5rem;
  flex-shrink: 0;
}

.btn-anadido {
  background-color: #28a745;
  border-color: #28a745;
  color: #ffffff;
  cursor: not-allowed; 
}
.btn-anadido:hover {
  background-color: #218838; 
  border-color: #1e7e34;
  transform: scale(1);
  box-shadow: none;
}

#mi-lista {
  background-color: #FFFFFF;
  min-height: auto; 
  padding-top: 8rem;
  padding-bottom: 8rem;
}

#lista-libros {
  list-style: none;
  padding: 0;
  max-width: 70rem;
  margin: 3rem auto 0 auto;
  text-align: left;
}

#lista-libros li {
  background-color: #F4F4F9;
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  font-weight: 500;
  color: #333;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lista-item-precio {
  font-weight: 600;
  color: #005A9C;
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-left: 2rem;
}

#lista-vacia {
  background-color: transparent;
  box-shadow: none;
  color: #888;
  text-align: center;
  font-style: italic;
  font-weight: 400;
  display: block;
}

.lista-footer {
  max-width: 70rem;
  margin: 3rem auto 0 auto;
  padding-top: 2rem;
  border-top: 2px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.lista-total {
  font-size: 2.4rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

#lista-total-monto {
  color: #005A9C;
}

.btn-vaciar {
  background-color: #dc3545;
  border-color: #dc3545;
  margin: 0;
}
.btn-vaciar:hover {
  background-color: #c82333;
  border-color: #bd2130;
  box-shadow: 0 0 25px rgba(220, 53, 69, 0.5);
}

.form-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem;
  background-color: #FFFFFF; 
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
}

.form-grupo {
  margin-bottom: 2rem;
  text-align: left;
}

.form-grupo label {
  display: block;
  font-size: 1.6rem;
  font-weight: 500;
  color: #005A9C; 
  margin-bottom: 0.5rem;
}

.form-grupo input,
.form-grupo textarea {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.6rem;
  border-radius: 5px;
  border: 1px solid #ccc; 
  background: #F9F9F9; 
  color: #333;
}

.form-grupo input::placeholder,
.form-grupo textarea::placeholder {
  color: #999;
}

.btn-submit {
  width: 100%;
  margin-top: 1rem;
  background-color: #007BFF; 
  border-color: #007BFF;
  color: #FFFFFF;
}

.btn-submit:hover {
  background-color: #005A9C; 
  border-color: #005A9C;
  box-shadow: 0 0 25px rgba(0, 90, 156, 0.4);
}

#toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 1.5rem 2rem;
  border-radius: 8px;
  font-size: 1.6rem;
  font-weight: 500;
  background-color: #28a745;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

#click-counter {
  font-size: 1.4rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: #007BFF;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  margin-left: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  line-height: 1.3; 
  user-select: none; 
}

#click-count {
  font-weight: 700;
  font-size: 1.6rem;
  padding-right: 4px;
}

.click-animate {
  animation: click-pulse 0.4s ease;
}

@keyframes click-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}


/* 
AQUÍ COMIENZAN LOS ESTILOS DEL MODO OSCURO
*/

#modo-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    position: absolute;
    top: 20px;
    right: 20px;
    color: rgba(0, 90, 156, 1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

#modo-toggle:hover {
    background-color: rgba(0, 90, 156, 0.1); 
}

.theme-icon {
    width: 28px;  
    height: 28px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}


.moon {
    opacity: 0;
    transform: scale(0.5); 
    transform-origin: center;
    transition: all 0.4s ease;
}

.sun {
    opacity: 1;
    transform: scale(1);
    transform-origin: center;
    transition: all 0.4s ease;
}

body.dark-mode #modo-toggle {
    color: rgba(255, 195, 0, 1);
}
body.dark-mode #modo-toggle:hover {
    background-color: rgba(255, 195, 0, 0.1);
}

body.dark-mode .theme-icon {
    transform: rotate(180deg);
}

body.dark-mode .moon {
    opacity: 1;
    transform: scale(1); 
}

body.dark-mode .sun {
    opacity: 0;
    transform: scale(0.5); 
}
.dark-mode .home-img img{
  box-shadow: 0 0 25px #FFC300;
}
.dark-mode .home-img img:hover {
  box-shadow: 0 0 35px #FFC300; 
}

.dark-mode body,
.dark-mode {
  background-color: #333333;
  color: #ffffff;
}
.dark-mode .modo-toggle-btn{
  color: #FFC300;
  border-color: #005A9C;
  background-color: #005A9C;
}


.dark-mode h1 {
  color: #ffffff;
}
.dark-mode h3 {
  color: #FFC300;
}
.dark-mode p {
  color: #ddd;
}

.dark-mode .energia-span {
  color: #FF8C00;
}

.dark-mode header {
  background-color: rgba(51, 51, 51, 0.8);
}

.dark-mode #search-bar {
  background: #555;
  border-color: #777;
  color: #FFFFFF;
}
.dark-mode #search-bar:focus {
  border-color: #FF8C00;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
}

.dark-mode .logo {
  color: #FF8C00;
}
.dark-mode nav a {
  color: #FF8C00;
}
.dark-mode nav a:hover,
.dark-mode nav a.active {
  color: #FFA500;
  border-bottom: 3px solid #FFA500;
}

.dark-mode .btn {
  background-color: #FF8C00;
  color: #333;
  border-color: #FF8C00;
}

.dark-mode .btn:hover {
  background-color: #FFA500;
  border-color: #FFA500;
  color: #000;
  box-shadow: 0 0 25px #FFA500;
}

.dark-mode .home-content h3 {
  color: #ffffff;
}
.dark-mode .typing-text span {
  color: #FF8C00;
}

.dark-mode .typing-text span::after {
  border-left: 3px solid #FF8C00;
}

.dark-mode .typing-text span::before {
  color: #FF8C00;
}

.dark-mode .seccion-descripcion {
  color: #ccc;
}

.dark-mode .producto-card {
  background-color: #444;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .producto-card:hover {
  box-shadow: 0 10px 30px rgba(255, 140, 0, 0.3);
}

.dark-mode .producto-card .categoria {
  color: #FFD700;
}
.dark-mode .producto-card p {
  color: #ddd;
}

.dark-mode .producto-precio {
  color: #FFC300;
}

.dark-mode .form-container {
  background-color: #444;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dark-mode .form-grupo label {
  color: #FF8C00;
}

.dark-mode .form-grupo input,
.dark-mode .form-grupo textarea {
  border: 1px solid #777;
  background: #555;
  color: #ffffff;
}

.dark-mode .form-grupo input::placeholder,
.dark-mode .form-grupo textarea::placeholder {
  color: #aaa;
}

.dark-mode .btn-submit {
  background-color: #FFA500;
  border-color: #FFA500;
  color: #333;
}

.dark-mode .btn-submit:hover {
  background-color: #FFC300;
  border-color: #FFC300;
  box-shadow: 0 0 25px #FFC300;
}

.dark-mode .btn-anadido {
  background-color: #5cb85c;
  border-color: #5cb85c;
  color: #333;
}
.dark-mode .btn-anadido:hover {
  background-color: #4cae4c;
  border-color: #4cae4c;
}

.dark-mode #mi-lista {
  background-color: #2c2c2c;
}
.dark-mode #lista-libros li {
  background-color: #444;
  color: #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.dark-mode .lista-item-precio {
  color: #FFC300;
}
.dark-mode #lista-vacia {
  background-color: transparent;
  color: #777;
  box-shadow: none;
}
.dark-mode .lista-footer {
  border-top: 2px solid #555;
}
.dark-mode .lista-total {
  color: #eee;
}
.dark-mode #lista-total-monto {
  color: #FFC300;
}
.dark-mode .btn-vaciar {
  background-color: #e74c3c;
  border-color: #e74c3c;
  color: #ffffff;
}
.dark-mode .btn-vaciar:hover {
  background-color: #c0392b;
  border-color: #c0392b;
}

.dark-mode .toast {
  background-color: #5cb85c;
  color: #333;
}

.dark-mode #click-counter {
  background-color: #FFC300;
  color: #333;
}
.caja {
  background: white;
  border: 1px solid #ccc;
  padding: 40px;
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.dark-mode .box-descripcion {
  box-shadow: 0 0 25px #FFC300;
}
.box-descripcion:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px #005A9C; 
}
.dark-mode .box-descripcion:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px #FFC300; 
}
.dark-mode .producto-text {
  box-shadow: 0 0 25px #FFC300;
}

.portafolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 40px; 
  justify-items: center; 
  
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.card-container {
  background-color: transparent;
  width: 300px;
  height: 400px;
  perspective: 1000px;
  margin: 0; 
}

@media (max-width: 1000px) {
  .portafolio-grid {
     grid-template-columns: repeat(2, 1fr); 
  }
}

@media (max-width: 650px) {
  .portafolio-grid {
     grid-template-columns: 1fr; 
  }
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s; 
  transform-style: preserve-3d; 
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.card-container:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white; 
  padding: 20px;
  box-sizing: border-box;
}
.card-front {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 2px solid rgba(255,255,255,0.3);
}

.project-title {
  font-size: 1.5rem;
  margin: 10px 0;
  font-weight: bold;
}

.hover-text {
  font-size: 1.5rem;
  margin-top: auto; 
  font-style: italic;
}

.card-back {
  background: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
  transform: rotateY(180deg); 
  justify-content: space-between; 
}

.card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 10px;
}

.card-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.icons a {
  color: white;
  font-size: 1.5rem;
  margin-left: 10px;
  text-decoration: none;
  transition: color 0.3s;
}

.icons a:hover {
  color: #000;
}

.card-body {
  flex-grow: 1;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  line-height: 1.4;
}

.card-footer {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.tech-tag {
  background-color: #FFC300;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  backdrop-filter: blur(5px); 
}


.style-5 .card-front { background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%); }
.style-5 .card-back  { background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%); }


.dark-mode .style-5 .card-front{background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); }
.dark-mode .style-5 .card-back { background: linear-gradient(135deg, #e65c00 0%, #F9D423 100%); }

.skills-wrapper {
  display: flex;
  flex-wrap: wrap; 
  justify-content: center; 
  gap: 15px; 
  max-width: 900px; 
  margin: 0 auto;
}
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px; 
  padding: 8px 16px; 
  border-radius: 20px; 
  
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2); 
  color: black;
  
  font-size: 1.5rem; 
  font-weight: 500;
  cursor: default;
  transition: all 0.3s ease;
  
  border-color: var(--color); 
}

.skill-tag i {
  color: var(--color);
  font-size: 1.1rem;
}

.skill-tag:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1); 
  
  box-shadow: 0 0 15px var(--color); 
  text-shadow: 0 0 5px var(--color); 
}
/* --- SECCIÓN CONTACTO --- */
.contact-section {
  padding: 80px 20px;
  text-align: center;
  color: #007BFF;
}

.contact-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.contact-text {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.8; 
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 30px; 
  flex-wrap: wrap;
}

.social-btn {
  text-decoration: none;
  color: #007BFF; 
  font-size: 3rem; 
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);

  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}


.social-btn.instagram:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: white;
  box-shadow: 0 0 20px rgba(214, 36, 159, 0.7);
  transform: translateY(-5px);
}

.social-btn.discord:hover {
  background-color: #5865F2;
  color: white;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.7);
  transform: translateY(-5px);
}

.social-btn.github:hover {
  background-color: #333;
  color: white;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  transform: translateY(-5px);
}

.social-btn.whatsapp:hover {
  background-color: #25D366;
  color: white;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.7);
  transform: translateY(-5px);
}

#menu-icon {
    font-size: 3.6rem;
    color: #005A9C;
    display: none; 
    cursor: pointer;
    z-index: 1001; 
}

.dark-mode #menu-icon {
    color: #FFC300;
}

@media (max-width: 991px) {
    header {
        padding: 2rem 4%;
    }
    section {
        padding: 10rem 4% 2rem;
    }
    .home {
        gap: 3rem; 
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block; 
    }
    
    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;  
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1000; 
    }

    header nav.active {
        right: 0;
    }
    #modo-toggle{
        position: relative;
        align-items: center;
        left: 5px;
        margin-left: 0;      
        margin-top: 2rem;    
        transform: scale(1.2);
    }
    .typing-text{
        display: none;
    }
    header nav a {
        display: block;
        font-size: 2.4rem;
        margin: 2rem 0; 
        margin-left: 0; 
    }

    .dark-mode header nav {
        background-color: rgba(51, 51, 51, 0.95);
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }

    .home {
        flex-direction: column-reverse; 
        text-align: center;
        padding-top: 12rem; 
    }

    .home-content {
        align-items: center; 
    }
    
    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-img img {
        width: 70vw; 
        height: 70vw; 
        max-width: 350px;
        max-height: 350px;
    }

    h1 {
        font-size: 3.5rem; 
    }

    #mi-cursor {
        display: none;
    }
    body {
        cursor: auto;
    }

    .portafolio-grid {
        grid-template-columns: 1fr; 
    }

    .card-container {
        width: 100%; 
        max-width: 320px; 
    }

    .producto-card img {
        height: 300px; 
    }

    .search-container {
        width: 100%;
        padding: 0 2rem;
    }

    #lista-libros li {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .lista-item-precio {
        margin-left: 0;
        align-self: flex-end;
    }
}