/* Paleta de colores */
:root {
  --dark-green: #002500ff;
  --indian-red: #cc6d6bff;
  --paynes-gray: #4f6272ff;
  --rosy-brown: #c99da3ff;
  --sage: #bdc4a7ff;
  --hover-highlight: #c99da3ff;
}

/* Estilos generales */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
   background-image: url('imagenes/fondo.png');
  background-size: cover;        /* Ajusta la imagen al tamaño del viewport */
  background-position: center;   /* Centra la imagen */
  background-repeat: no-repeat; 
  min-height: 100vh;
  font-size: 1.8rem;
  display: flex;
  flex-direction: column;
  font-family: "Poiret One", sans-serif;
}

/* Barra superior */
.barra-superior {
  background-color: var(--indian-red);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.barra-superior .redes {
  display: flex;
  align-items: center;
  gap: 10px;
}

.barra-superior .nombre {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--sage);
}

.barra-superior .redes a {
  color: var(--sage);
  margin-left: 15px;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.barra-superior .redes a:hover {
  color: var(--rosy-brown);
}

.barra-superior .redes a:last-child {
  font-size: 1.1rem;
  margin-left: 15px;
  color: var(--sage);
}

.barra-superior .redes a:last-child:hover {
  color: var(--rosy-brown);
}

/* Contenedor general */
.contenedor {
  display: flex;
  flex: 1;
  margin-top: 60px;
  margin-left: 20px;
  margin-right: 20px;
}

/* Menú lateral */
nav {
  width: 200px;
  background-color: var(--paynes-gray);
  color: white;
  padding: 20px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

nav h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
}

nav ul {
  list-style: none;
}

nav ul li {
  margin: 15px 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
  transition: color 0.3s, background-color 0.3s;
  padding: 5px 10px;
  display: block;
  border-radius: 5px;
}

nav ul li a:hover {
  color: var(--dark-green);
  background-color: var(--hover-highlight);
}

/* Contenido principal */
main {
  flex: 1;
  padding: 20px;
}

.banner {
  width: 100%;
  height: 500px;
  background-image: url('Imagenes/banner.png');
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: relative;
}

.banner::after {
  content: "Bienvenid@ a mi portafolio";
  position: absolute;
  bottom: 20px;
  left: 30px;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

/* Botones para Ilustración / Diseño de personajes */
.botones-trabajos {
  text-align: center;
  margin: 30px 0;
}

.botones-trabajos .boton {
  display: inline-block;
  background-color: #6c63ff;
  color: white;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 25px;
  text-decoration: none;
  font-family: 'Poiret One', cursive;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.botones-trabajos .boton:hover {
  background-color: #5a52d6;
  transform: scale(1.05);
}

/* Trabajos / Galerías */
.galeria-trabajos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding-top: 60px; /* Para que no se tape debajo de la barra fija */
  padding: 20px;
}

.trabajo {
  width: 300px;
  text-align: center;
  position: relative;
}

.trabajo img,
.trabajo video {
  width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 15px;
  margin: 10px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.trabajo img:hover,
.trabajo video:hover {
  transform: scale(1.05);
}

.trabajo .video {
  display: none;
}

/* Secciones de Ilustración / Diseño */
.ilustracion {
  background-color: var(--sage);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ilustracion h2 {
  font-size: 2rem;
  color: var(--dark-green);
  margin-bottom: 15px;
}

/* Sobre mí */
.sobre-mi {
  background-color: var(--sage);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: var(--dark-green);
  margin: 20px;
  border: 2px solid var(--paynes-gray);
}

.sobre-mi h2 {
  margin-bottom: 10px;
  color: var(--dark-green);
}

/* Footer */
footer {
  background-color: var(--paynes-gray);
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 0.9rem;
  margin-top: auto;
}

/* Fuentes especiales */
.poiret-one-regular {
  font-family: "Poiret One", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.parraf-style {
  font-family: "Macondo", cursive;
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--dark-green);
}

.macondo-regular {
  font-family: "Macondo", cursive;
  font-weight: 400;
  font-style: normal;
}

/* Botón hamburguesa */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  margin-bottom: 10px;
}

/* Mostrar botón y ocultar menú en móvil */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background-color: var(--paynes-gray);
    width: 100%;
  }

  nav ul.show {
    display: flex;
  }

  .barra-superior {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .barra-superior .redes {
    margin-top: 10px;
  }
}

/* Estilos para el swiper dentro de las tarjetas */
/* Contenedor del swiper para limitar su tamaño */
.contenedor-swiper {
  width: 90%; /* Limitar el ancho al 90% */
  max-width: 800px; /* Definir un tamaño máximo */
  margin: 0 auto; /* Centrar el contenedor */
}

.swiper {
  width: 100%;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, var(--dark-green), var(--indian-red), var(--paynes-gray));
}

.swiper-slide {
  display: flex;
  justify-content: center; /* Centra las imágenes en el contenedor */
  align-items: center; /* Alinea las imágenes verticalmente */
  height: auto;
}

.swiper-slide img,
.swiper-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 400px;
}

.galeria-trabajos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.trabajo {
  background-color: white;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 10px;
  text-align: center;
}

.trabajo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.trabajo:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.trabajo:hover img {
  transform: scale(1.05);
}

#cv {
  text-align: center;
  margin: 50px 0;
}

.cv-container {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  border-radius: 10px;
  overflow: hidden;
}

/* Estilo para el PDF cuando aparece */
.pdf-container {
  display: none; /* Lo ocultamos al principio */
  opacity: 0;
  transition: opacity 1s ease-in-out; /* Duración de la animación */
}

.pdf-container.show {
  display: block;
  opacity: 1;
}

#cv iframe {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

#cv iframe.show {
  opacity: 1;
}

  .swiper {
    width: 100%;
    height: 400px;
  }

  .swiper-slide {
    background-color: #000; /* o #fff si prefieres fondo blanco */
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Responsive: ajusta altura en pantallas pequeñas */
  @media (max-width: 768px) {
    .swiper {
      height: 250px;
    }
  }

  @media (max-width: 480px) {
    .swiper {
      height: 200px;
    }
  }

  .trabajo-amplio {
  width: 100%;
  max-width: 1000px; /* O el tamaño que quieras */
  margin: 0 auto;
  padding: 20px;
}

.trabajo-amplio .imagen,
.trabajo-amplio .video {
  width: 100%;
  height: 500px;
  border-radius: 10px;
}

section.trabajos img {
  width: 250px;         /* o 100%, si prefieres que se adapten al contenedor */
  height: auto;
  margin: 10px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

section.trabajos {
  text-align: center;
}