:root {
  --primary-color: #333;
  --secondary-color: #f4f4f4;
  --accent-color: #4a90e2;
  --text-color: #333;
  --background-color: #fff;
}

[data-theme="dark"] {
  --primary-color: #f4f4f4;
  --secondary-color: #333;
  --accent-color: #61dafb;
  --text-color: #f4f4f4;
  --background-color: #222;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

header {
  background-color: var(--secondary-color);
  padding: 1rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style-type: none;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-color);
}

/* Estilos para el hero */

.hero-content {
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--accent-color);
  color: var(--background-color);
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: var(--primary-color);
}

section {
  padding: 100px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

section.visible {
  opacity: 1;
}

h1,
h2 {
  color: var(--primary-color);
  padding: 20px;
}

.subtitle-desc {
  font-size: 30px;
}

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1200px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox.active {
  display: block;
}

.lightbox-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
}

#lightbox-img {
  display: block;
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  margin: 2rem;
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

.close {
  color: white;
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 35px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 1001;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  user-select: none;
  -webkit-user-select: none;
  background-color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
  z-index: 1;
}

.prev {
  left: 0;
  border-radius: 0 3px 3px 0;
}

.next {
  right: -65px;
  border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2rem;
}

.sobre-mi-desc {
  max-width: 800px;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  width: 100%;
}

input,
textarea,
button {
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  background-color: var(--background-color);
  color: var(--text-color);
}

button {
  background-color: var(--accent-color);
  color: var(--background-color);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--primary-color);
}

footer {
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-align: center;
  padding: 1rem;
}

footer a {
  color: var(--accent-color);
  text-decoration: none;
}

footer a:hover {
  transition: all 0.3s ease;
  color: rgb(153, 85, 218);
}

.theme-switch-wrapper {
  display: flex;
  align-items: center;
  position: inherit;
  right: 20px;
  top: 20px;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 26px;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Estilos para la sección de testimonios */
#testimonios {
  background-color: var(--secondary-color);
  padding: 100px 20px;
}

.testimonios-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonio {
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 20px;
  margin: 20px;
  width: calc(33.33% - 40px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.testimonio p {
  font-style: italic;
  margin-bottom: 10px;
}

.testimonio h4 {
  text-align: right;
  color: var(--accent-color);
}

/* Estilos para el footer y redes sociales */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.social-icons a {
  color: var(--text-color);
  font-size: 1.5rem;
  margin-left: 15px;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: var(--accent-color);
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: row;
    align-items: center;
  }

  .subtitle-desc {
    text-align: center;
  }

  .theme-switch-wrapper {
    position: static;
    justify-content: center;
    margin-top: 1rem;
  }

  .testimonios-container {
    flex-direction: column;
  }

  .testimonio {
    width: calc(100% - 40px);
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .social-icons {
    margin-top: 1rem;
  }

  .social-icons a {
    margin: 0 10px;
  }
}

@media only screen and (max-width: 700px) {
  .prev,
  .next,
  #caption {
    font-size: 16px;
  }
  #lightbox-img {
    display: block;
    width: 100%;
    max-height: 100vh;
    object-fit: contain;
    margin: auto;
  }
  .prev {
    left: 0;
    border-radius: 0 3px 3px 0;
  }

  .next {
    right: -0;
    border-radius: 3px 0 0 3px;
  }
}
