/* ==== RESET Y BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

/* ==== SECCIÓN PORTADA CON HEADER ==== */
.seccion {
  background-color: #fff;
  margin: 40px 20px;
  padding: 50px 30px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.seccion-portada {
  width: 100%;
  height: auto;
  overflow: hidden;
}

.banner-portada {
  position: relative;
  width: 100%;
  height: 1000px;
  max-height: 580px;
  overflow: hidden;
}

.banner-portada img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}
/* === MENÚ HAMBURGUESA === */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
}
/* HEADER DENTRO DE PORTADA */
.grupo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.header-portada {
  position: relative;
  z-index: 2;
  padding: 20px 0;
}
.contenedor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  padding-left: 20px; /* más cerca del borde */
  padding-right: 20px;
}
.logo-subtitulo {
  flex-shrink: 0;
  margin-right: auto; /* fuerza al logo a ir completamente a la izquierda */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo {
  font-size: 1.8rem;
  color: #fff;
  font-weight: bold;
  margin: 0;
}
.subtitulo-portada {
  font-size: 1.20rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.menu {
  flex-grow: 1;
  display: flex;
  justify-content: center;
}
.menu ul {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.espaciador {
  width: 300px;
}
.menu ul li a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  transition: color 0.3s ease;
}

.menu ul li a:hover {
  color: #FF1654;
}
/*===== Sobre Mí ======*/

.sobre-mi {
  background-color: #ffffff;
  text-align: center;
}

.sobre-mi .contenedor {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}
.sobre-mi p {
  font-size: 1.05rem;
  color: #18307C;
  line-height: 2;
  margin-bottom: 25px;
}


/*===== Skills ======*/
.skills {
  background-color: #ffffff;
  padding: 60px 20px;
  text-align: center;
}

.carrusel-skills {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.cinta-skills {
  display: flex;
  animation: moverSkills 30s linear infinite;
  gap: 50px;
}

.skill {
  flex: 0 0 auto;
  text-align: center;
  width: 120px;
  transition: transform 0.3s ease;
}

.skill:hover {
  transform: scale(1.1);
}

.skill img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}


@keyframes moverSkills {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/*===== PROYECTOS ======*/

.contenedor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.proyectos {
  background-color: #ffffff;
}

.grid-proyectos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 30px;
  margin-top: 30px;
  justify-content: center;
}

.card-proyecto {
  background-color: #f2f2f2;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding-bottom: 20px;
}
.card-proyecto h3{
  margin-top: 20px;
}
.card-proyecto:hover {
  transform: scale(1.03);
}

.card-proyecto video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.card-proyecto:hover video {
  filter: grayscale(0);
  transform: scale(1.03);
}

.video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}


.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.contenedor h2 {
  text-align: center;
  margin: 0 auto;
  transition: transform 0.3s ease;
  margin-top: 30px;
  margin-bottom: 20px;
  color: #18307C;
}
.contenedor p {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #18307C;
}

.card-proyecto h3 {
  font-size: 1rem;
  color: #18307C;
  margin-bottom: 20px;
}

.card-proyecto p {
  font-size: 0.70rem;
  font-weight: 600;
  color: #18307C;
}

.botones-proyecto {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.botones-proyecto a {
  background-color: #18307C;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.botones-proyecto a:hover {
  background-color: #FF1654;
}


/*===== SERVICIOS ======*/
.grid-servicios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  justify-items: center;
  margin-top: 40px;
}

.card-servicio {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 25px 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 300px;
  overflow: hidden;
}

.card-servicio:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.imagen-servicio {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
}

.imagen-servicio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.card-servicio:hover .imagen-servicio img {
  transform: scale(1.08);
}

.card-servicio h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #18307C;
}

.card-servicio p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}

/* ===== CONTACTO ===== */
.contacto {
  background-color: #f9f9f9;
  padding: 60px 20px;
  text-align: center;
}

.contacto h2 {
  font-size: 2rem;
  color: #18307C;
  margin-bottom: 20px;
}

.contacto p {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 20px;
}

.contacto a {
  color: #FF1654;
  font-weight: bold;
  text-decoration: none;
}

.contacto a:hover {
  text-decoration: underline;
}

/* ===== ÍCONOS CONTACTO ===== */
.iconos-contacto {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 20px;
}

.iconos-contacto a i {
  font-size: 2rem;
  color: #18307C;
  transition: transform 0.3s ease, color 0.3s ease;
}

.iconos-contacto a:hover i {
  transform: scale(1.2);
  color: #FF1654;
}

/* ===== FOOTER ===== */
.footer-principal {
  background-color: #18307C;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}

.footer-principal p {
  margin: 0;
}
/* === RESPONSIVE === */
@media (max-width: 768px) {
  .contenedor-header {
    flex-direction: column;
    align-items: center;
    padding: 15px;
  }
  .logo-subtitulo {
    align-items: flex-start;
    width: 100%;
    margin-bottom: 10px;
  }
  .logo {
    margin-left: 0;
  }
  .seccion {
    margin: 60px 15px;
  }
  .menu {
    display: none;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
  }

  .menu.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
    margin-top: 30px;
  }
  .sobre-mi .contenedor {
    padding: 20px 15px;
  }
  .sobre-mi p {
    font-size: 1rem;
    line-height: 1.9;
    text-align: justify;
  }
  .cinta-skills {
    gap: 30px;
    padding: 0 10px;
  }
  .cinta-skills {
    animation: moverSkills 20s linear infinite; 
    gap: 30px;
    padding: 0 10px;
  }
  .skill {
    width: 100px;
  }

  .skill img {
    width: 50px;
    height: 50px;
  }
  .grid-proyectos {
    grid-template-columns: 1fr;
  }
  .card-proyecto h3{
    margin-top: 20px;
  }
  .grid-servicios {
    grid-template-columns: 1fr;
  }

  .card-servicio {
    max-width: 100%;
  }
  .contacto {
    padding: 40px 15px;
  }

  .iconos-contacto {
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
  }

  .footer-principal {
    font-size: 0.85rem;
    padding: 15px;
  }
}